Breakup Neovim config into Lua modules

This commit is contained in:
mitchell 2025-05-11 18:49:32 -04:00
parent 3179a5b48d
commit 1517f56c86
11 changed files with 662 additions and 584 deletions

View file

@ -0,0 +1,60 @@
-- lua/plugins/treesitter.lua
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
opts = {
ensure_installed = {
"c",
"cpp",
"lua",
"vim",
"regex",
"bash",
"fish",
"typescript",
"javascript",
"tsx",
"go",
"elixir",
"vue",
"groovy",
"java",
"objc",
"swift",
"hcl",
"terraform",
"yaml",
"json",
"markdown",
"markdown_inline",
},
auto_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
indent = {
enable = true,
},
},
init = function()
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldenable = false
end,
config = function(plugin, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
}