Editor Integration
Set up Soli language support in your favorite editor. Full LSP features including autocomplete, hover docs, and real-time linting.
Zero Configuration Required
Install the extension and it just works. The LSP server starts automatically when you open a .sl file.
Cursor & VS Code
The Cursor and VS Code extensions provide the full Soli language experience with LSP support.
Installation
Install from the .vsix package:
cd editors/vscode
vsce package
# Then install .vsix in your editor
Settings
Customize in settings.json:
{
"soli.lsp.enable": true,
"soli.lint.onSave": true
}
Available LSP Features
hover
Documentation for functions, classes, and builtins
completion
Keywords, types, and local symbols
definition
Jump to symbol definitions
references
Find all uses of a symbol
documentSymbol
Outline view of your code
foldingRange
Fold classes and functions
inlayHint
Inline type annotations
codeAction
Quick fixes for lint violations
formatting
Format entire document
Neovim
Neovim has built-in LSP support. Configure using lspconfig:
-- ~/.config/nvim/lua/lsp/soli.lua
local lspconfig = require('lspconfig')
lspconfig.soli.setup({
cmd = {"soli", "lsp"},
filetypes = {"soli"},
root_dir = function(filename)
return lspconfig.util.root_pattern("soli.toml", ".git")(filename)
end,
settings = {
soli = {}
},
capabilities = require('cmp_nvim_lsp').default_capabilities(),
})
Or without lspconfig (Neovim 0.10+):
vim.lsp.config('soli', {
cmd = {"soli", "lsp"},
filetypes = {"soli"},
root_markers = {"soli.toml"},
})
vim.lsp.enable('soli')
Other Editors
Any editor that supports the Language Server Protocol can use Soli's LSP server.
{
"name": "soli",
"command": "soli lsp",
"filetypes": ["soli"],
"rootPatterns": ["soli.toml"],
"languageId": "soli"
}
Requirements
- The
solibinary must be in your PATH - Editor files should use the
.slextension - For project root detection, include a
soli.tomlfile in your project