ptaylor added inline comments.
================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts:92
+ // *not* load itself automatically on '.cu' and '.cuh' files.
+ const cudaFilePatterns: {scheme: string, pattern: string}[] = [
+ {scheme : 'file', pattern : '**/*.{cu}'},
----------------
hokein wrote:
> I think we could simplify the code, we could move this part to the
> package.json under the `contributes` umbrella, something like
>
> ```
> "contributes": {
> "languages": [
> {
> "id": "cuda",
> "filenamePatterns": [
> "**/*.{cu}",
> "**/*.{cuh}",
> ],
> }
> ]
> ```
>
> then in the extension.ts, we only need an entry `{ scheme: 'file', language:
> 'cuda' }` when initailizing the clientOptions.
Yes that's an option. I chose this approach to stay consistent with the current
behavior, because `vscode-clangd` can do CUDA intellisense and refactoring, it
doesn't contribute the CUDA grammar definitions for syntax highlighting.
The VSCode docs aren't clear on whether multiple extensions can contribute
separate features for the same language, or what happens when two plugins both
contribute languages with the same `languageId`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70041/new/
https://reviews.llvm.org/D70041
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits