From b7bb13c9a34223d4e63aa9c8349578b3e8db818b Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Fri, 25 Jun 2021 12:09:26 +0200
Subject: [PATCH] MISC: Add sample configuration files

---
 .clangd                                       |  4 ++++
 .gitignore                                    | 14 +++++++++++---
 utils/samples/dot-ccls                        | 16 ++++++++++++++++
 utils/samples/dot-vim-slash-coc-settings.json | 10 ++++++++++
 4 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 .clangd
 create mode 100644 utils/samples/dot-ccls
 create mode 100644 utils/samples/dot-vim-slash-coc-settings.json

diff --git a/.clangd b/.clangd
new file mode 100644
index 00000000..2a20863a
--- /dev/null
+++ b/.clangd
@@ -0,0 +1,4 @@
+If:                               # Apply this config conditionally
+  PathMatch: .*\.h                # to all headers...
+  CompileFlags:                     # Tweak the parse settings
+    Add: [-xc++, -Wall]             # treat all files as C++, enable more warnings
diff --git a/.gitignore b/.gitignore
index acf09d2b..bcc2a83a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,18 @@
+# CMake stuff
+Violet
+Violet_autogen/*
+Vivy
+Vivy_autogen/*
+compile_commands.json
 CMakeCache.txt
 CMakeFiles/*
 Makefile
-Violet
-Violet_autogen/*
 cmake_install.cmake
 .cache/*
 Debug/*
-compile_commands.json
+
+# Build folder
 build/*
+
+# Local configurations
+.vim/*
diff --git a/utils/samples/dot-ccls b/utils/samples/dot-ccls
new file mode 100644
index 00000000..8c27fe14
--- /dev/null
+++ b/utils/samples/dot-ccls
@@ -0,0 +1,16 @@
+-isystem
+/usr/local/include
+-isystem
+/usr/include/x86_64-linux-gnu
+-isystem
+/usr/include/x86_64-linux-gnu/qt5/QtCore
+-isystem
+/usr/include/x86_64-linux-gnu/qt5/QtWidgets
+-isystem
+/usr/include
+-I
+./inc
+./build/Vivy_autogen/include
+-std=c++20
+-fPIC
+-D__linux__
diff --git a/utils/samples/dot-vim-slash-coc-settings.json b/utils/samples/dot-vim-slash-coc-settings.json
new file mode 100644
index 00000000..6cd13edc
--- /dev/null
+++ b/utils/samples/dot-vim-slash-coc-settings.json
@@ -0,0 +1,10 @@
+{
+    "languageserver": {
+        "clangd": {
+            "command": "clangd",
+            "rootPatterns": ["compile_commands.json"],
+            "filetypes": ["c", "cpp", "objc", "objcpp"]
+        }
+    },
+    "clangd.semanticHighlighting": true
+}
-- 
GitLab