Refresh vim settings
This commit is contained in:
parent
bb2ced8b81
commit
a7e509e6aa
3 changed files with 57 additions and 34 deletions
|
@ -3,7 +3,7 @@ let mapleader = ","
|
||||||
nmap <Leader>s :update<CR>
|
nmap <Leader>s :update<CR>
|
||||||
nmap <leader>p :set paste!<CR>
|
nmap <leader>p :set paste!<CR>
|
||||||
nmap <leader>h :set hlsearch!<CR>
|
nmap <leader>h :set hlsearch!<CR>
|
||||||
nmap <leader>t :wa <bar> :Make test<CR>
|
nmap <leader>t :NvimTreeOpen<CR>
|
||||||
|
|
||||||
" navigate buffers by ctrl-b
|
" navigate buffers by ctrl-b
|
||||||
nmap <C-b> :bprevious<CR>
|
nmap <C-b> :bprevious<CR>
|
||||||
|
|
|
@ -14,10 +14,6 @@ command! -bang -nargs=* Find call fzf#vim#grep('rga --column --line-number --no-
|
||||||
let g:ctrlp_show_hidden = 1
|
let g:ctrlp_show_hidden = 1
|
||||||
let g:ctrlp_user_command = 'rga %s --files --hidden --color=never --glob ""'
|
let g:ctrlp_user_command = 'rga %s --files --hidden --color=never --glob ""'
|
||||||
|
|
||||||
" nerdtree startup
|
|
||||||
autocmd StdinReadPre * let s:std_in=1
|
|
||||||
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
|
|
||||||
|
|
||||||
" rainbow
|
" rainbow
|
||||||
let g:rainbow_active = 1
|
let g:rainbow_active = 1
|
||||||
|
|
||||||
|
@ -45,3 +41,17 @@ set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||||
let g:ackprg = 'rg --vimgrep --smart-case'
|
let g:ackprg = 'rg --vimgrep --smart-case'
|
||||||
let g:ack_autoclose = 1
|
let g:ack_autoclose = 1
|
||||||
let g:ack_use_cword_for_empty_search = 1
|
let g:ack_use_cword_for_empty_search = 1
|
||||||
|
|
||||||
|
|
||||||
|
lua << EOF
|
||||||
|
require'nvim-tree'.setup{
|
||||||
|
disable_netrw = false,
|
||||||
|
hijack_cursor=true,
|
||||||
|
ignore_buffer_on_setup=true,
|
||||||
|
open_on_setup=true,
|
||||||
|
open_on_tab=true,
|
||||||
|
update_focused_file = { enable = true },
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
home.file.".vimrc".source = ../../../.vimrc;
|
home.file.".vimrc".source = ../../../.vimrc;
|
||||||
home.packages = with pkgs; [ ripgrep ];
|
home.packages = with pkgs; [ ripgrep ];
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
|
@ -10,34 +10,47 @@
|
||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
withRuby = true;
|
withRuby = true;
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs;
|
||||||
ack-vim
|
with pkgs.vimPlugins; [
|
||||||
coc-highlight
|
(vimUtils.buildVimPluginFrom2Nix rec {
|
||||||
coc-nvim
|
pname = "srht.vim";
|
||||||
coc-rust-analyzer
|
version = "2022-01-04";
|
||||||
coc-yaml
|
src = fetchFromSourcehut {
|
||||||
ctrlp-vim
|
owner = "~willdurand";
|
||||||
editorconfig-vim
|
repo = pname;
|
||||||
fzf-vim
|
rev = "825e685f75464cbd41a5f8eded974e46f416355e";
|
||||||
quickfix-reflector-vim
|
sha256 = "sha256-9/Yeqmq/1ZIIsEgsrLLZ7o0cjOt/wlUgeLEzJoK7eco=";
|
||||||
rainbow
|
};
|
||||||
tabular
|
})
|
||||||
vim-airline
|
ack-vim
|
||||||
vim-airline-themes
|
coc-highlight
|
||||||
vim-autoformat
|
coc-nvim
|
||||||
vim-colors-solarized
|
coc-rust-analyzer
|
||||||
vim-devicons
|
coc-yaml
|
||||||
vim-dirdiff
|
ctrlp-vim
|
||||||
vim-dispatch
|
editorconfig-vim
|
||||||
vim-fugitive
|
fzf-vim
|
||||||
vim-gitgutter
|
nvim-tree-lua
|
||||||
vim-markdown
|
nvim-web-devicons
|
||||||
vim-nix
|
quickfix-reflector-vim
|
||||||
vim-sensible
|
rainbow
|
||||||
vim-startify
|
tabular
|
||||||
vim-surround
|
vim-airline
|
||||||
vim-toml
|
vim-airline-themes
|
||||||
];
|
vim-autoformat
|
||||||
|
vim-colors-solarized
|
||||||
|
vim-devicons
|
||||||
|
vim-dirdiff
|
||||||
|
vim-dispatch
|
||||||
|
vim-fugitive
|
||||||
|
vim-gitgutter
|
||||||
|
vim-markdown
|
||||||
|
vim-nix
|
||||||
|
vim-sensible
|
||||||
|
vim-startify
|
||||||
|
vim-surround
|
||||||
|
vim-toml
|
||||||
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
if filereadable($HOME . "/.vimrc")
|
if filereadable($HOME . "/.vimrc")
|
||||||
source $HOME/.vimrc
|
source $HOME/.vimrc
|
||||||
|
|
Loading…
Reference in a new issue