[PATCH] D70041: register cuda language activation event and activate for .cuh files
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 14 03:08:01 PST 2019
hokein added a comment.
Thanks for the patch.
================
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}'},
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70041/new/
https://reviews.llvm.org/D70041
More information about the cfe-commits
mailing list