mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 04:15:11 +00:00
Fix copy-paste bugs in language server init params
1. clangd + ccls: workspace folder name was literal "$name" placeholder
instead of os.path.basename(repository_absolute_path).
2. Erlang: rootUri used f"file://{path}" instead of
pathlib.Path(...).as_uri(), producing malformed URIs on Windows.
3. F#: symbolKind valueSet used range(1, 26) (1-25) instead of
range(1, 27) (1-26), missing TypeParameter.
This commit is contained in:
1 parent
0c915bd18d
commit
57e720bc79
4 files changed
+5
-4
No files matched your search
@@ -118,7 +118,7 @@ class CCLS(SolidLanguageServer):
|
||||
"workspaceFolders": [
|
||||
{
|
||||
"uri": root_uri,
|
||||
"name": "$name",
|
||||
"name": os.path.basename(repository_absolute_path),
|
||||
}
|
||||
],
|
||||
# ccls supports initializationOptions but none are required for basic functionality
|
||||
|
||||
@@ -228,7 +228,7 @@ class ClangdLanguageServer(SolidLanguageServer):
|
||||
"workspaceFolders": [
|
||||
{
|
||||
"uri": root_uri,
|
||||
"name": "$name",
|
||||
"name": os.path.basename(repository_absolute_path),
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import threading
|
||||
@@ -134,7 +135,7 @@ class ErlangLanguageServer(SolidLanguageServer):
|
||||
initialize_params = {
|
||||
"processId": None,
|
||||
"rootPath": self.repository_root_path,
|
||||
"rootUri": f"file://{self.repository_root_path}",
|
||||
"rootUri": pathlib.Path(self.repository_root_path).as_uri(),
|
||||
"capabilities": {
|
||||
"textDocument": {
|
||||
"synchronization": {"didSave": True},
|
||||
|
||||
@@ -166,7 +166,7 @@ class FSharpLanguageServer(SolidLanguageServer):
|
||||
"documentHighlight": {"dynamicRegistration": True},
|
||||
"documentSymbol": {
|
||||
"dynamicRegistration": True,
|
||||
"symbolKind": {"valueSet": list(range(1, 26))}, # All SymbolKind values
|
||||
"symbolKind": {"valueSet": list(range(1, 27))}, # All SymbolKind values (1-26)
|
||||
"hierarchicalDocumentSymbolSupport": True,
|
||||
},
|
||||
"codeAction": {
|
||||
|
||||
Reference in new issue
Block a user