Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lunarvim can't find a c++ include that is created within the project #4484

Closed
stefanaerospace opened this issue Jan 27, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@stefanaerospace
Copy link

stefanaerospace commented Jan 27, 2024

Problem description

Trying to make a "portable" code base that leverages CMake's FetchContent so dependencies are built within the project. Code builds and runs, but Lunarvim highlights an include that it should be able to easily find.

LunarVim version

release-1.3/neovim-0.9-d1c1bace

Neovim version (>= 0.9.1)

NVIM v0.9.4

Terminal name

bash

Operating system/version

Pop!_OS 22.04 LTS

Steps to reproduce

Issues that I have already looked at for help:
#2896
#4381

CMake version 3.22.1

My config.lua:
lvim.keys.normal_mode[""] = ":w" -- faster than :w , the is probably carriage return, basically "Enter", override doesn't work w/o it
lvim.keys.normal_mode["<C-[>"] = ":bprev" -- Effectively C-( to go to left tab
lvim.keys.normal_mode["<C-]>"] = ":bnext" -- Effectively C-( to go to left tab
lvim.keys.insert_mode["jj"] = "" -- I don't like reaching
lvim.builtin.treesitter.ensure_installed = {"python", "cpp", "c", "bash"} -- languages to check
lvim.builtin.treesitter.highlight.enable = true -- syntax check (I think)
vim.opt.clipboard = "unnamedplus" -- system clipboard access

To reproduce the problem:
Clone my Git project:
https://gitlab.com/Saero/scientific-coding.git

Commit hash:
273cd7967d08b2b3f953107acde231a524244613

Navigate to project root in the terminal:
Run ./compile.sh
This will build successfully.
You will find a compile_commands.json in CMake/
However when you open src/fastImageProcessing.cpp you will see the following:
 3 #include <matplot/matplot.h> ■ 'matplot/matplot.h' file not found

How do I get lunarvim to find this header file in CMake/_deps/matplotplusplus-src/source/matplot/matplot.h ?

Screenshots

No response

@stefanaerospace stefanaerospace added the bug Something isn't working label Jan 27, 2024
@kristiansordal
Copy link

Shot in the dark, but have you tried ln -s CmakeFiles/compile_commands.json compile_commands.json from the root directory? In my experience compile_commands.json should be linked to the root of the project.

Copy link
Contributor

github-actions bot commented May 1, 2024

This issue is stale because it has been open for 50 days with no activity.

@github-actions github-actions bot added the stale label May 1, 2024
@stefanaerospace
Copy link
Author

stefanaerospace commented May 1, 2024 via email

@github-actions github-actions bot removed the stale label May 2, 2024
@kylo252 kylo252 closed this as completed May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants