From 5e788e0eabec1073bf1861fcd1a11b31955ad840 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 19 Aug 2023 21:53:09 +0200 Subject: Fix(hm/conf/neovim/nixneovim): Remove as it's replaced by nixvim --- .../config/neovim/nixneovim/mappings/default.nix | 177 --------------------- 1 file changed, 177 deletions(-) delete mode 100644 home-manager/soispha/config/neovim/nixneovim/mappings/default.nix (limited to 'home-manager/soispha/config/neovim/nixneovim/mappings/default.nix') diff --git a/home-manager/soispha/config/neovim/nixneovim/mappings/default.nix b/home-manager/soispha/config/neovim/nixneovim/mappings/default.nix deleted file mode 100644 index 8b38a1d0..00000000 --- a/home-manager/soispha/config/neovim/nixneovim/mappings/default.nix +++ /dev/null @@ -1,177 +0,0 @@ -{lib, ...}: { - programs.nixneovim = { - globals = { - mapleader = " "; - maplocalleader = " "; - }; - mapping = let - normal_and_insert = { - "" = { - action = "'noh'"; - desc = "Disable the search highlighting and send Escape"; - }; - }; - in { - insert = - lib.recursiveUpate { - "hh" = { - action = '' - function() - local cmp = require('cmp'); - local luasnip = require('luasnip'); - - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - end - end - ''; - desc = "completion trigger/ forward in completen menu"; - }; - "" = { - action = '' - function() - local cmp = require('cmp'); - cmp.confirm() - end - ''; - desc = "confirm the selected item"; - }; - } - normal_and_insert; - normalVisualOp = { - # yank/ cut to the system clipboard - "y" = "'\"+y'"; - "Y" = "'\"+Y'"; - - # Unmap some old keys - #"s" = "''"; - #"t" = "''"; - "" = "''"; - "" = "''"; - "" = "''"; - "" = "''"; - - # remap dvorak - "l" = "n"; - "L" = "N"; - "k" = "t"; - "K" = "T"; - "j" = "k"; - "J" = "K"; - - # Change Vim-keys - "h" = ""; - "t" = "g"; - "n" = "g"; - "s" = ""; - - # Move display lines - "0" = "g0"; - "$" = "g$"; - }; - normal = - lib.recursiveUpdate { - "" = { - action = "':'"; - desc = "jump to command line"; - }; - - "N" = { - action = "vim.diagnostic.goto_prev()"; - desc = "go to previous diagnostic message"; - }; - "T" = { - action = "vim.diagnostic.goto_next()"; - desc = "go to next diagnostic message"; - }; - "e" = { - action = "vim.diagnostic.open_float()"; - desc = "open float for the symbol"; - }; - "q" = { - action = "vim.diagnostic.setloclist()"; - desc = "add buffer diagnostic to the location list (quick-fix)"; - }; - - # Splits - "" = { - action = "'p'"; - desc = "go to previous split"; - }; - "" = { - action = "'w'"; - desc = "go to next split"; - }; - "-" = { - action = "'s'"; - desc = "New horizontal split"; - }; - "|" = { - action = "'v'"; - desc = "New vertical split"; - }; - - # Exit insert mode after creating a new line above or below the current line."; - "o" = "'o'"; - "O" = "'O'"; - - # Center the cursor vertically when moving to the next word during a search. - "n" = "'nzzzv'"; - #"N" = "'Nzzzv'"; - - "p" = { - action = "'\"_dP'"; - desc = "keep the cut thing in the base register"; - }; - - "d" = { - action = "'\"_d'"; - desc = "delete without saving to register"; - }; - "dd" = { - action = '' - function() - if vim.api.nvim_get_current_line():match("^%s*$") then - return '"_dd' - else - return "dd" - end - end - ''; - desc = "Pipe all blank line deletions to the blackhole register"; - expr = true; - silent = true; - }; - - "s" = { - action = "':%s/\\<\\>//gI'"; - desc = "replace for the word under the cursor"; - }; - - "" = { - action = "'mksession! '"; - desc = "to overwrite/create a session"; - }; - - "X" = { - action = "'[[!!$SHELL ]]'"; - desc = "Read the current line and execute that line in your $SHELL. The resulting output will replace the curent line that was being executed."; - }; - } - normal_and_insert; - terminal = { - "" = { - action = "''"; - desc = "Exit terminal mode with "; - }; - }; - visual = { - # move selected lines in visual mode - "T" = "':m '>+1gv=gv'"; - "N" = "':m '<-2gv=gv'"; - }; - }; - }; -} -- cgit 1.4.1