Documentation
¶
Overview ¶
Package lspserver implements a Language Server Protocol server for tally.
The server provides Dockerfile linting diagnostics, quick-fix code actions, and document formatting through the LSP protocol. It reuses the same lint pipeline as the CLI (dockerfile.Parse, semantic model, rules, processors).
Transport: stdio only (--stdio). Protocol: LSP 3.17 types via internal/lsp/protocol, JSON-RPC via golang.org/x/exp/jsonrpc2.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
// URI is the document URI (e.g., "file:///path/to/Dockerfile").
URI string
// LanguageID is the language identifier (e.g., "dockerfile").
LanguageID string
// Version is the document version as reported by the client.
Version int32
// Content is the current full text of the document.
Content string
}
Document represents an open text document tracked by the LSP server.
type DocumentStore ¶
type DocumentStore struct {
// contains filtered or unexported fields
}
DocumentStore manages open documents in the LSP server. It is safe for concurrent access.
func NewDocumentStore ¶
func NewDocumentStore() *DocumentStore
NewDocumentStore creates a new empty document store.
func (*DocumentStore) All ¶
func (s *DocumentStore) All() []*Document
All returns a snapshot slice of all currently open documents.
func (*DocumentStore) Close ¶
func (s *DocumentStore) Close(uri string)
Close removes a document from the store.
func (*DocumentStore) Get ¶
func (s *DocumentStore) Get(uri string) *Document
Get retrieves a document by URI. Returns nil if not found.