[nvim] Add filetypes settings

This commit is contained in:
aloslider
2026-04-21 18:28:48 +03:00
parent 6c16b57f3b
commit d3926ee434
4 changed files with 45 additions and 49 deletions
@@ -1,18 +0,0 @@
#!/bin/sh
{{ if eq .chezmoi.osRelease.id "nixos" }}
exit 0
{{ end }}
set -euo pipefail
echo "Installing LSPs for Neovim..."
npm install -g --prefix ~/.local \
@vtsls/language-server \
@vue/language-server \
vscode-langservers-extracted
dotnet tool install -g roslyn-language-server --prerelease
dotnet tool install -g csharpier
echo "Done"
+2 -1
View File
@@ -1,6 +1,7 @@
require("config.autocmds")
require("config.options")
require("config.filetypes")
require("config.keymaps")
require("config.options")
require("config.lazy")
require("config.theme") -- ignored by git
@@ -0,0 +1,12 @@
vim.filetype.add({
pattern = {
[".*%.tmpl"] = function(path, _)
local ext = path:match("%.(%w+)%.tmpl$")
if ext then
return ext
end
return "template"
end,
},
})
@@ -1,32 +1,33 @@
return {
{
"nvim-treesitter/nvim-treesitter",
lazy = false,
build = ":TSUpdate",
config = function()
require("nvim-treesitter").install({
"c",
"caddy",
"c_sharp",
"css",
"csv",
"html",
"javascript",
"json",
"nix",
"sql",
"typescript",
"vimdoc",
"zsh",
})
end,
},
{
"nvim-treesitter/nvim-treesitter-textobjects",
branch = "main",
init = function()
vim.g.no_plugin_maps = true
end,
opts = {}
}
{
"nvim-treesitter/nvim-treesitter",
lazy = false,
build = ":TSUpdate",
config = function()
require("nvim-treesitter").install({
"bash",
"c",
"caddy",
"c_sharp",
"css",
"csv",
"html",
"javascript",
"json",
"nix",
"sql",
"typescript",
"vimdoc",
"zsh",
})
end,
},
{
"nvim-treesitter/nvim-treesitter-textobjects",
branch = "main",
init = function()
vim.g.no_plugin_maps = true
end,
opts = {}
}
}