Skip to content

Commit

Permalink
lsp server json should use projectFiles style.
Browse files Browse the repository at this point in the history
  • Loading branch information
manateelazycat committed Nov 13, 2024
1 parent d30043e commit 7344d8e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion langserver/clojure-lsp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"languageId": "clojure",
"command": ["clojure-lsp"],
"settings": {},
"project-files": ["deps.edn"],
"projectFiles": ["deps.edn"],
"support-single-file": false
}
2 changes: 1 addition & 1 deletion langserver/elixirLS.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"languageId": "elixir",
"command": ["language_server.sh"],
"support-single-file": false,
"project-files": ["mix.exs"],
"projectFiles": ["mix.exs"],
"settings": {
"elixirLS": {
"dialyzerEnabled": true,
Expand Down
2 changes: 1 addition & 1 deletion langserver/elixirLS_windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"languageId": "elixir",
"command": ["language_server.bat"],
"support-single-file": false,
"project-files": ["mix.exs"],
"projectFiles": ["mix.exs"],
"settings": {
"elixirLS": {
"dialyzerEnabled": true,
Expand Down
2 changes: 1 addition & 1 deletion langserver/gopls.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"gopls",
"-remote=auto"
],
"project-files": ["go.mod"],
"projectFiles": ["go.mod"],
"settings":{
"gopls": {
"usePlaceholders": true,
Expand Down
2 changes: 1 addition & 1 deletion langserver/graphql-lsp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "graphql-lsp",
"languageId": "graphql",
"command": ["graphql-lsp", "server", "--method=stream"],
"project-files": ["gradlew"],
"projectFiles": ["gradlew"],
"settings": {
"graphql-config": {}
}
Expand Down
2 changes: 1 addition & 1 deletion langserver/intelephense.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"intelephense",
"--stdio"
],
"project-files": ["composer.json"],
"projectFiles": ["composer.json"],
"settings": {}
}
2 changes: 1 addition & 1 deletion langserver/phpactor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"phpactor",
"language-server"
],
"project-files": ["composer.json"],
"projectFiles": ["composer.json"],
"settings": {}
}
2 changes: 1 addition & 1 deletion langserver/rust-analyzer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"languageId": "rust",
"command": ["rust-analyzer"],
"settings": {},
"project-files": ["Cargo.toml"],
"projectFiles": ["Cargo.toml"],
"capabilities": {
"textDocument": {
"hover": {
Expand Down
2 changes: 1 addition & 1 deletion langserver/volar.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"vue-language-server",
"--stdio"
],
"project-files": ["package.json"],
"projectFiles": ["package.json"],
"settings": {},
"initializationOptions": {
"typescript": {
Expand Down
2 changes: 1 addition & 1 deletion langserver/volar_windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"vue-language-server.cmd",
"--stdio"
],
"project-files": ["package.json"],
"projectFiles": ["package.json"],
"settings": {},
"initializationOptions": {
"typescript": {
Expand Down
6 changes: 3 additions & 3 deletions lsp_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,10 +772,10 @@ def load_single_lang_server(self, project_path, filepath):
("support-single-file" in lang_server_info and
lang_server_info["support-single-file"] is False)):

if "project-files" in lang_server_info:
if "projectFiles" in lang_server_info:
# If support-support-single-file is False,
# we will search project-files up 20 level directories to find project root.
project_root = self.find_project_root(filepath, lang_server_info["project-files"])
# we will search projectFiles up 20 level directories to find project root.
project_root = self.find_project_root(filepath, lang_server_info["projectFiles"])
if project_root is None:
self.turn_off_by_single_file(filepath, single_lang_server)

Expand Down

0 comments on commit 7344d8e

Please sign in to comment.