LSP & Editor Setup

visuall-lsp is a Language Server Protocol server that brings Visuall language support to any LSP-compatible editor.

Capabilities

FeatureDescription
DiagnosticsReal-time error and warning underlines with range highlighting
CompletionScope-aware autocomplete (trigger: ., (, ", ')
HoverType information and documentation on hover
Go to DefinitionJump to symbol definitions (cross-file via workspace index)
Find ReferencesList all usages of a symbol across the workspace
Document SymbolsBreadcrumb outline of functions, classes, and scopes
Workspace SymbolsFuzzy search for symbols across all project files
FormattingFull-document formatting
Inlay HintsInline type annotations and parameter names
Semantic TokensSyntax highlighting (keywords, functions, classes, etc.)
Signature HelpFunction parameter hints on ( and , trigger
Code ActionsQuick fixes (missing return, typo suggestions)
RenameCross-file symbol renaming
Incremental SyncEfficient range-based document sync for large files

Building

The LSP builds alongside the compiler when BUILD_LSP=ON (default):

cd build
cmake .. -DBUILD_LSP=ON
cmake --build . --target visuall-lsp

The binary visuall-lsp will be in build/tools/visuall-lsp/.

Editor Setup

VS Code

Add to settings.json:

"visuall.lsp.path": "/path/to/build/tools/visuall-lsp/visuall-lsp"

Neovim

Using nvim-lspconfig:

local lspconfig = require('lspconfig')
lspconfig.visuall_lsp = {
  cmd = { '/path/to/visuall-lsp' },
  filetypes = { 'visuall' },
  root_dir = lspconfig.util.root_pattern('vsl.toml', '.git'),
}

Other Editors

visuall-lsp implements standard LSP over stdio. Configure any LSP-compatible editor (Helix, Emacs, Zed, etc.) to launch visuall-lsp for .vsl files.

The server discovers project structure by looking for a vsl.toml or .git directory at the workspace root, and indexes all .vsl files under it.