I'm separating the functions from main.c to func1.c func2.c, then I'm using util.h to store the prototype (all name of all functions).
PROBLEM
when I try to go to implementation, lsp leading me into util.c, but i want to leading to func1.c
main.c
#include "util.h" int main(){ int x = fun||c1(); // here || is cursure location ! int y = funct2(); //... } util.c
#define TRUE 1 #define FALSE 0 int func1(); int func2(); //... func1.c
int func1(){ //... } Makefile
all: main main: func1.o func2.o ... main.o gcc func1.o func2.o ... main.o -o main func1.o: func1.c util.h gcc func1.c func2.o: func2.c util.h gcc func2.c #... my env:
i use:
neovimasidelspconfigplugin handlelspccls/clangdis towlspforc/cpp:lua vim.lsp.buf.implementation()go to implementation but lead me toutil.h:lua vim.lsp.buf.definition()go to definition but lead me toutil.htoo