Skip to content
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

language support: CodeQL #12470

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

evanrichter
Copy link
Contributor

adds CodeQL support for highlighting, text objects, and LSP!

the treesitter grammer defines the language as just ql (thus exporting the function tree_sitter_ql in the dylib) but I've never heard it referred by just that, it's always "CodeQL", so I stuck with "codeql" for all user facing names for this language.

For code fences in markdown, github supports this language as codeql or ql, but again, I don't think anyone refers to this language as just ql, so I left the injection-regex as codeql.

For the language server, it works as defined, but minimally. Formatting works, goto definition, etc. But to be actually useful, users will probably need to override the args to add --search-path=P where P is a path to their local checkout of the standard queries. It would be nice to have an lsp option for appending args to the default like this:

# ideally:
[language-servers.codeql]
extraArgs = ["--search-path=P"] # just the appended args

# current users need to respecify default args:
[language-servers.codeql]
args = ["execute", "language-server", "--check-errors=ON_CHANGE", "--search-path=P"]

@the-mikedavis the-mikedavis added the A-language-support Area: Support for programming/text languages label Jan 10, 2025
@the-mikedavis the-mikedavis merged commit 9721144 into helix-editor:master Jan 10, 2025
6 checks passed
rmburg pushed a commit to rmburg/helix that referenced this pull request Jan 20, 2025
VishnuTejaBandi pushed a commit to VishnuTejaBandi/helix that referenced this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants