mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 14:17:49 +00:00
Remove references to multilspy
This commit is contained in:
1 parent
82d495b2a6
commit
09722e9e72
7 files changed
+27
-38
No files matched your search
@@ -202,20 +202,12 @@ pylint.html
|
||||
/agent-ui
|
||||
/test/**/.serena
|
||||
|
||||
# dynamic LS installations
|
||||
/src/multilspy/language_servers/*/static
|
||||
/src/solidlsp/language_servers/*/static
|
||||
/src/solidlsp/language_servers/static
|
||||
|
||||
# clojure-lsp temporary files
|
||||
.calva/
|
||||
.clj-kondo/
|
||||
.cpcache/
|
||||
.lsp/
|
||||
|
||||
# Cache is in .multilspy
|
||||
**/.multilspy/**
|
||||
|
||||
# temporary and backup files
|
||||
*.bak
|
||||
*.tmp
|
||||
|
||||
@@ -53,7 +53,7 @@ class Intelephense(SolidLanguageServer):
|
||||
PlatformId.WIN_x64,
|
||||
PlatformId.WIN_arm64,
|
||||
]
|
||||
assert platform_id in valid_platforms, f"Platform {platform_id} is not supported for multilspy PHP at the moment"
|
||||
assert platform_id in valid_platforms, f"Platform {platform_id} is not supported by {cls.__name__} at the moment"
|
||||
|
||||
# Verify both node and npm are installed
|
||||
is_node_installed = shutil.which("node") is not None
|
||||
|
||||
+11
-11
@@ -249,12 +249,11 @@ class SolidLanguageServer(ABC):
|
||||
|
||||
Do not instantiate this class directly. Use `LanguageServer.create` method instead.
|
||||
|
||||
:param config: The Multilspy configuration.
|
||||
:param repository_root_path: The root path of the repository.
|
||||
:param process_launch_info: Each language server has a specific command used to start the server.
|
||||
This parameter is the command to launch the language server process.
|
||||
The command must pass appropriate flags to the binary, so that it runs in the stdio mode,
|
||||
as opposed to HTTP, TCP modes supported by some language servers.
|
||||
:param config: the global SolidLSP configuration.
|
||||
:param repository_root_path: the root path of the repository.
|
||||
:param process_launch_info: the command used to start the actual language server.
|
||||
The command must pass appropriate flags to the binary, so that it runs in the stdio mode,
|
||||
as opposed to HTTP, TCP modes supported by some language servers.
|
||||
:param cache_version_raw_document_symbols: the version, for caching, of the raw document symbols coming
|
||||
from this specific language server. This should be incremented by subclasses calling this constructor
|
||||
whenever the format of the raw document symbols changes (typically because the language server
|
||||
@@ -343,10 +342,11 @@ class SolidLanguageServer(ABC):
|
||||
self.server.set_request_timeout(timeout)
|
||||
|
||||
def get_ignore_spec(self) -> pathspec.PathSpec:
|
||||
"""Returns the pathspec matcher for the paths that were configured to be ignored through
|
||||
the multilspy config.
|
||||
"""
|
||||
Returns the pathspec matcher for the paths that were configured to be ignored through
|
||||
the language server configuration.
|
||||
|
||||
This is is a subset of the full language-specific ignore spec that determines
|
||||
This is a subset of the full language-specific ignore spec that determines
|
||||
which files are relevant for the language server.
|
||||
|
||||
This matcher is useful for operations outside of the language server,
|
||||
@@ -619,7 +619,7 @@ class SolidLanguageServer(ABC):
|
||||
:param line: The line number of the symbol
|
||||
:param column: The column number of the symbol
|
||||
|
||||
:return List[multilspy_types.Location]: A list of locations where the symbol is defined
|
||||
:return: the list of locations where the symbol is defined
|
||||
"""
|
||||
if not self.server_started:
|
||||
log.error("request_definition called before language server started")
|
||||
@@ -842,7 +842,7 @@ class SolidLanguageServer(ABC):
|
||||
:param line: The line number of the symbol
|
||||
:param column: The column number of the symbol
|
||||
|
||||
:return List[multilspy_types.CompletionItem]: A list of completions
|
||||
:return: A list of completions
|
||||
"""
|
||||
with self.open_file(relative_file_path):
|
||||
open_file_buffer = self.open_file_buffers[pathlib.Path(os.path.join(self.repository_root_path, relative_file_path)).as_uri()]
|
||||
|
||||
@@ -28,7 +28,7 @@ class FilenameMatcher:
|
||||
|
||||
class Language(str, Enum):
|
||||
"""
|
||||
Possible languages with Multilspy.
|
||||
Enumeration of language servers supported by SolidLSP.
|
||||
"""
|
||||
|
||||
CSHARP = "csharp"
|
||||
@@ -351,9 +351,6 @@ class LanguageServerConfig:
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, env: dict) -> Self:
|
||||
"""
|
||||
Create a MultilspyConfig instance from a dictionary
|
||||
"""
|
||||
import inspect
|
||||
|
||||
return cls(**{k: v for k, v in env.items() if k in inspect.signature(cls).parameters})
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Defines wrapper objects around the types returned by LSP to ensure decoupling between LSP versions and multilspy
|
||||
Defines wrapper objects around the types returned by LSP to ensure decoupling between LSP versions and SolidLSP
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -223,7 +223,7 @@ class FileUtils:
|
||||
"""
|
||||
try:
|
||||
tmp_files = []
|
||||
tmp_file_name = str(PurePath(os.path.expanduser("~"), "multilspy_tmp", uuid.uuid4().hex))
|
||||
tmp_file_name = str(PurePath(os.path.expanduser("~"), "solidlsp_tmp", uuid.uuid4().hex))
|
||||
tmp_files.append(tmp_file_name)
|
||||
os.makedirs(os.path.dirname(tmp_file_name), exist_ok=True)
|
||||
FileUtils.download_file(url, tmp_file_name)
|
||||
@@ -269,10 +269,6 @@ class FileUtils:
|
||||
|
||||
|
||||
class PlatformId(str, Enum):
|
||||
"""
|
||||
multilspy supported platforms
|
||||
"""
|
||||
|
||||
WIN_x86 = "win-x86"
|
||||
WIN_x64 = "win-x64"
|
||||
WIN_arm64 = "win-arm64"
|
||||
@@ -290,10 +286,6 @@ class PlatformId(str, Enum):
|
||||
|
||||
|
||||
class DotnetVersion(str, Enum):
|
||||
"""
|
||||
multilspy supported dotnet versions
|
||||
"""
|
||||
|
||||
V4 = "4"
|
||||
V6 = "6"
|
||||
V7 = "7"
|
||||
|
||||
@@ -46,17 +46,25 @@ log = logging.getLogger(__name__)
|
||||
@dataclasses.dataclass
|
||||
class ProcessLaunchInfo:
|
||||
"""
|
||||
This class is used to store the information required to launch a process.
|
||||
This class is used to store the information required to launch a (language server) process.
|
||||
"""
|
||||
|
||||
# The command to launch the process
|
||||
cmd: str | list[str]
|
||||
"""
|
||||
the command used to launch the process.
|
||||
Specification as a list is preferred (as it is more robust and avoids incorrect quoting of arguments);
|
||||
the string variant is supported for backward compatibility only
|
||||
"""
|
||||
|
||||
# The environment variables to set for the process
|
||||
env: dict[str, str] = dataclasses.field(default_factory=dict)
|
||||
"""
|
||||
the environment variables to set for the process
|
||||
"""
|
||||
|
||||
# The working directory for the process
|
||||
cwd: str = os.getcwd()
|
||||
"""
|
||||
the working directory for the process
|
||||
"""
|
||||
|
||||
|
||||
class LSPError(Exception):
|
||||
|
||||
Reference in new issue
Block a user