flx_lsp 0.3.0 copy "flx_lsp: ^0.3.0" to clipboard
flx_lsp: ^0.3.0 copied to clipboard

Language server for .flx — diagnostics, completion, hover, go-to-definition and document symbols, speaking LSP over stdio.

flx

flx_lsp #

Language server for flx. Speaks LSP over stdio; editors launch it, you generally should not.

dart pub global activate flx_lsp

For VS Code, install the extension from tools/vscode-flx rather than wiring this up by hand.

Features #

Syntax diagnostics Per keystroke — same message, position and hint as the build
Type errors On save, mapped back onto the .flx that produced them
Completion Hooks, widgets, arguments, enum shorthands, Icons, local bindings, composables
Hover Signatures and docs; the route for a @page; the expression behind a binding
Go to definition Composables across files, bindings, parameters — including from inside ${…}
… and into Dart Hooks, widgets, your own classes: useState lands in flx_runtime, Text in Flutter
Outline & workspace symbols Composables with their bindings nested

The design constraint #

The parser is fatally strict, and a file you are typing into does not parse — Column { ⟨cursor⟩ } has an empty block, which is a syntax error. So completion reads the token stream, never the AST, and falls back to a truncated tokenization when even the lexer fails on a half-typed string. Navigation and the outline use the last successful parse rather than emptying themselves on every keystroke.

Options #

initializationOptions.semanticDiagnostics: false turns off the Dart analyzer pass. It is on by default, and it writes files: type-checking requires transpiling the folder on save, so generated .dart appears as a side effect.

License #

BSD-3-Clause.

0
likes
150
points
150
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Language server for .flx — diagnostics, completion, hover, go-to-definition and document symbols, speaking LSP over stdio.

Repository (GitHub)
View/report issues

Topics

#flutter #dsl #lsp #language-server

License

BSD-3-Clause (license)

Dependencies

flx_compiler

More

Packages that depend on flx_lsp