lua-language-server
lua-language-server copied to clipboard
Extension does not activate for virtual documents
Describe the bug When performing request forwarding from one extension to this extension it does not produce any responses for virtual documents until a proper lua text document is opened in a visible text editor.
Background:
I have made a language extension for an assembler which may have embedded lua scripts. To get lua language support I've implemented this via request forwarding and virtual documents as described in the VSCode documentation here. The text document provider for the virtual documents is registered with the schema c6510-embedded-content and I have also added it manually to the configuration setting Lua.workspace.supportScheme for this lua extension.
To Reproduce Steps to reproduce the behavior:
- Install the extension
roblunx.c6510-asm - Open a new workspace
- Open a new file with suffix
.sor set language toc6510-asm - Type content like
lua print("foo") - Make sure the file exists on disk by saving
- Completion and hover in the
.sfile will not work.
Next:
- Open a new document in the same workspace and set language to lua.
- Go back to the
.sfile and hover the embedded lua code (e.g. print function) and it will show hover info. - It still does not work for new documents that hasn't been saved.
Expected behaviorr** The lua extension should be activated for the workspace and provide completion and hover results also for virtual lua documents.
Environment (please complete the following information):
- OS: macOS
- Client: VSCode 1.68.1
Provided logs service.log file_Users_user_Documents_vscode-c6510-asm.log
AFAIK, the extension is actived by events, this extension register events:
"activationEvents": [
"onLanguage:lua",
"onWebviewPanel:lua-doc",
"onCommand:extension.lua.doc"
],
Maybe there are some API of VSCode to active these events.
Issue has gone stale