Migrate nvim config
This commit is contained in:
75
modules/editors/neovim/lua/config/treesitter.lua
Normal file
75
modules/editors/neovim/lua/config/treesitter.lua
Normal file
@ -0,0 +1,75 @@
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"glsl",
|
||||
"graphql",
|
||||
"haskell",
|
||||
"http",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"json5",
|
||||
"latex",
|
||||
"lua",
|
||||
"markdown",
|
||||
"ninja",
|
||||
"nix",
|
||||
"org",
|
||||
"perl",
|
||||
"php",
|
||||
"pug",
|
||||
"python",
|
||||
"regex",
|
||||
"rst",
|
||||
"ruby",
|
||||
"rust",
|
||||
"scala",
|
||||
"scss",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
"zig"
|
||||
},
|
||||
ignore_install = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
},
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
-- Extensions
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
matchup = { enable = true },
|
||||
rainbow = { enable = true },
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
|
Reference in New Issue
Block a user