Forgot to set globals in server
This commit is contained in:
parent
afaedeea23
commit
1082cc1281
|
|
@ -11,6 +11,8 @@ import {
|
|||
ProposedFeatures,
|
||||
CompletionItemKind,
|
||||
} from 'vscode-languageserver/node'
|
||||
import { setGlobals } from '../../../src/parser/tokenizer'
|
||||
import { globals } from '../../../src/prelude'
|
||||
|
||||
const connection = createConnection(ProposedFeatures.all)
|
||||
const documents = new TextDocuments(TextDocument)
|
||||
|
|
@ -31,10 +33,7 @@ connection.onRequest('shrimp/bytecode', handleBytecode)
|
|||
// Start listening
|
||||
connection.listen()
|
||||
|
||||
// ============================================================================
|
||||
// Handler implementations
|
||||
// ============================================================================
|
||||
|
||||
function handleInitialize(): InitializeResult {
|
||||
connection.console.log('🦐 Server initialized with capabilities')
|
||||
const result: InitializeResult = {
|
||||
|
|
@ -85,6 +84,7 @@ function handleParseTree(params: { uri: string }) {
|
|||
if (!document) return 'Document not found'
|
||||
|
||||
const text = document.getText()
|
||||
setGlobals(Object.keys(globals))
|
||||
const tree = parser.parse(text)
|
||||
const cursor = tree.cursor()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user