mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-10 04:49:19 -08:00
vim: move to neovim
This commit is contained in:
parent
88721ea1cb
commit
31d35be90f
3 changed files with 32 additions and 57 deletions
|
|
@ -1,15 +1,16 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.sessionVariables.EDITOR = "vim";
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
programs.vim = {
|
|
||||||
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = { };
|
extraConfig = import ./vimrc.nix { inherit pkgs config; };
|
||||||
package = pkgs.vim_configurable-pynvim;
|
vimAlias = true;
|
||||||
#withPython3 = true;
|
viAlias = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
nerdtree
|
|
||||||
vim-nix
|
vim-nix
|
||||||
|
notmuch-vim
|
||||||
rust-vim
|
rust-vim
|
||||||
coc-nvim
|
coc-nvim
|
||||||
coc-rust-analyzer
|
coc-rust-analyzer
|
||||||
|
|
@ -27,33 +28,23 @@
|
||||||
vim-lastplace
|
vim-lastplace
|
||||||
base16-vim
|
base16-vim
|
||||||
];
|
];
|
||||||
#extraPackages = with pkgs;
|
coc = {
|
||||||
# [ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
|
enable = true;
|
||||||
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
|
settings = {
|
||||||
extraConfig = import ./vimrc.nix { inherit pkgs config; };
|
"rust.rustfmt_path" = "${pkgs.rustfmt}/bin/rustfmt";
|
||||||
};
|
"rust-analyzer.serverPath" = "rust-analyzer";
|
||||||
xdg.dataFile = {
|
"rust-analyzer.updates.prompt" = false;
|
||||||
"vim/undo/.keep".text = "";
|
"rust-analyzer.notifications.cargoTomlNotFound" = false;
|
||||||
"vim/swap/.keep".text = "";
|
"rust-analyzer.notifications.workspaceLoaded" = false;
|
||||||
"vim/backup/.keep".text = "";
|
"rust-analyzer.procMacro.enable" = true;
|
||||||
};
|
"rust-analyzer.cargo.loadOutDirsFromCheck" = true;
|
||||||
xdg.configFile = {
|
"rust-analyzer.cargo-watch.enable" = true;
|
||||||
"vim/coc/coc-settings.json".text = builtins.toJSON {
|
"rust-analyzer.completion.addCallParenthesis" = false; # consider using this?
|
||||||
"rust.rustfmt_path" = "${pkgs.rustfmt}/bin/rustfmt";
|
"rust-analyzer.hoverActions.linksInHover" = true;
|
||||||
"rust-analyzer.serverPath" = "rust-analyzer";
|
"rust-analyzer.diagnostics.disabled" = [
|
||||||
"rust-analyzer.updates.prompt" = false;
|
"inactive-code" # it has strange cfg support..?
|
||||||
"rust-analyzer.notifications.cargoTomlNotFound" = false;
|
];
|
||||||
"rust-analyzer.notifications.workspaceLoaded" = false;
|
};
|
||||||
"rust-analyzer.procMacro.enable" = true;
|
|
||||||
"rust-analyzer.cargo.loadOutDirsFromCheck" = true;
|
|
||||||
"rust-analyzer.cargo-watch.enable" =
|
|
||||||
true;
|
|
||||||
"rust-analyzer.completion.addCallParenthesis" =
|
|
||||||
false; # consider using this?
|
|
||||||
"rust-analyzer.hoverActions.linksInHover" = true;
|
|
||||||
"rust-analyzer.diagnostics.disabled" = [
|
|
||||||
"inactive-code" # it has strange cfg support..?
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,8 @@
|
||||||
''}";
|
''}";
|
||||||
" Enable mouse
|
" Enable mouse
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set ttymouse=sgr
|
|
||||||
|
|
||||||
set viminfo='100000,<100000,s1000,h,n$XDG_DATA_HOME/vim/viminfo
|
set viminfo='100000,<100000,s1000,h,n$XDG_DATA_HOME/vim/viminfo'
|
||||||
|
|
||||||
" colors
|
" colors
|
||||||
let base16colorspace=256
|
let base16colorspace=256
|
||||||
|
|
@ -23,7 +22,7 @@
|
||||||
" tabline
|
" tabline
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
|
|
||||||
" notmuch!
|
" notmuch!
|
||||||
let g:notmuch_config_file='${config.xdg.configHome}/notmuch/notmuchrc'
|
let g:notmuch_config_file='${config.xdg.configHome}/notmuch/notmuchrc'
|
||||||
let g:notmuch_folders_count_threads=0
|
let g:notmuch_folders_count_threads=0
|
||||||
let g:notmuch_date_format='%y-%m-%d %H:%M'
|
let g:notmuch_date_format='%y-%m-%d %H:%M'
|
||||||
|
|
@ -32,18 +31,9 @@
|
||||||
let g:notmuch_search_date_format='%Y/%m/%d %H:%M'
|
let g:notmuch_search_date_format='%Y/%m/%d %H:%M'
|
||||||
let g:notmuch_html_converter='${pkgs.elinks}/bin/elinks --dump'
|
let g:notmuch_html_converter='${pkgs.elinks}/bin/elinks --dump'
|
||||||
|
|
||||||
" lastplace
|
" lastplace
|
||||||
let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit"
|
let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit"
|
||||||
|
|
||||||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
|
|
||||||
\ quit | endif
|
|
||||||
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
|
|
||||||
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
|
|
||||||
nnoremap <leader>n :NERDTreeFocus<CR>
|
|
||||||
nnoremap <C-n> :NERDTree<CR>
|
|
||||||
nnoremap <C-t> :NERDTreeToggle<CR>
|
|
||||||
nnoremap <C-f> :NERDTreeFind<CR>
|
|
||||||
|
|
||||||
let g:coc_node_path='${pkgs.nodejs}/bin/node'
|
let g:coc_node_path='${pkgs.nodejs}/bin/node'
|
||||||
let g:coc_config_home=$XDG_CONFIG_HOME . '/vim/coc'
|
let g:coc_config_home=$XDG_CONFIG_HOME . '/vim/coc'
|
||||||
|
|
||||||
|
|
@ -64,7 +54,7 @@
|
||||||
set hlsearch
|
set hlsearch
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set completeopt=longest,menuone
|
set completeopt=longest,menuone
|
||||||
|
|
||||||
command Spaces set expandtab
|
command Spaces set expandtab
|
||||||
command Tabs set noexpandtab
|
command Tabs set noexpandtab
|
||||||
|
|
||||||
|
|
@ -200,10 +190,4 @@
|
||||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
||||||
" Resume latest coc list.
|
" Resume latest coc list.
|
||||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
||||||
|
''
|
||||||
'' + (if config.wayland.windowManager.sway.enable then ''
|
|
||||||
noremap "+y y:call system("wl-copy", @")<CR>
|
|
||||||
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', ''', 'g')<CR>p
|
|
||||||
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', ''', 'g')<CR>p
|
|
||||||
'' else
|
|
||||||
"")
|
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
"homepage": null,
|
"homepage": null,
|
||||||
"owner": "arcnmx",
|
"owner": "arcnmx",
|
||||||
"repo": "nixexprs",
|
"repo": "nixexprs",
|
||||||
"rev": "d321fb6c1675545007d6f5486a50f67d8a5a8836",
|
"rev": "4ebb785dde22feae297e5c51b7175f4e78f0d816",
|
||||||
"sha256": "194w6cs5qwv6xfslni013afdc3jyawg8h7mqywg82qxwmvipngjp",
|
"sha256": "1hslmzgjdfwdzcms56px8g06mk1q7k6yxiwk1g9i9kwsb62p6a9l",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/arcnmx/nixexprs/archive/d321fb6c1675545007d6f5486a50f67d8a5a8836.tar.gz",
|
"url": "https://github.com/arcnmx/nixexprs/archive/4ebb785dde22feae297e5c51b7175f4e78f0d816.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
"ci": {
|
"ci": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue