mirror of
https://github.com/webgefrickel/dotfiles
synced 2024-11-13 01:10:27 +00:00
Space-leader, hop, gruvbox and fzf-lua etc.
This commit is contained in:
parent
ff07959a02
commit
efc9e2196a
@ -6,7 +6,7 @@ brew tap homebrew/services
|
||||
|
||||
# install additional brew packages -- see _install.sh too
|
||||
brew install clipper
|
||||
brew install exa
|
||||
brew install fd
|
||||
brew install fzf
|
||||
brew install glances
|
||||
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac --with-rav1e
|
||||
@ -15,7 +15,6 @@ brew install lazygit
|
||||
brew install nnn
|
||||
brew install ripgrep
|
||||
brew install starship
|
||||
brew install tree
|
||||
|
||||
ln -s ~/dotfiles/lazygit ~/.config/lazygit
|
||||
ln -s ~/Dotfiles/starship.toml ~/.config/starship.toml
|
||||
|
@ -21,5 +21,5 @@ augroup init
|
||||
|
||||
" special settings for json5, css and scss: better BEM
|
||||
autocmd BufNewFile,BufRead *.{json5,css,scss} set iskeyword+=-
|
||||
autocmd BufNewFile,BufRead *.scss set ft=scss.css
|
||||
autocmd BufNewFile,BufRead *.scss set ft=sass.css
|
||||
augroup END
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Installed extensions are:
|
||||
////////////////////////////
|
||||
// coc-calc
|
||||
// coc-eslint8 // -- fall back to non-8 when supported offically
|
||||
// coc-html
|
||||
// coc-json
|
||||
// coc-markdownlint
|
||||
@ -10,7 +9,6 @@
|
||||
// coc-snippets
|
||||
// coc-tsserver
|
||||
// coc-yaml
|
||||
// coc-yank
|
||||
{
|
||||
"coc.preferences.formatOnSaveFiletypes": [
|
||||
"typescriptreact",
|
||||
@ -20,7 +18,6 @@
|
||||
"yaml"
|
||||
],
|
||||
// linters config
|
||||
"eslint.autoFixOnSave": true,
|
||||
"javascript.format.enabled": false,
|
||||
"javascript.validate.enable": false,
|
||||
"typescript.format.enabled": false,
|
||||
|
@ -1,15 +1,18 @@
|
||||
call plug#begin('~/.config/nvim/plugged')
|
||||
|
||||
" Plugins
|
||||
" Dependencies for other plugins
|
||||
Plug 'rktjmp/lush.nvim'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'vijaymarupudi/nvim-fzf'
|
||||
|
||||
" Colorscheme
|
||||
Plug 'ellisonleao/gruvbox.nvim'
|
||||
|
||||
" Plugins
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
Plug 'phaazon/hop.nvim'
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'ibhagwan/fzf-lua'
|
||||
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'nvim-lualine/lualine.nvim'
|
||||
|
@ -1,4 +1,8 @@
|
||||
" remap semi-colon to be colon in normal an visual mode
|
||||
nnoremap Q <nop>
|
||||
nnoremap K <nop>
|
||||
|
||||
" deactivate stupid ex-mode and man-page stuff
|
||||
nnoremap ; :
|
||||
vnoremap ; :
|
||||
|
||||
@ -12,10 +16,9 @@ vnoremap <C-V> v
|
||||
nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
||||
nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
|
||||
|
||||
" behave - yank just like D and C
|
||||
" sane yanking and copying to clipboard/alfred-history
|
||||
nnoremap Y y$
|
||||
|
||||
" auto-yanking with clipper for selected yanking, see leader-y mapping
|
||||
nnoremap yy yy :call system('nc localhost 8377', @0)<cr>
|
||||
vnoremap y y :call system('nc localhost 8377', @0)<cr>
|
||||
|
||||
" Keeping it centered
|
||||
@ -35,9 +38,8 @@ nnoremap <down> :blast<cr>
|
||||
nnoremap <left> :bp<cr>
|
||||
nnoremap <right> :bn<cr>
|
||||
|
||||
" Bubble/indent lines using unimpaired
|
||||
" using left alt + hjkl on mac usgerman keyboard
|
||||
" those are some weird mappings, but they work!
|
||||
" Bubble/indent lines using unimpaired using left alt + hjkl
|
||||
" on mac: weird mappings, but they work!
|
||||
nmap ˚ [e
|
||||
nmap ∆ ]e
|
||||
nmap ˙ <<
|
||||
@ -46,7 +48,3 @@ vmap ˚ [egv
|
||||
vmap ∆ ]egv
|
||||
vmap ˙ <gv
|
||||
vmap ¬ >gv
|
||||
|
||||
" deactivate stupid ex-mode and man-page stuff
|
||||
nnoremap Q <nop>
|
||||
nnoremap K <nop>
|
||||
|
@ -1,5 +1,6 @@
|
||||
let g:mapleader=","
|
||||
let g:maplocalleader=","
|
||||
nnoremap <space> <nop>
|
||||
let g:mapleader=' '
|
||||
let g:maplocalleader=''
|
||||
|
||||
" Zoom / Restore window.
|
||||
function! s:ToggleZoom() abort
|
||||
@ -24,9 +25,6 @@ nnoremap <leader>- <C-w>s<C-w>j
|
||||
" Opens an edit command with the path of the currently edited file filled in
|
||||
nnoremap <leader>o :e <C-R>=expand("%:p:h") . "/" <cr>
|
||||
|
||||
" Yank to clipboard with clipper -- see https://github.com/wincent/clipper
|
||||
nnoremap <leader>y :call system('nc localhost 8377', @0)<cr>
|
||||
|
||||
" Find merge conflict markers
|
||||
nnoremap <leader>gf /\v^[<\|=>]{7}( .*\|$)<cr>
|
||||
|
||||
|
@ -14,6 +14,20 @@ require('lualine').setup({
|
||||
},
|
||||
})
|
||||
|
||||
require('hop').setup()
|
||||
|
||||
require('fzf-lua').setup({
|
||||
winopts = {
|
||||
width = 0.80,
|
||||
height = 0.78,
|
||||
row = 0.45,
|
||||
col = 0.48,
|
||||
},
|
||||
})
|
||||
|
||||
-- LSP-config
|
||||
require('lspconfig').eslint.setup({})
|
||||
|
||||
require('lspconfig').stylelint_lsp.setup({
|
||||
settings = {
|
||||
stylelintplus = {
|
||||
@ -26,7 +40,7 @@ require('lspconfig').stylelint_lsp.setup({
|
||||
})
|
||||
|
||||
require('lspconfig').cssls.setup({
|
||||
filetypes = { 'css', 'scss' },
|
||||
filetypes = { 'css', 'scss', 'sass' },
|
||||
settings = {
|
||||
css = {
|
||||
validate = false,
|
||||
@ -34,48 +48,55 @@ require('lspconfig').cssls.setup({
|
||||
scss = {
|
||||
validate = false,
|
||||
},
|
||||
sass = {
|
||||
validate = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
EOF
|
||||
|
||||
nnoremap <silent> <leader>, :BufferLinePick<cr>
|
||||
nnoremap <silent> <leader>] :BufferLineCycleNext<CR>
|
||||
nnoremap <silent> <leader>[ :BufferLineCyclePrev<CR>
|
||||
|
||||
" fugitive
|
||||
nnoremap <silent> <leader>gs :G<cr><C-w>20+
|
||||
nnoremap <silent> <leader>gd :Gvdiff<cr><C-w>20+
|
||||
nnoremap <silent> <leader>gc :Gcommit<cr><C-w>20+
|
||||
nnoremap <silent> <leader>gc :Git commit<cr><C-w>20+
|
||||
nnoremap <silent> <leader>gw :Gwrite<cr><C-w>20+
|
||||
nnoremap <silent> <leader>gb :Gblame<cr><C-w>20+
|
||||
nnoremap <silent> <leader>gb :Git blame<cr><C-w>20+
|
||||
|
||||
" fzf
|
||||
nnoremap <silent> <space>, :Files<cr>
|
||||
nnoremap <silent> <space>. :Buffers<cr>
|
||||
nnoremap <silent> <space>l :Lines<cr>
|
||||
nnoremap <silent> <space>a :Rg<cr>
|
||||
nnoremap <silent> <space>h :History:<cr>
|
||||
nnoremap <silent> <space>/ :History/<cr>
|
||||
nnoremap <silent> <space>c :Commits<cr>
|
||||
nnoremap <silent> <leader>, <cmd>lua require('fzf-lua').files()<cr>
|
||||
nnoremap <silent> <leader>` <cmd>lua require('fzf-lua').files({ cwd = '~/' })<cr>
|
||||
nnoremap <silent> <leader>. <cmd>lua require('fzf-lua').buffers()<cr>
|
||||
nnoremap <silent> <leader>l <cmd>lua require('fzf-lua').lines()<cr>
|
||||
nnoremap <silent> <leader>a <cmd>lua require('fzf-lua').grep_project()<cr>
|
||||
nnoremap <silent> <leader>; <cmd>lua require('fzf-lua').command_history()<cr>
|
||||
nnoremap <silent> <leader>/ <cmd>lua require('fzf-lua').search_history()<cr>
|
||||
nnoremap <silent> <leader>c <cmd>lua require('fzf-lua').git_commits()<cr>
|
||||
nnoremap <silent> <leader>b <cmd>lua require('fzf-lua').git_branches()<cr>
|
||||
|
||||
" EasyMotion
|
||||
let g:EasyMotion_do_mapping=0
|
||||
let g:EasyMotion_smartcase=1
|
||||
nmap <leader>j <Plug>(easymotion-overwin-f2)
|
||||
" Hop
|
||||
nnoremap <silent> <space>j <cmd>lua require('hop').hint_words()<cr>
|
||||
|
||||
" Floaterm
|
||||
let g:floaterm_keymap_toggle = '<space>t'
|
||||
let g:floaterm_width = 0.9
|
||||
let g:floaterm_height = 0.62
|
||||
let g:floaterm_width = 0.8
|
||||
let g:floaterm_height = 0.8
|
||||
let g:floaterm_autoclose = 1
|
||||
let g:floaterm_opener = 'edit'
|
||||
let g:floaterm_borderchars = '─│─│╭╮╯╰'
|
||||
let g:floaterm_title = ''
|
||||
hi FloatermBorder guibg='#282828' guifg='#a89984'
|
||||
hi FloatermBorder guibg='#282828' guifg='#fbf1c7'
|
||||
nnoremap <silent> - :FloatermNew nnn<cr>
|
||||
nnoremap <silent> <space>g :FloatermNew lazygit<cr>
|
||||
|
||||
|
||||
|
||||
" COC.vim
|
||||
" TODO LSP-alternatives
|
||||
" nmap <leader>c <Plug>(coc-rename)
|
||||
" nmap <leader>e <Plug>(coc-diagnostic-next)
|
||||
" xmap <leader>f <Plug>(coc-format-selected)
|
||||
" nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
inoremap <silent><expr> <C-j>
|
||||
\ pumvisible() ? coc#_select_confirm() :
|
||||
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<cr>" :
|
||||
@ -115,12 +136,6 @@ function! s:show_documentation()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Leader mappings
|
||||
nmap <leader>c <Plug>(coc-rename)
|
||||
nmap <leader>e <Plug>(coc-diagnostic-next)
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
" Selection ranges
|
||||
nmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
xmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
|
@ -25,7 +25,7 @@ bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft=
|
||||
bind -n WheelDownPane select-pane -t= \; send-keys -M
|
||||
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
|
||||
|
||||
# Custom statusbar
|
||||
# Custom statusbar, gruvbox style
|
||||
set -g status-style bg=black,fg=yellow,default
|
||||
set -g pane-border-style 'fg=#504945'
|
||||
set -g pane-active-border-style 'fg=#504945'
|
||||
@ -34,12 +34,11 @@ set -g display-panes-active-colour blue
|
||||
set -g display-panes-colour brightred
|
||||
set -g status-left-length 100
|
||||
set -g status-right-length 100
|
||||
set -g status-left '#[fg=black,bg=white] ⧉ #S #[fg=white,bg=default,nobold]'
|
||||
set -g status-right '#[fg=white,bg=default,nobold] #(whoami)@#h #[fg=black,bg=white,nobold] %d.%m.%Y ¦ %H:%M '
|
||||
set -g status-left '#[fg=black,bg=white] ⧉ #S #[fg=white,bg=default,nobold] '
|
||||
set -g status-right '#[fg=white,bg=default,nobold]#(whoami)@#h #[fg=black,bg=white,nobold] %d.%m.%Y ¦ %H:%M '
|
||||
set -g window-status-format '#[fg=white,bg=default] #I #W '
|
||||
set -g window-status-current-format '#[fg=blue,bg=black]#[fg=black,bg=blue] #I #W #[fg=blue,bg=black]#[fg=blue,bg=black,nobold]'
|
||||
|
||||
|
||||
# Plugin configuration
|
||||
set -g @resurrect-processes 'nnn v nvim m neomutt'
|
||||
set -g @continuum-restore 'on'
|
||||
|
@ -13,7 +13,6 @@ alias ggps='git push origin $(current_branch)'
|
||||
alias gmo='$EDITOR $(git ls-files -m)'
|
||||
alias gs="git status"
|
||||
alias lg='lazygit'
|
||||
alias e='exa -la'
|
||||
alias m='neomutt'
|
||||
alias mutt='neomutt'
|
||||
alias nb="npm run build"
|
||||
|
@ -36,9 +36,6 @@ export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
# fzf colors
|
||||
export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --glob '!.git'"
|
||||
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
|
||||
--color=fg:#cdcecf,bg:#192330,hl:#b4a2df,fg+:#cdcecf,bg+:#283648,hl+:#fabd2f
|
||||
--color=info:#83a598,prompt:#bdae93,spinner:#fabd2f,pointer:#b4a2df,marker:#b4a2df,header:#665c54'
|
||||
|
||||
# n node version management
|
||||
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" # Added by n-install (see http://git.io/n-install-repo).
|
||||
|
Loading…
Reference in New Issue
Block a user