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

52 lines
952 B
Nix

{
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'
'';
}
{
plugin = vim-autoformat;
config = ''
au BufWrite * :Autoformat
'';
}
vim-surround
vim-commentary
nvim-treesitter
nvim-treesitter-parsers.nu
nvim-treesitter-parsers.nix
nvim-nu
];
extraLuaConfig = ''
vim.o.termguicolors = true
'';
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
'';
withPython3 = true;
};
}