mirror of
https://github.com/zoriya/flake.git
synced 2026-05-07 05:37:37 +00:00
Configure treesitter
This commit is contained in:
22
nvim/lua/plugins/treesitter.lua
Normal file
22
nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter",
|
||||
lazy = false,
|
||||
load = function() end,
|
||||
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
|
||||
opts = {
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
}
|
||||
},
|
||||
after = function(plug)
|
||||
require("nvim-treesitter.configs").setup(plug.opts)
|
||||
vim.wo.foldmethod = 'expr'
|
||||
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
end
|
||||
},
|
||||
}
|
||||
@@ -18,6 +18,7 @@ vim.opt.splitbelow = true
|
||||
vim.opt.inccommand = 'split'
|
||||
|
||||
vim.opt.wrap = false
|
||||
vim.opt.foldlevelstart = 99
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
|
||||
Reference in New Issue
Block a user