nvim/lua/plugins/tresitter.lua
2023-04-08 23:47:10 +02:00

48 lines
1.1 KiB
Lua

local M = {
'nvim-treesitter/nvim-treesitter',
-- lazy = false,
-- dependencies = { 'nvim-treesitter/playground' },
-- event = { 'BufReadPost', 'BufNewFile' },
-- event = 'VeryLazy'
}
function M.config()
local configs = require 'nvim-treesitter.configs'
configs.setup {
ensure_installed = {
'bash',
'c',
'cpp',
'go',
'json',
'lua',
'python',
'rust',
'markdown',
'markdown_inline',
'regex',
'vim',
},
ignore_install = { 'haskell' },
-- matchup = {
-- enable = true -- mandatory, false will disable the whole extension
-- -- disable = { "c", "ruby" }, -- optional, list of language that will be disabled
-- },
highlight = {
enable = true, -- false will disable the whole extension
disable = { 'html' },
},
-- context_commentstring = { enable = true, config = { css = '// %s' } },
-- indent = {enable = true, disable = {"python", "html", "javascript"}},
-- TODO seems to be broken
indent = { enable = true, disable = { 'python', 'css' } },
-- autotag = { enable = true },
-- autopairs = {
-- enable = true,
-- },
}
end
return M