Docs/Toolchain/Editor Setup
Editor Setup
fid lsp gives any editor diagnostics, completion, hover, go-to-definition and rename.
~1 min read
On this page
The built-in LSP server
fid lspA JSON-RPC language server over stdio, with no dependencies: diagnostics come straight from the compiler’s parser and type checker.
VS Code
The Fid Language extension in editors/vscode highlights .fd files and starts fid lsp for diagnostics, completion, hover, go-to-definition and rename. It is not on the Marketplace yet; package and install it from the repository:
cd editors/vscode
npm install
npx @vscode/vsce package
code --install-extension fid-lang-0.1.0.vsixIf fid is not on your PATH, set its location in .vscode/settings.json:
{
"fid.server.path": "/path/to/fid"
}Neovim
init.lua (Neovim 0.11 or later):
vim.filetype.add({ extension = { fd = 'fid' } })
vim.lsp.config('fid', { cmd = { 'fid', 'lsp' }, filetypes = { 'fid' } })
vim.lsp.enable('fid')Supported methods
| Method | Behavior |
|---|---|
initialize / initialized | Capability negotiation (text sync, diagnostics, completion, hover, definition, rename) |
textDocument/didOpen | Publishes diagnostics on open |
textDocument/didChange | Full-document sync; diagnostics re-published on every change |
textDocument/didClose | Clears document state |
textDocument/completion | Keyword and symbol completion |
textDocument/hover | Type and signature information on hover |
textDocument/definition | Go-to-definition across your source |
textDocument/rename | Rename symbols project-wide |
shutdown / exit | Clean termination |