nvim/lua/cosmic/plugins/treesitter/init.lua
2021-12-21 11:04:27 -08:00

39 lines
718 B
Lua

local config = require('cosmic.config')
local utils = require('cosmic.utils')
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(utils.merge(defaults, config.treesitter or {}))