This command generates a file called `compile_commands.json`, which I
added to gitignore. Also ignored `.cache/clangd`, which gets populated
when I run my editor
---
It took me some time to figure out how to make LSP happy in this repo;
hopefully this information is helpful to others.
.gitignore | 2 ++README.md | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/.gitignore b/.gitignore
index f269464..0bfc1a1 100644
--- a/.gitignore+++ b/.gitignore
@@ -57,3 +57,5 @@ dkms.conf
/.build
/highlight
/mrsh
+/compile_commands.json+/.cache/clangd
diff --git a/README.md b/README.md
index 3287c4f..3fefdc4 100644
--- a/README.md+++ b/README.md
@@ -24,6 +24,16 @@ To use POSIX make:
make
./mrsh
+[Clangd](https://clangd.llvm.org/) users can use+[intercept-build](https://github.com/llvm/llvm-project/blob/main/clang/tools/scan-build-py/lib/libscanbuild/intercept.py)+from LLVM to generate the compilation database. This is necessary for LSP+clients to resolve references to `<mrsh/xyz.h>` libraries.++ make clean # intercept-build needs to build all objects+ ./configure+ intercept-build make+ ./mrsh+## Contributing
Either [send GitHub pull requests][GitHub] or [send patches on the mailing
--
2.37.3