fix treesitter stuff

This commit is contained in:
wires 2025-03-05 09:52:05 -05:00
parent 9fc3847a6e
commit 0c0251a687
Signed by: wires
SSH key fingerprint: SHA256:9GtP+M3O2IivPDlw1UY872UPUuJH2gI0yG6ExBxaaiM

View file

@ -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,
} }