intorust / intorust.vscode

A VSCode extension for learning Rust
Other
9 stars 2 forks source link

better initial prompt #7

Open nikomatsakis opened 4 weeks ago

nikomatsakis commented 4 weeks ago

The initial prompt right now is pretty bare bones. I want to try providing it better and more context. I'm going to do some experimenting, I suspect we can do this in a fairly language-agnostic fashion but I have to explore what APIs vscode offers me.

nikomatsakis commented 4 weeks ago

From what I can tell, the only way to do what I want is to wrap the rust-analyzer language server (and presumably extension??). I had assumed it would be possible to ask vscode to do common operations (getDocumentSymbols) so that people could implement extensions that work across languages, but that doesn't seem to be true, at least based on what I see in the publicly documented API.

nikomatsakis commented 4 weeks ago

Examples of things I want to do:

nikomatsakis commented 3 weeks ago

OK, I've found that rust-analyzer returns a language client as part of its extension API. So by loading that I am able to get what I need, it seems, though so far it feels awfully clumsy (maybe I've not found the right vscode.d interface definitions).