configuration.nix/home/programs/neovim.nix

50 lines
1 KiB
Nix
Raw Normal View History

2023-05-27 21:11:38 +05:30
{pkgs, ...}: {
2023-06-14 10:00:19 +05:30
xdg.desktopEntries = {
"nvim".name = "Neovim wrapper";
"nvim".exec = "nvim %F";
"nvim".noDisplay = true;
};
2023-06-04 10:20:19 +05:30
programs.neovim = {
2023-05-27 17:07:47 +05:30
enable = true;
2023-06-04 10:20:19 +05:30
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = true;
defaultEditor = true;
extraPackages = with pkgs; [
fd
ripgrep
tree-sitter
nil
];
2023-06-04 14:56:02 +05:30
2023-06-04 10:20:19 +05:30
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
2023-05-27 17:07:47 +05:30
2023-06-04 10:20:19 +05:30
nmap <C-a> <cmd>bp<Return>
nmap <C-d> <cmd>bn<Return>
nnoremap <C-h> <cmd>noh<Return>
2023-06-04 13:52:38 +05:30
nnoremap <leader>w <cmd>bdelete<CR><cmd>bnext<Return>
2023-05-27 17:07:47 +05:30
'';
};
}