in VS Code I want to provide custom JSDocs and autocomplete for javascript.
So I have a js file that contains definitions and JSDocs for specific objects and functions and I would like to have autocomplete and docs on hover, without the file/definitions being present in the current code base/context, but for example via an extension.
I found a solution by creating custom hover providers and use vscode.languages.registerCompletionItemProvider, but this is much less beautiful than what a language server can provide with docs.
My next idea was to somehow inject the file into the current LSP context from within the extension, but I didn’t find a way to do this.
Are there ways to do this or achieve something similar or do I have to settle with the first solution?
rstsec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.