Update server.ts
This commit is contained in:
parent
854ed02625
commit
b3ec6995db
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user