nvim/lua/plugins/tresitter.lua

48 lines
1.1 KiB
Lua
Raw Normal View History

2022-12-31 17:43:31 +01:00
local M = {
'nvim-treesitter/nvim-treesitter',
-- lazy = false,
2023-04-08 23:47:10 +02:00
-- dependencies = { 'nvim-treesitter/playground' },
-- event = { 'BufReadPost', 'BufNewFile' },
-- event = 'VeryLazy'
2022-12-31 17:43:31 +01:00
}
function M.config()
local configs = require 'nvim-treesitter.configs'
configs.setup {
2023-04-08 23:47:10 +02:00
ensure_installed = {
'bash',
'c',
'cpp',
'go',
'json',
'lua',
'python',
'rust',
'markdown',
'markdown_inline',
'regex',
'vim',
},
2022-12-31 17:43:31 +01:00
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' },
},
2023-01-01 17:04:23 +01:00
-- context_commentstring = { enable = true, config = { css = '// %s' } },
2022-12-31 17:43:31 +01:00
-- indent = {enable = true, disable = {"python", "html", "javascript"}},
-- TODO seems to be broken
2023-03-21 07:18:45 +01:00
indent = { enable = true, disable = { 'python', 'css' } },
2023-01-01 17:04:23 +01:00
-- autotag = { enable = true },
-- autopairs = {
-- enable = true,
-- },
2022-12-31 17:43:31 +01:00
}
end
return M