mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
vim: fix comment syntax pattern
Only lines which contain (optional) whitespace followed by a # character are comments. We should not treat lines like "foreground = #aaa" as containing a comment.
This commit is contained in:
@ -14,7 +14,7 @@ const Template = struct {
|
||||
\\contexts:
|
||||
\\ main:
|
||||
\\ # Comments
|
||||
\\ - match: '#.*$'
|
||||
\\ - match: '^\s*#.*$'
|
||||
\\ scope: comment.line.number-sign.ghostty
|
||||
\\
|
||||
\\ # Keywords
|
||||
|
@ -70,7 +70,7 @@ fn writeSyntax(writer: anytype) !void {
|
||||
try writer.writeAll(
|
||||
\\
|
||||
\\
|
||||
\\syn match ghosttyConfigComment /#.*/ contains=@Spell
|
||||
\\syn match ghosttyConfigComment /^\s*#.*/ contains=@Spell
|
||||
\\
|
||||
\\hi def link ghosttyConfigComment Comment
|
||||
\\hi def link ghosttyConfigKeyword Keyword
|
||||
|
Reference in New Issue
Block a user