about summary refs log tree commit diff stats
path: root/modules/home/conf
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-06-19 07:15:25 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-06-19 07:15:25 +0200
commit763b9e3340299185240ec45b9c9b67602ce994ec (patch)
tree3874135d1b4cf7550f2b0a5d392298dbd303b70b /modules/home/conf
parentfix(pkgs/brightness): Remove unneeded variable assignment (diff)
downloadnixos-config-763b9e3340299185240ec45b9c9b67602ce994ec.tar.gz
nixos-config-763b9e3340299185240ec45b9c9b67602ce994ec.zip
fix(modules/nvim): Update to the newest nixVim version
This includes replacing the deprecated `lua = true` pattern with a raw
lua value and using the new name for `nil_ls`: `nil-ls`
Diffstat (limited to '')
-rw-r--r--modules/home/conf/nvim/mappings/default.nix12
-rw-r--r--modules/home/conf/nvim/plgs/debugprint/default.nix12
-rw-r--r--modules/home/conf/nvim/plgs/femaco/default.nix3
-rw-r--r--modules/home/conf/nvim/plgs/goto-preview/default.nix15
-rw-r--r--modules/home/conf/nvim/plgs/harpoon/default.nix18
-rw-r--r--modules/home/conf/nvim/plgs/lsp/keymaps/default.nix6
-rw-r--r--modules/home/conf/nvim/plgs/lsp/servers/default.nix2
-rw-r--r--modules/home/conf/nvim/plgs/lsp/servers/servers/nil-ls.nix (renamed from modules/home/conf/nvim/plgs/lsp/servers/servers/nil_ls.nix)2
-rw-r--r--modules/home/conf/nvim/plgs/telescope/extensions/frecency/default.nix3
-rw-r--r--modules/home/conf/nvim/plgs/telescope/extensions/symbols/default.nix9
10 files changed, 28 insertions, 54 deletions
diff --git a/modules/home/conf/nvim/mappings/default.nix b/modules/home/conf/nvim/mappings/default.nix
index 2cb174a4..af800d22 100644
--- a/modules/home/conf/nvim/mappings/default.nix
+++ b/modules/home/conf/nvim/mappings/default.nix
@@ -14,7 +14,7 @@
       {
         key = "hh";
         mode = ["i"];
-        action = ''
+        action.__raw = ''
           function()
             local cmp = require('cmp');
             local luasnip = require('luasnip');
@@ -26,19 +26,17 @@
             end
           end
         '';
-        lua = true;
         options.desc = "completion trigger/ forward in completen menu";
       }
       {
         key = "uu";
         mode = ["i"];
-        action = ''
+        action.__raw = ''
           function()
             local cmp = require('cmp');
             cmp.confirm()
           end
         '';
-        lua = true;
         options.desc = "confirm the selected item";
       }
 
@@ -171,8 +169,7 @@
       {
         mode = ["n"];
         key = "\\f";
-        action = "function() require('lf').start() end";
-        lua = true;
+        action.__raw = "function() require('lf').start() end";
         options.desc = "open lf in a floating window";
       }
 
