Closed embeddedpenguin closed 2 years ago
Fixed this by changing ~/.config/nvim/lua/user/lsp/settings/clangd.lua to
return {
cmd = "clangd --query-driver=/usr/bin/arm-unknown-eabi-gcc"
}
Right now it does feel like a lot of guessing though. That obviously isn't really anyones fault, though. It would be awesome if you could go through and show how to configure these on a per project basis. Like maybe clangd looks in the project root and finds a .clangd file that has some arguments we can pass here so I don't have to change this file every time I need to work with a different toolchain. Thanks a bunch for this series!
I'm basically trying to add onto what you've done here in ~/.config/nvim/lua/user/lsp/lsp-installer.lua
I've added the clangd portion. Then, I've added ~/.config/nvim/lua/user/lsp/settings/clangd.lua :
This is probably just my poor understanding of lua, but in my brain this should work. It doesn't though. When opening a C file and using :LspInfo, I can see that the cmd is still just clangd:
I also can't find any documentation for what settings these "opts" structs actually take for clangd, so I have no idea if it's actually called "cmd" or "command" or what. I'm assuming it's called cmd because LspInfo lists it as cmd.