nvim-tree and treesitter config to packer

This commit is contained in:
2022-03-16 19:53:08 +01:00
parent c0aa5e03d0
commit cf9b76d0e0
4 changed files with 69 additions and 69 deletions

37
lua/setup/treesitter.lua Normal file
View File

@@ -0,0 +1,37 @@
require('nvim-treesitter.configs').setup({
ensure_installed = 'maintained',
highlight = {
enable = true
},
rainbow = {
enable = true,
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int
-- colors = {}, -- table of hex strings
-- termcolors = {} -- table of colour name strings
},
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
lsp_interop = {
enable = true,
border = 'none',
peek_definition_code = {
["<leader>df"] = "@function.outer",
["<leader>dF"] = "@class.outer",
},
},
},
})