Only one treesitter config
This commit is contained in:
parent
6689c9b523
commit
464644246c
67
init.lua
67
init.lua
@ -28,7 +28,38 @@ require('nvim-treesitter.configs').setup({
|
|||||||
ensure_installed = 'maintained',
|
ensure_installed = 'maintained',
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true
|
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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
-------------------- GITSIGNS ------------------------------
|
-------------------- GITSIGNS ------------------------------
|
||||||
require('gitsigns').setup({
|
require('gitsigns').setup({
|
||||||
@ -104,40 +135,6 @@ require("project_nvim").setup {
|
|||||||
}
|
}
|
||||||
require('telescope').load_extension('projects')
|
require('telescope').load_extension('projects')
|
||||||
utils.map('n', '<space>p', '<cmd>Telescope projects<cr>')
|
utils.map('n', '<space>p', '<cmd>Telescope projects<cr>')
|
||||||
-------------------- TS-RAINBOW ----------------------------
|
|
||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
-------------------- LUASNIP -------------------------------
|
-------------------- LUASNIP -------------------------------
|
||||||
require("luasnip.loaders.from_vscode").load()
|
require("luasnip.loaders.from_vscode").load()
|
||||||
-------------------- AUTOPAIRS -----------------------------
|
-------------------- AUTOPAIRS -----------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user