System/home-manager/modules/programs/neovim.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

2024-11-28 03:10:32 +00:00
{
config,
lib,
pkgs,
...
}:
{
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
vim-nix
airline
{
plugin = onehalf;
config = ''
colorscheme onehalfdark
let g:airline_theme='onehalflight'
'';
}
2024-11-29 03:10:19 +00:00
{
plugin = vim-autoformat;
config = ''
au BufWrite * :Autoformat
2024-11-29 04:40:22 +00:00
let g:autoformat_autoindent = 0
let g:autoformat_retab = 0
let g:autoformat_remove_trailing_spaces = 0
2024-11-29 03:10:19 +00:00
'';
}
2024-11-28 03:10:32 +00:00
vim-surround
2024-11-29 04:09:33 +00:00
vim-commentary
2024-11-29 04:40:22 +00:00
nvim-treesitter.withAllGrammars
2024-11-29 04:47:21 +00:00
{
plugin = nvim-nu;
config = ''
require'nu'.setup{}
'';
}
2024-11-29 04:40:22 +00:00
null-ls-nvim
2024-11-28 03:10:32 +00:00
];
extraLuaConfig = ''
vim.o.termguicolors = true
'';
2024-11-29 04:09:33 +00:00
extraConfig = ''
" Show relative line numbers
set number
set rnu
" 2 spaces for tabs
set tabstop=4
set shiftwidth=4
" Keep 4 lines off the edge of the screen when scrolling
set scrolloff=4
'';
2024-11-28 03:10:32 +00:00
withPython3 = true;
};
}