nvim.lua bombos y platillos
This commit is contained in:
parent
0ca9a00df0
commit
efc1b575db
|
@ -3,6 +3,7 @@
|
|||
xsetroot -cursor_name left_ptr &
|
||||
xcompmgr &
|
||||
fcitx &
|
||||
xset r rate 200 30
|
||||
xrdb -merge "$XDG_CONFIG_HOME/X11/xresources"
|
||||
|
||||
exec runsvdir -P ~/.local/service.x
|
||||
|
|
|
@ -15,15 +15,15 @@ scrolling:
|
|||
# Font configuration
|
||||
font:
|
||||
normal:
|
||||
family: Harmonia Sans Medium
|
||||
family: PragmataPro Mono Liga
|
||||
style: Regular
|
||||
|
||||
italic:
|
||||
family: Harmonia Sans Medium
|
||||
family: PragmataPro Mono Liga
|
||||
style: Italic
|
||||
|
||||
bold:
|
||||
family: Harmonia Sans Medium
|
||||
family: PragmataPro Mono Liga
|
||||
style: Bold
|
||||
|
||||
# Point size
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
max_icon_size = 24
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /home/deadguy/.local/share/icons/BeOS/scalable/actions:/home/deadguy/.local/share/icons/BeOS/scalable/animations:/home/deadguy/.local/share/icons/BeOS/scalable/apps:/home/deadguy/.local/share/icons/BeOS/scalable/categories:/home/deadguy/.local/share/icons/BeOS/scalable/devices:/home/deadguy/.local/share/icons/BeOS/scalable/emblems:/home/deadguy/.local/share/icons/BeOS/scalable/emotes:/home/deadguy/.local/share/icons/BeOS/scalable/mimetypes:/home/deadguy/.local/share/icons/BeOS/scalable/places:/home/deadguy/.local/share/icons/BeOS/scalable/status:/home/deadguy/.local/share/icons/BeOS/scalable/stock
|
||||
icon_path = /home/corpse/.local/share/icons/BeOS/scalable/actions:/home/corpse/.local/share/icons/BeOS/scalable/animations:/home/corpse/.local/share/icons/BeOS/scalable/apps:/home/corpse/.local/share/icons/BeOS/scalable/categories:/home/corpse/.local/share/icons/BeOS/scalable/devices:/home/corpse/.local/share/icons/BeOS/scalable/emblems:/home/corpse/.local/share/icons/BeOS/scalable/emotes:/home/corpse/.local/share/icons/BeOS/scalable/mimetypes:/home/corpse/.local/share/icons/BeOS/scalable/places:/home/corpse/.local/share/icons/BeOS/scalable/status:/home/corpse/.local/share/icons/BeOS/scalable/stock
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
|
|
@ -4,18 +4,18 @@ git : /home/corpse/.config/git/config
|
|||
gtk3 : /home/corpse/.config/gtk-3.0/settings.ini
|
||||
lfview : /home/corpse/.local/bin/lfview
|
||||
gtk2 : /home/corpse/.config/gtk-2.0/gtkrc-2.0
|
||||
mpv : /home/corpse/.config/mpv/mpv.conf
|
||||
nvim : /home/corpse/.config/nvim
|
||||
xinit : /home/corpse/.config/X11/xinitrc
|
||||
dunst : /home/corpse/.config/dunst/dunstrc
|
||||
xresources : /home/corpse/.config/X11/xresources
|
||||
lf : /home/corpse/.config/lf/lfrc
|
||||
alias : /home/corpse/.config/zsh/conf/03_aliases.zsh
|
||||
tmux : /home/corpse/.config/tmux/tmux.conf
|
||||
polybar : /home/corpse/.config/polybar/config
|
||||
correo : /home/corpse/.config/neomutt
|
||||
terminal : /home/corpse/.config/alacritty.yml
|
||||
zsh : /home/corpse/.config/zsh
|
||||
bspwm : /home/corpse/.config/bspwm/bspwmrc
|
||||
keys : /home/corpse/.config/sxhkd/sxhkdrc
|
||||
terminal : /home/corpse/.config/alacritty.yml
|
||||
bspwm : /home/corpse/.config/bspwm/bspwmrc
|
||||
tmux : /home/corpse/.config/tmux/tmux.conf
|
||||
mpv : /home/corpse/.config/mpv/mpv.conf
|
||||
xinit : /home/corpse/.config/X11/xinitrc
|
||||
zshenv : /home/corpse/.zshenv
|
||||
lf : /home/corpse/.config/lf/lfrc
|
||||
zsh : /home/corpse/.config/zsh
|
||||
|
|
183
.config/lf/lfrc
183
.config/lf/lfrc
|
@ -1,7 +1,9 @@
|
|||
# Basic Settings
|
||||
set shell zsh
|
||||
set shellopts '-eu:--shwordsplit'
|
||||
set shellopts '-euy:--shwordsplit'
|
||||
set ifs "\n"
|
||||
set errorfmt "\033[1;31m%s\033[0m"
|
||||
set promptfmt "\033[34;1m%d\033[0m\033[1m%f\033[0m"
|
||||
set scrolloff 5
|
||||
set wrapscroll
|
||||
set sortby time
|
||||
|
@ -13,6 +15,8 @@ set hidden
|
|||
set preview
|
||||
set previewer lfview
|
||||
|
||||
%[ $LF_LEVEL -eq 1 ] || echo "Warning: You're in a nested lf instance!"
|
||||
|
||||
%{{
|
||||
w=$(tput cols)
|
||||
if [ $w -le 80 ]; then
|
||||
|
@ -38,68 +42,69 @@ cmd open ${{
|
|||
esac
|
||||
}}
|
||||
|
||||
cmd bulkrename ${{
|
||||
old=$(mktemp)
|
||||
new=$(mktemp)
|
||||
[ -n $fs ] && fs=$(ls)
|
||||
printf "$fs\n" > $old
|
||||
printf "$fs\n" > $new
|
||||
$EDITOR $new
|
||||
[ $(cat $new | wc -l) -ne $(cat $old | wc -l) ] && exit
|
||||
paste $old $new | while read names; do
|
||||
src=$(printf $names | cut -f1)
|
||||
dst=$(printf $names | cut -f2)
|
||||
[ $src = $dst ] && continue
|
||||
[ -e $dst ] && continue
|
||||
mv $src $dst
|
||||
cmd bulk-rename ${{
|
||||
old="$(mktemp)"
|
||||
new="$(mktemp)"
|
||||
[ -n "$fs" ] && fs="$(ls)"
|
||||
printf '%s\n' "$fs" >"$old"
|
||||
printf '%s\n' "$fs" >"$new"
|
||||
$EDITOR "$new"
|
||||
[ "$(wc -l < "$new")" -ne "$(wc -l < "$old")" ] && exit
|
||||
paste "$old" "$new" | while IFS= read -r names; do
|
||||
src="$(printf '%s' "$names" | cut -f1)"
|
||||
dst="$(printf '%s' "$names" | cut -f2)"
|
||||
if [ "$src" = "$dst" ] || [ -e "$dst" ]; then
|
||||
continue
|
||||
fi
|
||||
mv -- "$src" "$dst"
|
||||
done
|
||||
rm $old $new
|
||||
rm -- "$old" "$new"
|
||||
lf -remote "send $id unselect"
|
||||
}}
|
||||
|
||||
# insert
|
||||
cmd rename-insert &{{
|
||||
if [ "$(echo "$fx" | wc -l)" -gt 1 ]; then
|
||||
lf -remote "send $id echo You can't change more than one file name"
|
||||
lf -remote "send $id unselect"
|
||||
else
|
||||
len="$(basename "$f" | wc -m)" # length of selected file/directory
|
||||
for i in $(seq "$len"); do
|
||||
pos="${pos}<left>" # how many times do I have to press <left> in order to get first char
|
||||
done
|
||||
lf -remote "send $id rename"
|
||||
lf -remote "send $id push $pos"
|
||||
fi
|
||||
if [ "$(echo "$fx" | wc -l)" -gt 1 ]; then
|
||||
lf -remote "send $id echo You can't change more than one file name"
|
||||
lf -remote "send $id unselect"
|
||||
else
|
||||
len="$(basename "$f" | wc -m)" # length of selected file/directory
|
||||
for i in $(seq "$len"); do
|
||||
pos="${pos}<left>" # how many times do I have to press <left> in order to get first char
|
||||
done
|
||||
lf -remote "send $id rename"
|
||||
lf -remote "send $id push $pos"
|
||||
fi
|
||||
}}
|
||||
|
||||
# append before ext
|
||||
cmd rename-before-ext &{{
|
||||
if [ "$(echo "$fx" | wc -l)" -gt 1 ]; then
|
||||
lf -remote "send $id echo You can't change more than one file name"
|
||||
lf -remote "send $id unselect"
|
||||
else
|
||||
if [ -d "$f" ]; then
|
||||
lf -remote "send $id rename"
|
||||
else
|
||||
ext_len="$(echo ${f##*.} | wc -m)" # extention length
|
||||
for i in $(seq "$ext_len"); do
|
||||
pos="${pos}<left>"
|
||||
done
|
||||
lf -remote "send $id rename"
|
||||
lf -remote "send $id push "$pos""
|
||||
fi
|
||||
fi
|
||||
if [ "$(echo "$fx" | wc -l)" -gt 1 ]; then
|
||||
lf -remote "send $id echo You can't change more than one file name"
|
||||
lf -remote "send $id unselect"
|
||||
else
|
||||
if [ -d "$f" ]; then
|
||||
lf -remote "send $id rename"
|
||||
else
|
||||
ext_len="$(echo ${f##*.} | wc -m)" # extention length
|
||||
for i in $(seq "$ext_len"); do
|
||||
pos="${pos}<left>"
|
||||
done
|
||||
lf -remote "send $id rename"
|
||||
lf -remote "send $id push "$pos""
|
||||
fi
|
||||
fi
|
||||
}}
|
||||
|
||||
# change its name entirely
|
||||
cmd rename-new &{{
|
||||
if [ "$(echo "$fx" | wc -l)" -gt 1 ]; then
|
||||
lf -remote "send $id echo You can't change more than one file name"
|
||||
lf -remote "send $id unselect"
|
||||
else
|
||||
lf -remote "send $id rename"
|
||||
lf -remote "send $id push <c-u>"
|
||||
fi
|
||||
if [ "$(echo "$fx" | wc -l)" -gt 1 ]; then
|
||||
lf -remote "send $id echo You can't change more than one file name"
|
||||
lf -remote "send $id unselect"
|
||||
else
|
||||
lf -remote "send $id rename"
|
||||
lf -remote "send $id push <c-u>"
|
||||
fi
|
||||
}}
|
||||
|
||||
cmd paste-rsync &{{
|
||||
|
@ -121,19 +126,6 @@ cmd paste-rsync &{{
|
|||
lf -remote 'send clear'
|
||||
}}
|
||||
|
||||
cmd paste-append &{{
|
||||
load=$(lf -remote 'load')
|
||||
mode=$(echo "$load" | sed -n '1p')
|
||||
list=$(echo "$load" | sed '1d')
|
||||
if [ $mode = 'copy' ]; then
|
||||
cp -rn $list .
|
||||
elif [ $mode = 'move' ]; then
|
||||
mv -n $list .
|
||||
fi
|
||||
lf -remote 'send load'
|
||||
lf -remote 'send clear'
|
||||
}}
|
||||
|
||||
cmd paste-overwrite %{{
|
||||
load=$(lf -remote 'load')
|
||||
mode=$(echo "$load" | sed -n '1p')
|
||||
|
@ -147,27 +139,13 @@ cmd paste-overwrite %{{
|
|||
lf -remote 'send clear'
|
||||
}}
|
||||
|
||||
cmd paste-interactive %{{
|
||||
load=$(lf -remote 'load')
|
||||
mode=$(echo "$load" | sed -n '1p')
|
||||
list=$(echo "$load" | sed '1d')
|
||||
if [ $mode = 'copy' ]; then
|
||||
cp -r $list .
|
||||
elif [ $mode = 'move' ]; then
|
||||
mv $list .
|
||||
fi
|
||||
lf -remote 'send load'
|
||||
lf -remote 'send clear'
|
||||
}}
|
||||
|
||||
cmd fzf_jump ${{
|
||||
res="$(find . -maxdepth 3 -printf '%P\n' | fzf --reverse --header='Jump to location')"
|
||||
if [ -f "$res" ]; then
|
||||
cmd="select"
|
||||
elif [ -d "$res" ]; then
|
||||
res="$(find . -maxdepth 3 | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')"
|
||||
if [ -d "$res" ]; then
|
||||
cmd="cd"
|
||||
else
|
||||
cmd="select"
|
||||
fi
|
||||
|
||||
lf -remote "send $id $cmd \"$res\""
|
||||
}}
|
||||
|
||||
|
@ -210,8 +188,32 @@ cmd yes_preview :{{
|
|||
cmd newfold ${{
|
||||
set -f
|
||||
read newd
|
||||
mkdir $newd
|
||||
mv $fx $newd
|
||||
mkdir -- "$newd"
|
||||
mv -- $fx "$newd"
|
||||
}}
|
||||
|
||||
cmd yank-dirname $dirname -- "$f" | head -c-1 | xclip -i -selection clipboard
|
||||
cmd yank-path $printf '%s' "$fx" | xclip -i -selection clipboard
|
||||
cmd yank-basename $basename -a -- $fx | head -c-1 | xclip -i -selection clipboard
|
||||
|
||||
cmd yank-basename-without-extension ${{
|
||||
echo "$fx" |
|
||||
xargs -r -d '\n' basename -a |
|
||||
awk -e '{
|
||||
for (i=length($0); i > 0; i--) {
|
||||
if (substr($0, i, 1) == ".") {
|
||||
if (i == 1) print $0
|
||||
else print substr($0, 0, i-1)
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
print $0
|
||||
}' |
|
||||
if [ -n "$fs" ]; then cat; else tr -d '\n'; fi |
|
||||
xclip -i -selection clipboard
|
||||
}}
|
||||
|
||||
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
|
||||
|
@ -250,13 +252,12 @@ map ¿ bottom
|
|||
map x clear
|
||||
map dd cut
|
||||
map yy copy
|
||||
map yn ${{echo -n $(dirname $f) | xclip -selection clipboard}}
|
||||
map yp ${{echo -n $f | xclip -selection clipboard}}
|
||||
map yn ${{echo -n $(basename $f) | xclip -selection clipboard}}
|
||||
map yn yank-dirname
|
||||
map yp yank-path
|
||||
map yn yank-basename
|
||||
map yw yank-basename-without-extension
|
||||
map pp paste
|
||||
map pa paste-append
|
||||
map po paste-overwrite
|
||||
map pi paste-interactive
|
||||
map pr paste-rsync
|
||||
map o &mimeopen $f
|
||||
map O $mimeopen --ask $f
|
||||
|
@ -269,13 +270,11 @@ map zf $file-roller "$f"
|
|||
map zc $zip -9 -r "$f".cbz $f
|
||||
map zx $zu "$f"
|
||||
map zn newfold
|
||||
|
||||
map i push A<c-a> # at the very beginning
|
||||
map I push A<c-a> # at the very beginning
|
||||
map A rename # at the very end
|
||||
map I push A<a-b><c-b>. # before extension
|
||||
map a push A<a-b> # after extension
|
||||
map i push A<a-b><c-b> # at the very beginning
|
||||
map a push A<a-b> # after extention
|
||||
map B bulkrename
|
||||
|
||||
map L :Link
|
||||
map f fzf_jump
|
||||
map / $lf -remote "send $id select \"$(FZF_DEFAULT_COMMAND='fd --max-depth=1' fzf)\""
|
||||
|
|
|
@ -12,6 +12,8 @@ autofit-larger=90%x90%
|
|||
stop-playback-on-init-failure=yes
|
||||
idle=once
|
||||
osc=yes
|
||||
cache=yes
|
||||
cache-pause=no
|
||||
ytdl-format=bestvideo[height<=?1080]+bestaudio/best
|
||||
ytdl-raw-options=youtube-skip-dash-manifest=,no-call-home=,no-cache-dir=,geo-bypass=
|
||||
screenshot-format=png
|
||||
|
|
|
@ -2,3 +2,11 @@ setlocal expandtab
|
|||
setlocal shiftwidth=2
|
||||
setlocal softtabstop=2
|
||||
setlocal smartindent
|
||||
|
||||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
setlocal noexpandtab
|
||||
setlocal shiftwidth=4
|
||||
setlocal tabstop=4
|
||||
setlocal foldmethod=syntax
|
||||
|
||||
let g:go_textobj_include_function_doc = 1
|
||||
let g:go_auto_type_info = 1
|
||||
let g:go_auto_sameids = 1
|
||||
let g:go_autodetect_gopath = 1
|
||||
let g:go_imports_autosave = 1
|
||||
let g:go_doc_popup_window = 1
|
||||
let g:go_gopls_enabled = 1
|
||||
let g:go_metalinter_autosave = 1
|
||||
let g:go_fmt_command = "goimports"
|
||||
let g:go_list_type = "quickfix"
|
||||
|
||||
" Go syntax highlighting
|
||||
let g:go_highlight_build_constraints = 1
|
||||
let g:go_highlight_fields = 1
|
||||
let g:go_highlight_function_calls = 1
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_methods = 1
|
||||
let g:go_highlight_operators = 1
|
||||
let g:go_highlight_structs = 1
|
||||
let g:go_highlight_types = 1
|
||||
let g:go_highlight_extra_types = 1
|
||||
let g:go_play_browser_command = 'tmux new-window elinks %URL%'
|
||||
|
||||
" Status line types/signatures
|
||||
let g:go_auto_type_info = 1
|
||||
|
||||
" Add the failing test name to the output of :GoTest
|
||||
let g:go_test_show_name = 1
|
||||
|
||||
inoremap <buffer> . .<C-x><C-o>
|
||||
nmap <buffer><leader>d :<Plug>(go-def)
|
||||
nmap <buffer><leader>t :GoTest!<CR>
|
||||
nmap <buffer><leader>b :GoBuild!<CR>
|
||||
nmap <buffer><leader>i :GoInstall!<CR>
|
||||
nmap <buffer><leader>R :GoRun %<CR>
|
||||
nmap <buffer><leader>x :GoDebugStart!<CR>
|
||||
nmap <buffer><leader>r :GoRun!<CR>
|
||||
nmap <buffer><leader>m :GoDoc<CR>
|
||||
nmap <buffer><leader>D :GoDocBrowser<CR>
|
|
@ -13,3 +13,11 @@ if &completeopt =~# '.*noselect.*'
|
|||
else
|
||||
iabbrev </ </<C-X><C-O>
|
||||
endif
|
||||
|
||||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'nvim_lua' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
||||
set shiftwidth=2
|
||||
set tabstop=2
|
|
@ -0,0 +1 @@
|
|||
setlocal noexpandtab
|
|
@ -15,3 +15,11 @@ nnoremap <buffer> <silent> <F9> z=
|
|||
nnoremap <buffer> <silent> <F10> z=1<CR><CR>
|
||||
nnoremap <buffer> <silent> <F11> zg
|
||||
inoremap <buffer> <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||
|
||||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'buffer' },
|
||||
\ { name = 'spell' }
|
||||
\ { name = 'look', keyword_length=3 },
|
||||
\ },
|
||||
\ }
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
||||
set shiftwidth=2
|
||||
set tabstop=2
|
|
@ -0,0 +1,4 @@
|
|||
augroup Profugo
|
||||
autocmd!
|
||||
autocmd BufReadPost fugitive:///*//2/*,fugitive:///*//3/* setlocal nomodifiable readonly
|
||||
augroup END
|
File diff suppressed because it is too large
Load Diff
|
@ -1,2 +0,0 @@
|
|||
" Last Change: 2019 Nov 14
|
||||
au BufRead,BufNewFile *.m{s,m} set filetype=groff
|
|
@ -0,0 +1,14 @@
|
|||
if !exists("b:sh_indent_options")
|
||||
let b:sh_indent_options = {}
|
||||
endif
|
||||
|
||||
let b:sh_indent_options['continuation-line'] = 2
|
||||
|
||||
if executable('shfmt')
|
||||
let &l:formatprg='shfmt -i ' . &l:shiftwidth . ' -ln posix -sr -ci -s'
|
||||
endif
|
||||
|
||||
nnoremap <buffer> D :Man <c-r><c-w><CR>
|
||||
|
||||
" allow for commands with - in the name
|
||||
set iskeyword+=-
|
|
@ -0,0 +1,9 @@
|
|||
setlocal shiftwidth=2
|
||||
|
||||
command! -buffer -bang Compile compiler zsh | make<bang>
|
||||
|
||||
augroup linty
|
||||
au! * <buffer>
|
||||
au BufWritePost <buffer=abuf> Compile
|
||||
au QuickFixCmdPost make cwindow
|
||||
augroup END
|
|
@ -1,31 +1,44 @@
|
|||
let g:loaded_ruby_provider = 0
|
||||
let g:loaded_node_provider = 0
|
||||
let g:loaded_python_provider = 0
|
||||
let g:loaded_gzip = 1
|
||||
let g:loaded_tarPlugin = 1
|
||||
let g:loaded_zipPlugin = 1
|
||||
let g:loaded_2html_plugin = 1
|
||||
|
||||
if filereadable('bin/python3')
|
||||
let g:python3_host_prog = '/bin/python3'
|
||||
endif
|
||||
|
||||
if executable('rg')
|
||||
set grepprg=rg\ --vimgrep
|
||||
set grepformat=%f:%l:%c:%m
|
||||
else
|
||||
set grepprg=grep\ -R\ -n\ --exclude-dir=.git,.cache
|
||||
endif
|
||||
|
||||
set grepprg=rg\ --vimgrep
|
||||
set grepformat=%f:%l:%c:%m
|
||||
let mapleader="\<SPACE>"
|
||||
let maplocalleader=','
|
||||
|
||||
set termguicolors
|
||||
let g:srcery_transparent_background = 1
|
||||
let g:srcery_italic = 1
|
||||
let g:srcery_inverse_matches = 1
|
||||
let g:srcery_underline = 1
|
||||
let g:srcery_undercurl = 1
|
||||
let g:srcery_underline_match_paren = 1
|
||||
colorscheme srcery
|
||||
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
aug Plugins
|
||||
au!
|
||||
au VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
aug END
|
||||
endif
|
||||
if filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
call plug#begin(stdpath('data') . '/plugged')
|
||||
Plug 'fatih/vim-go', {'for': 'go', 'do': ':GoInstallBinaries'}
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'p00f/nvim-ts-rainbow'
|
||||
Plug 'windwp/nvim-autopairs'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
Plug 'nvim-telescope/telescope-fzf-native.nvim', {'do': 'make'}
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'hrsh7th/cmp-nvim-lua'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
Plug 'octaltree/cmp-look'
|
||||
Plug 'f3fora/cmp-spell'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'lewis6991/gitsigns.nvim'
|
||||
Plug 'rktjmp/lush.nvim'
|
||||
Plug 'ellisonleao/gruvbox.nvim'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'onsails/lspkind-nvim'
|
||||
call plug#end()
|
||||
endif
|
||||
|
||||
set termguicolors
|
||||
colorscheme gruvbox
|
||||
hi! Normal ctermbg=NONE guibg=NONE
|
||||
hi! NonText ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
||||
|
|
|
@ -10,7 +10,7 @@ if !exists('autocommands_loaded') && has('autocmd')
|
|||
aug END
|
||||
|
||||
aug Miscs
|
||||
au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700}
|
||||
au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=500}
|
||||
au BufEnter * set fo-=c fo-=r fo-=o
|
||||
aug END
|
||||
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local feedkey = function(key, mode)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
||||
end
|
||||
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = require('lspkind').cmp_format({with_text=true, menu = ({
|
||||
buffer = " [Buff]",
|
||||
nvim_lsp = " [LSP]",
|
||||
vsnip = " [Snip]",
|
||||
nvim_lua = " [Lua]",
|
||||
look = " [Dict]",
|
||||
spell = " [Spell]"
|
||||
}),
|
||||
}),
|
||||
-- format = require('lspkind').cmp_format({with_text = true, maxwidth = 50})
|
||||
-- format = function(entry, vim_item)
|
||||
-- -- fancy icons and a name of kind
|
||||
-- vim_item.kind = require('lspkind').presets.default[vim_item.kind]
|
||||
|
||||
-- -- set a name for each source
|
||||
-- vim_item.menu = ({
|
||||
-- buffer = " [Buff]",
|
||||
-- nvim_lsp = " [LSP]",
|
||||
-- vsnip = " [Snip]",
|
||||
-- nvim_lua = " [Lua]",
|
||||
-- look = " [Dict]",
|
||||
-- spell = " [Spell]"
|
||||
-- })[entry.source.name]
|
||||
-- return vim_item
|
||||
-- end,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif vim.fn["vsnip#available"]() == 1 then
|
||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function()
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'buffer' },
|
||||
}
|
||||
})
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
local disabled_builtin_plugins = {
|
||||
'gzip',
|
||||
'zip',
|
||||
'zipPlugin',
|
||||
'tar',
|
||||
'tarPlugin',
|
||||
'getscript',
|
||||
"getscriptPlugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"2html_plugin",
|
||||
"logipat",
|
||||
"rrhelper",
|
||||
"matchit",
|
||||
'remote_plugins'
|
||||
}
|
||||
|
||||
for _, plugin in pairs(disabled_builtin_plugins) do
|
||||
vim.g["loaded_" .. plugin] = 1
|
||||
end
|
||||
|
||||
local disabled_providers = {
|
||||
"ruby",
|
||||
"node",
|
||||
"python",
|
||||
"perl"
|
||||
}
|
||||
|
||||
for _, provider in pairs(disabled_providers) do
|
||||
vim.g["loaded_" .. provider .. "_provider"] = 0
|
||||
end
|
||||
|
||||
vim.g.python3_host_prog = '/bin/python3'
|
|
@ -0,0 +1,33 @@
|
|||
require('gitsigns').setup {
|
||||
numhl = true,
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = { virt_text_pos = 'right_align', delay= 1000 },
|
||||
current_line_blame_formatter_opts = { relative_time = false },
|
||||
signs = {
|
||||
add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
||||
change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
},
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000,
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
diff_opts = {
|
||||
internal = true,
|
||||
}, -- If vim.diff or luajit is present
|
||||
yadm = {
|
||||
enable = false
|
||||
},
|
||||
}
|
||||
|
||||
vim.g.fugitive_summary_format = "%an\t%s"
|
|
@ -0,0 +1,4 @@
|
|||
require('lspkind').init({
|
||||
with_text = true,
|
||||
preset = 'default',
|
||||
})
|
|
@ -0,0 +1,119 @@
|
|||
local nvim_lsp = require 'lspconfig'
|
||||
local configs = require'lspconfig/configs'
|
||||
local on_attach = function(_, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'qq', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>so', [[<cmd>lua require('telescope.builtin').lsp_document_symbols()<CR>]], opts)
|
||||
vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]]
|
||||
end
|
||||
|
||||
vim.cmd [[
|
||||
highlight LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
||||
highlight LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
||||
highlight LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
||||
highlight LspDiagnosticsLineNrHint guibg=#1E205D guifg=#0000FF gui=bold
|
||||
|
||||
sign define LspDiagnosticsSignError text= texthl=LspDiagnosticsSignError linehl= numhl=LspDiagnosticsLineNrError
|
||||
sign define LspDiagnosticsSignWarning text= texthl=LspDiagnosticsSignWarning linehl= numhl=LspDiagnosticsLineNrWarning
|
||||
sign define LspDiagnosticsSignInformation text= texthl=LspDiagnosticsSignInformation linehl= numhl=LspDiagnosticsLineNrInformation
|
||||
sign define LspDiagnosticsSignHint text= texthl=LspDiagnosticsSignHint linehl= numhl=LspDiagnosticsLineNrHint
|
||||
]]
|
||||
|
||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
underline = true,
|
||||
virtual_text = false,
|
||||
update_in_insert = true
|
||||
})
|
||||
|
||||
require'lspconfig'.jsonls.setup {
|
||||
commands = {
|
||||
Format = {
|
||||
function()
|
||||
vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configs.ls_emmet = {
|
||||
default_config = {
|
||||
cmd = { 'ls_emmet', '--stdio' };
|
||||
filetypes = { 'html', 'css', 'scss' }; -- Add the languages you use, see language support
|
||||
root_dir = function(_)
|
||||
return vim.loop.cwd()
|
||||
end;
|
||||
settings = {};
|
||||
};
|
||||
}
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' }
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
capabilities.textDocument.completion.completionItem.preselectSupport = true
|
||||
capabilities.textDocument.completion.completionItem.insertReplaceSupport = true
|
||||
capabilities.textDocument.completion.completionItem.labelDetailsSupport = true
|
||||
capabilities.textDocument.completion.completionItem.deprecatedSupport = true
|
||||
capabilities.textDocument.completion.completionItem.commitCharactersSupport = true
|
||||
capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } }
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
properties = {
|
||||
'documentation',
|
||||
'detail',
|
||||
'additionalTextEdits',
|
||||
},
|
||||
}
|
||||
|
||||
local servers = { 'html', 'cssls', 'jsonls', 'tailwindcss', 'vimls', 'ls_emmet' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
local sumneko_root_path ='/mnt/wd1tb/catacombs/code/lua-language-server'
|
||||
local sumneko_binary = sumneko_root_path .. '/bin/Linux/lua-language-server'
|
||||
|
||||
local runtime_path = vim.split(package.path, ';')
|
||||
table.insert(runtime_path, 'lua/?.lua')
|
||||
table.insert(runtime_path, 'lua/?/init.lua')
|
||||
|
||||
require('lspconfig').sumneko_lua.setup {
|
||||
cmd = { sumneko_binary, '-E', sumneko_root_path .. '/main.lua' },
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
path = runtime_path,
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
nnoremap <silent> <F1> <cmd>Telescope help_tags<CR>
|
||||
nnoremap <silent> <F2> <cmd>Telescope find_files<CR>
|
||||
nnoremap <silent> <F3> <cmd>Telescope file_browser<CR>
|
||||
nnoremap <silent> <F4> <cmd>Telescope buffers<CR>
|
||||
nnoremap <silent> <M-f> <cmd>Telescope live_grep<CR>
|
||||
nnoremap <silent> <M-g> <cmd>Telescope git_commits<CR>
|
||||
nnoremap <silent> <M-S-r> <cmd>Telescope resume<CR>
|
|
@ -0,0 +1,12 @@
|
|||
nnoremap <silent> <Leader>ff :G<CR>
|
||||
nnoremap <silent> <Leader>fc :GCheckout<CR>
|
||||
nnoremap <silent> <Leader>fd :Gvdiffsplit!<CR>
|
||||
nnoremap <silent> <Leader>fh :diffget //2<CR>
|
||||
nnoremap <silent> <Leader>fl :diffget //3<CR>
|
||||
|
||||
nmap <silent> <leader>tt :Gitsigns toggle_signs<CR>
|
||||
nmap <silent> <leader>}g :lua require 'gitsigns'.next_hunk()<CR>
|
||||
nmap <silent> <leader>{g :lua require 'gitsigns'.prev_hunk()<CR>
|
||||
nmap <silent> <leader>+ :lua require'gitsigns'.stage_hunk()<CR>
|
||||
nmap <silent> <leader>- :lua require'gitsigns'.undo_stage_hunk():<CR>
|
||||
nmap <silent> <leader>p :lua require'gitsigns'.stage_hunk({vim.fn.line('.'), vim.fn.line('v')})<CR>
|
|
@ -1,6 +0,0 @@
|
|||
let g:netrw_browse_split = 0
|
||||
let g:netrw_banner = 0
|
||||
let g:netrw_winsize = 25
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_localrmdir='rm -r'
|
||||
nnoremap <silent><F5> :Vex!<cr>
|
|
@ -0,0 +1,53 @@
|
|||
require('nvim-autopairs').setup{
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
lua = {'string'},-- it will not add pair on that treesitter node
|
||||
javascript = {'template_string'},
|
||||
}
|
||||
}
|
||||
|
||||
local Rule = require('nvim-autopairs.rule')
|
||||
|
||||
require('nvim-autopairs').add_rules({
|
||||
Rule("%", "%", "lua")
|
||||
:with_pair(require('nvim-autopairs.ts-conds').is_ts_node({'string','comment'})),
|
||||
Rule("$", "$", "lua")
|
||||
:with_pair(require('nvim-autopairs.ts-conds').is_not_ts_node({'function'})),
|
||||
Rule(' ', ' ')
|
||||
:with_pair(function (opts)
|
||||
local pair = opts.line:sub(opts.col - 1, opts.col)
|
||||
return vim.tbl_contains({ '()', '[]', '{}' }, pair)
|
||||
end),
|
||||
Rule('( ', ' )')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%)') ~= nil
|
||||
end)
|
||||
:use_key(')'),
|
||||
Rule('{ ', ' }')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%}') ~= nil
|
||||
end)
|
||||
:use_key('}'),
|
||||
Rule('[ ', ' ]')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%]') ~= nil
|
||||
end)
|
||||
:use_key(']'),
|
||||
Rule('%(.*%)%s*%=>$', ' { }', { 'typescript', 'typescriptreact', 'javascript' })
|
||||
:use_regex(true)
|
||||
:set_end_pair_length(2),
|
||||
})
|
||||
|
||||
require("nvim-autopairs.completion.cmp").setup({
|
||||
map_cr = true, -- map <CR> on insert mode
|
||||
map_complete = true, -- it will auto insert `(` (map_char) after select function or method item
|
||||
auto_select = true, -- automatically select the first item
|
||||
insert = false, -- use insert confirm behavior instead of replace
|
||||
map_char = { -- modifies the function or method delimiter by filetypes
|
||||
all = '(',
|
||||
tex = '{'
|
||||
}
|
||||
})
|
|
@ -1,10 +1,7 @@
|
|||
" Settings
|
||||
scriptencoding utf-8
|
||||
|
||||
set inccommand=nosplit
|
||||
set clipboard^=unnamedplus
|
||||
set number
|
||||
set signcolumn=auto:1
|
||||
set signcolumn="yes"
|
||||
set noswapfile
|
||||
set hidden
|
||||
set lazyredraw
|
||||
|
@ -13,6 +10,7 @@ set updatetime=100
|
|||
set splitbelow
|
||||
set splitright
|
||||
set notimeout
|
||||
set cursorline
|
||||
set ignorecase
|
||||
set scrolloff=5
|
||||
set sidescroll=5
|
||||
|
@ -30,5 +28,13 @@ set diffopt+=foldcolumn:0
|
|||
set diffopt+=vertical
|
||||
set fillchars=diff:\ ,eob:\ ,stlnc:\ ,stl:\ ,vert:\│
|
||||
set formatoptions=tnqj
|
||||
set completeopt=menu,menuone,noselect,noinsert
|
||||
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
|
||||
let g:netrw_browse_split = 0
|
||||
let g:netrw_banner = 0
|
||||
let g:netrw_winsize = 25
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_localrmdir='rm -r'
|
||||
nnoremap <silent><F5> :Vex!<cr>
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
-- luacheck: globals vim dotfiles
|
||||
dotfiles = _G.dotfiles or {}
|
||||
function dotfiles.sl_wc()
|
||||
return vim.tbl_contains({
|
||||
"markdown",
|
||||
"txt",
|
||||
"vimwiki"
|
||||
}, vim.opt.filetype:get()) and " W:" .. vim.fn.wordcount().words or ""
|
||||
end
|
||||
function dotfiles.sl_dg()
|
||||
local d = ''
|
||||
if vim.diagnostic ~= nil then -- Neovim 0.6
|
||||
for marker,kind in pairs({
|
||||
[" E:"] = vim.diagnostic.severity.ERROR,
|
||||
[" W:"] = vim.diagnostic.severity.WARN,
|
||||
[" I:"] = vim.diagnostic.severity.INFO,
|
||||
[" H:"] = vim.diagnostic.severity.HINT
|
||||
}) do
|
||||
local c = #vim.diagnostic.get(0, { severity = kind })
|
||||
if c ~= 0 then
|
||||
d = d .. marker .. tostring(c)
|
||||
end
|
||||
end
|
||||
else -- Neovim 0.5
|
||||
for kind,marker in pairs({ Error = " E:", Warning = " W:", Information = " I:", Hint = " H:" }) do
|
||||
local c = vim.lsp.diagnostic.get_count(0, kind)
|
||||
if c ~= 0 then
|
||||
d = d .. marker .. tostring(c)
|
||||
end
|
||||
end
|
||||
end
|
||||
return d
|
||||
end
|
||||
local statusline = " %0.45f%m%h%w%r%= %y%{v:lua.dotfiles.sl_wc()} %l:%c %p%%%{v:lua.dotfiles.sl_dg()} "
|
||||
local statusline_nc = " %0.45f%m%h%w%r%="
|
||||
function dotfiles.sl_stl()
|
||||
return vim.g.statusline_winid == vim.fn.win_getid() and statusline or statusline_nc
|
||||
end
|
||||
vim.opt.statusline="%!v:lua.dotfiles.sl_stl()"
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
local actions = require('telescope.actions')
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
'rg',
|
||||
'--no-heading',
|
||||
'--with-filename',
|
||||
'--line-number',
|
||||
'--column',
|
||||
'--smart-case'
|
||||
},
|
||||
sorting_strategy = "ascending",
|
||||
layout_config = {
|
||||
width = 0.75,
|
||||
prompt_position = "top",
|
||||
preview_cutoff = 120,
|
||||
},
|
||||
find_command = {'fd', '-t f', '-c always', '-H'},
|
||||
-- find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'},
|
||||
selection_caret = "→",
|
||||
color_devicons = true,
|
||||
set_env = {['COLORTERM'] = 'truecolor'},
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||
["<C-x>"] = false,
|
||||
["<C-o>"] = actions.select_horizontal,
|
||||
["<CR>"] = actions.select_default + actions.center
|
||||
},
|
||||
n = {
|
||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
require('telescope').load_extension('fzf')
|
|
@ -0,0 +1,44 @@
|
|||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics,
|
||||
{
|
||||
underline = true,
|
||||
virtual_text = {
|
||||
spacing = 5,
|
||||
severity_limit = 'Hint',
|
||||
},
|
||||
update_in_insert = true,
|
||||
}
|
||||
)
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "bash", "css", "go", "gomod", "html", "json", "json5", "jsonc", "latex", "lua", "scss", "toml", "vim", "yaml" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
use_languagetree = true,
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
},
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
{{++}}
|
||||
fmt.Println("vim-go")
|
||||
}
|
|
@ -17,7 +17,7 @@ window {
|
|||
height: 0px;
|
||||
anchor: northwest;
|
||||
location: northwest;
|
||||
padding: 0px 5px;
|
||||
padding: 0px 5px 0px 0px;
|
||||
transparency: "real";
|
||||
children: [ horibox ];
|
||||
background-color: @trans;
|
||||
|
|
|
@ -17,7 +17,7 @@ window {
|
|||
text-color: @foreground;
|
||||
location: northwest;
|
||||
anchor: northwest;
|
||||
padding: 0px 5px;
|
||||
padding: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
|
|
|
@ -40,7 +40,7 @@ super + e
|
|||
rofi -show emoji -modi emoji -theme dprompt3
|
||||
|
||||
super + {shift + b,b,q,s,n,p,r,d}
|
||||
{firefox -P streams,$BROWSER,powermenu,rofi -show window,escribir,postear,ref,leer}
|
||||
{firefox -no-remote -P streams,$BROWSER,powermenu,rofi -show window,escribir,postear,ref,leer}
|
||||
|
||||
super + {_,shift} + g
|
||||
{grabar,corte}
|
||||
|
|
|
@ -12,4 +12,5 @@ hash -d gv=$HOME/vid
|
|||
hash -d ge=$HOME/etc
|
||||
hash -d gi=$HOME/img
|
||||
hash -d gc=/mnt/cell
|
||||
hash -d gs=/mnt/vb/graveyard
|
||||
hash -d gr=/mnt
|
||||
|
|
Loading…
Reference in New Issue