add existence checks for neovim

This commit is contained in:
Daylin Morgan 2024-06-13 13:22:15 -05:00
parent d3acc18eea
commit 4894ea6588
Signed by: daylin
GPG key ID: 950D13E9719334AD
10 changed files with 57 additions and 34 deletions

View file

@ -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"
command = "set conceallevel=0",
})

View file

@ -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" },

View file

@ -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",

View file

@ -17,6 +17,5 @@ return {
config = function()
vim.cmd([[do FileType]])
end,
}
},
}

View file

@ -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,
}
}
}
}
},
},
},
},
}

View file

@ -1,3 +1,7 @@
if not vim.fn.executable("nix") then
return
end
return {
require("util").setup_lang({ treesitter = { "nix" } }),
{

View file

@ -1,3 +1,7 @@
if not vim.fn.executable("nu") then
return
end
return {
"nvim-treesitter/nvim-treesitter",
dependencies = {

View file

@ -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 = {

View file

@ -1,3 +1,7 @@
if not vim.fn.executable("rust") then
return
end
-- adapted from https://www.lazyvim.org/extras/lang/rust
return {
{

View file

@ -1,3 +1,7 @@
if not vim.fn.executable("zig") then
return
end
-- adapted from https://www.lazyvim.org/extras/lang/rust
return {
{