Handmade Network»Forums
Will Ehrendreich
1 posts
clangd on windows in neovim

Hey all, hope you're having a good day.

I'm competely new to c programming and I want to follow along to handmade hero to learn.

I don't however, want to go through it without having my basic LSP working in Neovim.

Has anyone else done this?

I cannot get it to recognize anything, it doesn't load header files.

I'm super lost as to what to do to get set up, and there isn't any lsp related setup resources that i could find.

it's only sublime text and atom, which if i remember correctly atom is defunct?

I'm on Windows 10, and use neovim with Clangd. or.. i want to.. any advice?

Mārtiņš Možeiko
2562 posts / 2 projects
clangd on windows in neovim

I expect clangd or any similar tools will not work well on Handmade Hero source code because its code base builds as unity build. Meaning .cpp files won't find correct declarations because includes are maintained in place where .cpp file itself is included. The .cpp files are not standalone translation units in such build.

Amin Mesbah
13 posts / 1 project
clangd on windows in neovim
Replying to mmozeiko (#29283)

Indeed. See this open issue: https://github.com/clangd/clangd/issues/45

I haven't found an existing solution for go-to-definition that works reliably for code bases structured this way.