Begins syntax highlighting of string literals at the opening quote rather than the closing one. This is consistent with syntax highlighting used for strings in other languages.
make string highlighting start at opening quote #127
jpk68/zig.vim:string-syntax into master Could you explain what exactly this PR changes and how it can be observed or tested?
Before these changes, a string literal would only be highlighted when there is a double quotation mark at both ends. This can be thought of as "highlighting only once you finish typing the string" rather than "highlighting from when you start typing the string". For example:
constx="syntax is not highlightedconsty="syntax is highlighted";// As it turns out, Codeberg's syntax highlighting for Zig does do it 'correctly' in both cases.In almost all other languages in Vim (C, C++, Rust...), string literals will be highlighted starting with the opening quotation mark, even before the string is closed. This PR aims to make Zig's syntax highlighting consistent with others; I also personally believe it looks better this way, but that's a matter of opinion.
In terms of how this patch can be tested, I just did so by replacing the modified file in the repo cloned by vim-plug with my own changes. A similar approach can likely be taken with other setups.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?