gotlin/cmd/gotlin-lsp/README.md
Pavel Flegr 8f4f858d86 init
2026-03-05 14:55:09 +01:00

965 B

gotlin-lsp

Minimal stdio language server for .gt files.

Current support:

  • initialize
  • shutdown
  • exit
  • textDocument/didOpen
  • textDocument/didChange
  • textDocument/didClose
  • publish diagnostics from the existing Gotlin parser/code generator
  • textDocument/hover for packages, imports, and top-level functions
  • textDocument/definition for imported namespaces and top-level functions
  • simple semantic diagnostics for duplicate imports/functions and undefined names
  • optional fallback to gopls for hover/definition on Go-imported symbols

Build:

go build -o ./bin/gotlin-lsp ./cmd/gotlin-lsp

Use your editor's custom LSP configuration to launch:

./bin/gotlin-lsp

gopls bridge

If gopls is installed, gotlin-lsp will try to use it as a fallback for hover and definition on Go-imported symbols.

You can set an explicit path with:

GOTLIN_GOPLS_PATH=/absolute/path/to/gopls ./bin/gotlin-lsp