[Mlir-commits] [mlir] [vscode-mlir] Added per-LSP-server executable arguments (PR #79671)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Jan 26 17:52:48 PST 2024
https://github.com/jjalowie created https://github.com/llvm/llvm-project/pull/79671
Each LSP server type (mlir-lsp-server, pdll-lsp-server and tblgen-lsp-server) has a different "additional_server_args" entry in the config.
>From 0522da9b7ab1d11faa810680c19729f574bb62d8 Mon Sep 17 00:00:00 2001
From: Kuba Jalowiec <jakub.jalowiec at intel.com>
Date: Sat, 27 Jan 2024 01:49:26 +0000
Subject: [PATCH] [vscode-mlir] Added per-LSP-server executable arguments
---
mlir/utils/vscode/package.json | 19 +++++++++++++++++--
mlir/utils/vscode/src/mlirContext.ts | 5 +++++
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/mlir/utils/vscode/package.json b/mlir/utils/vscode/package.json
index bd550e2b6e61e24..b1febc0deb07291 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 mlir-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 mlir-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 c7b6de6322d27f2..adfca60c446a026 100644
--- a/mlir/utils/vscode/src/mlirContext.ts
+++ b/mlir/utils/vscode/src/mlirContext.ts
@@ -179,14 +179,19 @@ export class MLIRContext implements vscode.Disposable {
// Initialize additional configurations for this server.
if (languageName === 'pdll') {
+ additionalServerArgs = config.get<string[]>("pdll_additional_server_args", null, []);
await this.preparePDLLServerOptions(workspaceFolder, configsToWatch,
filepathsToWatch,
additionalServerArgs);
} else if (languageName == 'tablegen') {
+ additionalServerArgs = config.get<string[]>("table_additional_server_args", null, []);
await this.prepareTableGenServerOptions(workspaceFolder, configsToWatch,
filepathsToWatch,
additionalServerArgs);
}
+ else {
+ additionalServerArgs = config.get<string[]>("mlir_additional_server_args", null, []);
+ }
// Try to activate the language client.
const [server, serverPath] = await this.startLanguageClient(
More information about the Mlir-commits
mailing list