From d20ec7a2e7ac10038fad0bb59a965f5367cb8642 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Wed, 28 May 2025 11:01:58 +0200 Subject: [PATCH] [Treesitter] Enable folding, add parsers --- nvim/lua/options.lua | 4 ++++ nvim/lua/plugins/lsp/treesitter.lua | 3 +++ 2 files changed, 7 insertions(+) diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua index 8b65e1f..50319f2 100755 --- a/nvim/lua/options.lua +++ b/nvim/lua/options.lua @@ -15,6 +15,10 @@ vim.opt.expandtab = true vim.opt.breakindent = true vim.opt.linebreak = true +-- folding +vim.wo.foldmethod = 'expr' +vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' + -- line numbers vim.wo.number = true vim.wo.cursorline = true diff --git a/nvim/lua/plugins/lsp/treesitter.lua b/nvim/lua/plugins/lsp/treesitter.lua index a9acba8..42272fe 100755 --- a/nvim/lua/plugins/lsp/treesitter.lua +++ b/nvim/lua/plugins/lsp/treesitter.lua @@ -19,11 +19,13 @@ return { -- "latex", "lua", "markdown", + "meson", "nginx", "php", "python", "rasi", "requirements", + "robots", "ruby", "rust", "scss", @@ -37,6 +39,7 @@ return { "vue", "xml", "yaml", + "zathurarc" }, sync_install = false,