@@ -224,7 +221,7 @@
       {
         key = "dd";
         mode = ["n"];
-        action = ''
+        action.__raw = ''
           function()
             if vim.api.nvim_get_current_line():match("^%s*$") then
               return '"_dd'
@@ -233,7 +230,6 @@
             end
           end
         '';
-        lua = true;
         options = {
           desc = "Pipe all blank line deletions to the blackhole register";
           expr = true;
diff --git a/modules/home/conf/nvim/plgs/debugprint/default.nix b/modules/home/conf/nvim/plgs/debugprint/default.nix
index b0d72339..3c591e9f 100644
--- a/modules/home/conf/nvim/plgs/debugprint/default.nix
+++ b/modules/home/conf/nvim/plgs/debugprint/default.nix
@@ -16,12 +16,11 @@
       {
         key = "g?v";
         mode = ["v" "n"];
-        action = ''
+        action.__raw = ''
           function()
             return require('debugprint').debugprint({variable = true;});
           end
         '';
-        lua = true;
         options.expr = true;
         options.desc = ''
           'variable' debug line below the current line
@@ -30,12 +29,11 @@
       {
         key = "g?V";
         mode = ["v" "n"];
-        action = ''
+        action.__raw = ''
           function()
             return require('debugprint').debugprint({above = true; variable = true;}) ;
           end
         '';
-        lua = true;
         options.expr = true;
         options.desc = ''
           'variable' debug line above the current line
@@ -44,12 +42,11 @@
       {
         key = "g?p";
         mode = "n";
-        action = ''
+        action.__raw = ''
           function()
             return require('debugprint').debugprint();
           end
         '';
-        lua = true;
         options.expr = true;
         options.desc = ''
           'plain' debug line below the current line
@@ -58,12 +55,11 @@
       {
         key = "g?P";
         mode = "n";
-        action = ''
+        action.__raw = ''
           function()
             return require('debugprint').debugprint({above = true;});
           end
         '';
-        lua = true;
         options.expr = true;
         options.desc = ''
           'plain' debug line above the current line
diff --git a/modules/home/conf/nvim/plgs/femaco/default.nix b/modules/home/conf/nvim/plgs/femaco/default.nix
index 0b4f7937..6c4a7d89 100644
--- a/modules/home/conf/nvim/plgs/femaco/default.nix
+++ b/modules/home/conf/nvim/plgs/femaco/default.nix
@@ -15,8 +15,7 @@
       {
         key = "<leader>cc";
         mode = "n";
-        action = "require('femaco.edit').edit_code_block";
-        lua = true;
+        action.__raw = "require('femaco.edit').edit_code_block";
         options.desc = "edit a [c]ode blo[c]k with femaco";
       }
     ];
diff --git a/modules/home/conf/nvim/plgs/goto-preview/default.nix b/modules/home/conf/nvim/plgs/goto-preview/default.nix
index 13a26212..3de28c68 100644
--- a/modules/home/conf/nvim/plgs/goto-preview/default.nix
+++ b/modules/home/conf/nvim/plgs/goto-preview/default.nix
@@ -15,36 +15,31 @@
       {
         key = "<space>gd";
         mode = "n";
-        action = "require('goto-preview').goto_preview_definition";
-        lua = true;
+        action.__raw = "require('goto-preview').goto_preview_definition";
         options.desc = "[G]oto [D]efinition";
       }
       {
         key = "<space>gtd";
         mode = "n";
-        action = "require('goto-preview').goto_preview_type_definition";
-        lua = true;
+        action.__raw = "require('goto-preview').goto_preview_type_definition";
         options.desc = "[G]oto the [t]ype [D]efinition";
       }
       {
         key = "<space>gi";
         mode = "n";
-        action = "require('goto-preview').goto_preview_implementation";
-        lua = true;
+        action.__raw = "require('goto-preview').goto_preview_implementation";
         options.desc = "[G]oto [I]mplementations";
       }
       {
         key = "<space>gr";
         mode = "n";
-        action = "require('goto-preview').goto_preview_references";
-        lua = true;
+        action.__raw = "require('goto-preview').goto_preview_references";
         options.desc = "[G]o to all [R]eferences of the symbol";
       }
       {
         key = "\\<space>";
         mode = "n";
-        action = "require('goto-preview').close_all_win";
-        lua = true;
+        action.__raw = "require('goto-preview').close_all_win";
         options.desc = "close all preview windows";
       }
     ];
diff --git a/modules/home/conf/nvim/plgs/harpoon/default.nix b/modules/home/conf/nvim/plgs/harpoon/default.nix
index b1421dab..fa275f1b 100644
--- a/modules/home/conf/nvim/plgs/harpoon/default.nix
+++ b/modules/home/conf/nvim/plgs/harpoon/default.nix
@@ -7,12 +7,11 @@
     desc_template,
   }: {
     key = "${prefix}${number}";
-    action = ''
+    action.__raw = ''
       function()
         ${command_template number}
       end
     '';
-    lua = true;
     options.desc = "${desc_template number}";
   };
   mkGotoTerminalCommand = number: let
@@ -45,52 +44,47 @@ in {
       [
         {
           key = "-";
-          action = ''
+          action.__raw = ''
             function()
               require("harpoon.ui").nav_next()
              end
           '';
-          lua = true;
           options.desc = "go to the next marked file";
         }
         {
           key = "_";
-          action = ''
+          action.__raw = ''
             function()
               require("harpoon.ui").nav_prev()
              end
           '';
-          lua = true;
           options.desc = "go to the previous marked file";
         }
         {
           key = "<leader><leader>";
-          action = ''
+          action.__raw = ''
             function()
               require("harpoon.mark").add_file()
             end
           '';
-          lua = true;
           options.desc = "add a mark to the open file in harpoon.";
         }
         {
           key = "gqc";
-          action = ''
+          action.__raw = ''
             function()
               require("harpoon.cmd-ui").toggle_quick_menu()
             end
           '';
-          lua = true;
           options.desc = "toggle the harpoon command quick menu to see all commands.";
         }
         {
           key = "<leader>q";
-          action = ''
+          action.__raw = ''
             function()
               require("harpoon.ui").toggle_quick_menu()
             end
           '';
-          lua = true;
           options.desc = "toggle the harpoon normal quick menu to see all marks.";
         }
       ]
diff --git a/modules/home/conf/nvim/plgs/lsp/keymaps/default.nix b/modules/home/conf/nvim/plgs/lsp/keymaps/default.nix
index e176461e..b1276639 100644
--- a/modules/home/conf/nvim/plgs/lsp/keymaps/default.nix
+++ b/modules/home/conf/nvim/plgs/lsp/keymaps/default.nix
@@ -53,18 +53,16 @@
     keymaps = [
       {
         key = "<space>f";
-        action = "function() vim.lsp.buf.format { async = true } end";
-        lua = true;
+        action.__raw = "function() vim.lsp.buf.format { async = true } end";
         options.desc = "[F]ormat the current buffer (asynchronously)";
       }
       {
         key = "<space>wl";
-        action = ''
+        action.__raw = ''
           function()
             print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
           end
         '';
-        lua = true;
         options.desc = "[W]orkspace folders [l]ist";
       }
     ];
diff --git a/modules/home/conf/nvim/plgs/lsp/servers/default.nix b/modules/home/conf/nvim/plgs/lsp/servers/default.nix
index 1f59ae4e..605046d4 100644
--- a/modules/home/conf/nvim/plgs/lsp/servers/default.nix
+++ b/modules/home/conf/nvim/plgs/lsp/servers/default.nix
@@ -6,7 +6,7 @@
     ./servers/quick-lint-js.nix
     ./servers/ltex.nix
     ./servers/lua-ls.nix
-    ./servers/nil_ls.nix
+    ./servers/nil-ls.nix
     ./servers/openscad.nix
     ./servers/ruff-lsp.nix
     ./servers/rust-analyzer.nix
diff --git a/modules/home/conf/nvim/plgs/lsp/servers/servers/nil_ls.nix b/modules/home/conf/nvim/plgs/lsp/servers/servers/nil-ls.nix
index f0cccbdc..ab9e643b 100644
--- a/modules/home/conf/nvim/plgs/lsp/servers/servers/nil_ls.nix
+++ b/modules/home/conf/nvim/plgs/lsp/servers/servers/nil-ls.nix
@@ -1,6 +1,6 @@
 {...}: {
   programs.nixvim.plugins.lsp.servers = {
-    nil_ls = {
+    nil-ls = {
       enable = true;
       settings = {
         formatting.command = ["alejandra"];
diff --git a/modules/home/conf/nvim/plgs/telescope/extensions/frecency/default.nix b/modules/home/conf/nvim/plgs/telescope/extensions/frecency/default.nix
index c1cebc09..0e007b80 100644
--- a/modules/home/conf/nvim/plgs/telescope/extensions/frecency/default.nix
+++ b/modules/home/conf/nvim/plgs/telescope/extensions/frecency/default.nix
@@ -4,8 +4,7 @@
       {
         key = "gff";
         mode = "n";
-        action = "function() require('telescope').extensions.frecency.frecency() end";
-        lua = true;
+        action.__raw = "function() require('telescope').extensions.frecency.frecency() end";
         options.desc = "activate the frecency file selection";
       }
     ];
diff --git a/modules/home/conf/nvim/plgs/telescope/extensions/symbols/default.nix b/modules/home/conf/nvim/plgs/telescope/extensions/symbols/default.nix
index fa166c02..05b4a4f2 100644
--- a/modules/home/conf/nvim/plgs/telescope/extensions/symbols/default.nix
+++ b/modules/home/conf/nvim/plgs/telescope/extensions/symbols/default.nix
@@ -8,33 +8,31 @@
       {
         key = "<space>il";
         mode = "n";
-        action = ''
+        action.__raw = ''
           function()
             require('telescope.builtin').symbols{ sources = {
               'latex'
             }}
           end
         '';
-        lua = true;
         options.desc = "[i]nsert a [l]atex symbol";
       }
       {
         key = "<space>ie";
         mode = "n";
-        action = ''
+        action.__raw = ''
           function()
             require('telescope.builtin').symbols{ sources = {
                 'emoji',
             }}
           end
         '';
-        lua = true;
         options.desc = "[i]nsert a [e]moji";
       }
       {
         key = "<space>is";
         mode = "n";
-        action = ''
+        action.__raw = ''
           function()
             require('telescope.builtin').symbols{ sources = {
                 'emoji',
@@ -47,7 +45,6 @@
             }}
           end
         '';
-        lua = true;
         options.desc = "[i]nsert a [s]ymbol (like emojis)";
       }
     ];