From 5243003bad0709bd539fef302bccb54fd0eddbe8 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 10 Jul 2022 22:17:19 +0000 Subject: [PATCH] switch to new neovim gruvbox --- modules/colorscheme/gruvbox/default.nix | 13 +++---------- modules/editor/neovim/lua/keybinds.lua | 10 ++++++++++ modules/wsl/default.nix | 4 ++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/modules/colorscheme/gruvbox/default.nix b/modules/colorscheme/gruvbox/default.nix index cd877c8..574e4c3 100644 --- a/modules/colorscheme/gruvbox/default.nix +++ b/modules/colorscheme/gruvbox/default.nix @@ -23,17 +23,10 @@ M.packer = function(use) use({ - "morhetz/gruvbox", + "lifepillar/vim-gruvbox8", config = function() - vim.g.gruvbox_italic = 1 - -- vim.api.nvim_create_autocmd("ColorScheme", { - -- pattern = "*", - -- command = "colorscheme gruvbox", - -- }) - vim.cmd([[ - autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE - colorscheme gruvbox - ]]) + vim.g.gruvbox_italicize_strings = 0 + vim.cmd("colorscheme gruvbox8") end, }) end diff --git a/modules/editor/neovim/lua/keybinds.lua b/modules/editor/neovim/lua/keybinds.lua index eb199db..4e1a8c1 100644 --- a/modules/editor/neovim/lua/keybinds.lua +++ b/modules/editor/neovim/lua/keybinds.lua @@ -61,6 +61,10 @@ key("n", "gs", telescope.git_status) -- key("n", "", "gT") -- key("i", "", "gT") +-- Swap buffers +key("n", "L", ":bnext") +key("n", "H", ":bprevious") + -- LSP key("n", "gd", vim.lsp.buf.definition, { silent = true }) key("n", "gT", vim.lsp.buf.type_definition, { silent = true }) @@ -111,6 +115,12 @@ key("i", ".", ".u") key("i", "!", "!u") key("i", "?", "?u") +-- Resize with arrows +key("n", "", ":resize +2", { silent = true }) +key("n", "", ":resize -2", { silent = true }) +key("n", "", ":vertical resize -2", { silent = true }) +key("n", "", ":vertical resize +2", { silent = true }) + -- Other key("t", "", "") --- Exit terminal mode key("n", "", ":noh", { silent = true }) --- Clear search in VimWiki diff --git a/modules/wsl/default.nix b/modules/wsl/default.nix index d7e7b86..be5a6d2 100644 --- a/modules/wsl/default.nix +++ b/modules/wsl/default.nix @@ -4,6 +4,10 @@ location = { provider = lib.mkForce "manual"; }; services.localtimed.enable = lib.mkForce false; + # Used by NeoVim for clipboard sharing with Windows + # home-manager.users.${config.user}.home.sessionPath = + # [ "/mnt/c/Program Files/win32yank/" ]; + # Replace config directory with our repo system.activationScripts.configDir.text = '' rm -rf /etc/nixos