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

Enable clangd on HLSL sources #392

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"onLanguage:cuda-cpp",
"onLanguage:objective-c",
"onLanguage:objective-cpp",
"onLanguage:hlsl",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can't be conditional, but I think this just wakes up the plugin when an HLSL file is opened, and would just waste a few resources if the documentSelector doesn't have HLSL.

"onCommand:clangd.activate",
"onCommand:clangd.install",
"onCommand:clangd.update"
Expand Down
1 change: 1 addition & 0 deletions src/clangd-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const clangdDocumentSelector = [
{scheme: 'file', language: 'cuda-cpp'},
{scheme: 'file', language: 'objective-c'},
{scheme: 'file', language: 'objective-cpp'},
{scheme: 'file', language: 'hlsl'},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part is "just code", I think we can make it conditional on a config option.

];

export function isClangdDocument(document: vscode.TextDocument) {
Expand Down