Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuiltinInfo ¶ added in v0.0.9
type BuiltinInfo struct {
Name string // e.g. "print"
Signature string // e.g. "func print(args ...any)"
Doc string // e.g. "Prints values to stdout"
}
BuiltinInfo holds metadata for a builtin function or keyword-level construct.
type Document ¶
type Document struct {
URI lsp.DocumentURI
Content string
Version int
// Cached analysis results
Program *ast.Program
SymbolTable *semantic.SymbolTable
Errors []error
Lines []string
}
Document represents an open document in the LSP
func (*Document) GetLineContent ¶
GetLineContent returns the content of a specific line (0-indexed)
func (*Document) GetWordAtPosition ¶
GetWordAtPosition returns the word at the given position
func (*Document) OffsetToPosition ¶
OffsetToPosition converts a byte offset to an LSP position
type DocumentStore ¶
type DocumentStore struct {
// contains filtered or unexported fields
}
DocumentStore manages all open documents
func NewDocumentStore ¶
func NewDocumentStore() *DocumentStore
NewDocumentStore creates a new document store
func (*DocumentStore) Close ¶
func (ds *DocumentStore) Close(uri lsp.DocumentURI)
Close removes a document from the store
func (*DocumentStore) Get ¶
func (ds *DocumentStore) Get(uri lsp.DocumentURI) *Document
Get retrieves a document by URI
func (*DocumentStore) Open ¶
func (ds *DocumentStore) Open(uri lsp.DocumentURI, content string, version int) *Document
Open adds a new document to the store
func (*DocumentStore) Update ¶
func (ds *DocumentStore) Update(uri lsp.DocumentURI, content string, version int) *Document
Update updates an existing document
Click to show internal directories.
Click to hide internal directories.