-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add function for custom folds #88
Conversation
I haven't tested this yet, but this looks good! Is there any reason you set it as a draft? |
Given that this PR using Additionally, the current implementation requires extra configurations in the UFO, which can be cumbersome. I'm seeking suggestions for a more streamlined way to offer this feature |
Is there any method to know wheter jupynium is start like :thenCall(function(ufo_folds)
local filename = vim.api.nvim_buf_get_name(bufnr)
local ok, jupynium = pcall(require, "jupynium")
if ok and string.match(filename, "%.ju.py$") then
for _, fold in ipairs(jupynium.get_folds()) do
table.insert(ufo_folds, fold)
end
end
return ufo_folds |
In highlighter.lua, I also match the file name. To be consistent with your settings, you can use this condition. jupynium.nvim/lua/jupynium/highlighter.lua Line 131 in 05ef99a
|
5b066db
to
ac5e300
Compare
ac5e300
to
1e77251
Compare
I just confirmed that it works very well. Can you mention this feature in README? It doesn't have to be long.
I think this much would be enough. Thanks a lot for your contribution! |
Sure, will do it later |
Thanks again for your contribution! |
I think it would be great to make cells to be foldable 👀
fold:
Here is the setup for ufo(I note you also use this) https://github.com/fecet/nvim/blob/main/lua/modules/configs/editor/ufo.lua: