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

Enhance asciidoc syntax support #14439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Phantasimay
Copy link

@Phantasimay Phantasimay commented Apr 8, 2024

asciidoc are in full syntax realase and dont have flavour branch so i want (n)vim to support its syntax fully. this enhamcment make writing asciidoc much conforteble base on this. i hope it help other writer to using (n)vim.

@zeertzjq
Copy link
Member

zeertzjq commented Apr 8, 2024

cc @aerostitch

Copy link
Member

@chrisbra chrisbra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a weired mix of :syn and :hi def link commands in the file. Usually we have all the :hi commands in one block at the end of the file. Can you please change this?

let s:conceal = ''
let s:concealends = ''
let s:concealcode = ''
if has('conceal') && get(g:, 'vim_asciidoc_conceal', 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing documented variable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is parameter to use build in vim syn-concealends and syn-conceal to active on specific region.
first vim check build in conceal feature. then if let g:vim_asciidoc_conceal=0 vim will not activated conceal in specific region.

let s:conceal = ' conceal'
let s:concealends = ' concealends'
endif
if has('conceal') && get(g:, 'vim_asciidoc_conceal_code_blocks', 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing documented variable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if let g:vim_asciidoc_conceal_conceal_code_block=0 vim will not activated conceal in specific code block like [] _ *.

endif

" additions to HTML groups
if get(g:, 'vim_asciidoc_emphasis_multiline', 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is parameter to use build in vim syn-oneline active on specific region to support html syntax on mark down like <em></em> <p></p>.

@chrisbra chrisbra added the needs more work used for a pull request that isn't ready to include (other than needing a test) label Apr 18, 2024
@chrisbra
Copy link
Member

that documentation should go into $VIMRUNTIME/doc/syntax.txt instead of mentioning it here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more work used for a pull request that isn't ready to include (other than needing a test)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants