Skip to content

craft-ls enables editors that support the LSP to get quality of life improvements while working on *craft configuration files.

License

Notifications You must be signed in to change notification settings

Batalex/craft-ls

Repository files navigation

craft-ls

GitHub Actions Workflow Status

Get on
PyPI - Version FlakeHub Snap - Version VSCode Marketplace

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.

Features

Feature Snapcraft Rockcraft Charmcraft1
Diagnostics
Symbol documentation
Autocompletion
demo.mov

Usage

Installation

Using uv or pipx

uv tool install craft-ls

pipx install craft-ls

Setup

Helix

# languages.toml
[[language]]
name = "yaml"
language-servers = ["craft-ls"]

[language-server.craft-ls]
command = "craft-ls"

VSCode

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

Roadmap

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

Footnotes

  1. snapcraft, rockcraft and partial support for charmcraft (all-in-one charmcraft.yaml only) 2

About

craft-ls enables editors that support the LSP to get quality of life improvements while working on *craft configuration files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •