craft-ls
is a Language Server Protocol implementation for *craft1 tools.
craft-ls
enables editors that support the LSP to get quality of life improvements while working on *craft configuration files.
Feature | Snapcraft | Rockcraft | Charmcraft1 |
---|---|---|---|
Diagnostics | ✅ | ✅ | ✅ |
Symbol documentation | ✅ | ✅ | ✅ |
Autocompletion | ❌ | ❌ | ❌ |
demo.mov
Using uv
or pipx
uv tool install craft-ls
pipx install craft-ls
# languages.toml
[[language]]
name = "yaml"
language-servers = ["craft-ls"]
[language-server.craft-ls]
command = "craft-ls"
The VSCode extension can be installed from the marketplace. It requires a Python 3.12 interpreter. If not automatically picked, you may configure it using the following key:
"craft-ls.interpreter": [
"/usr/bin/python3.12"
]
TBD: neovim
Project availability:
- Python package
- Snap
- Nix flake
- VSCode extension
Features:
- Diagnostics
- Autocompletion on typing
- Symbol documentation
Ecosystem:
- Encourage *craft tools to refine their JSONSchemas even further