added cpp, rust, go, php, ruby to the language list

This commit is contained in:
n 2024-10-27 07:48:17 +00:00
parent 12aa936655
commit 782f37021e

View File

@ -1,14 +1,11 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
return { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", config = function()
require("nvim-treesitter.configs").setup({
-- A list of parser names, or "all"
ensure_installed = {
"vimdoc", "javascript", "typescript", "vue", "lua", "yaml",
"jsdoc", "bash", "powershell", "c_sharp", "json", "sql",
"vim", "html", "css", "scss", "jsonc", "python", "http",
"xml"
"xml", "cpp", "rust", "go", "php", "ruby",
},
-- Install parsers synchronously (only applied to `ensure_installed`)
@ -35,14 +32,10 @@ return {
})
local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()
treesitter_parser_config.templ = {
install_info = {
treesitter_parser_config.templ = { install_info = {
url = "https://github.com/vrischmann/tree-sitter-templ.git",
files = {"src/parser.c", "src/scanner.c"},
branch = "master",
},
}
files = {"src/parser.c", "src/scanner.c"}, branch = "master",
} }
vim.treesitter.language.register("templ", "templ")
end
}
end }