Open minestarks opened 1 year ago
Draft PR wiring up basic implementation of P1 features in VS Code and the playground: #364
@minestarks -- is #1038 going to unblock LSP support, or are there other changes required?
Also, perhaps we could file some separate issues for some of these features and use this issue to track them?
@minestarks -- is #1038 going to unblock LSP support, or are there other changes required?
@sezna well, we'd have to implement an LSP server... but if you're asking if anything in the core language service crate needs to change, I don't think so. I had a prototype for this a few months ago using the https://github.com/python-lsp/python-lsp-jsonrpc package which was working in JupyterLab. I think it's just a matter of wiring pieces together.
Also, perhaps we could file some separate issues for some of these features and use this issue to track them?
Yes this issue is quite big, I don't mind breaking off a few items. I didn't want to create issues for things that aren't even on our radar, but for near-term stuff (e.g. formatting) and for stuff we want a dedicated discussion thread for, it makes sense.
This issue tracks the implementation of the language service and editor features for Q#. Editor features are things like autocomplete, go-to-definition and hover. The language service is the component that uses the compiler internals to keep track of the current state of the program, update the program in response to document updates, and answer questions about it in response to requests from the editor.
Components involved
run()
method etc)pip install
the extension instead of having to separately install Node.js) for a JupyterLab user.Implementation plan
This list shows the proposed order of implementation, based on complexity (simpler features like hover are prioritized above more complicated ones like completions) and feature priority (VS Code extension being the highest priority deliverable).
The links are to LSP documentation. Even if we don't implement a true LSP server, we'll follow the LSP spec while designing the interface as it closely resembles the extensibility model used by many editors (VS Code, Monaco, JupyterLab, etc).
}
)