Closed wenjinnn closed 1 month ago
Open the branch in Web Editor • VS Code • Insiders
Open Preview
Latest commit: ef8fca047b7f2283d8b9a95702563c270d999640
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Your free trial has expired. To keep using Ellipsis, sign up at https://app.ellipsis.dev for $20/seat/month or reach us at help@ellipsis.dev
The change in lua/hurl/split.lua
introduces a new line of code within the function M.show
to recompute the fold level after setting the filetype. This adjustment ensures that the foldexpr
is handled correctly, improving the functionality related to code folding.
File | Change Summary |
---|---|
lua/hurl/split.lua |
Added a line to recompute the fold level after setting the filetype in M.show function. |
In code's embrace, where lines unfold, A tweak, a change, a story told. With foldexpr set, the paths align, And clarity emerges, so divine. 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hi @wenjinnn I can't reproduce the issue. Could you record a video for before/after the PR? Thanks 🙏
Sure! the basic setting is:
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
You also need to setup nvim-treesitter with json html parser. before this PR:
https://github.com/jellydn/hurl.nvim/assets/30885216/80b15da5-7ec5-4c2c-979a-5eb44e4aa40e
after:
https://github.com/jellydn/hurl.nvim/assets/30885216/f0506829-2eda-4c7e-9e7d-ae840380e810
Thanks @wenjinnn LGTM.
WHAT
foldlevel computing can manually trigger with
zx
, so we just need recompute foldlevel after setup filetype to json | html | text related #162WHY
HOW
Screenshots (if appropriate):
Types of changes
Checklist:
Summary by CodeRabbit