feat(treesitter): replace nvim-treesitter with pack-managed parsers
This commit is contained in:
@@ -21,6 +21,7 @@ for _, file in ipairs(files) do
|
||||
end
|
||||
end
|
||||
|
||||
local ts = require("ts")
|
||||
require("pack").setup({
|
||||
"https://github.com/navarasu/onedark.nvim",
|
||||
"https://github.com/nvim-lua/plenary.nvim",
|
||||
@@ -40,7 +41,6 @@ require("pack").setup({
|
||||
"https://github.com/owallb/mason-auto-install.nvim",
|
||||
"https://github.com/mfussenegger/nvim-dap",
|
||||
"https://github.com/igorlfs/nvim-dap-view",
|
||||
"https://github.com/nvim-treesitter/nvim-treesitter",
|
||||
"https://github.com/numToStr/Comment.nvim",
|
||||
"https://github.com/j-hui/fidget.nvim",
|
||||
"https://github.com/rbong/vim-flog",
|
||||
@@ -50,4 +50,133 @@ require("pack").setup({
|
||||
"https://github.com/nvim-tree/nvim-tree.lua",
|
||||
"https://github.com/stevearc/oil.nvim",
|
||||
"https://github.com/hedyhli/outline.nvim",
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-bash",
|
||||
ts_parser = "bash",
|
||||
},
|
||||
-- required by cpp
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-c",
|
||||
ts_parser = "c",
|
||||
},
|
||||
{
|
||||
"https://github.com/stsewd/tree-sitter-comment",
|
||||
ts_parser = "comment",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-cpp",
|
||||
ts_parser = "cpp",
|
||||
},
|
||||
-- required by scss
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-css",
|
||||
ts_parser = "css",
|
||||
},
|
||||
{
|
||||
"https://github.com/gbprod/tree-sitter-gitcommit",
|
||||
ts_parser = "gitcommit",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-go",
|
||||
ts_parser = "go",
|
||||
},
|
||||
{
|
||||
"https://github.com/ngalaiko/tree-sitter-go-template",
|
||||
ts_parser = "gotmpl",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-html",
|
||||
ts_parser = "html",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-json",
|
||||
ts_parser = "json",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter-grammars/tree-sitter-luadoc",
|
||||
ts_parser = "luadoc",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-php",
|
||||
ts_parser = {
|
||||
{ lang = "php", location = "php" },
|
||||
{ lang = "php_only", location = "php_only" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-python",
|
||||
ts_parser = "python",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-rust",
|
||||
ts_parser = "rust",
|
||||
},
|
||||
{
|
||||
"https://github.com/serenadeai/tree-sitter-scss",
|
||||
ts_parser = "scss",
|
||||
},
|
||||
{
|
||||
"https://github.com/derekstride/tree-sitter-sql",
|
||||
version = "gh-pages",
|
||||
ts_parser = "sql",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter-grammars/tree-sitter-svelte",
|
||||
ts_parser = "svelte",
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter/tree-sitter-typescript",
|
||||
ts_parser = {
|
||||
{ lang = "typescript", location = "typescript" },
|
||||
{ lang = "tsx", location = "tsx" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter-grammars/tree-sitter-xml",
|
||||
ts_parser = {
|
||||
{ lang = "xml", location = "xml" },
|
||||
{ lang = "dtd", location = "dtd" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"https://github.com/tree-sitter-grammars/tree-sitter-yaml",
|
||||
ts_parser = "yaml",
|
||||
},
|
||||
{
|
||||
"https://github.com/georgeharker/tree-sitter-zsh",
|
||||
ts_parser = "zsh",
|
||||
},
|
||||
})
|
||||
|
||||
ts.setup({
|
||||
languages = {
|
||||
"bash",
|
||||
"c", -- builtin
|
||||
"comment",
|
||||
"cpp",
|
||||
"css",
|
||||
"gitcommit",
|
||||
"go",
|
||||
"gotmpl",
|
||||
"html",
|
||||
"json",
|
||||
"lua", -- builtin
|
||||
"luadoc",
|
||||
"markdown", -- builtin
|
||||
"markdown_inline", -- builtin
|
||||
"php",
|
||||
"python",
|
||||
"query", -- builtin
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim", -- builtin
|
||||
"vimdoc", -- builtin
|
||||
"xml",
|
||||
"yaml",
|
||||
"zsh",
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user