summary refs log tree commit diff
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/.ycm_extra_conf.py18
-rw-r--r--configs/plugins.vimrc3
2 files changed, 21 insertions, 0 deletions
diff --git a/configs/.ycm_extra_conf.py b/configs/.ycm_extra_conf.py
new file mode 100644
index 0000000..abaa723
--- /dev/null
+++ b/configs/.ycm_extra_conf.py
@@ -0,0 +1,18 @@
+def Settings(**kwargs):
+    return {"ls": language_server_settings(kwargs["language"])}
+
+
+def language_server_settings(language):
+    match language:
+        case "nix":
+            return nil_settings()
+        case _:
+            return {}
+
+
+def nil_settings():
+    return {
+        "formatting": {
+            "command": ["nixfmt"],
+        },
+    }
diff --git a/configs/plugins.vimrc b/configs/plugins.vimrc
index cdc2a88..92d499d 100644
--- a/configs/plugins.vimrc
+++ b/configs/plugins.vimrc
@@ -2,6 +2,9 @@
 
 " YOUCOMPLETEME:
 
+let g:ycm_extra_conf_globlist = ['/nix/store/*']
+let g:ycm_global_ycm_extra_conf = '@ycm_extra_conf@'
+
 let g:ycm_language_server =
   \ [
   \   {