[Mlir-commits] [mlir] 86db215 - [vscode-mlir] Added per-LSP-server executable arguments (#79671)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Aug 14 11:31:22 PDT 2024


Author: jjalowie
Date: 2024-08-14T12:31:14-06:00
New Revision: 86db2154bc27bf64212b91c76ed67b7dd1fc5eb0

URL: https://github.com/llvm/llvm-project/commit/86db2154bc27bf64212b91c76ed67b7dd1fc5eb0
DIFF: https://github.com/llvm/llvm-project/commit/86db2154bc27bf64212b91c76ed67b7dd1fc5eb0.diff

LOG: [vscode-mlir] Added per-LSP-server executable arguments (#79671)

Each LSP server type (mlir-lsp-server, pdll-lsp-server and
tblgen-lsp-server) should have a different "additional_server_args"
entry in the config for passing arguments to the server such as
`--log=verbose`.

Added: 
    

Modified: 
    mlir/utils/vscode/package.json
    mlir/utils/vscode/src/mlirContext.ts

Removed: 
    


################################################################################
diff  --git a/mlir/utils/vscode/package.json b/mlir/utils/vscode/package.json
index bd550e2b6e61e2..6d0f6f5c88adb8 100644
--- a/mlir/utils/vscode/package.json
+++ b/mlir/utils/vscode/package.json
@@ -2,7 +2,7 @@
   "name": "vscode-mlir",
   "displayName": "MLIR",
   "description": "MLIR Language Extension",
-  "version": "0.0.11",
+  "version": "0.0.12",
   "publisher": "llvm-vs-code-extensions",
   "homepage": "https://mlir.llvm.org/",
   "icon": "icon.png",
@@ -47,7 +47,7 @@
     "@types/vscode": "~1.67.0",
     "@vscode/vsce": "^2.19.0",
     "clang-format": "^1.8.0",
-    "typescript": "^4.6.4",
+    "typescript": "^4.9.5",
     "vscode-test": "^1.3.0"
   },
   "repository": {
@@ -155,6 +155,11 @@
           "type": "string",
           "description": "The file path of the mlir-lsp-server executable."
         },
+        "mlir.mlir_additional_server_args": {
+          "scope": "resource",
+          "type": "array",
+          "description": "A list of additional arguments for mlir-lsp-server executable. E.g. --log=verbose."
+        },
         "mlir.pdll_server_path": {
           "scope": "resource",
           "type": "string",
@@ -165,6 +170,11 @@
           "type": "array",
           "description": "A list of `pdll_compile_commands.yml` database files containing information about .pdll files processed by the server."
         },
+        "mlir.pdll_additional_server_args": {
+          "scope": "resource",
+          "type": "array",
+          "description": "A list of additional arguments for pdll-lsp-server executable. E.g. --log=verbose."
+        },
         "mlir.tablegen_server_path": {
           "scope": "resource",
           "type": "string",
@@ -175,6 +185,11 @@
           "type": "array",
           "description": "A list of `tablegen_compile_commands.yml` database files containing information about .td files processed by the server."
         },
+        "mlir.tablegen_additional_server_args": {
+          "scope": "resource",
+          "type": "array",
+          "description": "A list of additional arguments for tblgen-lsp-server executable. E.g. --log=verbose."
+        },
         "mlir.onSettingsChanged": {
           "type": "string",
           "default": "prompt",

diff  --git a/mlir/utils/vscode/src/mlirContext.ts b/mlir/utils/vscode/src/mlirContext.ts
index c7b6de6322d27f..e12aa92522d083 100644
--- a/mlir/utils/vscode/src/mlirContext.ts
+++ b/mlir/utils/vscode/src/mlirContext.ts
@@ -176,6 +176,7 @@ export class MLIRContext implements vscode.Disposable {
     let configsToWatch: string[] = [];
     let filepathsToWatch: string[] = [];
     let additionalServerArgs: string[] = [];
+    additionalServerArgs = config.get<string[]>(languageName + "_additional_server_args", null, []);
 
     // Initialize additional configurations for this server.
     if (languageName === 'pdll') {


        


More information about the Mlir-commits mailing list