added neovim formatter pkgs

This commit is contained in:
Giulio De Pasquale 2021-11-21 11:36:57 +01:00
parent 14c1b77f91
commit 5a8050ed2c

View File

@ -4,22 +4,18 @@
imports = [ ./zsh.nix ./git.nix ];
home = {
stateVersion = "21.05";
stateVersion = "21.05";
sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
packages = with pkgs; [
rizin
sshfs
nixfmt
];
packages = with pkgs; [ rizin sshfs nixfmt ];
};
programs.neovim = {
enable = true;
enable = true;
extraPackages = with pkgs; [ nodePackages.prettier cmake-format clang-tools rustfmt ];
extraConfig = ''
" syntax
syntax enable
@ -76,14 +72,19 @@
set cindent cinkeys-=0#
set expandtab shiftwidth=2 tabstop=2 softtabstop=2
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" Enable alignment
let g:neoformat_basic_format_align = 1
" Enable tab to spaces conversion
let g:neoformat_basic_format_retab = 1
" Enable trimmming of trailing whitespace
let g:neoformat_basic_format_trim = 1
'';
viAlias = true;
viAlias = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
plugins = with pkgs.vimPlugins; [
vim-nix
molokai
YouCompleteMe
@ -95,9 +96,8 @@
nerdtree
vim-easy-align
vim-fugitive
vim-yaml
vim-autoformat
vimtex
neoformat
];
};
}