Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Conversation

NJichev
Copy link
Collaborator

@NJichev NJichev commented May 3, 2024

Closes #56
Adds a folding range provider. For now it only works on do end blocks.
Things to consider:

  • typespecs and docs and whether to fold them together with their respsective function - makes this PR a bit harder and maybe it's not necessary for starters?
  • folding on fn -> end blocks - I think this should be added as well in the first version

@mhanberg
Copy link
Collaborator

mhanberg commented May 3, 2024

The folds I added to nvim-treesitter currently consist of


[
  (anonymous_function)
  (stab_clause)
  (arguments)
  (block)
  (do_block)
  (list)
  (map)
  (tuple)
] @fold

So should at least do those.

Eventually it would be nice to fold consecutive alias Foo.Bar, as we have a lot of them in the Next LS code base, would be cool to fold them up.

@NJichev
Copy link
Collaborator Author

NJichev commented May 3, 2024

Thanks for the feedback, I'll go and implement them, will edit the original comment with a todo list for those.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

folding
2 participants