replace plain neovim with nixvim

This commit is contained in:
Adithya 2023-08-05 17:42:16 +05:30
parent d3cdae9660
commit 2dce222fae
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
3 changed files with 46 additions and 57 deletions

View file

@ -13,8 +13,7 @@
./gnupg.nix
./kitty.nix
./mpv.nix
#./neovim.nix
./nixvim.nix
./neovim.nix
./starship.nix
./tmux.nix
./virt-manager.nix

View file

@ -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 <C-a> <cmd>bp<Return>
nmap <C-d> <cmd>bn<Return>
nnoremap <C-h> <cmd>noh<Return>
nnoremap <leader>w <cmd>bdelete<CR><cmd>bnext<Return>
'';
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 = {
"<C-a>" = {
silent = true;
action = "<cmd>bp<Return>";
};
"<C-d>" = {
silent = true;
action = "<cmd>bn<Return>";
};
"<C-h>" = {
silent = true;
action = "<cmd>noh<Return>";
};
"<leader>w" = {
action = "<cmd>bdelete<CR><cmd>bnext><Return>";
};
};
};
};
}

View file

@ -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
];
};
}