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

Folding by 'syntax' does nothing with Markdown syntax #1009

Closed
ryanisaacg opened this issue Sep 5, 2020 · 3 comments
Closed

Folding by 'syntax' does nothing with Markdown syntax #1009

ryanisaacg opened this issue Sep 5, 2020 · 3 comments
Assignees
Labels
enhancement markdown Problems specific to markdown syntax syntax Related to syntax and highlighting

Comments

@ryanisaacg
Copy link

Syntax: markdown
Version: Stable version: 2.5
Config:

let g:vimwiki_list = [{ 'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.txt' }]
hi VimwikiLink cterm=underline ctermfg=DarkBlue
let g:vimwiki_folding = 'syntax'

Reproduce:

  1. Open a Vimwiki file with some headers, in Markdown syntax
  2. Attempt to fold a section
  3. Error: No Fold Found
@tinmarino tinmarino self-assigned this Sep 5, 2020
@tinmarino
Copy link
Member

@ryanisaacg nice pick
Fixed: . Please:

  1. Rebase to top of dev
  2. Check if the issue is still present
  3. Close the issue

Thank you for the nice report.

@tinmarino
Copy link
Member

@devs: An easy issue in theory but I had troubles with test so added many lines.

Doc removal: :h g:vimwiki_folding: 'syntax' is only available for the default syntax so far

  • bullet_types again hanted me, I realized it with syn list VimwikiList: note the # that is filtering from default syntax due to a poor heritage of vimwiki_tmp_setting. For markdown [*, -, +] is expected but the code reading bullet_types <- s:populate_wikilocal_options is called at init, so it is too late when Vader is hot chaing the syntax. I move it to s:normalize_wikilocal_settings and it realy belongs to syntaxlocal options (vimwiki blessing 🤓)
^\s*\%(\(-\|\*\|#\)\|\(\C\%(\d\+)\|\d\+\.\|[ivxlcdm]\+)\|[IVXLCDM]\+)\|\l\{1,2})\|\u\{1,2})\)\)\)\s

@tinmarino tinmarino added enhancement markdown Problems specific to markdown syntax syntax Related to syntax and highlighting labels Sep 7, 2020
@ryanisaacg
Copy link
Author

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement markdown Problems specific to markdown syntax syntax Related to syntax and highlighting
Projects
None yet
Development

No branches or pull requests

2 participants