Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/multilspy/language_servers/rust_analyzer/rust_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ def setup_runtime_dependencies(self, logger: MultilspyLogger, config: MultilspyC
"""
Setup runtime dependencies for rust_analyzer.
"""

if config.custom_lsp_binary:
path = os.path.abspath(config.custom_lsp_binary)
assert os.path.exists(path)
return path

platform_id = PlatformUtils.get_platform_id()

with open(os.path.join(os.path.dirname(__file__), "runtime_dependencies.json"), "r") as f:
Expand Down
3 changes: 3 additions & 0 deletions src/multilspy/multilspy_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from enum import Enum
from dataclasses import dataclass
from typing import Optional

class Language(str, Enum):
"""
Expand Down Expand Up @@ -33,6 +34,8 @@ class MultilspyConfig:
code_language: Language
trace_lsp_communication: bool = False
start_independent_lsp_process: bool = True
# Only works for Rust Analyzer
custom_lsp_binary: Optional[str] = None

@classmethod
def from_dict(cls, env: dict):
Expand Down