Nathan Ridge

Results 1499 comments of Nathan Ridge

> [@HighCommander4](https://github.com/HighCommander4) Any guidance where to start on this? The code to build the array designator contents is around [here](https://searchfox.org/llvm/rev/3d91a71223801bb73ab3e4ff8ab3f883639ed79f/clang-tools-extra/clang-tidy/utils/DesignatedInitializers.cpp#74-76). This is a utility shared by clang-tidy and clangd; clangd...

I can't reproduce this on Linux, even after running the input file through `unix2dos` (so it has CRLF line endings). Can you share a verbose clangd log?

The log you shared doesn't include the `didOpen` message to show the state of the file before the formatting. If possible, logs starting at clangd startup are ideal.

Thanks; I am able to reproduce the issue on Linux now, with an input file containing `\r\n` line endings. Looking at the server's response to `textDocument/formatting`: ```json { "id": 8,...

> I couldn't find the code in the extension that applies these changes, The code that applies the formatting edits is not in vscode-clangd, but in vscode itself. vscode-clangd includes...

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...

Can you use the extension API shown [here](https://github.com/clangd/vscode-clangd/blob/master/api/README.md) (see also [this file](https://github.com/clangd/vscode-clangd/blob/master/api/vscode-clangd.d.ts)) to ask clangd for an AST and then do your processing on it and provide the user feature...

> I do not find a package of @clangd/vscode-clangd in npm Could you file an issue about publishing that package please? In the meantime, you'll need to check out the...

> is it possible not open file and get ast node of a c file just by pass uri directly? Clangd does require that the file be opened on the...

Glad you figured it out. For reference, the standard Language Server Protocol messages and notifications (such as `didOpen`) are documented at https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/.