-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add new Feature to clangd by other extension #668
Comments
Can you give an example of a feature you have in mind? Is your feature's implementation going to be talking to the clangd server? If so, are you using a forked/modified clangd server that e.g. supports a new kind of LSP request? |
Hi @HighCommander4 |
hi @HighCommander4 |
Could you file an issue about publishing that package please? In the meantime, you'll need to check out the vscode-clangd repo and refer to the package using a local path the way I do in this example repo. |
Hi @HighCommander4
the problem is that the above code only works when the file has opened in vscode, if I directly call and do not open the text document in vscode, I will get 'ResponseError: trying to get AST for non-added document ' |
Clangd does require that the file be opened on the server with textDocument/didOpen before any operations (such as requesting an AST) are performed on it. However, opening the file on the server doesn't necessarily require opening it in the editor; I think you could use the client object exposed in the extension API to send the |
hi @HighCommander4 |
HI @HighCommander4
|
Glad you figured it out. For reference, the standard Language Server Protocol messages and notifications (such as |
Note: we mostly implement features in the clangd language server, and rely on Microsoft's LSP client framework to expose these in VSCode. Features requiring a lot of VSCode-specific work are unlikely to be implemented.
Hi,
The text was updated successfully, but these errors were encountered: