-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Brackets in links are not concealed #99
Comments
what's your conceallevel ( |
:echo &conceallevel produces the answer 0 |
try doing |
:setlocal conceallevel=2 worked |
Ok, and what about the output of |
echo &concealcursor is empty |
Ok. You need to add autocmd FileType org setlocal conceallevel=2 |
Thanks a lot. with conceallevel=2 the issue is solved, but I am seeing one more behaviour. the moment my cursor is on the line containing the link it gets exapnded. I would like it to be expanded when I am in insert mode - I am switching from vim-orgmode, where that was the behaviour. Can I change some setting to get my desired behaviour. |
Yes, add also |
Links in headline are not supported because of similar issue like this. You should use |
Good to know that tree-sitter branch will fix this. For now, I replaced the line "syntax match org_hyperlink "[{2}[^][](][[^][])?]{2}" contains=org_hyperlinkBracketsLeft,org_hyperlinkURL,org_hyperlinkBracketsRight" in org.vim file to "syntax match org_hyperlink "[{2}[^][](][[^][])?]{2}" contains=org_hyperlinkBracketsLeft,org_hyperlinkURL,org_hyperlinkBracketsRight containedin=OrgHeadlineLevel1,OrgHeadlineLevel2,OrgHeadlineLevel3,OrgHeadlineLevel4,OrgHeadlineLevel5" With this I think it'll work for 5 levels of heading and I can live with that till tree-sitter branch becomes the main. Thanks for your effort. |
@sethidden I don't think this can be fixed. It's just how concealing works in Vim. Try doing |
For organization's sake - concealed text wrongly contributing to wrapping is reported upstream in neovim under neovim/neovim#14409 |
Are you using "tree-sitter" branch?
No
Describe the bug
As shown in the above message, for links the brackets are not hidden. Am I missing some setting. My minimal init.vim to reproduce the issue
init.vim
function! PackagerInit() abort
packadd vim-packager
call packager#init()
call packager#add('kristijanhusak/orgmode.nvim')
endfunction
command! PackagerInstall call PackagerInit() | call packager#install()
command! -bang PackagerUpdate call PackagerInit() | call packager#update({ 'force_hooks': '' })
command! PackagerClean call PackagerInit() | call packager#clean()
command! PackagerStatus call PackagerInit() | call packager#status()
lua << EOF
require('orgmode').setup({
org_hide_leading_stars = true
})
EOF
Steps to reproduce
My org file contnts:
[[test]]
[[test][link to test]]
Expected behavior
The brackets should be hidden
Emacs functionality
No response
Screenshots and recordings
OS / Distro
Ubuntu 20.04.3 LTS
Neovim version/commit
NVIM v0.5.0-dev+1372-g056c464e8
Additional context
No response
The text was updated successfully, but these errors were encountered: