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

Is it possible to get the AST for a cpp file from clangd vscode extension?

I'm writing a vscode extension, which is trying to communicate with vscode-clangd extension. I need the AST from a cpp file, more precisely the type with occurences in file of a selected variable, however I can't call the clangd.ast command,…
Syn0n
  • 11
  • 3
1
vote
0 answers

ycm can't find header situated in another directory

I use the youcompleteme plugin for autocompletion in vim. However, it appears i can't make it find header files that are not located in the same directory as my source files. i have the following architecture : root ├── include │──…
Grizzlyman
  • 53
  • 6
1
vote
0 answers

How does `clangd` know where a function definition is when only one file has been indexed?

How does clangd know where a function definition is when only one file has been indexed through the LSP (Language Server Protocol) message textDocument/didOpen? This question is based off of the assumption that there is no compile_commands.json file…
John DeBord
  • 638
  • 1
  • 5
  • 17
0
votes
0 answers

how to set clangd to detect unimplemented member function

I am configuring clangd(clangd-12) on vscode(wsl) using config.yaml Diagnostics: ClangTidy: Add: [ performance-*, bugprone-*, portability-*, modernize-*, ] Remove:…
cooronx
  • 1
  • 1
0
votes
0 answers

clangd heats up the processor too much

I use lsp in emacs, which runs clangd. For large projects such as Unreal Engine where 1gb compile_commands are generated clangd consumes a lot of resources and heats up the processor, up to +90C. Are there any other flags, besides the ones already…
0
votes
0 answers

Troubles with IntelliSense in MacVim and Coc

I'm trying to setup Vim as a C++ IDE on Mac. I followed this tutorial. So I'm using Coc and coc-clangd extension. Everything works perfect, except 2 things : when I try to use c++ standard libs (stdio.h works for exemple but not iostream). It says…
sta
  • 23
  • 3
0
votes
1 answer

Clangd server does not search symbols in current working directory

I'm trying to configure clangd to be able to search symbols in nvim working directory, but it still uses only opened buffers. Configuration: local opts = { noremap=true, silent=true } local on_attach = function(client, bufnr) …
BabyRooJr
  • 23
  • 5
0
votes
0 answers

When I use clangd in vscode, it always says clang language server client: couldn't create connection to server

I don't know if it's because she didn't connect to the server. She didn't have a code prompt,and didn't show underline and others, I want to fix it, exerting the effect she should have. There are two pictures,one is the problem. The other picture…
littleyzp
  • 11
  • 2
0
votes
1 answer

Vscode clangd can't find clangd executable even when path is correctly specified

vscode clangd not can't find clangd even though path is specified. I have installed the clangd extension in vscode and in its settings have specified the path to the clangd executable on my computer. Which is located in…
narcomoeba
  • 21
  • 4
0
votes
1 answer

Clangd goes down when I work with lsp, what could be the reason for the fall?

Clangd goes down when I work with lsp. However, from clion (it uses a different solution) clangd works stable. What could be the problem? The next stack of Trace falls out, tried reinstalling lsp and clangd, and different versions, the error remains…
0
votes
1 answer

VScode clangd failed to find my header file not found `clang(pp_file_not_found)`

Description: I'm using clangd as my language server for coding c/c++ with CMake in vscode. However, I'm experiencing some annoying bugs that keep interrupting me. forehead/include.h' file not found clang(pp_file_not_found) Bugs Reproduction: I got…
Daniel Hu
  • 31
  • 1
  • 5
0
votes
0 answers

clangd error out for template header file

I am working on a C++ project and have clangd working mostly correctly with a compile_commands.json database generated with CMake. The problem is that I can't seem to get clangd to work with template header files. Clangd seems to error out…
Tony Yuen
  • 13
  • 4
0
votes
0 answers

YouCompleteMe doesn't find STL files

I'm use vim with the YouCompleteMe plugin. One day it have fail to finding STL files. :YcmDebugInfo Printing YouCompleteMe debug information... -- Resolve completions: Up front -- Client logfile: /tmp/ycm_squvcfr3.log -- Server Python interpreter:…
0
votes
1 answer

Clangd.main out of memory while processing UE5 project

Attempting to use QT creator as a C++ IDE for UE5 project on Linux. Engine built, and project generated all good. have the .pro file for QT creator. When opening it, it starts to parse the files. Takes a few minutes and then it just close… Looking…
Pain67
  • 326
  • 1
  • 9
0
votes
1 answer

Change Cmake pch file extension from hxx to h

I am trying to use the clangd vscode extension with cmake, but it isn't detecting my pch file, even though everything compiles just fine. I think this is because clangd isn't detecting the cmake_pch_arm64.hxx file generated by cmake. Because if I…
Taxen99
  • 49
  • 5