Salt Language Server Protocol Server
- Python >= 3.8
- Poetry
- VSCode (required for live testing the server from an editor)
Install the dependencies:
$ poetry install
Create the completion classes once:
$ poetry run dump_state_name_completions
Start the server:
$ poetry run salt_lsp_server --tcp
Install the server:
$ poetry build
$ pip install --user --force-reinstall dist/salt_lsp-0.0.1*whl
- Run
yarn install
- Start VSCode and open this directory as the server
- Open the Debug menu (Ctrl + Shift + D)
- Select "Launch Client" drop down
- Press F5
You should install salt-mode so
that sls
files are registered to the salt major mode. The language server must
be installed on your system so that the clients can launch it.
- Install & configure lsp-mode
- Load the file
clients/emacs/salt-lsp.el
- Open a sls file and launch
lsp
viaM-x lsp
- Install & configure eglot
- Evaluate the following snippet:
(add-to-list 'eglot-server-programs '(salt-mode . ("python3" "-m" "salt_lsp")))
- Launch eglot via
M-x eglot