changes to neovim config
parent
d05b0c6486
commit
895b1985f5
|
@ -1,19 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
black
|
||||
jq
|
||||
# sqlfluff
|
||||
nixfmt
|
||||
shfmt
|
||||
hlint
|
||||
];
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withPython3 = true;
|
||||
};
|
||||
}
|
|
@ -1,8 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ];
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withPython3 = true;
|
||||
extraPackages = with pkgs; [
|
||||
black
|
||||
jq
|
||||
# sqlfluff
|
||||
nixfmt
|
||||
shfmt
|
||||
hlint
|
||||
pylint
|
||||
nodePackages.pyright
|
||||
];
|
||||
extraPython3Packages = pyPkgs: with pyPkgs; [ pylint ];
|
||||
plugins = with pkgs.vimPlugins;
|
||||
# find sha256 with:
|
||||
# nix-prefetch-url --unpack https://github.com/${owner}/${repo}/archive/${rev}.tar.gz
|
||||
|
@ -75,14 +90,14 @@
|
|||
};
|
||||
meta.homepage = "https://github.com/lambdalisue/fern-hijack.vim";
|
||||
};
|
||||
black-vim = pkgs.vimUtils.buildVimPlugin {
|
||||
black-vim = pkgs.vimUtils.buildVimPlugin rec {
|
||||
pname = "black-vim";
|
||||
version = "git";
|
||||
version = "23.1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "psf";
|
||||
repo = "black";
|
||||
rev = "f1d4e742c91dd5179d742b0db9293c4472b765f8";
|
||||
sha256 = "124a76cpl3xx9v2kbcprsajr149f93nib4hgacqii798m3mzm1x9";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "08rvk15mrvpmmjw7zw1ixcgh3sx2knadzrpp21q8kamvbizbjp5f";
|
||||
};
|
||||
meta.homepage = "https://github.com/psf/black";
|
||||
};
|
||||
|
|
|
@ -166,9 +166,9 @@ let g:airline#extensions#ale#enabled = 1
|
|||
let g:ale_linters ={
|
||||
\ 'haskell': ['hlint', 'hdevtools', 'hfmt'],
|
||||
\}
|
||||
let g:ale_python_auto_pipenv=1 " see ale-integrations-local-executables
|
||||
" let g:ale_python_auto_pipenv=1 " see ale-integrations-local-executables
|
||||
"let g:ale_python_pylint_auto_pipenv=1
|
||||
let g:ale_python_pylint_executable="pipenv"
|
||||
" let g:ale_python_pylint_executable="pipenv"
|
||||
let g:ale_python_pylint_change_directory=1
|
||||
|
||||
autocmd! User GoyoEnter Limelight
|
||||
|
@ -222,9 +222,10 @@ let g:UltiSnipsExpandTrigger="<tab>"
|
|||
let g:UltiSnipsJumpForwardTrigger="<c-b>"
|
||||
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
|
||||
|
||||
autocmd FileType python nnoremap <buffer> <C-f> :Black<CR>
|
||||
autocmd FileType sql nnoremap <buffer> <C-f> :%!sqlfluff fix -<CR>
|
||||
autocmd FileType sh nnoremap <buffer> <C-f> :Shfmt<CR>
|
||||
autocmd FileType json nnoremap <buffer> <C-f> :%!jq --indent 4 .<CR>
|
||||
autocmd FileType terraform nnoremap <buffer> <C-f> :TerraformFmt<CR>
|
||||
autocmd FileType nix nnoremap <buffer> <C-f> :%!nixfmt < %<CR>
|
||||
" autocmd FileType python nnoremap <buffer> <C-f> :Black<CR>
|
||||
autocmd FileType python nnoremap <buffer> <C-f> :!black %<CR>
|
||||
|
|
Loading…
Reference in New Issue