this post was submitted on 27 Nov 2023
1 points (100.0% liked)
Emacs
313 readers
2 users here now
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
Get Emacs
Rules
- Posts should be emacs related
- Be kind please
- Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.
Emacs Resources
Emacs Tutorials
- Beginner’s Guide to Emacs
- Absolute Beginner's Guide to Emacs
- How to Learn Emacs: A Hand-drawn One-pager for Beginners
Useful Emacs configuration files and distributions
Quick pain-saver tip
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Hey,same situation here. I am not an emacs expert but am using it for around 6 years now.
My solution is to use clangd with a "compile_flags.txt" file in top level directory of the repository (and add it to ".git/info/exclude") to avoid an accidential commit.
The content is mostly project paths and additionally:
-include
c:/Users/USERNAME/.mchp_packs/Microchip/dsPICxxx/y.y.yyy/COMPILER/support/dsPICxxx/h/pxxx.h
-include
c:/Users/USERNAME/.mchp_packs/Microchip/dsPICxxx/y.y.yyy/COMPILER/support/generic/h/xc.h
-I
path/to/project.X/mcc_generated_files
-O0
-I
C:/MinGW/include
-D
__dsPICxxx__
The paths vary in Controller and pack that is used.
I also use "eglot" instead of "lsp-mode" simply because it's enough for me in functionality and I also have a "build.bat" at the top level of the repo that is used with the emacs internal compile command like "project-compile" (C-c p c).
- build.bat clean
- build.bat cleanbuild
- build.bat makefiles
- build.bat ...