1
0
Fork 0
numbers/nvim/plugin/trees.lua

46 lines
1.2 KiB
Lua

vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics,
{
underline = true,
virtual_text = {
spacing = 5,
severity_limit = 'Hint',
},
update_in_insert = true,
}
)
require'nvim-treesitter.configs'.setup {
ensure_installed = { "bash", "css", "go", "gomod", "html", "json", "json5", "jsonc", "lua", "scss", "toml", "vim", "yaml" },
highlight = {
enable = true,
use_languagetree = true,
additional_vim_regex_highlighting = false,
},
indent = { enable = true, },
incremental_selection = { enable = true },
query_linter = {
enable = true,
use_virtual_text = true,
lint_events = { "BufWrite", "CursorHold" }
},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
},
},
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
},
autopairs = { enable = true },
context_commentstring = { enable = true },
}
}