[PATCH] D44732: [clangd] Set CLANGD_EDITOR environment variable in vscode extension.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 21 06:05:22 PDT 2018


hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek.

This would allow us to log the editor using custom-built clangd.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44732

Files:
  clangd/clients/clangd-vscode/package.json
  clangd/clients/clangd-vscode/src/extension.ts


Index: clangd/clients/clangd-vscode/src/extension.ts
===================================================================
--- clangd/clients/clangd-vscode/src/extension.ts
+++ clangd/clients/clangd-vscode/src/extension.ts
@@ -23,6 +23,9 @@
         command: getConfig<string>('path'),
         args: getConfig<string[]>('arguments')
     };
+    // Set "CLANGD_EDITOR" environment variable allowing us to log which editor
+    // uses clangd.
+    process.env['CLANGD_EDITOR'] = 'vscode';
     const traceFile = getConfig<string>('trace');
     if (!!traceFile) {
         const trace = { CLANGD_TRACE: traceFile };
Index: clangd/clients/clangd-vscode/package.json
===================================================================
--- clangd/clients/clangd-vscode/package.json
+++ clangd/clients/clangd-vscode/package.json
@@ -2,7 +2,7 @@
     "name": "vscode-clangd",
     "displayName": "vscode-clangd",
     "description": "Clang Language Server",
-    "version": "0.0.5",
+    "version": "0.0.6",
     "publisher": "llvm-vs-code-extensions",
     "homepage": "https://clang.llvm.org/extra/clangd.html",
     "engines": {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44732.139282.patch
Type: text/x-patch
Size: 1126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180321/d59ec522/attachment.bin>


More information about the cfe-commits mailing list