mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-12-18 04:47:22 +00:00
Breakup Neovim config into Lua modules
This commit is contained in:
parent
3179a5b48d
commit
1517f56c86
11 changed files with 662 additions and 584 deletions
60
.config/nvim/lua/plugins/treesitter.lua
Normal file
60
.config/nvim/lua/plugins/treesitter.lua
Normal 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,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue