diff --git a/home/modules/neovim/default.nix b/home/modules/neovim/default.nix index 06458ae4..90fbea43 100644 --- a/home/modules/neovim/default.nix +++ b/home/modules/neovim/default.nix @@ -85,8 +85,8 @@ in { # Files encoding = "utf-8"; fileencoding = "utf-8"; - swapfile = false; - backup = false; + # swapfile = true; + # backup = false; undofile = true; undodir = "/home/christoph/.vim/undo"; # autochdir = true; @@ -139,9 +139,10 @@ in { o.guifont = "JetBrainsMono Nerd Font:h13:Medium:i" end - -- Hide inline diagnostics + -- Hide inline diagnostics and show border vim.diagnostic.config({ virtual_text = false, + float = { border = "rounded" } }) -- Allow navigating popupmenu completion with Up/Down @@ -167,56 +168,6 @@ in { ]; keymaps = [ - # { - # action = "make"; - # key = ""; - # options = { - # silent = true; - # }; - # } - - # Disable arrow keys - # { - # mode = ["n" "i"]; - # key = ""; - # action = ""; - # options = { - # silent = true; - # noremap = true; - # desc = "Disable Up arrow key"; - # }; - # } - # { - # mode = ["n" "i"]; - # key = ""; - # action = ""; - # options = { - # silent = true; - # noremap = true; - # desc = "Disable Down arrow key"; - # }; - # } - # { - # mode = ["n" "i"]; - # key = ""; - # action = ""; - # options = { - # silent = true; - # noremap = true; - # desc = "Disable Right arrow key"; - # }; - # } - # { - # mode = ["n" "i"]; - # key = ""; - # action = ""; - # options = { - # silent = true; - # noremap = true; - # desc = "Disable Left arrow key"; - # }; - # } - # No Leader { mode = "v"; @@ -320,7 +271,7 @@ in { mode = "n"; key = "u"; action = "Telescope undo"; - options.desc = "View undo history"; + options.desc = "Show undo history"; } { mode = "n"; @@ -344,7 +295,7 @@ in { mode = "n"; key = "?"; action = "Telescope keymaps"; - options.desc = "View keymaps"; + options.desc = "Show keymaps"; } { mode = "n"; @@ -387,7 +338,7 @@ in { mode = "n"; key = "bb"; action = "Telescope buffers"; - options.desc = "View open buffers"; + options.desc = "Show open buffers"; } { mode = "n"; @@ -525,25 +476,25 @@ in { mode = "n"; key = "gs"; action = "Telescope git_status"; - options.desc = "View Git status"; + options.desc = "Show Git status"; } { mode = "n"; key = "gc"; action = "Telescope git_commits"; - options.desc = "View Git log"; + options.desc = "Show Git log"; } { mode = "n"; key = "gb"; action = "Telescope git_branches"; - options.desc = "View Git branches"; + options.desc = "Show Git branches"; } { mode = "n"; key = "gf"; action = "Telescope git_bcommits"; - options.desc = "View Git log for current file"; + options.desc = "Show Git log for current file"; } # LSP l @@ -605,7 +556,7 @@ in { mode = "n"; key = "cd"; action = "Telescope diagnostics"; - options.desc = "View diagnostics"; + options.desc = "Show diagnostics"; } ]; @@ -801,6 +752,7 @@ in { enable = true; settings = { + mappings.basic = true; # Apparently required for opleader/toggler config mappings.extra = false; opleader.line = ""; toggler.line = ""; @@ -979,15 +931,21 @@ in { lspBuf = { K = { action = "hover"; - desc = "Hover"; + desc = "Hover information"; }; "cr" = { action = "rename"; - desc = "Rename"; + desc = "Rename symbol"; }; "ca" = { action = "code_action"; - desc = "Code Action"; + desc = "Show code actions"; + }; + }; + diagnostic = { + "cD" = { + action = "open_float"; + desc = "Show line diagnostic"; }; }; };