diff --git a/dotfiles/.config/nvim/after/ftplugin/typescript.lua b/dotfiles/.config/nvim/after/ftplugin/typescript.lua new file mode 100644 index 0000000..6520502 --- /dev/null +++ b/dotfiles/.config/nvim/after/ftplugin/typescript.lua @@ -0,0 +1,6 @@ +-- Folding configurations for Neovim +if vim.api.nvim_buf_line_count(0) >= 100 then + vim.o.foldmethod = "expr" -- Allow folding using the "nvim-treesitter" plugin + vim.o.foldexpr = "nvim_treesitter#foldexpr()" -- Configure the folding algorithm to be from the plugin + vim.o.foldlevel = 1 -- Configure the maximum indenting for the folding +end