aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el4
-rw-r--r--clox/CMakeLists.txt2
-rw-r--r--environment.scm3
3 files changed, 8 insertions, 1 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..e717202
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,4 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((c-mode . ((ccls-args . '("--init={\"compilationDatabaseDirectory\": \"clox/_build\"}")))))
diff --git a/clox/CMakeLists.txt b/clox/CMakeLists.txt
index fb44875..aa285e1 100644
--- a/clox/CMakeLists.txt
+++ b/clox/CMakeLists.txt
@@ -2,4 +2,6 @@ cmake_minimum_required(VERSION 2.19)
project(Lox C)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
add_subdirectory(src)
diff --git a/environment.scm b/environment.scm
index 096d72d..3c649c3 100644
--- a/environment.scm
+++ b/environment.scm
@@ -9,4 +9,5 @@
(specification->package "dejagnu")
(specification->package "gcc-toolchain")
(specification->package "ccls")
- (specification->package "bear")))
+ ;; For clang-format
+ (specification->package "clang")))