fix treesitter stuff
This commit is contained in:
parent
9fc3847a6e
commit
0c0251a687
1 changed files with 6 additions and 13 deletions
|
@ -1,11 +1,6 @@
|
||||||
local config = require('config')
|
local config = {
|
||||||
local u = require('utils')
|
|
||||||
|
|
||||||
local defaults = {
|
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'astro',
|
|
||||||
'css',
|
'css',
|
||||||
'go',
|
|
||||||
'html',
|
'html',
|
||||||
'javascript',
|
'javascript',
|
||||||
'jsdoc',
|
'jsdoc',
|
||||||
|
@ -17,7 +12,7 @@ local defaults = {
|
||||||
'python',
|
'python',
|
||||||
'regex',
|
'regex',
|
||||||
'styled',
|
'styled',
|
||||||
'scss',
|
'svelte',
|
||||||
'tsx',
|
'tsx',
|
||||||
'typescript',
|
'typescript',
|
||||||
'yaml',
|
'yaml',
|
||||||
|
@ -32,10 +27,6 @@ local defaults = {
|
||||||
autotag = {
|
autotag = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
context_commentstring = {
|
|
||||||
enable = true,
|
|
||||||
enable_autocmd = false,
|
|
||||||
},
|
|
||||||
refactor = {
|
refactor = {
|
||||||
highlight_definitions = { enable = true },
|
highlight_definitions = { enable = true },
|
||||||
highlight_current_scope = { enable = false },
|
highlight_current_scope = { enable = false },
|
||||||
|
@ -52,7 +43,9 @@ return {
|
||||||
event = 'BufEnter',
|
event = 'BufEnter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
config = function()
|
config = function()
|
||||||
require('nvim-treesitter.configs').setup(u.merge(defaults, config.plugins.treesitter or {}))
|
require('nvim-treesitter.configs').setup(config)
|
||||||
end,
|
require('ts_context_commentstring').setup {
|
||||||
enabled = not vim.tbl_contains(config.disable_builtin_plugins, 'treesitter'),
|
enable_autocmd = false,
|
||||||
|
}
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue