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
1
vote
0 answers

vscode display too much function paramters

I don't know if this is a vscode bug or an extension bug. And I didn't find how to disable it. If anyone can see this picture, please help me. Thanks! For example: The prototype for a function is: static inline struct file *get_file(struct file…
dazhi
  • 11
  • 2
1
vote
1 answer

Why my clangd in vscode will change my header file's order to alphabetical order when I was fomating doc?

I found my clangd plugin in VSCode will modify *.h file's order to alphabetical order. For example: before: -#include "c.h" -#include "b.h" -#include "a.h" after: +#include "a.h" +#include "b.h" +#include "c.h" And here is my clangd's settins,How…
lyt626
  • 35
  • 5
1
vote
1 answer

How to make SCons export compile commands including flags pointing to a conda virtual environment?

I'm working on a C++ project that is built with SCons. I installed SCons using my system's package manager. The project has some dependencies that I installed into a virtual environment using conda. I followed the SCons documentation to export a…
Quappas
  • 79
  • 7
1
vote
0 answers

In vim plugin CoC, how to change coc-clangd source priority?

How to change coc-clangd source priority? I use vim conqueror of completion with language server client coc-clangd as autocompletion source and I would like to lower its priority from 99 to 70. I cannot find how to do in the doc. I tried the…
Robert
  • 171
  • 9
1
vote
0 answers

CLion 2022 no matching 'operator new' C++

I am getting this error from Clangd on std functions since I upgraded to CLion 2022.1.1: In template: no matching 'operator new' function for non-allocating placement new expression; include This error is displayed on std functions such as…
1
vote
1 answer

Visual Studio Code clangd Find all references only works for local folder

I have a project with source files in multiple folders. I am using clangd as my language server. I have a single cmake file at the top of my source folder (I actually don't use cmake to build my project, I only use it to generate the…
dvader
  • 11
  • 4
1
vote
3 answers

clangd cannot parse stl lib header

I met a issue when I config my neovim lsp. My lsp client is nvim-lspconfig and clangd is my lsp server. Here is my clangd setup arguments require('lspconfig')['clangd'].setup { on_attach = on_attach, flags = { -- This will be the default in…
d1337
  • 11
  • 3
1
vote
1 answer

How to include path using an eviornment variable in compile_flags.txt?

I am compiling with clang and editing with Visual Studio Code using the clangd extension on Windows. Compilation is fine, my issue is with intellisense. I am using a compile_flags.txt that looks like…
CLearner
  • 767
  • 4
  • 10
1
vote
0 answers

Emacs freezes when debugging a program that segfaults (DAP vscode-cpptools)

I'm having an issue when debugging c++ programs in emacs (using dap-mode, LSP, projectile...): I have no problem with the debugger, as long as my code doesn't crash. But when the debugger hits a segmentation fault, I get the usual messages that I…
lagarkane
  • 915
  • 2
  • 9
  • 22
1
vote
1 answer

Update VSCode to C++20

I am trying to use Visual Studio Code with C++20 with clangd. Unfortunately it seems to be running in C++98. I get the following error when using basic things like std::function I have updated as many settings as I can see to C++20, and the…
Nathan29006781
  • 173
  • 1
  • 9
1
vote
0 answers

CoC-clangd for .m files

I want to contribute to a project which uses objc heavily. As I am not a mac user I cannot use Xcode for this project. So I looked for solutions and found that vim has a code completion plugin (CoC) which should support objc via CoC-clangd. I think…
1
vote
0 answers

Using ALE with clangd for both linting and autocompletion

I'm currently using ALE with clangd as a linter, but I'm running into an issue when I try to use it for autocompletion as well. The linter works fine as long as I set let g:ale_cpp_clangd_options = "-stdlib=libc++ -std=c++17" in my .vimrc file.…
Nick
  • 21
  • 2
1
vote
0 answers

how to build compile_commands.json for arm project

I'm using coc.nvim/coc-clangd in vim to read my project source code. I see that clanged can work if the compile_commands.json is provided to clanged. I can compile the project in my ubuntu env with armcc, so I try to use bear to make…
1
vote
1 answer

coc-clangd has issues with gtkmm-4.0

I have the hello world program from the gtkmm documentation. I can compile the program without any issues using: g++ -o example main.cc example.cc `pkg-config "gtkmm-4.0" --cflags --libs` But the moment I go into neovim, coc-clangd has an error: In…
DevHyperCoder
  • 895
  • 1
  • 9
  • 22
1
vote
0 answers

How to manually request the clangd or implement ClangdServer for code complettion

I've installed clangd for MS VS Code and everything works fine. I wonder how can I manually request clangd via language server protocol? Or is there capability to programmatically include ClangdServer in my code, then add the header for requesting…
Russell
  • 11
  • 2