February update
This commit is contained in:
parent
71a7fe2b72
commit
af39225ac2
|
@ -17,8 +17,8 @@ macro f set browser "feh %u"
|
||||||
macro m set browser "mpv %u"
|
macro m set browser "mpv %u"
|
||||||
macro M set browser "mpv %u" ; open-in-browser ; set browser "qutebrowser %u"
|
macro M set browser "mpv %u" ; open-in-browser ; set browser "qutebrowser %u"
|
||||||
macro q set browser "qutebrowser %u"
|
macro q set browser "qutebrowser %u"
|
||||||
macro d set browser "youtube-dl -f best -o '~/videos/%(title)s.%(ext)s' '%u'"
|
macro d set browser "yt-dlp -f best -o '~/videos/%(title)s.%(ext)s' '%u'"
|
||||||
macro D set browser "youtube-dl -f best -o '~/videos/%(title)s.%(ext)s' '%u'" ; open-in-browser ; set browser "qutebrowser %u"
|
macro D set browser "yt-dlp -f best -o '~/videos/%(title)s.%(ext)s' '%u'" ; open-in-browser ; set browser "qutebrowser %u"
|
||||||
macro y set browser "echo -n %u | xclip -sel clip" ; open-in-browser ; set browser "qutebrowser %u"
|
macro y set browser "echo -n %u | xclip -sel clip" ; open-in-browser ; set browser "qutebrowser %u"
|
||||||
|
|
||||||
unbind-key l
|
unbind-key l
|
||||||
|
|
|
@ -7,6 +7,7 @@ set nu rnu
|
||||||
set smartindent
|
set smartindent
|
||||||
set nocp
|
set nocp
|
||||||
set bo=all
|
set bo=all
|
||||||
|
set mouse=a
|
||||||
colorscheme torte
|
colorscheme torte
|
||||||
set list
|
set list
|
||||||
set listchars=tab:*·,lead:·,trail:~,extends:>,precedes:<
|
set listchars=tab:*·,lead:·,trail:~,extends:>,precedes:<
|
||||||
|
@ -30,6 +31,8 @@ nnoremap <silent> <F2> <cmd>ToggleDiagOff<cr>:Gdiffsplit<cr>
|
||||||
nnoremap <silent> <F5> <cmd>ToggleDiag<cr>
|
nnoremap <silent> <F5> <cmd>ToggleDiag<cr>
|
||||||
nnoremap <silent> <F6> <cmd>%!expand -t4<cr><cmd>%!sed 's/[ \t]*$//'<cr>
|
nnoremap <silent> <F6> <cmd>%!expand -t4<cr><cmd>%!sed 's/[ \t]*$//'<cr>
|
||||||
nnoremap <silent> <F7> <cmd>%!unexpand -t4<cr><cmd>%!sed 's/[ \t]*$//'<cr>
|
nnoremap <silent> <F7> <cmd>%!unexpand -t4<cr><cmd>%!sed 's/[ \t]*$//'<cr>
|
||||||
|
nnoremap <silent> <F8> <cmd>TagbarToggle<CR>
|
||||||
|
nnoremap <silent> <C-n> <cmd>NERDTreeToggle<CR>
|
||||||
|
|
||||||
noremap - ddp
|
noremap - ddp
|
||||||
nnoremap _ ddkP
|
nnoremap _ ddkP
|
||||||
|
@ -64,9 +67,11 @@ Plug 'drmingdrmer/xptemplate'
|
||||||
|
|
||||||
Plug 'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim'
|
Plug 'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim'
|
||||||
|
|
||||||
call plug#end()
|
Plug 'preservim/tagbar'
|
||||||
|
|
||||||
nnoremap <C-n> <cmd>silent NERDTreeToggle<CR>
|
Plug 'junegunn/fzf.vim'
|
||||||
|
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
augroup python
|
augroup python
|
||||||
autocmd FileType python :iabbrev <buffer> frompdb from pdb import set_trace; set_trace()
|
autocmd FileType python :iabbrev <buffer> frompdb from pdb import set_trace; set_trace()
|
||||||
|
@ -111,9 +116,14 @@ vim.api.nvim_set_keymap('i', '<cr>', 'compe#confirm("<cr>")', { expr = true })
|
||||||
|
|
||||||
local common_bindings = function(client, bufnr)
|
local common_bindings = function(client, bufnr)
|
||||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||||
|
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||||
|
|
||||||
|
local opts = { noremap=true, silent=true }
|
||||||
|
|
||||||
--Enable completion triggered by <c-x><c-o>
|
--Enable completion triggered by <c-x><c-o>
|
||||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
|
||||||
|
buf_set_keymap('n', '<C-[>', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
local default_formatting = function(client, bufnr)
|
local default_formatting = function(client, bufnr)
|
||||||
|
@ -144,27 +154,10 @@ end
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
local servers = { 'clangd', 'rls', 'tsserver' }
|
local servers = { 'clangd', 'rls', 'tsserver', 'jedi_language_server' }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
setup(lsp, default_attach)
|
setup(lsp, default_attach)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Servers with custom setup
|
|
||||||
|
|
||||||
-- pylsp
|
|
||||||
local pylsp_settings = {
|
|
||||||
pylsp = {
|
|
||||||
plugins = {
|
|
||||||
pycodestyle = {
|
|
||||||
enabled = true,
|
|
||||||
ignore = {'E501', 'E711'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setup('pylsp', default_attach, pylsp_settings)
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
" auto close scratch buffer (preview window)
|
" auto close scratch buffer (preview window)
|
||||||
|
|
|
@ -27,7 +27,6 @@ alias feh="feh -."
|
||||||
# vi keybindings
|
# vi keybindings
|
||||||
alias info="info --vi-keys"
|
alias info="info --vi-keys"
|
||||||
alias less="less -R"
|
alias less="less -R"
|
||||||
alias find="find -name"
|
|
||||||
alias sl="ls"
|
alias sl="ls"
|
||||||
alias la="ls -a"
|
alias la="ls -a"
|
||||||
alias venv="source venv/bin/activate"
|
alias venv="source venv/bin/activate"
|
||||||
|
@ -46,4 +45,7 @@ goto() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# NVM - Dynamic loading trick
|
# NVM - Dynamic loading trick
|
||||||
alias nvm="unalias nvm && source /usr/share/nvm/init-nvm.sh && nvm"
|
alias nvm="unalias nvm && [ -z $NVM_LOADED ] && export NVM_LOADED=1 && source /usr/share/nvm/init-nvm.sh ; nvm"
|
||||||
|
alias node="unalias node && [ -z $NVM_LOADED ] && export NVM_LOADED=1 && source /usr/share/nvm/init-nvm.sh ; node"
|
||||||
|
|
||||||
|
source "$HOME/.swallow"
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
MPV=/usr/bin/mpv
|
||||||
|
|
||||||
|
mpv() {
|
||||||
|
EXT=${*##*.}
|
||||||
|
|
||||||
|
case "$*" in
|
||||||
|
*--no-video*)
|
||||||
|
$MPV $*
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$EXT" in
|
||||||
|
ogg|opus|mp3)
|
||||||
|
$MPV $*
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
swallow $MPV $*
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
|
@ -58,8 +58,8 @@ set -g pane-active-border-style 'bg=colour0 fg=colour9'
|
||||||
set -g status-position bottom
|
set -g status-position bottom
|
||||||
set -g status-justify left
|
set -g status-justify left
|
||||||
set -g status-style 'bg=colour234 fg=colour255'
|
set -g status-style 'bg=colour234 fg=colour255'
|
||||||
set -g status-left '#[fg=colour255,bg=colour234] '
|
set -g status-left '#[fg=colour255,bg=colour234] '
|
||||||
set -g status-right '#[bg=colour234,fg=colour27]#[fg=colour255,bg=colour27] %d/%m %H:%M '
|
set -g status-right '#[bg=colour234,fg=colour27]#[fg=colour255,bg=colour27] %d/%m %H:%M '
|
||||||
set -g status-right-length 50
|
set -g status-right-length 50
|
||||||
set -g status-left-length 20
|
set -g status-left-length 20
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
CMD="$1"
|
||||||
|
shift 1
|
||||||
|
WINDOW=$(xdotool getwindowfocus)
|
||||||
|
xdotool windowunmap "$WINDOW"
|
||||||
|
$CMD "$@" > /dev/null 2>&1
|
||||||
|
xdotool windowmap "$WINDOW"
|
Loading…
Reference in New Issue