summary refs log tree commit diff stats
path: root/user/settings/neovim.nix
diff options
context:
space:
mode:
Diffstat (limited to 'user/settings/neovim.nix')
-rw-r--r--user/settings/neovim.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/user/settings/neovim.nix b/user/settings/neovim.nix
new file mode 100644
index 00000000..108b51a7
--- /dev/null
+++ b/user/settings/neovim.nix
@@ -0,0 +1,35 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}: {
+  programs.neovim = {
+    enable = true;
+    vimAlias = true;
+    vimdiffAlias = true;
+    withNodeJs = true;
+    plugins = with pkgs.vimPlugins; [
+      commentary
+      coc-git
+      coc-json
+      coc-tabnine
+      coc-yaml
+      vim-surround
+    ];
+    extraLuaConfig = builtins.readFile ../nvim/init.lua;
+    coc = {
+      enable = true;
+      settings = {
+        "json.enable" = true;
+        "suggest.enablePreview" = true;
+        languageserver = {
+          nix = {
+            command = "${pkgs.nil}/bin/nil";
+            filetypes = [ "nix" ];
+          };
+        };
+      };
+    };
+  };
+}