Skip to content
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

Fold indicator doesn't consider virtual text offset #93

Closed
igorlfs opened this issue Nov 4, 2022 · 2 comments
Closed

Fold indicator doesn't consider virtual text offset #93

igorlfs opened this issue Nov 4, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@igorlfs
Copy link

igorlfs commented Nov 4, 2022

Neovim version (nvim -v | head -n1)

NVIM v0.9.0-dev-94-g0a19c16778

Operating system/version

Linux 6.0.2

How to reproduce the issue

-- Use Vim packages install the plugin, also work with some plugins manager such as packer.nvim
vim.o.packpath = '~/.local/share/nvim/site'
vim.cmd('packadd promise-async')
vim.cmd('packadd nvim-ufo')
vim.cmd('packadd neorg')


-- Setting
vim.o.foldcolumn = '1'
vim.o.foldlevel = 99
vim.o.foldlevelstart = -1
vim.o.foldenable = true

local ufo = require('ufo')
ufo.setup()
vim.keymap.set('n', 'zR', ufo.openAllFolds)
vim.keymap.set('n', 'zM', ufo.closeAllFolds)

nvim --clean +'so mini.lua'

  1. Create a norg file, eg
* foo
  - [ ] bar

image

  1. Try to close the fold.

Expected behavior

The ellipsis should be displayed after the virtual text.

Actual behavior

The indicator won't consider virtual text's offset:
image

@igorlfs igorlfs added the bug Something isn't working label Nov 4, 2022
@kevinhwang91
Copy link
Owner

kevinhwang91 commented Nov 4, 2022

priority = opts.priority or 10,

Increasing the priority value may work. No idea how to fix it perfectly, almost situations need a lower priority for folded lines.

Detach ufo in org may be a workaround.
#33

@igorlfs
Copy link
Author

igorlfs commented Nov 4, 2022

Detach ufo in org may be a workaround.

This works for now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants