module

Adamantine::LspRegistry

Constants

LANGUAGE_SERVERS = {"crystal" => ["adamas_lsp", "crystalline", "crystal-lsp"], "ruby" => ["solargraph", "ruby-lsp"], "python" => ["pyright", "pylsp"], "typescript" => ["typescript-language-server"], "javascript" => ["typescript-language-server"], "go" => ["gopls"], "rust" => ["rust-analyzer"], "c" => ["clangd"], "cpp" => ["clangd"], "java" => ["jdtls"], "kotlin" => ["kotlin-language-server"], "swift" => ["sourcekit-lsp"], "lua" => ["lua-language-server"], "elixir" => ["elixir-ls", "lexical"], "haskell" => ["haskell-language-server"], "ocaml" => ["ocamllsp"], "zig" => ["zls"], "nim" => ["nimlangserver"], "csharp" => ["omnisharp", "csharp-ls"], "bash" => ["bash-language-server"], "yaml" => ["yaml-language-server"], "scala" => ["metals"], "dart" => ["dart"]}
PROJECT_MARKERS = {"shard.yml" => "crystal", "Gemfile" => "ruby", "Cargo.toml" => "rust", "go.mod" => "go", "package.json" => "typescript", "pyproject.toml" => "python", "setup.py" => "python", "requirements.txt" => "python", "pom.xml" => "java", "build.gradle" => "java", "build.gradle.kts" => "kotlin", "Package.swift" => "swift", "mix.exs" => "elixir", "stack.yaml" => "haskell", "dune-project" => "ocaml", "pubspec.yaml" => "dart", "build.zig" => "zig"}

Class methods

detect_project_language(root : Path) : String | Nil
Source
executable?(path : String) : Bool
Source
find_adamas_lsp(_project_root : Path, _cwd : Path = Path.new(Dir.current)) : String | Nil

Resolve the bundled Adamas server only when it is explicitly exposed on PATH. Project trees and their ancestors are untrusted input; walking them for executable files would turn merely opening a project into code execution.

Source
find_lsp_for_language(language_id : String) : String | Nil
Source
which(name : String) : String | Nil
Source