add existence checks for neovim
This commit is contained in:
parent
d3acc18eea
commit
4894ea6588
10 changed files with 57 additions and 34 deletions
|
@ -6,8 +6,7 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
|||
command = "set syntax=lua",
|
||||
})
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.md"},
|
||||
command = "set conceallevel=0"
|
||||
pattern = { "*.md" },
|
||||
command = "set conceallevel=0",
|
||||
})
|
||||
|
|
|
@ -10,7 +10,6 @@ vim.opt.timeoutlen = 200
|
|||
|
||||
vim.g.autoformat = false
|
||||
|
||||
|
||||
-- make .roc files have the correct filetype
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.roc" },
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
-- adapted from https://www.lazyvim.org/extras/lang/go
|
||||
if not vim.fn.executable("go") then
|
||||
return
|
||||
end
|
||||
|
||||
-- adapted from https://www.lazyvim.org/extras/lang/go
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
return {
|
||||
require("util").setup_lang({treesitter = {"markdown", "markdown_inline"}}),
|
||||
require("util").setup_lang({ treesitter = { "markdown", "markdown_inline" } }),
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>cp",
|
||||
ft = "markdown",
|
||||
"<cmd>MarkdownPreviewToggle<cr>",
|
||||
desc = "Markdown Preview",
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>cp",
|
||||
ft = "markdown",
|
||||
"<cmd>MarkdownPreviewToggle<cr>",
|
||||
desc = "Markdown Preview",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.cmd([[do FileType]])
|
||||
end,
|
||||
},
|
||||
config = function()
|
||||
vim.cmd([[do FileType]])
|
||||
end,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if not vim.fn.executable("nim") then
|
||||
return
|
||||
end
|
||||
|
||||
return {
|
||||
require("util").setup_lang({ treesitter = { "nim", "nim_format_string" } }),
|
||||
{
|
||||
|
@ -6,8 +10,8 @@ return {
|
|||
servers = {
|
||||
nim_langserver = {
|
||||
mason = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if not vim.fn.executable("nix") then
|
||||
return
|
||||
end
|
||||
|
||||
return {
|
||||
require("util").setup_lang({ treesitter = { "nix" } }),
|
||||
{
|
||||
|
@ -8,7 +12,7 @@ return {
|
|||
mason = false,
|
||||
},
|
||||
-- nil_ls = {
|
||||
-- mason = false,
|
||||
-- mason = false,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
if not vim.fn.executable("nu") then
|
||||
return
|
||||
end
|
||||
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
{ "nushell/tree-sitter-nu" },
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
{ "nushell/tree-sitter-nu" },
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if not vim.fn.executable("roc") then
|
||||
return
|
||||
end
|
||||
|
||||
-- make .roc files have the correct filetype
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.roc" },
|
||||
|
@ -15,8 +19,7 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
|||
-- }
|
||||
|
||||
return {
|
||||
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "roc" } }
|
||||
},
|
||||
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "roc" } } },
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if not vim.fn.executable("rust") then
|
||||
return
|
||||
end
|
||||
|
||||
-- adapted from https://www.lazyvim.org/extras/lang/rust
|
||||
return {
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if not vim.fn.executable("zig") then
|
||||
return
|
||||
end
|
||||
|
||||
-- adapted from https://www.lazyvim.org/extras/lang/rust
|
||||
return {
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue