mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
17 lines
404 B
Go
17 lines
404 B
Go
package handlers
|
|
|
|
import (
|
|
"github.com/tliron/glsp"
|
|
protocol "github.com/tliron/glsp/protocol_3_16"
|
|
)
|
|
|
|
// Todo: Implement incremental parsing
|
|
func TextDocumentDidChange(context *glsp.Context, params *protocol.DidChangeTextDocumentParams) error {
|
|
content := params.ContentChanges[0].(protocol.TextDocumentContentChangeEventWhole).Text
|
|
|
|
Parser.Clear()
|
|
Parser.ParseFromFile(content)
|
|
|
|
return nil
|
|
}
|