Documentation
¶
Overview ¶
Package lsp implements a Language Server Protocol server for ELPS. It provides diagnostics, hover, go-to-definition, references, completion, document symbols, and rename support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
URI string
Version int32
Content string
// contains filtered or unexported fields
}
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 with thread-safe access.
func NewDocumentStore ¶
func NewDocumentStore() *DocumentStore
NewDocumentStore creates an empty document store.
func (*DocumentStore) All ¶ added in v1.27.0
func (s *DocumentStore) All() []*Document
All returns a snapshot of all open documents.
func (*DocumentStore) Change ¶
func (s *DocumentStore) Change(uri string, version int32, content string) *Document
Change updates a document's content (full sync) and re-parses it.
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.
type InlayHint ¶ added in v1.32.0
type InlayHint struct {
Position protocol.Position `json:"position"`
Label string `json:"label"`
Kind int `json:"kind"` // 1=Type, 2=Parameter
PaddingLeft bool `json:"paddingLeft,omitempty"`
PaddingRight bool `json:"paddingRight,omitempty"`
}
InlayHint is a single inlay hint returned to the client.
type InlayHintParams ¶ added in v1.32.0
type InlayHintParams struct {
TextDocument protocol.TextDocumentIdentifier `json:"textDocument"`
Range protocol.Range `json:"range"`
}
InlayHintParams is the parameter for textDocument/inlayHint.
type Option ¶
type Option func(*Server)
Option configures the LSP server.
func WithRegistry ¶
func WithRegistry(reg *lisp.PackageRegistry) Option
WithRegistry injects an embedder's package registry for stdlib exports.
Source Files
¶
- call_hierarchy.go
- code_actions.go
- completion.go
- definition.go
- diagnostics.go
- document.go
- folding.go
- formatting.go
- handler_wrapper.go
- highlight.go
- hover.go
- inlay_hints.go
- linked_editing.go
- position.go
- references.go
- rename.go
- selection_range.go
- semantic_tokens.go
- server.go
- signature.go
- symbols.go
- virtual.go
- watched_files.go
- workspace_symbols.go