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 u = require('utils')
local defaults = {
local config = {
ensure_installed = {
'astro',
'css',
'go',
'html',
'javascript',
'jsdoc',
@ -17,7 +12,7 @@ local defaults = {
'python',
'regex',
'styled',
'scss',
'svelte',
'tsx',
'typescript',
'yaml',
@ -32,10 +27,6 @@ local defaults = {
autotag = {
enable = true,
},
context_commentstring = {
enable = true,
enable_autocmd = false,
},
refactor = {
highlight_definitions = { enable = true },
highlight_current_scope = { enable = false },
@ -52,7 +43,9 @@ return {
event = 'BufEnter',
build = ':TSUpdate',
config = function()
require('nvim-treesitter.configs').setup(u.merge(defaults, config.plugins.treesitter or {}))
end,
enabled = not vim.tbl_contains(config.disable_builtin_plugins, 'treesitter'),
require('nvim-treesitter.configs').setup(config)
require('ts_context_commentstring').setup {
enable_autocmd = false,
}
end,
}