This repo contains an implementation of a language server for Algebraic Data Language and a VSCode extension implementing the corresponding language client.
The language server conforms to the Language Server Protocol and uses tree-sitter to implement efficient parsing. The full grammar is defined in tree-sitter-adl.
The Rust code in adl-lsp borrows code and architecture from
coder3101's implementation of
Protols (a Protobuf Language Server).
When paired with the VSCode extension you will be provided
- ✅ Syntax highlighting (by guyNeara from adl-vscode-highlight)
- ✅ Goto definition and goto references
- ✅ Diagnostics
- ✅ Hover information
Further planned features
- 🚧 Symbol renaming
- 🚧 Import management
- 🚧 Code completion and suggestions
- 🚧 Formatting
- 🚧 Style and linting rules
- 🚧 Type-checking of interior JSON values
- 🚧 Plugins for other editors (neovim, helix)
This repo implements a VSCode client extension that is published to the marketplace. See the README for futher configuration instructions.
[[language]]
name = "algebraic-data-language"
scope = "source.adl"
language-id = "adl"
file-types = ["adl", "adl-cpp", "adl-hs", "adl-java", "adl-hs", "adl-rs", "adl-ts"]
roots = [".git"]
comment-tokens = ["//", "///", "//!"]
language-servers = ["adl-lsp"]
workspace-lsp-roots = ["adl"]
[language-server.adl-lsp]
command = "adl-lsp"First install [adl-vim-highlight] for ADL file detection and syntax highlighting
vim.lsp.config["adl-lsp"] = {
cmd = { "adl-lsp" },
filetypes = { "adl" },
root_markers = { ".git" },
}
vim.lsp.enable("adl-lsp")This project is licensed under the MIT License.