nvim/lua/cosmic/plugins/treesitter/init.lua

38 lines
697 B
Lua

local config = require('cosmic.config')
local defaults = {
ensure_installed = {
'css',
'html',
'javascript',
'jsdoc',
'json',
'lua',
'markdown',
'php',
'python',
'scss',
'tsx',
'typescript',
},
highlight = {
enable = true,
use_languagetree = true,
},
indent = {
enable = true,
},
autotag = {
enable = true,
},
context_commentstring = {
enable = true,
enable_autocmd = false,
},
refactor = {
highlight_definitions = { enable = true },
highlight_current_scope = { enable = false },
},
}
require('nvim-treesitter.configs').setup(vim.tbl_deep_extend('force', defaults, config.treesitter or {}))