fix: Support other DuckyScript commands in Syntax Highlighting - #3
Open
webbrain-one wants to merge 2 commits into
Open
webbrain-one wants to merge 2 commits into
webbrain-one wants to merge 2 commits into
Conversation
Allow users to configure additional commands via settings.json to extend syntax highlighting. This enables support for custom extensions used by projects like USBArmyKnife and Flipper Zero.
Owner
|
Hi @webbrain-one ! Thanks again for the contribution. I've tested your implementation and made a few refinements on top of it. Could you please enable Allow edits from maintainers on this PR? I'd like to push the improvements directly to your branch so that your original PR and contribution remain fully credited. |
Builds on @webbrain-one's implementation in aleff-github#3, which is kept as the base of this branch. - pass the legend to registerDocumentSemanticTokensProvider and use the numeric SemanticTokensBuilder.push overload (the branch did not compile) - declare duckyscriptCustomCommand in contributes.semanticTokenTypes and map it to support.function.builtin.duckyscript, so any theme colours it - enable semanticHighlighting in the two bundled themes, which shipped with it turned off - match against the configured command list (escaped, case-insensitive, longest-first) and compute the start column correctly on indented lines - dispose the configuration listener and emitter, honour cancellation Closes aleff-github#2 Co-authored-by: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TRLqQ6ZvofMhPeunTaR8GX
Owner
|
Thanks again @webbrain-one — I've pushed my refinements directly onto your branch, on top of your commit, so your original work and authorship stay intact in the history and in the merge. What I changed on top of it:
The feature is yours — I'll merge with a merge commit so your authorship is preserved. Thanks for pushing this forward, and thanks to @i-am-shodan for the original request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2