diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 2684b6276f03358e0d98fe12c68f6d1a8da75ddc..b680fe82d1368df9dcc66d49bf20615b00a5eacb 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -19,14 +19,38 @@ vim.opt.wildmode = { "longest:full", "full" } vim.opt.wildignore:append({ "node_modules", ".git" }) vim.opt.completeopt = { "menu", "menuone", "popup", "noselect", "noinsert" } +vim.pack.add({ + { src = "https://github.com/nvim-mini/mini.pick" }, +}) + +local mini = require('mini.pick') +mini.setup({ + source = { + show = mini.default_show, + }, + window = { + prompt_prefix = " ", + config = function() + return { + border = "single", + anchor = "SW", + height = 15, + width = vim.o.columns, + row = vim.o.lines - vim.o.cmdheight - 1, + col = 0, + } + end, + }, +}) + vim.keymap.set("n", "", ":bprevious") vim.keymap.set("n", "", ":bnext") vim.keymap.set("n", "d", ":bd!") -vim.keymap.set("n", "x", ":Ex .") -vim.keymap.set("n", "f", ":find ") -vim.keymap.set("n", "b", ":b ") vim.keymap.set("n", "q", ":nohlsearch") vim.keymap.set("n", "w", ":silent! grep! | cwindow | redraw!") +vim.keymap.set("n", "p", ":Pick files") +vim.keymap.set("n", "b", ":Pick buffers") +vim.keymap.set("n", "g", ":Pick grep_live") vim.api.nvim_set_hl(0, "Normal", { bg = "#000000" }) vim.api.nvim_set_hl(0, "CursorLine", { bg = "#222222" }) diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..f7e14f615554ff311dc1d7f5edeb6e4f49026916 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule ".vim/pack/plugins/start/vim-commentary"] + path = .vim/pack/plugins/start/vim-commentary + url = git@github.com:tpope/vim-commentary.git +[submodule ".vim/pack/plugins/start/ctrlp.vim"] + path = .vim/pack/plugins/start/ctrlp.vim + url = git@github.com:ctrlpvim/ctrlp.vim.git +[submodule ".vim/pack/plugins/start/vim-gitgutter"] + path = .vim/pack/plugins/start/vim-gitgutter + url = git@github.com:airblade/vim-gitgutter.git +[submodule ".vim/pack/plugins/start/sniper.vim"] + path = .vim/pack/plugins/start/sniper.vim + url = git@github.com:mitjafelicijan/sniper.vim.git diff --git a/.shenanigans.sh b/.shenanigans.sh index 7800e7f27fdb21e3d9f0601b915065d017252463..244d96299f77f59bb6476f40c0aabbcd34c144a8 100755 --- a/.shenanigans.sh +++ b/.shenanigans.sh @@ -10,8 +10,8 @@ export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 export COLORTERM=truecolor export TERM=xterm-256color - export VISUAL=nvim - export EDITOR=nvim + export VISUAL=vim + export EDITOR=vim # Customized Bash prompt. SYMBOL='\[\e[38;5;214m\]\$\[\e[0m\]' @@ -26,7 +26,6 @@ alias ..='cd ..' alias gg='lazygit' alias less='less -R' alias tmux='tmux -T 256 -u' - alias vim='nvim' alias server='python3 -m http.server 6969' alias newsboat='newsboat -r -u ~/.feeds.txt' alias emptytrash='gio trash --empty' diff --git a/.vim/vimrc b/.vim/vimrc new file mode 100644 index 0000000000000000000000000000000000000000..b6be7a931ffd4e089e2670d96cd0eef64248b65d --- /dev/null +++ b/.vim/vimrc @@ -0,0 +1,24 @@ +set nocompatible exrc secure +filetype plugin on + +set encoding=utf8 spelllang=en_us laststatus=2 tabstop=4 shiftwidth=4 +set number autoindent cursorline ignorecase hlsearch incsearch signcolumn=yes +set hidden nowrap nobackup noswapfile noundofile autoread updatetime=100 +set backspace=indent,eol,start completeopt=menuone path+=** +set foldmethod=syntax foldlevel=99 foldopen= lazyredraw scrolloff=10 +set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/vendor,tags,*.o,*.a,*.so +set completeopt=menu,menuone,popup,noselect,noinsert +set background=dark +colorscheme wildcharm + +nnoremap :bnext +nnoremap :bprevious +nnoremap :copen +nnoremap :CtrlPBuffer +nnoremap d :bd! +nnoremap q :nohlsearch +nnoremap w :silent! grep! \| cwindow \| redraw! + +let g:ctrlp_use_caching = 0 +let g:ctrlp_show_hidden = 1 +let g:ctrlp_working_path_mode = 'ra' diff --git a/.vimrc b/.vimrc deleted file mode 100644 index 113313c36809dcc831c09604a0695c9c87f217be..0000000000000000000000000000000000000000 --- a/.vimrc +++ /dev/null @@ -1,58 +0,0 @@ -set nocompatible exrc secure -filetype plugin on - -call plug#begin() - Plug 'tpope/vim-commentary' - Plug 'ctrlpvim/ctrlp.vim' - Plug 'dense-analysis/ale' - Plug 'airblade/vim-gitgutter' - Plug 'mitjafelicijan/sniper.vim' -call plug#end() - -set encoding=utf8 spelllang=en_us laststatus=2 tabstop=4 shiftwidth=4 -set number autoindent cursorline ignorecase hlsearch incsearch signcolumn=yes -set hidden nowrap nobackup noswapfile noundofile autoread updatetime=300 -set backspace=indent,eol,start completeopt=menuone path+=** -set foldmethod=syntax foldlevel=99 foldopen= lazyredraw scrolloff=10 -set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/vendor,tags,*.o,*.a,*.so -set completeopt=menu,menuone,popup,noselect,noinsert -set omnifunc=ale#completion#OmniFunc -set background=dark -colorscheme wildcharm - -if executable('rg') - set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case - set grepformat=%f:%l:%c:%m -endif - -nnoremap :bnext -nnoremap :bprevious -nnoremap :copen -nnoremap :CtrlPBuffer -nnoremap :ALEHover -nnoremap :ALEDetail -nnoremap d :bd! -nnoremap q :nohlsearch -nnoremap e :ALEPopulateQuickfix:sleep 100m:copen -nnoremap w :silent! grep! \| cwindow \| redraw! -nnoremap :m .+1== -nnoremap :m .-2== -nnoremap >> -nnoremap << -vnoremap :m '>+1gv=gv -vnoremap :m '<-2gv=gv -vnoremap >gv -vnoremap gr :ALEFindReferences -quickfix:sleep 100m:copen -nmap gd :ALEGoToDefinition -nmap re :ALERename -imap (ale_complete) - -let g:ctrlp_use_caching = 0 -let g:ctrlp_show_hidden = 1 -let g:ctrlp_working_path_mode = 'ra' -let g:ale_hover_to_floating_preview = 1 -let g:ale_detail_to_floating_preview = 1 -let g:ale_floating_window_border = 0 -let g:ale_virtualtext_cursor = 0 -let g:ale_set_quickf = 1 diff --git a/README.md b/README.md index aed4ac3fad687c782cc46cf701b2f25f90250838..92f2a00d1c0936b529bc84a2532f2ae28a59dff9 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,10 @@ ![Unga Bunga](https://github.com/mitjafelicijan/dotfiles/assets/296714/2ea7852a-8297-40c4-a9b1-0f6cba6c701f) ```sh -git clone git@github.com:mitjafelicijan/dotfiles.git ~/.dotfiles +# Install +git clone --recursive git@github.com:mitjafelicijan/dotfiles.git ~/.dotfiles cd ~/.dotfiles && stow . -``` - -Unga Bunga woke up before the sun, as he always did, scratching his head with a -stick he was fairly sure used to be someone else’s idea. - -The cave was quiet. Too quiet. - -“Hmm,” said Unga Bunga, a man of deep and thoughtful vocabulary. -He stepped outside and immediately noticed something was wrong. The big rock he -liked to sit on… was gone. - -“Bunga?” he called. - -From behind a bush, his friend Bunga appeared, holding the rock. - -“I move rock,” said Bunga proudly. - -“Why move rock?” Unga Bunga asked. - -“Feel like it.” - -Unga Bunga considered this. It was, unfortunately, a very strong argument. - -He nodded. “Good reason.” - -They both stood there for a moment, staring at the rock in its new, objectively -worse location. - -“Now what?” asked Bunga. - -Unga Bunga picked up a slightly smaller rock. - -“We move this one too.” - -Bunga grinned. “Unga bunga.” - -And so, civilization began. +# Update all submodules +git submodule update --remote --recursive +```