neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b4d21f141cf1dff0abdb2f43f0ebca105a171441
parent 4f374bf938283b2d8c842bddb4583337aba0555d
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Tue,  2 Sep 2025 08:28:07 +0800

vim-patch:71149df: runtime(java): Dismiss "g:markdown_fenced_languages" for Java buffers (#35596)

No support is provided or planned for language recognition
in code snippets of documentation comments.  Requesting to
load arbitrary syntax plugins with the aid of the concerned
variable is therefore wasteful in general and erroneous when
paired languages ":syn-include" one another without taking
steps to manage circularity.

related: vim/vim#17308
related: vim/vim#17220
closes: vim/vim#18172

https://github.com/vim/vim/commit/71149dfec502d7489cd7e46c721f891b486bdbf6

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Diffstat:
Mruntime/syntax/java.vim | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Claudio Fleiner <claudio@fleiner.com> " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2025 Aug 07 +" Last Change: 2025 Aug 30 " Please check ":help java.vim" for comments on some of the options " available. @@ -447,6 +447,11 @@ if !exists("g:java_ignore_javadoc") && (s:with_html || s:with_markdown) && g:mai unlet g:html_syntax_folding endif + if !empty(get(g:, 'markdown_fenced_languages', [])) + let s:markdown_fenced_languages_copy = g:markdown_fenced_languages + unlet g:markdown_fenced_languages + endif + syntax include @javaMarkdown syntax/markdown.vim try @@ -464,6 +469,11 @@ if !exists("g:java_ignore_javadoc") && (s:with_html || s:with_markdown) && g:mai finally unlet! b:current_syntax + if exists("s:markdown_fenced_languages_copy") + let g:markdown_fenced_languages = s:markdown_fenced_languages_copy + unlet s:markdown_fenced_languages_copy + endif + if exists("s:html_syntax_folding_copy") let g:html_syntax_folding = s:html_syntax_folding_copy unlet s:html_syntax_folding_copy