From 2dce222faea4cc49711824e161d3cdfc727d6256 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 5 Aug 2023 17:42:16 +0530 Subject: [PATCH] replace plain neovim with nixvim --- home/programs/default.nix | 3 +- home/programs/neovim.nix | 88 ++++++++++++++++++++------------------- home/programs/nixvim.nix | 12 ------ 3 files changed, 46 insertions(+), 57 deletions(-) delete mode 100644 home/programs/nixvim.nix diff --git a/home/programs/default.nix b/home/programs/default.nix index 6101956..3bcda12 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -13,8 +13,7 @@ ./gnupg.nix ./kitty.nix ./mpv.nix - #./neovim.nix - ./nixvim.nix + ./neovim.nix ./starship.nix ./tmux.nix ./virt-manager.nix diff --git a/home/programs/neovim.nix b/home/programs/neovim.nix index 57f9982..e71167d 100644 --- a/home/programs/neovim.nix +++ b/home/programs/neovim.nix @@ -1,49 +1,51 @@ {pkgs, ...}: { - #xdg.desktopEntries = { - # "nvim".name = "Neovim wrapper"; - # "nvim".exec = "nvim %F"; - # "nvim".noDisplay = true; - #}; - programs.neovim = { - enable = false; + programs.nixvim = { + enable = true; viAlias = true; vimAlias = true; - vimdiffAlias = true; - withNodeJs = true; - withPython3 = true; - withRuby = true; - defaultEditor = true; - extraPackages = with pkgs; [ - fd - ripgrep - tree-sitter - nil + clipboard.providers.wl-copy.enable = true; + colorscheme = "dracula"; + extraPlugins = with pkgs.vimPlugins; [ + dracula-nvim ]; - - extraConfig = '' - set autowrite - set background=dark - set clipboard+=unnamedplus - set expandtab - set laststatus=2 - set noshowmode - set noswapfile - set number - set relativenumber - set shiftwidth=2 - set signcolumn=yes - set smartindent - set tabstop=2 - set termguicolors - set updatetime=100 - set wrap - set splitright - set splitbelow - - nmap bp - nmap bn - nnoremap noh - nnoremap w bdeletebnext - ''; + options = { + autowrite = true; + background = "dark"; + clipboard = "unnamedplus"; + expandtab = true; + laststatus = 2; + showmode = false; + swapfile = false; + number = true; + relativenumber = true; + shiftwidth = 2; + signcolumn = "yes"; + smartindent = true; + tabstop = 2; + termguicolors = true; + updatetime = 100; + wrap = true; + splitright = true; + splitbelow = true; + }; + maps = { + normal = { + "" = { + silent = true; + action = "bp"; + }; + "" = { + silent = true; + action = "bn"; + }; + "" = { + silent = true; + action = "noh"; + }; + "w" = { + action = "bdeletebnext>"; + }; + }; + }; }; } diff --git a/home/programs/nixvim.nix b/home/programs/nixvim.nix deleted file mode 100644 index 3e16013..0000000 --- a/home/programs/nixvim.nix +++ /dev/null @@ -1,12 +0,0 @@ -{pkgs, ...}: { - programs.nixvim = { - enable = true; - viAlias = true; - vimAlias = true; - clipboard.providers.wl-copy.enable = true; - colorscheme = "dracula"; - extraPlugins = with pkgs.vimPlugins; [ - dracula-nvim - ]; - }; -}