diff --git a/nvim/mappings.nix b/nvim/mappings.nix index ce92fe0..e548847 100644 --- a/nvim/mappings.nix +++ b/nvim/mappings.nix @@ -1,4 +1,6 @@ -[ +let + mkRaw = data: {__raw = data;}; +in [ # Quickfix { mode = "n"; @@ -48,107 +50,92 @@ { mode = "n"; key = "dj"; - action = "vim.diagnostic.goto_next"; - lua = true; + action = mkRaw "vim.diagnostic.goto_next"; options.desc = "Diagnostics next [J]"; } { mode = "n"; key = "dk"; - action = "vim.diagnostic.goto_prev"; - lua = true; + action = mkRaw "vim.diagnostic.goto_prev"; options.desc = "Diagnostics previous [K]"; } { mode = "n"; key = "xx"; - action = "require('trouble').toggle"; - lua = true; + action = mkRaw "require('trouble').toggle"; options.desc = "Toggle trouble"; } { mode = "n"; key = "xw"; - action = "function() require('trouble').toggle('workspace_diagnostics') end"; - lua = true; + action = mkRaw "function() require('trouble').toggle('workspace_diagnostics') end"; options.desc = "Toggle Workspace trouble"; } { mode = "n"; key = "xd"; - action = "function() require('trouble').toggle('document_diagnostics') end"; - lua = true; + action = mkRaw "function() require('trouble').toggle('document_diagnostics') end"; options.desc = "Toggle Document trouble"; } { mode = "n"; key = "xq"; - action = "function() require('trouble').toggle('quickfix') end"; - lua = true; + action = mkRaw "function() require('trouble').toggle('quickfix') end"; options.desc = "Toggle Quickfix trouble"; } { mode = "n"; key = "xl"; - action = "function() require('trouble').toggle('loclist') end"; - lua = true; + action = mkRaw "function() require('trouble').toggle('loclist') end"; options.desc = "Toggle Loclist trouble"; } { mode = "n"; key = "gR"; - action = "function() require('trouble').toggle('lsp_references') end"; - lua = true; + action = mkRaw "function() require('trouble').toggle('lsp_references') end"; options.desc = "Toggle lsp References trouble"; } # Telescope { mode = "n"; key = "ff"; - action = "require('telescope.builtin').find_files"; - lua = true; + action = mkRaw "require('telescope.builtin').find_files"; options.desc = "Find Files"; } { mode = "n"; key = "fg"; - action = "require('telescope.builtin').live_grep"; - lua = true; + action = mkRaw "require('telescope.builtin').live_grep"; options.desc = "Find Grep"; } { mode = "n"; key = "fh"; - action = "require('telescope.builtin').help_tags"; - lua = true; + action = mkRaw "require('telescope.builtin').help_tags"; options.desc = "Find Help"; } { mode = "n"; key = "fb"; - action = "require('telescope.builtin').buffers"; - lua = true; + action = mkRaw "require('telescope.builtin').buffers"; options.desc = "Find Buffer"; } { mode = "n"; key = "fd"; - action = "require('telescope.builtin').diagnostics"; - lua = true; + action = mkRaw "require('telescope.builtin').diagnostics"; options.desc = "Find Diagnostics"; } { mode = "n"; key = "fq"; - action = "require('telescope.builtin').quickfix"; - lua = true; + action = mkRaw "require('telescope.builtin').quickfix"; options.desc = "Find Quickfix"; } { mode = "n"; key = "w"; - action = "require'conform'.format"; - lua = true; + action = mkRaw "require'conform'.format"; options.desc = "Format buffer"; } ]