Questions tagged [clangd]

clangd is a language server that implements the Language Server Protocol

clangd is a language server that implements the Language Server Protocol

156 questions
2
votes
1 answer

In included file: 'begin_code.h' file not found occurring in Neovim LSP

I am trying to set up my Neovim for C development however, whenever I use: #include I get an error saying "In included file: 'begin_code.h' file not found". I did some digging and in my include files and I did see 'begin_code.h'. I am…
2
votes
0 answers

Qt Creator runs clangd many times and the demons don't finish

I had left turned on Ubuntu and Qt Creator for a night, next day the htop showed: Qt Creator 7.0.0 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), 64). Built Mar 22 2022 в 02:18:16. Revision 638b93591b. clangd version 14.0.0…
2
votes
1 answer

Clangd: treat files with non-standard extensions as headers

I am working with an old C code base where there are header files with non-standard extensions such as .s, .e, etc instead of .h For compatibility reasons I cannot rename these files. Currently these files are causing the following error message in…
Gabriel Devillers
  • 3,155
  • 2
  • 30
  • 53
2
votes
0 answers

SDL2/SDL.h not found, clang(pp_file_not_found)

I don't understand where I'm making a mistake. My steps: Installing vscodium, msys2. Updating msys2 packages, installing clangd extension, CodeLLdb. Checking compilation build, work.everything works. Installing SDL inside the project. Tree - Tree…
Elektronik
  • 21
  • 1
2
votes
2 answers

clangd for vscode with multiple build directories

I am trying to use clangd for code completion within vscode. I am using CMake for the project setup and I am creating a compilation database. However, I have several build directories with different flags (Debug, Release...) and clangd requires to…
jjcasmar
  • 1,387
  • 1
  • 18
  • 30
2
votes
0 answers

Clangd code completion not working with IPP (TPP) files in VS Code

When I separate a template class definition into an HPP file and a IPP (TPP) file as suggested here, I cannot take advantage of the code completion feature offered by clangd. Is there a way to "inform" the IPP (TPP) file about its corresponding…
fdev
  • 127
  • 12
2
votes
1 answer

What TAB completion is triggering the insertion of the include statement for bits/stdc++.h? How can I prevent it?

Sometimes, after some hour of coding, in which I've certainly mashed TAB, I find out some file containing #include (which I don't want to use), which means that some TAB-completion triggered that. Since I discover this after a long…
Enlico
  • 23,259
  • 6
  • 48
  • 102
2
votes
1 answer

How to manually(without keybindings) search a symbol in a source code using coc-clangd/coc-nvim?

I use neovim and coc-clangd for C/C++ programming. Every thing is ok and i can jump through definitions and search references of a symbol in all of my project files by holding the cursor on the symbol and use the gr keybinding for calling the…
AMIR REZA SADEQI
  • 409
  • 2
  • 5
  • 13
2
votes
1 answer

Strange clangd crash when using \n instead of endl with -std=c++2a

This is the reference source file #include int main() { int x = 7; std::cout << x << '\n'; } If I open a line before the line with cout and write std:: I correctly see YCM's semantic cmpletion popup; if I do the same after the…
Enlico
  • 23,259
  • 6
  • 48
  • 102
2
votes
1 answer

how to program in C with lib gtk in vim with coc-clangd?

I copied the "Hello world" code from the website of the GTK project and pasted it into Vim with the environment to develop in C properly configured with coc-clangd. However, several errors are shown in the #include But when I send…
2
votes
0 answers

is it possible to use coc.nvim extensions behind a firewall?

In my case, I am trying to use coc-clangd at work where we have a firewall, preventing access to external resources (like github). There is however a way to have a local mirror of github repos. This is where i have copies of coc.nvim and…
ambushed
  • 533
  • 1
  • 5
  • 14
2
votes
1 answer

Indexing whole project directory with vim and coc-clangd

Since few day I am trying to force vim-coc (with coc-clangd) to work properly with project. My test project is clonned bluez project. When I openbluez/src/main.c with vim (neovim in my case) most of autocompletion and goto definition works but…
PatLas
  • 179
  • 1
  • 5
  • 16
2
votes
1 answer

Clangd not finding standard headers

I am using Atom to write C++ code and have installed the llvm suite to use an Atom package which uses the clangd language server. It seems to be working, except that clangd doesn't seem to find the standard headers (e.g. iostream, algorithm). I…
scmartin
  • 53
  • 1
  • 6
1
vote
0 answers

nvim clangd problem with #define, #ifdef, and BEGIN_DECLS

This is a minimal stm32 project based on libopencm3 library. The problem is clangd language server in neovim, does not detect definitions in some header files and throws errors. For example if you open the header file libopencm3/stm32/dma.h which is…
mehdi
  • 167
  • 11
1
vote
1 answer

How to setup clangd in visual studio code to support C23

I'm having some trouble setting up clangd visual studio extension to support C23. I use the following .clangd file CompileFlags: Add: ["--std=c2x"] Compiler: gcc In my root folder: .clangd src main.c I can see from the extension logs that…
Nullndr
  • 1,624
  • 1
  • 6
  • 24