Sanchayan Maity
384eed0b5c
We were getting errors on trying to open vim help files. As per nvim-treesitter, parsers for C, lua, query, vim & vimdoc should always be installed.
21 lines
896 B
Lua
21 lines
896 B
Lua
local ts_langs = { "bash", "c", "cpp", "diff", "fennel", "fish", "go", "haskell", "html", "java", "javascript", "jsdoc", "json", "lua", "markdown", "nix", "python", "query", "racket", "rust", "scheme", "toml", "tsx", "typescript", "verilog", "vim", "vimdoc" }
|
|
|
|
require'nvim-treesitter.install'.compilers = { "gcc" }
|
|
require'nvim-treesitter.configs'.setup {
|
|
ensure_installed = ts_langs,
|
|
highlight = {
|
|
enable = true,
|
|
additional_vim_regex_highlighting = false,
|
|
},
|
|
query_linter = {
|
|
enable = true,
|
|
use_virtual_text = true,
|
|
lint_events = { "BufWrite", "CursorHold" },
|
|
},
|
|
matchup = {
|
|
enable = true,
|
|
},
|
|
}
|
|
|
|
vim.keymap.set('o', '<Leader>m', ':<C-U>lua require(\'tsht\').nodes()<CR>', { noremap=false, unique=true, silent=true })
|
|
vim.keymap.set('x', '<Leader>m', ':lua require(\'tsht\').nodes()<CR>' , { noremap=true , unique=true, silent=true })
|