Update server.ts

This commit is contained in:
Corey Johnson 2025-11-07 07:30:10 -08:00
parent 854ed02625
commit b3ec6995db

View File

@ -63,6 +63,7 @@ function handleInitialize(): InitializeResult {
function handleDocumentOpen(event: TextDocumentChangeEvent<TextDocument>) {
const document = event.document
setGlobals(Object.keys(globals))
const tree = parser.parse(document.getText())
documentTrees.set(document.uri, tree)
}
@ -82,6 +83,7 @@ function handleDocumentChange(change: TextDocumentChangeEvent<TextDocument>) {
const document = change.document
// Parse and cache
setGlobals(Object.keys(globals))
const tree = parser.parse(document.getText())
documentTrees.set(document.uri, tree)