diff --git a/README.md b/README.md index a20bc60..1040d38 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ unless you add a `.luarc.json` file with the following content: } ``` +### Clangd +If `clangd` can't find some headers, then you need to create a `compile_commands.json` file. +When a `Makefile` is present (or other build tools such as `cmake` are used, look up how to do that online), you can use `bear` as follows to create this file: +`bear -- make`. That's it + ### Java #### jdtls Ensure you have jdk21-opnejdk or newer installed. On Arch (and derivatives) you can switch the preferred java version using `archlinux-java set ` diff --git a/nvim/lua/plugins/lsp/ls/c.lua b/nvim/lua/plugins/lsp/ls/c.lua index 7734c53..4917d07 100644 --- a/nvim/lua/plugins/lsp/ls/c.lua +++ b/nvim/lua/plugins/lsp/ls/c.lua @@ -11,7 +11,7 @@ lsp.config("clangd", { "--suggest-missing-includes", "--clang-tidy", }, - filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto", "ino" }, + filetypes = { "c", "cpp", "objc", "objcpp", "cuda" }, capabilities = opts.capabilities, on_attach = opts.on_attach_no_formatting, })