From 50a8400ddcf6da34967474b825179e54f5154126 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Thu, 5 Jan 2023 10:42:18 +0100
Subject: [PATCH] WORKSPACE: Add workspace config for VSCode+linux

---
 .gitignore                        | 30 +++++++++++++++---------------
 .vscode/c_cpp_properties.json     | 25 +++++++++++++++++++++++++
 .vscode/settings.json             |  7 +++++++
 inc/.vscode/c_cpp_properties.json | 25 +++++++++++++++++++++++++
 src/.vscode/c_cpp_properties.json | 25 +++++++++++++++++++++++++
 src/.vscode/settings.json         |  5 +++++
 6 files changed, 102 insertions(+), 15 deletions(-)
 create mode 100644 .vscode/c_cpp_properties.json
 create mode 100644 .vscode/settings.json
 create mode 100644 inc/.vscode/c_cpp_properties.json
 create mode 100644 src/.vscode/c_cpp_properties.json
 create mode 100644 src/.vscode/settings.json

diff --git a/.gitignore b/.gitignore
index 0537c25f..bc36840f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,37 +1,37 @@
+*.lock
+target/
 build/
 build.*/
 bin/
 pkg/
 tmp/
 fake/
-.vscode/
-.ccls*/
 *.cache/
 *.out
 *.o
+config.log
+!*.inc
+*\~
+*.AppImage
+*.pro.user
+
 *.sqlt
+*.zst
 *.ign
 *.mkv
 *.mks
 *.mka
+*.orig
+*.xz
+*.tar
+*.gz
+
+.ccls*/
 .ycm_extra_conf.py
 .ccls
 *.ccls
 *.ycm_extra_conf.py
-*.orig
 *.vimrc
-*.xz
-*.tar
-*.gz
 cscope.files
 cscope.out
 tags
-!*.inc
-*.zst
-config.log
-autom4te.cache
-*\~
-*.AppImage
-*.pro.user
-*.lock
-target/
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
new file mode 100644
index 00000000..1fbbd396
--- /dev/null
+++ b/.vscode/c_cpp_properties.json
@@ -0,0 +1,25 @@
+{
+    "configurations": [
+        {
+            "name": "Linux",
+            "includePath": [
+                "${workspaceFolder}/**",
+                "${workspaceFolder}/inc/**",
+                "/usr/include/qt6/QtCore",
+                "/usr/include/qt6/QtWidgets",
+                "/usr/include/qt6/QtGui",
+                "/usr/include/qt6"
+            ],
+            "defines": [
+                "LKT_OS_TOASTER=1",
+                "LKT_STATIC_MODULE=1",
+                "_POSIX_C_SOURCE=200809L"
+            ],
+            "compilerPath": "/usr/bin/clang",
+            "cStandard": "c17",
+            "cppStandard": "c++17",
+            "intelliSenseMode": "linux-clang-x64"
+        }
+    ],
+    "version": 4
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..8f485e80
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,7 @@
+{
+    "files.exclude": {
+        "**/src": true,
+        "**/inc": true,
+        "**/rust": true,
+    },
+}
\ No newline at end of file
diff --git a/inc/.vscode/c_cpp_properties.json b/inc/.vscode/c_cpp_properties.json
new file mode 100644
index 00000000..1fbbd396
--- /dev/null
+++ b/inc/.vscode/c_cpp_properties.json
@@ -0,0 +1,25 @@
+{
+    "configurations": [
+        {
+            "name": "Linux",
+            "includePath": [
+                "${workspaceFolder}/**",
+                "${workspaceFolder}/inc/**",
+                "/usr/include/qt6/QtCore",
+                "/usr/include/qt6/QtWidgets",
+                "/usr/include/qt6/QtGui",
+                "/usr/include/qt6"
+            ],
+            "defines": [
+                "LKT_OS_TOASTER=1",
+                "LKT_STATIC_MODULE=1",
+                "_POSIX_C_SOURCE=200809L"
+            ],
+            "compilerPath": "/usr/bin/clang",
+            "cStandard": "c17",
+            "cppStandard": "c++17",
+            "intelliSenseMode": "linux-clang-x64"
+        }
+    ],
+    "version": 4
+}
diff --git a/src/.vscode/c_cpp_properties.json b/src/.vscode/c_cpp_properties.json
new file mode 100644
index 00000000..d960b347
--- /dev/null
+++ b/src/.vscode/c_cpp_properties.json
@@ -0,0 +1,25 @@
+{
+    "configurations": [
+        {
+            "name": "Linux",
+            "includePath": [
+                "${workspaceFolder}/**",
+                "${workspaceFolder}/../inc/**",
+                "/usr/include/qt6/QtCore",
+                "/usr/include/qt6/QtWidgets",
+                "/usr/include/qt6/QtGui",
+                "/usr/include/qt6"
+            ],
+            "defines": [
+                "LKT_OS_TOASTER=1",
+                "LKT_STATIC_MODULE=1",
+                "_POSIX_C_SOURCE=200809L"
+            ],
+            "compilerPath": "/usr/bin/clang",
+            "cStandard": "c17",
+            "cppStandard": "c++17",
+            "intelliSenseMode": "linux-clang-x64"
+        }
+    ],
+    "version": 4
+}
\ No newline at end of file
diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json
new file mode 100644
index 00000000..1106b5ac
--- /dev/null
+++ b/src/.vscode/settings.json
@@ -0,0 +1,5 @@
+{
+    "files.exclude": {
+        "**/rust": true,
+    },
+}
\ No newline at end of file
-- 
GitLab