Arch 2025 rice. Also contains a newly inspired neovim config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
913 B

  1. return {
  2. 'kevinhwang91/nvim-ufo',
  3. dependencies = {
  4. { 'kevinhwang91/promise-async' },
  5. },
  6. config = function()
  7. vim.o.foldcolumn = '1' -- '0' is not bad
  8. vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
  9. vim.o.foldlevelstart = 99
  10. vim.o.foldenable = true
  11. -- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
  12. vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
  13. vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
  14. -- Option 3: treesitter as a main provider instead
  15. -- Only depend on `nvim-treesitter/queries/filetype/folds.scm`,
  16. -- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()`
  17. require('ufo').setup({
  18. provider_selector = function(bufnr, filetype, buftype)
  19. return { 'treesitter', 'indent' }
  20. end
  21. })
  22. end
  23. }