akfish/vscode-devdocs

Search in correct documentation

Jomik opened this issue · 1 comments

Jomik commented

Would it be possible to make it so that when you open the documentation on an array in a javascript file, that it then searches specifically in the devdocs.io/javascript documentation and not in everything?
Seems like devdocs sets this tag when you search it "manually" following the instructions.
<div class="_search-tag" style="display: block;">JavaScript</div>

I've had issues where it'd search the XML documentation, from a .js file, which isn't really what I wanted, and kind of defeats the purpose of the hotkey, as I would have to clear the search bar and then type it in manually anyway.

jcw- commented

To implement, I believe all you have to do is use the detected language of the current file as a prefix in the search string: javascript map will automatically search just the javascript documentation.