PhilippeChab / nwscript-ee-language-server

A NWScript Language Server.
https://marketplace.visualstudio.com/items?itemName=PhilippeChab.nwscript-ee-language-server
MIT License
20 stars 7 forks source link

[Autocomplete] Prioritize 'else' over NWScript functions #25

Closed Aschent89 closed 2 years ago

Aschent89 commented 2 years ago

Current state: image

Hitting enter or tab autocompletes to EffectSleep. Ideally would/should prioritize else instead of NWScript options.

PhilippeChab commented 2 years ago

The CompletionItemsProvider does not return any of the language's control keywords. I've asked myself if it actually should during the implementation, and after considering the facts that a) this is something no other LSP does, b) there is already plenty of completion items to deal with for vscode with the global scope of nwscript and c) we don't really need control keywords as completion items as they are quick to write and not something we will tend to forget, I've decided not to add them.

Same goes for the language basic types, directives, etc.