This is a Go-based LSP implementation for the Textwire templating language.
go get github.com/textwire/lsp- Language: Go 1.25.0
- Module:
github.com/textwire/lsp - Main dependency:
github.com/textwire/textwire/v6
- main.go: Entry point, message routing via stdio
- lsp/: LSP message types (initialize, hover, completion, document changes)
- analysis/: Core logic (state management, hover, completion features)
- rpc/: RPC encoding/decoding utilities
- internal/logger/: Logging utilities
All commands are in the Makefile:
make test- Run all testsmake build- Build the binarymake check-fmt- Verify Go code formatting
- Follow standard Go conventions
- Run
gofmton all files - All tests must pass
- Maintain existing code style and patterns
Current LSP methods implemented:
initialize- Server initializationtextDocument/didOpen- Track opened documentstextDocument/didChange- Track document changestextDocument/hover- Hover informationtextDocument/completion- Autocomplete suggestions
All commands run inside a container. The image is built automatically the first time you run any command:
make testmake build-image- Build the checks container imagemake build- Builds amainbinary in the root of the projectmake test- Run all testsmake fmt- Format Go codemake lint- Run lintermake check- Combines commands like: test, fmt, lintmake- Defaults tomake check
Commands use podman-compose by default. To use Docker Compose instead, override OCI:
make check OCI='docker compose'To publish a new version of LSP, you need to use tags. As soon as you push a new tech to GitHub, it will run a build that will create a release for this new version.
git tag <version>git push --tagsThe Textwire LSP project is licensed under the MIT License and is free to use, modify, and distribute.