neovim

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

commit 5681315b82f658348a6498b0b689e44888d4cd24
parent 081feae3a31f2165322d03eb4842a0f0dec90aec
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Wed, 24 Dec 2025 08:45:18 +0800

vim-patch:519dc39: runtime(make): Makefile highlighting breaks with ')' in string

Problem:  Makefile syntax highlighting incorrectly ends function calls
          when encountering ')' inside double or single quoted strings,
          causing incorrect highlighting for the remainder of the line.
Solution: Add makeDString and makeSString to the contains list for
          makeIdent regions. This allows strings to be recognized inside
          variable references and function calls.

fixes:  vim/vim#18687
closes: vim/vim#18818

https://github.com/vim/vim/commit/519dc391d8fe2f2182160027d2cecc154ea749d0

Co-authored-by: Beleswar Prasad Padhi <beleswarprasad@gmail.com>

Diffstat:
Mruntime/syntax/make.vim | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim @@ -8,6 +8,7 @@ " 2025 Oct 12 by Vim project: update makeDefine highlighting (#18403) " 2025 Oct 25 by Vim project: update makeTargetinDefine highlighting (#18570) " 2025 Dec 23 by Vim project: fix too greedy match (#18938) +" 2025 Dec 23 by Vim project: wrong highlight with paranthesis inside quotes (#18818) " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -42,15 +43,15 @@ syn match makeIdent "\$\$\$\$\w*" containedin=makeDefine syn match makeIdent "\$[^({]" syn match makeIdent "\$\$[^({]" containedin=makeDefine if get(b:, 'make_flavor', s:make_flavor) == 'microsoft' - syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent - syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent - syn region makeIdent start="\$\$(" end=")" containedin=makeDefine contains=makeStatement,makeIdent - syn region makeIdent start="\$\${" end="}" containedin=makeDefine contains=makeStatement,makeIdent + syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent,makeDString,makeSString + syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent,makeDString,makeSString + syn region makeIdent start="\$\$(" end=")" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString + syn region makeIdent start="\$\${" end="}" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString else - syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent - syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent - syn region makeIdent start="\$\$(" skip="\\)\|\\\\" end=")" containedin=makeDefine contains=makeStatement,makeIdent - syn region makeIdent start="\$\${" skip="\\}\|\\\\" end="}" containedin=makeDefine contains=makeStatement,makeIdent + syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeDString,makeSString + syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeDString,makeSString + syn region makeIdent start="\$\$(" skip="\\)\|\\\\" end=")" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString + syn region makeIdent start="\$\${" skip="\\}\|\\\\" end="}" containedin=makeDefine contains=makeStatement,makeIdent,makeDString,makeSString endif syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2 syn match makeIdent "^ *[^:#= \t]*\s*::="me=e-3