-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Update Bass grammar and queries #6547
base: master
Are you sure you want to change the base?
Conversation
Marking as draft; noticed a minor thing to fix in the grammar (expanding allowed characters in paths), will reopen when it's ready. |
Path parsing fix is in, good to go now 👍 |
(path) @string.special.path | ||
(command) @string.special.path | ||
|
||
(number) @constant.numeric.integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does number
capture integers and floats? @constant.numeric
would be more appropriate if it is both but the current capture is good if it's just integers
|
||
;; Comments | ||
|
||
(comment) @comment.line @spell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(comment) @comment.line @spell | |
(comment) @comment |
|
||
[ | ||
"^" | ||
] @character.special |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
] @character.special | |
] @string.special |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these are in the neovim format. We use different captures for indentation queries: https://docs.helix-editor.com/master/guides/indent.html
@@ -0,0 +1 @@ | |||
(comment) @comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar here about injections
(comment) @comment | |
((comment) @injection.content | |
(#set! injection.language "comment")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We follow tree-sitter for locals captures but these are in nvim's format. See https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
@scope
should become @local.scope
while @reference
becomes @local.reference
and the two @definition...
captures become @local.definition
Hiya, this is a follow-up to #3771 that bumps to the latest grammar (now rewritten by @amaanq 🙏), updates the highlight rules, and adds a few more queries:
folds.scm
indents.scm
injections.scm
locals.scm
Tested locally on my machine and all seems well.