Sigo rompiendo las bolas con nvim, como es costumbre. igual estoy un
poco mas cerca de lo que queria lograr ahora. mientras tanto, sigo intentando y viendo que onda...
This commit is contained in:
parent
38ce8a3d60
commit
d558b64083
|
@ -9,13 +9,13 @@ xresources : /home/corpse/.config/X11/xresources
|
||||||
polybar : /home/corpse/.config/polybar/config
|
polybar : /home/corpse/.config/polybar/config
|
||||||
correo : /home/corpse/.config/neomutt
|
correo : /home/corpse/.config/neomutt
|
||||||
keys : /home/corpse/.config/sxhkd/sxhkdrc
|
keys : /home/corpse/.config/sxhkd/sxhkdrc
|
||||||
tmux : /home/corpse/.config/tmux/tmux.conf
|
|
||||||
mpv : /home/corpse/.config/mpv/mpv.conf
|
mpv : /home/corpse/.config/mpv/mpv.conf
|
||||||
xinit : /home/corpse/.config/X11/xinitrc
|
xinit : /home/corpse/.config/X11/xinitrc
|
||||||
zshenv : /home/corpse/.zshenv
|
|
||||||
bspwm : /home/corpse/.config/bspwm/bspwmrc
|
bspwm : /home/corpse/.config/bspwm/bspwmrc
|
||||||
nvim : /home/corpse/.config/nvim
|
|
||||||
terminal : /home/corpse/.config/alacritty.yml
|
terminal : /home/corpse/.config/alacritty.yml
|
||||||
zsh : /home/corpse/.config/zsh
|
zsh : /home/corpse/.config/zsh
|
||||||
|
zshenv : /home/corpse/.zshenv
|
||||||
lf : /home/corpse/.config/lf/lfrc
|
lf : /home/corpse/.config/lf/lfrc
|
||||||
|
tmux : /home/corpse/.config/tmux/tmux.conf
|
||||||
|
nvim : /home/corpse/.config/nvim
|
||||||
alias : /home/corpse/.config/zsh/conf/03_aliases.zsh
|
alias : /home/corpse/.config/zsh/conf/03_aliases.zsh
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
||||||
|
|
||||||
include "/home/corpse/.gtkrc-2.0.mine"
|
include "/home/corpse/.gtkrc-2.0.mine"
|
||||||
gtk-theme-name="pho-earth-by-night"
|
gtk-theme-name="Skeuos-Black-Dark"
|
||||||
gtk-icon-theme-name="BluecurveRH"
|
gtk-icon-theme-name="BluecurveRH"
|
||||||
gtk-font-name="System Charcoal 10"
|
gtk-font-name="System Charcoal 10"
|
||||||
gtk-cursor-theme-name="Grounation"
|
gtk-cursor-theme-name="Grounation"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Settings]
|
[Settings]
|
||||||
gtk-application-prefer-dark-theme=1
|
gtk-application-prefer-dark-theme=1
|
||||||
gtk-theme-name=pho-earth-by-night
|
gtk-theme-name=Skeuos-Black-Dark
|
||||||
gtk-icon-theme-name=BluecurveRH
|
gtk-icon-theme-name=BluecurveRH
|
||||||
gtk-font-name=System Charcoal 10
|
gtk-font-name=System Charcoal 10
|
||||||
gtk-cursor-theme-size=0
|
gtk-cursor-theme-size=0
|
||||||
|
|
31
lf/lfrc
31
lf/lfrc
|
@ -33,23 +33,22 @@ cmd open ${{
|
||||||
esac
|
esac
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd bulk-rename ${{
|
cmd bulkrename ${{
|
||||||
old="$(mktemp)"
|
old=$(mktemp)
|
||||||
new="$(mktemp)"
|
new=$(mktemp)
|
||||||
[ -n "$fs" ] && fs="$(ls)"
|
[ -n $fs ] && fs=$(ls)
|
||||||
printf '%s\n' "$fs" >"$old"
|
printf "$fs\n" > $old
|
||||||
printf '%s\n' "$fs" >"$new"
|
printf "$fs\n" > $new
|
||||||
$EDITOR "$new"
|
$EDITOR $new
|
||||||
[ "$(wc -l < "$new")" -ne "$(wc -l < "$old")" ] && exit
|
[ $(cat $new | wc -l) -ne $(cat $old | wc -l) ] && exit
|
||||||
paste "$old" "$new" | while IFS= read -r names; do
|
paste $old $new | while read names; do
|
||||||
src="$(printf '%s' "$names" | cut -f1)"
|
src=$(printf $names | cut -f1)
|
||||||
dst="$(printf '%s' "$names" | cut -f2)"
|
dst=$(printf $names | cut -f2)
|
||||||
if [ "$src" = "$dst" ] || [ -e "$dst" ]; then
|
[ $src = $dst ] && continue
|
||||||
continue
|
[ -e $dst ] && continue
|
||||||
fi
|
mv $src $dst
|
||||||
mv -- "$src" "$dst"
|
|
||||||
done
|
done
|
||||||
rm -- "$old" "$new"
|
rm $old $new
|
||||||
lf -remote "send $id unselect"
|
lf -remote "send $id unselect"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"downloadDir": "/mnt/wd1tb/catacombs/img/comics/",
|
||||||
|
"languages": [
|
||||||
|
"en"
|
||||||
|
],
|
||||||
|
"downloadQuality": "data",
|
||||||
|
"forcePort443": false,
|
||||||
|
"asZip": true,
|
||||||
|
"zipType": "cbz"
|
||||||
|
}
|
|
@ -1,12 +1,5 @@
|
||||||
setlocal expandtab
|
setlocal expandtab
|
||||||
setlocal shiftwidth=2
|
setlocal shiftwidth=2
|
||||||
setlocal softtabstop=2
|
setlocal softtabstop=2
|
||||||
setlocal smartindent
|
|
||||||
|
|
||||||
lua require'cmp'.setup.buffer {
|
lua require('cmp').setup.buffer({ sources = {{ name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'buffer' }}})
|
||||||
\ sources = {
|
|
||||||
\ { name = 'nvim_lsp' },
|
|
||||||
\ { name = 'luasnip' },
|
|
||||||
\ { name = 'buffer' },
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
|
@ -3,42 +3,4 @@ setlocal shiftwidth=4
|
||||||
setlocal tabstop=4
|
setlocal tabstop=4
|
||||||
setlocal foldmethod=syntax
|
setlocal foldmethod=syntax
|
||||||
|
|
||||||
let g:go_textobj_include_function_doc = 1
|
lua require('cmp').setup.buffer({sources = {{name = 'nvim_lsp' }, {name = 'luasnip'}, { name = 'buffer' }}})
|
||||||
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>
|
|
||||||
|
|
|
@ -1,23 +1,16 @@
|
||||||
setlocal expandtab
|
setlocal expandtab
|
||||||
setlocal shiftwidth=2
|
setlocal shiftwidth=2
|
||||||
setlocal softtabstop=2
|
setlocal softtabstop=2
|
||||||
setlocal smartindent
|
|
||||||
|
|
||||||
let g:html_indent_script1 = "auto"
|
" let g:html_indent_script1 = "auto"
|
||||||
let g:html_indent_style1 = "auto"
|
" let g:html_indent_style1 = "auto"
|
||||||
|
"
|
||||||
|
" if &completeopt =~# '.*noselect.*'
|
||||||
|
" iabbrev </ </<C-X><C-O><C-N>
|
||||||
|
" imap </<CR> </<C-X><C-O><C-N><CR>
|
||||||
|
" imap ><CR> ><CR></<c-x><c-o><c-n><c-o><s-o>
|
||||||
|
" else
|
||||||
|
" iabbrev </ </<C-X><C-O>
|
||||||
|
" endif
|
||||||
|
|
||||||
if &completeopt =~# '.*noselect.*'
|
lua require('cmp').setup.buffer({ sources = {{ name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'buffer' }}})
|
||||||
iabbrev </ </<C-X><C-O><C-N>
|
|
||||||
imap </<CR> </<C-X><C-O><C-N><CR>
|
|
||||||
imap ><CR> ><CR></<c-x><c-o><c-n><c-o><s-o>
|
|
||||||
else
|
|
||||||
iabbrev </ </<C-X><C-O>
|
|
||||||
endif
|
|
||||||
|
|
||||||
lua require'cmp'.setup.buffer {
|
|
||||||
\ sources = {
|
|
||||||
\ { name = 'nvim_lsp' },
|
|
||||||
\ { name = 'luasnip' },
|
|
||||||
\ { name = 'buffer' },
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
lua require'cmp'.setup.buffer {
|
lua require('cmp').setup.buffer({ sources = { { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'buffer' }}})
|
||||||
\ sources = {
|
|
||||||
\ { name = 'nvim_lsp' },
|
|
||||||
\ { name = 'nvim_lua' },
|
|
||||||
\ { name = 'luasnip' },
|
|
||||||
\ { name = 'buffer' },
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
|
setlocal textwidth=120
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
setlocal spell
|
||||||
|
|
||||||
|
lua require('cmp').setup.buffer({sources = {{name = 'spell'}, {name = 'nvim_lsp' }, {name = 'luasnip'}}})
|
|
@ -16,9 +16,4 @@ nnoremap <buffer> <silent> <F10> z=1<CR><CR>
|
||||||
nnoremap <buffer> <silent> <F11> zg
|
nnoremap <buffer> <silent> <F11> zg
|
||||||
inoremap <buffer> <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
inoremap <buffer> <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||||
|
|
||||||
lua require'cmp'.setup.buffer {
|
lua require'cmp'.setup.buffer({sources = {{ name = 'spell' }}})
|
||||||
\ sources = {
|
|
||||||
\ { name = 'buffer' },
|
|
||||||
\ { name = 'spell' }
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
lua require'cmp'.setup.buffer {
|
lua require'cmp'.setup.buffer({ sources = {{ name = 'nvim_lsp' }, { name = 'nvim_lua' }, { name = 'luasnip' }, { name = 'buffer' }}})
|
||||||
\ sources = {
|
|
||||||
\ { name = 'nvim_lsp' },
|
|
||||||
\ { name = 'luasnip' },
|
|
||||||
\ { name = 'buffer' },
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
if executable("rg")
|
||||||
|
set grepprg=rg\ --vimgrep\ --no-heading
|
||||||
|
set grepformat=%f:%l:%c:%m,%f:%l:%m
|
||||||
|
endif
|
|
@ -0,0 +1,6 @@
|
||||||
|
let g:LoupeClearHighlightMap = 1
|
||||||
|
let g:LoupeCenterResults=0
|
||||||
|
set shortmess-=s
|
||||||
|
nmap <Nop> <Plug>(LoupeN)
|
||||||
|
nmap <Nop> <Plug>(Loupen)
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
" gomod.vim: Vim syntax file for go.mod file
|
||||||
|
"
|
||||||
|
" Quit when a (custom) syntax file was already loaded
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syntax case match
|
||||||
|
|
||||||
|
" match keywords
|
||||||
|
syntax keyword gomodModule module
|
||||||
|
syntax keyword gomodGo go contained
|
||||||
|
syntax keyword gomodRequire require
|
||||||
|
syntax keyword gomodExclude exclude
|
||||||
|
syntax keyword gomodReplace replace
|
||||||
|
|
||||||
|
" require, exclude, replace, and go can be also grouped into block
|
||||||
|
syntax region gomodRequire start='require (' end=')' transparent contains=gomodRequire,gomodVersion
|
||||||
|
syntax region gomodExclude start='exclude (' end=')' transparent contains=gomodExclude,gomodVersion
|
||||||
|
syntax region gomodReplace start='replace (' end=')' transparent contains=gomodReplace,gomodVersion
|
||||||
|
syntax match gomodGo '^go .*$' transparent contains=gomodGo,gomodGoVersion
|
||||||
|
|
||||||
|
" set highlights
|
||||||
|
highlight default link gomodModule Keyword
|
||||||
|
highlight default link gomodGo Keyword
|
||||||
|
highlight default link gomodRequire Keyword
|
||||||
|
highlight default link gomodExclude Keyword
|
||||||
|
highlight default link gomodReplace Keyword
|
||||||
|
|
||||||
|
" comments are always in form of // ...
|
||||||
|
syntax region gomodComment start="//" end="$" contains=@Spell
|
||||||
|
highlight default link gomodComment Comment
|
||||||
|
|
||||||
|
" make sure quoted import paths are higlighted
|
||||||
|
syntax region gomodString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||||
|
highlight default link gomodString String
|
||||||
|
|
||||||
|
" replace operator is in the form of '=>'
|
||||||
|
syntax match gomodReplaceOperator "\v\=\>"
|
||||||
|
highlight default link gomodReplaceOperator Operator
|
||||||
|
|
||||||
|
" match go versions
|
||||||
|
syntax match gomodGoVersion "1\.\d\+" contained
|
||||||
|
highlight default link gomodGoVersion Identifier
|
||||||
|
|
||||||
|
|
||||||
|
" highlight versions:
|
||||||
|
" * vX.Y.Z-pre
|
||||||
|
" * vX.Y.Z
|
||||||
|
" * vX.0.0-yyyyymmddhhmmss-abcdefabcdef
|
||||||
|
" * vX.Y.Z-pre.0.yyyymmddhhmmss-abcdefabcdef
|
||||||
|
" * vX.Y.(Z+1)-0.yyyymmddhhss-abcdefabcdef
|
||||||
|
" see https://godoc.org/golang.org/x/tools/internal/semver for more
|
||||||
|
" information about how semantic versions are parsed and
|
||||||
|
" https://golang.org/cmd/go/ for how pseudo-versions and +incompatible
|
||||||
|
" are applied.
|
||||||
|
|
||||||
|
|
||||||
|
" match vX.Y.Z and their prereleases
|
||||||
|
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?"
|
||||||
|
" ^--- version ---^^------------ pre-release ---------------------^^--------------- metadata ---------------------^
|
||||||
|
" ^--------------------------------------- semantic version -------------------------------------------------------^
|
||||||
|
|
||||||
|
" match pseudo versions
|
||||||
|
" without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||||
|
syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+"
|
||||||
|
" when most recent version before target is a pre-release
|
||||||
|
syntax match gomodVersion "v\d\+\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\+"
|
||||||
|
" ^--- version ---^^--- ------ pre-release -----------------^^--------------- metadata ---------------------^
|
||||||
|
" ^------------------------------------- semantic version --------------------------------------------------^
|
||||||
|
" most recent version before the target is X.Y.Z
|
||||||
|
syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\+"
|
||||||
|
" ^--- version ---^^--------------- metadata ---------------------^
|
||||||
|
|
||||||
|
" match incompatible vX.Y.Z and their prereleases
|
||||||
|
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?+incompatible"
|
||||||
|
" ^------- version -------^^------------- pre-release ---------------------^^--------------- metadata ---------------------^
|
||||||
|
" ^------------------------------------------- semantic version -----------------------------------------------------------^
|
||||||
|
|
||||||
|
" match incompatible pseudo versions
|
||||||
|
" incompatible without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef)
|
||||||
|
syntax match gomodVersion "v[2-9]\{1}\d*\.0\.0-\d\{14\}-\x\++incompatible"
|
||||||
|
" when most recent version before target is a pre-release
|
||||||
|
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\++incompatible"
|
||||||
|
" ^------- version -------^^---------- pre-release -----------------^^--------------- metadata ---------------------^
|
||||||
|
" ^---------------------------------------- semantic version ------------------------------------------------------^
|
||||||
|
" most recent version before the target is X.Y.Z
|
||||||
|
syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\++incompatible"
|
||||||
|
" ^------- version -------^^---------------- metadata ---------------------^
|
||||||
|
highlight default link gomodVersion Identifier
|
||||||
|
|
||||||
|
let b:current_syntax = "gomod"
|
|
@ -0,0 +1,33 @@
|
||||||
|
"
|
||||||
|
" vim-go/ftdetect/gofiletype.vim
|
||||||
|
"
|
||||||
|
|
||||||
|
" Note: should not use augroup in ftdetect (see :help ftdetect)
|
||||||
|
au BufRead,BufNewFile *.go setfiletype go
|
||||||
|
au BufRead,BufNewFile *.s setfiletype asm
|
||||||
|
au BufRead,BufNewFile *.tmpl setfiletype gohtmltmpl
|
||||||
|
au BufRead,BufNewFile go.sum set filetype=gosum
|
||||||
|
|
||||||
|
" remove the autocommands for modsim3, and lprolog files so that their
|
||||||
|
" highlight groups, syntax, etc. will not be loaded. *.MOD is included, so
|
||||||
|
" that on case insensitive file systems the module2 autocmds will not be
|
||||||
|
" executed.
|
||||||
|
au! BufRead,BufNewFile *.mod,*.MOD
|
||||||
|
" Set the filetype if the first non-comment and non-blank line starts with
|
||||||
|
" 'module <path>'.
|
||||||
|
au BufRead,BufNewFile go.mod call s:gomod()
|
||||||
|
|
||||||
|
fun! s:gomod()
|
||||||
|
for l:i in range(1, line('$'))
|
||||||
|
let l:l = getline(l:i)
|
||||||
|
if l:l ==# '' || l:l[:1] ==# '//'
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
|
||||||
|
if l:l =~# '^module .\+'
|
||||||
|
setfiletype gomod
|
||||||
|
endif
|
||||||
|
|
||||||
|
break
|
||||||
|
endfor
|
||||||
|
endfun
|
|
@ -0,0 +1,64 @@
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ','
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
local execute = vim.api.nvim_command
|
||||||
|
local fn = vim.fn
|
||||||
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
|
fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
|
execute 'packadd packer.nvim'
|
||||||
|
end
|
||||||
|
|
||||||
|
require('packer').startup({function(use)
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
use({ 'lewis6991/impatient.nvim',
|
||||||
|
config = function()
|
||||||
|
require('impatient')
|
||||||
|
end
|
||||||
|
})
|
||||||
|
use { 'neovim/nvim-lspconfig', requires = {'ray-x/lsp_signature.nvim'}, config = [[ require('plugins/lspconfig') ]] }
|
||||||
|
use { 'hrsh7th/nvim-cmp',
|
||||||
|
requires = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-nvim-lua",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
},
|
||||||
|
config = [[ require('plugins/cmp') ]],
|
||||||
|
}
|
||||||
|
use { 'L3MON4D3/LuaSnip', requires = { "rafamadriz/friendly-snippets", }}
|
||||||
|
use { 'windwp/nvim-autopairs', config = [[ require('plugins/autopairs') ]] }
|
||||||
|
use { 'nvim-telescope/telescope.nvim',
|
||||||
|
requires = {
|
||||||
|
{'nvim-lua/plenary.nvim', opt = true,},
|
||||||
|
{'nvim-telescope/telescope-fzf-native.nvim', opt = true, run = 'make' }
|
||||||
|
},
|
||||||
|
config = [[ require('plugins/telescope') ]],
|
||||||
|
}
|
||||||
|
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = [[ require('plugins/treesitter') ]] }
|
||||||
|
use { 'ellisonleao/gruvbox.nvim', requires = {'rktjmp/lush.nvim', opt = true}, }
|
||||||
|
use { 'kyazdani42/nvim-web-devicons', after = 'gruvbox.nvim', config = [[ require('plugins/webdevicons_nvim') ]] }
|
||||||
|
use { 'numToStr/Comment.nvim', require('Comment').setup() }
|
||||||
|
use { 'norcalli/nvim-colorizer.lua', config = [[ require('plugins/colorizer') ]] }
|
||||||
|
use { 'tpope/vim-fugitive', opt = true, cmd = { "Git", "Gdiff", "Gblame", "Glog", "Git mergetool" }, }
|
||||||
|
use { 'lewis6991/gitsigns.nvim', event = { "BufRead", "BufNewFile" }, requires = { 'nvim-lua/plenary.nvim', opt = true, }, config = [[ require('plugins/gitsigns_nvim') ]] }
|
||||||
|
use {
|
||||||
|
"folke/lsp-trouble.nvim",
|
||||||
|
config = function()
|
||||||
|
require("trouble").setup()
|
||||||
|
end,
|
||||||
|
cmd = { "LspTrouble" },
|
||||||
|
requires = "kyazdani42/nvim-web-devicons",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
config = {
|
||||||
|
compile_path = vim.fn.stdpath('config')..'/lua/packer_compiled.lua',
|
||||||
|
display = {
|
||||||
|
open_fn = function()
|
||||||
|
return require('packer.util').float({ border = 'single' })
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}})
|
||||||
|
require('packer_compiled')
|
|
@ -1,41 +0,0 @@
|
||||||
let mapleader="\<SPACE>"
|
|
||||||
let maplocalleader=','
|
|
||||||
|
|
||||||
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 'nvim-lua/plenary.nvim'
|
|
||||||
Plug 'rafamadriz/friendly-snippets'
|
|
||||||
Plug 'tpope/vim-fugitive'
|
|
||||||
Plug 'windwp/nvim-autopairs'
|
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
|
||||||
Plug 'hrsh7th/nvim-cmp'
|
|
||||||
Plug 'hrsh7th/cmp-buffer'
|
|
||||||
Plug 'hrsh7th/cmp-nvim-lua'
|
|
||||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
||||||
Plug 'saadparwaiz1/cmp_luasnip'
|
|
||||||
Plug 'f3fora/cmp-spell'
|
|
||||||
Plug 'L3MON4D3/LuaSnip'
|
|
||||||
Plug 'neovim/nvim-lspconfig'
|
|
||||||
Plug 'ray-x/lsp_signature.nvim'
|
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
||||||
Plug 'p00f/nvim-ts-rainbow'
|
|
||||||
Plug 'nvim-telescope/telescope.nvim'
|
|
||||||
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' }
|
|
||||||
Plug 'ellisonleao/gruvbox.nvim'
|
|
||||||
Plug 'kyazdani42/nvim-web-devicons'
|
|
||||||
call plug#end()
|
|
||||||
endif
|
|
||||||
lua require('Comment').setup()
|
|
||||||
set termguicolors
|
|
||||||
colorscheme gruvbox
|
|
||||||
hi! Normal ctermbg=NONE guibg=NONE
|
|
||||||
hi! NonText ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
|
||||||
hi! SignColumn ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
|
|
@ -1,10 +1,14 @@
|
||||||
require('nvim-autopairs').setup{
|
require('nvim-autopairs').setup({
|
||||||
check_ts = true,
|
check_ts = true,
|
||||||
ts_config = {
|
ts_config = {
|
||||||
lua = {'string'},-- it will not add pair on that treesitter node
|
lua = {'string'},-- it will not add pair on that treesitter node
|
||||||
javascript = {'template_string'},
|
javascript = {'template_string'},
|
||||||
}
|
},
|
||||||
}
|
enable_check_bracket_line = true, -- Don't add pairs if it already have a close pairs in same line
|
||||||
|
disable_filetype = { "TelescopePrompt" , "vim" }, --
|
||||||
|
enable_afterquote = false, -- add bracket pairs after quote
|
||||||
|
enable_moveright = true
|
||||||
|
})
|
||||||
|
|
||||||
local Rule = require('nvim-autopairs.rule')
|
local Rule = require('nvim-autopairs.rule')
|
||||||
require('nvim-autopairs').add_rules({
|
require('nvim-autopairs').add_rules({
|
||||||
|
@ -40,8 +44,7 @@ require('nvim-autopairs').add_rules({
|
||||||
:set_end_pair_length(2),
|
:set_end_pair_length(2),
|
||||||
})
|
})
|
||||||
|
|
||||||
require("nvim-autopairs.completion.cmp").setup({
|
require("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
|
map_complete = true, -- it will auto insert `(` (map_char) after select function or method item
|
||||||
auto_select = true, -- automatically select the first item
|
auto_select = true, -- automatically select the first item
|
||||||
insert = false, -- use insert confirm behavior instead of replace
|
insert = false, -- use insert confirm behavior instead of replace
|
|
@ -2,6 +2,11 @@ local has_words_before = function()
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
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
|
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not packer_plugins["plenary.nvim"].loaded then
|
||||||
|
vim.cmd([[packadd plenary.nvim]])
|
||||||
|
end
|
||||||
|
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
@ -9,10 +14,12 @@ cmp.setup({
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
vim_item.menu = ({
|
vim_item.menu = ({
|
||||||
nvim_lsp = ' [LSP]',
|
nvim_lsp = '[LSP]',
|
||||||
buffer = ' [Buffer]',
|
buffer = '[Buffer]',
|
||||||
luasnip = ' [LuaSnip]',
|
luasnip = '[Snippet]',
|
||||||
nvim_lua = ' [Lua]',
|
nvim_lua = '[API]',
|
||||||
|
path = '[Path]',
|
||||||
|
spell = '[Spell]',
|
||||||
})[entry.source.name]
|
})[entry.source.name]
|
||||||
vim_item.kind = ({
|
vim_item.kind = ({
|
||||||
Text = ' text',
|
Text = ' text',
|
||||||
|
@ -54,19 +61,22 @@ cmp.setup({
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping(function(_)
|
||||||
|
return vim.fn.pumvisible() == 1 and cmp.close() or cmp.complete()
|
||||||
|
end),
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
['<CR>'] = cmp.mapping.confirm { select = true,},
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
},
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif luasnip.expand_or_jumpable() then
|
elseif luasnip and luasnip.expand_or_jumpable() then
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
elseif has_words_before() then
|
elseif has_words_before() then
|
||||||
cmp.complete()
|
vim.api.nvim_feedkeys(
|
||||||
|
vim.api.nvim_replace_termcodes("<tab>", true, true, true),
|
||||||
|
"n",
|
||||||
|
true
|
||||||
|
)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
@ -74,15 +84,26 @@ cmp.setup({
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif luasnip.jumpable(-1) then
|
elseif luasnip and luasnip.jumpable(-1) then
|
||||||
luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
|
elseif has_words_before() then
|
||||||
|
vim.api.nvim_feedkeys(
|
||||||
|
vim.api.nvim_replace_termcodes("<s-tab>", true, true, true),
|
||||||
|
"n",
|
||||||
|
true
|
||||||
|
)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
},
|
},
|
||||||
|
preselect = cmp.PreselectMode.Item,
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'buffer' },
|
{ name = 'path' },
|
||||||
|
{ name = 'buffer', Keyword_length = 5 },
|
||||||
},
|
},
|
||||||
experimental = { custom_menu = true }
|
experimental = { native_menu = false }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||||
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
@ -0,0 +1,14 @@
|
||||||
|
require 'colorizer'.setup ({
|
||||||
|
'css';
|
||||||
|
'html';
|
||||||
|
'javascript';
|
||||||
|
'javascriptreact';
|
||||||
|
'typescript';
|
||||||
|
'typescriptreact';
|
||||||
|
'vim';
|
||||||
|
'yaml';
|
||||||
|
'python';
|
||||||
|
},
|
||||||
|
{
|
||||||
|
names = false;
|
||||||
|
})
|
|
@ -1,7 +1,10 @@
|
||||||
|
if not packer_plugins["plenary.nvim"].loaded then
|
||||||
|
vim.cmd([[packadd plenary.nvim]])
|
||||||
|
end
|
||||||
|
|
||||||
require('gitsigns').setup {
|
require('gitsigns').setup {
|
||||||
signcolumn = true,
|
signcolumn = true,
|
||||||
current_line_blame = true,
|
current_line_blame_opts = { delay = 2000, virt_text_pos = 'right_align' },
|
||||||
current_line_blame_opts = { virt_text_pos = 'right_align' },
|
|
||||||
signs = {
|
signs = {
|
||||||
add = {hl = 'GitSignsAdd' , text = '┃', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
add = {hl = 'GitSignsAdd' , text = '┃', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
||||||
change = {hl = 'GitSignsChange', text = '┃', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
change = {hl = 'GitSignsChange', text = '┃', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||||
|
@ -24,6 +27,7 @@ local map = vim.api.nvim_set_keymap
|
||||||
local default_opts = {noremap = true, silent = true}
|
local default_opts = {noremap = true, silent = true}
|
||||||
|
|
||||||
map('n', '<Leader>tt', ':Gitsigns toggle_signs<CR>', default_opts)
|
map('n', '<Leader>tt', ':Gitsigns toggle_signs<CR>', default_opts)
|
||||||
|
map('n', '<Leader>tb', ':Gitsigns toggle_current_line_blame<CR>', default_opts)
|
||||||
map('n', '<Leader>ff', ':G<CR>', default_opts)
|
map('n', '<Leader>ff', ':G<CR>', default_opts)
|
||||||
map('n', '<Leader>fc', ':GCheckout<CR>', default_opts)
|
map('n', '<Leader>fc', ':GCheckout<CR>', default_opts)
|
||||||
map('n', '<Leader>fd', ':Gvdiffsplit!<CR>', default_opts)
|
map('n', '<Leader>fd', ':Gvdiffsplit!<CR>', default_opts)
|
|
@ -1,36 +1,28 @@
|
||||||
local border = {
|
|
||||||
{"┌", "FloatBorder"},
|
|
||||||
{"─", "FloatBorder"},
|
|
||||||
{"┐", "FloatBorder"},
|
|
||||||
{"│", "FloatBorder"},
|
|
||||||
{"┘", "FloatBorder"},
|
|
||||||
{"─", "FloatBorder"},
|
|
||||||
{"└", "FloatBorder"},
|
|
||||||
{"│", "FloatBorder"},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
highlight LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
highlight LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
||||||
highlight LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
highlight LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
||||||
highlight LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
highlight LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
||||||
highlight LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold
|
highlight LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold
|
||||||
|
|
||||||
sign define LspDiagnosticsSignError text= texthl=LspDiagnosticsSignError linehl= numhl=LspDiagnosticsLineNrError
|
sign define LspDiagnosticsSignError text= texthl=LspDiagnosticsSignError linehl= numhl=LspDiagnosticsLineNrError
|
||||||
sign define LspDiagnosticsSignWarning text= texthl=LspDiagnosticsSignWarning linehl= numhl=LspDiagnosticsLineNrWarning
|
sign define LspDiagnosticsSignWarning text= texthl=LspDiagnosticsSignWarning linehl= numhl=LspDiagnosticsLineNrWarning
|
||||||
sign define LspDiagnosticsSignInformation text= texthl=LspDiagnosticsSignInformation linehl= numhl=LspDiagnosticsLineNrInformation
|
sign define LspDiagnosticsSignInformation text= texthl=LspDiagnosticsSignInformation linehl= numhl=LspDiagnosticsLineNrInformation
|
||||||
sign define LspDiagnosticsSignHint text= texthl=LspDiagnosticsSignHint linehl= numhl=LspDiagnosticsLineNrHint
|
sign define LspDiagnosticsSignHint text= texthl=LspDiagnosticsSignHint linehl= numhl=LspDiagnosticsLineNrHint
|
||||||
]]
|
]]
|
||||||
|
|
||||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
underline = true,
|
underline = true,
|
||||||
signs = true,
|
signs = true,
|
||||||
virtual_text = false,
|
update_in_insert = true,
|
||||||
update_in_insert = true
|
severity_sort = true,
|
||||||
|
virtual_text = {
|
||||||
|
spacing = 5,
|
||||||
|
severity_limit = 'Hint',
|
||||||
|
source = 'always',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.cmd ('autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics({border="single", focusable=false})')
|
local nvim_lsp = require'lspconfig'
|
||||||
|
|
||||||
local nvim_lsp = require 'lspconfig'
|
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
@ -45,10 +37,9 @@ local on_attach = function(client, bufnr)
|
||||||
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', '}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', 'qq', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||||
vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]]
|
vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]]
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border, focusable = false })
|
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||||
border = "single",
|
border = "single",
|
||||||
})
|
})
|
||||||
require "lsp_signature".on_attach({
|
require "lsp_signature".on_attach({
|
||||||
bind = true,
|
bind = true,
|
||||||
hint_prefix = " ",
|
hint_prefix = " ",
|
||||||
|
@ -57,22 +48,9 @@ local on_attach = function(client, bufnr)
|
||||||
trigger_on_newline = false,
|
trigger_on_newline = false,
|
||||||
toggle_key = '<M-f>',
|
toggle_key = '<M-f>',
|
||||||
})
|
})
|
||||||
if client.resolved_capabilities.document_highlight then
|
|
||||||
vim.api.nvim_exec(
|
|
||||||
[[
|
|
||||||
hi LspReferenceRead gui=bold guibg=#1b1b29 blend=10
|
|
||||||
hi LspReferenceText gui=bold guibg=#1b1b29 blend=10
|
|
||||||
hi LspReferenceWrite gui=bold guibg=#1b1b29 blend=10
|
|
||||||
augroup lsp_document_highlight
|
|
||||||
autocmd! * <buffer>
|
|
||||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
|
||||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
|
||||||
augroup END
|
|
||||||
]], false)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
require'lspconfig'.jsonls.setup {
|
nvim_lsp.jsonls.setup {
|
||||||
commands = {
|
commands = {
|
||||||
Format = {
|
Format = {
|
||||||
function()
|
function()
|
||||||
|
@ -83,15 +61,44 @@ require'lspconfig'.jsonls.setup {
|
||||||
}
|
}
|
||||||
|
|
||||||
require'lspconfig/configs'.ls_emmet = {
|
require'lspconfig/configs'.ls_emmet = {
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = { 'ls_emmet', '--stdio' };
|
cmd = { 'ls_emmet', '--stdio' };
|
||||||
filetypes = { 'html', 'css', 'scss', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'haml',
|
filetypes = { 'html', 'css', 'scss', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'haml',
|
||||||
'xml', 'xsl', 'pug', 'slim', 'sass', 'stylus', 'less', 'sss', 'svelte'};
|
'xml', 'xsl', 'pug', 'slim', 'sass', 'stylus', 'less', 'sss', 'svelte'};
|
||||||
root_dir = function(fname)
|
root_dir = function(fname)
|
||||||
return vim.loop.cwd()
|
return vim.loop.cwd()
|
||||||
end;
|
end;
|
||||||
settings = {};
|
settings = {};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
local shellcheck = {
|
||||||
|
lintCommand = 'shellcheck -f gcc -x',
|
||||||
|
lintSource = "shellcheck",
|
||||||
|
lintFormats = {
|
||||||
|
'%f:%l:%c: %trror: %m',
|
||||||
|
'%f:%l:%c: %tarning: %m',
|
||||||
|
'%f:%l:%c: %tote: %m'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
local shfmt = {
|
||||||
|
formatCommand = 'shfmt -ci -s -bn',
|
||||||
|
formatStdin = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
nvim_lsp.efm.setup{
|
||||||
|
init_options = {
|
||||||
|
documentFormatting = true,
|
||||||
|
hover = true,
|
||||||
|
},
|
||||||
|
settings = {
|
||||||
|
rootMarkers = { "package.json", "go.mod", ".git/", ".zshrc" },
|
||||||
|
languages = {
|
||||||
|
bash = { shellcheck, shfmt },
|
||||||
|
sh = { shellcheck, shfmt },
|
||||||
|
},
|
||||||
|
filetypes = {'bash', 'sh'}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
@ -108,7 +115,7 @@ capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||||
}
|
}
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||||
|
|
||||||
local servers = { 'html', 'cssls', 'jsonls', 'tailwindcss', 'vimls', 'ls_emmet' }
|
local servers = { 'html', 'cssls', 'gopls', 'jsonls', 'tailwindcss', 'vimls', 'ls_emmet' }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
@ -119,11 +126,9 @@ end
|
||||||
|
|
||||||
local sumneko_root_path ='/mnt/wd1tb/catacombs/code/lua-language-server'
|
local sumneko_root_path ='/mnt/wd1tb/catacombs/code/lua-language-server'
|
||||||
local sumneko_binary = sumneko_root_path .. '/bin/Linux/lua-language-server'
|
local sumneko_binary = sumneko_root_path .. '/bin/Linux/lua-language-server'
|
||||||
|
|
||||||
local runtime_path = vim.split(package.path, ';')
|
local runtime_path = vim.split(package.path, ';')
|
||||||
table.insert(runtime_path, 'lua/?.lua')
|
table.insert(runtime_path, 'lua/?.lua')
|
||||||
table.insert(runtime_path, 'lua/?/init.lua')
|
table.insert(runtime_path, 'lua/?/init.lua')
|
||||||
|
|
||||||
require('lspconfig').sumneko_lua.setup {
|
require('lspconfig').sumneko_lua.setup {
|
||||||
cmd = { sumneko_binary, '-E', sumneko_root_path .. '/main.lua' },
|
cmd = { sumneko_binary, '-E', sumneko_root_path .. '/main.lua' },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
|
@ -0,0 +1,143 @@
|
||||||
|
vim.cmd([[packadd plenary.nvim]])
|
||||||
|
vim.cmd([[packadd telescope-fzf-native.nvim]])
|
||||||
|
|
||||||
|
local actions = require('telescope.actions')
|
||||||
|
local previewers = require('telescope.previewers')
|
||||||
|
local Job = require('plenary.job')
|
||||||
|
|
||||||
|
local new_maker = function(filepath, bufnr, opts)
|
||||||
|
filepath = vim.fn.expand(filepath)
|
||||||
|
Job
|
||||||
|
:new({
|
||||||
|
command = 'file',
|
||||||
|
args = { '--mime-type', '-b', filepath },
|
||||||
|
on_exit = function(j)
|
||||||
|
local mime_type = vim.split(j:result()[1], '/')[1]
|
||||||
|
if mime_type == 'text' then
|
||||||
|
previewers.buffer_previewer_maker(filepath, bufnr, opts)
|
||||||
|
else
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { 'BINARY' })
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
:sync()
|
||||||
|
end
|
||||||
|
|
||||||
|
require('telescope').setup {
|
||||||
|
defaults = {
|
||||||
|
prompt_title = " ",
|
||||||
|
results_title = " ",
|
||||||
|
preview_title = " ",
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
layout_config = {
|
||||||
|
width = 0.75,
|
||||||
|
prompt_position = "top",
|
||||||
|
preview_cutoff = 120,
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
buffers = {
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
['d'] = actions.delete_buffer,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sort_mru = true,
|
||||||
|
preview_title = false,
|
||||||
|
},
|
||||||
|
find_files = {
|
||||||
|
find_command = {'fd', '-t f', '-c always', '-H'},
|
||||||
|
hidden = true,
|
||||||
|
},
|
||||||
|
file_browser = {
|
||||||
|
hidden = true,
|
||||||
|
},
|
||||||
|
lsp_references = {
|
||||||
|
initial_mode = 'normal',
|
||||||
|
sorting_strategy = 'ascending',
|
||||||
|
layout_strategy = 'cursor',
|
||||||
|
preview_title = false,
|
||||||
|
results_title = false,
|
||||||
|
prompt_title = 'References',
|
||||||
|
layout_config = {
|
||||||
|
width = 0.4,
|
||||||
|
height = 0.4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp_code_actions = {
|
||||||
|
initial_mode = 'normal',
|
||||||
|
sorting_strategy = 'ascending',
|
||||||
|
layout_strategy = 'cursor',
|
||||||
|
preview = false,
|
||||||
|
prompt_title = 'Code Actions',
|
||||||
|
results_title = '',
|
||||||
|
layout_config = {
|
||||||
|
width = 0.2,
|
||||||
|
height = 0.3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp_range_code_actions = {
|
||||||
|
initial_mode = 'normal',
|
||||||
|
sorting_strategy = 'ascending',
|
||||||
|
layout_strategy = 'cursor',
|
||||||
|
preview = false,
|
||||||
|
prompt_title = 'Code Actions',
|
||||||
|
results_title = '',
|
||||||
|
layout_config = {
|
||||||
|
width = 0.3,
|
||||||
|
height = 0.3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp_document_diagnostics = {
|
||||||
|
initial_mode = 'normal',
|
||||||
|
sorting_strategy = 'ascending',
|
||||||
|
layout_strategy = 'cursor',
|
||||||
|
prompt_title = 'Diagnostics',
|
||||||
|
results_title = '',
|
||||||
|
layout_config = {
|
||||||
|
width = 0.5,
|
||||||
|
height = 0.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp_definitions = {
|
||||||
|
layout_strategy = 'cursor',
|
||||||
|
prompt_title = 'Definitions',
|
||||||
|
preview_title = false,
|
||||||
|
results_title = false,
|
||||||
|
layout_config = {
|
||||||
|
width = 0.5,
|
||||||
|
height = 0.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
selection_caret = "→",
|
||||||
|
color_devicons = true,
|
||||||
|
file_ignore_patterns = { 'node_modules', '.git' },
|
||||||
|
set_env = {['COLORTERM'] = 'truecolor'},
|
||||||
|
buffer_previewer_maker = new_maker,
|
||||||
|
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,
|
||||||
|
["<esc>"] = actions.close,
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
require('telescope').load_extension('fzf')
|
||||||
|
|
||||||
|
local map = vim.api.nvim_set_keymap
|
||||||
|
local default_opts = {noremap = true, silent = true}
|
||||||
|
map('n', '<F1>', '<cmd>Telescope help_tags<CR>', default_opts)
|
||||||
|
map('n', '<F2>', '<cmd>lua require("telescope.builtin").find_files({cwd = "%:h", hidden=true})<CR>', default_opts)
|
||||||
|
map('n', '<F3>', '<cmd>Telescope file_browser hidden=true<CR>', default_opts)
|
||||||
|
map('n', '<F4>', '<cmd>Telescope buffers<CR>', default_opts)
|
||||||
|
map('n', '<M-f>', '<cmd>Telescope live_grep<CR>', default_opts)
|
||||||
|
map('n', '<M-g>', '<cmd>Telescope git_commits<CR>', default_opts)
|
||||||
|
map('n', '<M-S-r>', '<cmd>Telescope resume<CR>', default_opts)
|
|
@ -1,16 +1,5 @@
|
||||||
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 {
|
require'nvim-treesitter.configs'.setup {
|
||||||
ensure_installed = { "bash", "css", "go", "gomod", "html", "json", "json5", "jsonc", "lua", "scss", "toml", "vim", "yaml" },
|
ensure_installed = { "bash", "css", "go", "gomod", "html", "json", "json5", "jsonc", "lua", "regex", "scss", "toml", "vim", "yaml" },
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
use_languagetree = true,
|
use_languagetree = true,
|
||||||
|
@ -40,6 +29,12 @@ require'nvim-treesitter.configs'.setup {
|
||||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||||
},
|
},
|
||||||
autopairs = { enable = true },
|
autopairs = { enable = true },
|
||||||
context_commentstring = { enable = true },
|
context_commentstring = {
|
||||||
|
enable = true,
|
||||||
|
config = {
|
||||||
|
c = "// %s",
|
||||||
|
lua = "-- %s",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
local cmd = vim.cmd
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.init()
|
||||||
|
cmd([[packadd nvim-web-devicons]])
|
||||||
|
require("nvim-web-devicons").setup({
|
||||||
|
override = {
|
||||||
|
html = {
|
||||||
|
icon = "",
|
||||||
|
color = "#DE8C92",
|
||||||
|
name = "html",
|
||||||
|
},
|
||||||
|
css = {
|
||||||
|
icon = "",
|
||||||
|
color = "#61afef",
|
||||||
|
name = "css",
|
||||||
|
},
|
||||||
|
js = {
|
||||||
|
icon = "",
|
||||||
|
color = "#EBCB8B",
|
||||||
|
name = "js",
|
||||||
|
},
|
||||||
|
ts = {
|
||||||
|
icon = "ﯤ",
|
||||||
|
color = "#519ABA",
|
||||||
|
name = "ts",
|
||||||
|
},
|
||||||
|
rs = {
|
||||||
|
icon = "",
|
||||||
|
color = "#FFAA30",
|
||||||
|
name = "rs",
|
||||||
|
},
|
||||||
|
kt = {
|
||||||
|
icon = "",
|
||||||
|
color = "#ffcb91",
|
||||||
|
name = "kt",
|
||||||
|
},
|
||||||
|
png = {
|
||||||
|
icon = " ",
|
||||||
|
color = "#BD77DC",
|
||||||
|
name = "png",
|
||||||
|
},
|
||||||
|
jpg = {
|
||||||
|
icon = " ",
|
||||||
|
color = "#BD77DC",
|
||||||
|
name = "jpg",
|
||||||
|
},
|
||||||
|
jpeg = {
|
||||||
|
icon = " ",
|
||||||
|
color = "#BD77DC",
|
||||||
|
name = "jpeg",
|
||||||
|
},
|
||||||
|
mp3 = {
|
||||||
|
icon = "",
|
||||||
|
color = "#C8CCD4",
|
||||||
|
name = "mp3",
|
||||||
|
},
|
||||||
|
mp4 = {
|
||||||
|
icon = "",
|
||||||
|
color = "#C8CCD4",
|
||||||
|
name = "mp4",
|
||||||
|
},
|
||||||
|
out = {
|
||||||
|
icon = "",
|
||||||
|
color = "#C8CCD4",
|
||||||
|
name = "out",
|
||||||
|
},
|
||||||
|
toml = {
|
||||||
|
icon = "",
|
||||||
|
color = "#61afef",
|
||||||
|
name = "toml",
|
||||||
|
},
|
||||||
|
lock = {
|
||||||
|
icon = "",
|
||||||
|
color = "#DE6B74",
|
||||||
|
name = "lock",
|
||||||
|
},
|
||||||
|
zip = {
|
||||||
|
icon = "",
|
||||||
|
color = "#EBCB8B",
|
||||||
|
name = "zip",
|
||||||
|
},
|
||||||
|
xz = {
|
||||||
|
icon = "",
|
||||||
|
color = "#EBCB8B",
|
||||||
|
name = "xz",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -0,0 +1,243 @@
|
||||||
|
local windline = require('windline')
|
||||||
|
local helper = require('windline.helpers')
|
||||||
|
local sep = helper.separators
|
||||||
|
local vim_components = require('windline.components.vim')
|
||||||
|
local b_components = require('windline.components.basic')
|
||||||
|
local state = _G.WindLine.state
|
||||||
|
local lsp_comps = require('windline.components.lsp')
|
||||||
|
local git_comps = require('windline.components.git')
|
||||||
|
|
||||||
|
local hl_list = {
|
||||||
|
Black = { 'white', 'black' },
|
||||||
|
White = { 'black', 'white' },
|
||||||
|
Inactive = { 'InactiveFg', 'InactiveBg' },
|
||||||
|
Active = { 'ActiveFg', 'ActiveBg' },
|
||||||
|
}
|
||||||
|
local basic = {}
|
||||||
|
|
||||||
|
basic.divider = { b_components.divider, '' }
|
||||||
|
basic.space = { ' ', '' }
|
||||||
|
basic.bg = { ' ', 'StatusLine' }
|
||||||
|
basic.file_name_inactive = { b_components.full_file_name, hl_list.Inactive }
|
||||||
|
basic.line_col_inactive = { b_components.line_col, hl_list.Inactive }
|
||||||
|
basic.progress_inactive = { b_components.progress, hl_list.Inactive }
|
||||||
|
|
||||||
|
basic.vi_mode = {
|
||||||
|
hl_colors = {
|
||||||
|
Normal = { 'black', 'blue', 'bold' },
|
||||||
|
Insert = { 'black', 'red', 'bold' },
|
||||||
|
Visual = { 'black', 'white', 'bold' },
|
||||||
|
Replace = { 'black', 'blue_light', 'bold' },
|
||||||
|
Command = { 'black', 'magenta', 'bold' },
|
||||||
|
NormalBefore = { 'blue', 'black' },
|
||||||
|
InsertBefore = { 'red', 'black' },
|
||||||
|
VisualBefore = { 'white', 'black' },
|
||||||
|
ReplaceBefore = { 'blue_light', 'black' },
|
||||||
|
CommandBefore = { 'magenta', 'black' },
|
||||||
|
NormalAfter = { 'white', 'blue' },
|
||||||
|
InsertAfter = { 'white', 'red' },
|
||||||
|
VisualAfter = { 'white', 'white' },
|
||||||
|
ReplaceAfter = { 'white', 'blue_light' },
|
||||||
|
CommandAfter = { 'white', 'magenta' },
|
||||||
|
},
|
||||||
|
text = function()
|
||||||
|
return {
|
||||||
|
{ sep.left_rounded, state.mode[2] .. 'Before' },
|
||||||
|
{ state.mode[1] .. ' ', state.mode[2] },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
basic.lsp_diagnos = {
|
||||||
|
width = 90,
|
||||||
|
hl_colors = {
|
||||||
|
red = { 'red', 'black' },
|
||||||
|
yellow = { 'yellow', 'black' },
|
||||||
|
blue = { 'blue', 'black' },
|
||||||
|
},
|
||||||
|
text = function()
|
||||||
|
if lsp_comps.check_lsp() then
|
||||||
|
return {
|
||||||
|
{ lsp_comps.lsp_error({ format = ' %s' }), 'red' },
|
||||||
|
{ lsp_comps.lsp_warning({ format = ' %s' }), 'yellow' },
|
||||||
|
{ lsp_comps.lsp_hint({ format = ' %s' }), 'blue' },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return ''
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
local icon_comp = b_components.cache_file_icon({ default = '', hl_colors = {'white','black_light'} })
|
||||||
|
|
||||||
|
basic.file = {
|
||||||
|
hl_colors = {
|
||||||
|
default = { 'white', 'black_light' },
|
||||||
|
},
|
||||||
|
text = function(bufnr)
|
||||||
|
return {
|
||||||
|
{ ' ', 'default' },
|
||||||
|
icon_comp(bufnr),
|
||||||
|
{ ' ', 'default' },
|
||||||
|
{ b_components.cache_file_name('[No Name]', ''), '' },
|
||||||
|
{ b_components.file_modified(' '), '' },
|
||||||
|
-- { b_components.cache_file_size(), '' },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
basic.right = {
|
||||||
|
hl_colors = {
|
||||||
|
sep_before = { 'black_light', 'white_light' },
|
||||||
|
sep_after = { 'white_light', 'black' },
|
||||||
|
text = { 'black', 'white_light' },
|
||||||
|
},
|
||||||
|
text = function()
|
||||||
|
return {
|
||||||
|
-- { b_components.line_col, 'text' },
|
||||||
|
{ b_components.progress, 'text' },
|
||||||
|
{ sep.right_rounded, 'sep_after' },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
basic.git = {
|
||||||
|
width = 90,
|
||||||
|
hl_colors = {
|
||||||
|
green = { 'green', 'black' },
|
||||||
|
red = { 'red', 'black' },
|
||||||
|
blue = { 'blue', 'black' },
|
||||||
|
},
|
||||||
|
text = function()
|
||||||
|
if git_comps.is_git() then
|
||||||
|
return {
|
||||||
|
{ ' ', '' },
|
||||||
|
{ git_comps.diff_added({ format = '+%s' }), 'green' },
|
||||||
|
{ git_comps.diff_removed({ format = '-%s' }), 'red' },
|
||||||
|
{ git_comps.diff_changed({ format = '~%s' }), 'blue' },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return ''
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
basic.logo = {
|
||||||
|
hl_colors = {
|
||||||
|
sep_before = { 'blue', 'black' },
|
||||||
|
default = { 'black', 'blue' },
|
||||||
|
},
|
||||||
|
text = function()
|
||||||
|
return {
|
||||||
|
{ sep.left_rounded, 'sep_before' },
|
||||||
|
{ ' ', 'default' },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
-- LSP status
|
||||||
|
local lsp_status = require('lsp-status')
|
||||||
|
lsp_status.register_progress()
|
||||||
|
local lsp_config = require('lspconfig')
|
||||||
|
-- Lsp server name .
|
||||||
|
function lspservername()
|
||||||
|
local msg = ''
|
||||||
|
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||||
|
local clients = vim.lsp.get_active_clients()
|
||||||
|
if next(clients) == nil then return msg end
|
||||||
|
for _, client in ipairs(clients) do
|
||||||
|
local filetypes = client.config.filetypes
|
||||||
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||||
|
return "LSP[" .. client.name .. "]"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
|
||||||
|
basic.lsp = {
|
||||||
|
width = 90,
|
||||||
|
hl_colors = {
|
||||||
|
red = { 'red', 'black' },
|
||||||
|
yellow = { 'yellow', 'black' },
|
||||||
|
blue = { 'blue', 'black' },
|
||||||
|
},
|
||||||
|
text = function()
|
||||||
|
return {
|
||||||
|
{ lsp_status.status, 'red' },
|
||||||
|
{" ", ""},
|
||||||
|
{ lspservername(), 'red' },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
basic.git_branch = {
|
||||||
|
|
||||||
|
text = function()
|
||||||
|
return {
|
||||||
|
{ git_comps.git_branch(), { 'green', 'black', '' }, 90 },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
local default = {
|
||||||
|
filetypes = { 'default' },
|
||||||
|
active = {
|
||||||
|
basic.vi_mode,
|
||||||
|
{ git_comps.git_branch(), { 'red', 'black', 'bold' }, 90 },
|
||||||
|
basic.git,
|
||||||
|
basic.file,
|
||||||
|
{ vim_components.search_count(), { 'red', 'black_light' } },
|
||||||
|
{ sep.right_rounded, { 'black_light', 'black' } },
|
||||||
|
basic.divider,
|
||||||
|
basic.lsp_diagnos,
|
||||||
|
basic.lsp,
|
||||||
|
{ ' ', hl_list.Black },
|
||||||
|
basic.right,
|
||||||
|
-- { ' ', hl_list.Black },
|
||||||
|
},
|
||||||
|
in_active = {
|
||||||
|
basic.file_name_inactive,
|
||||||
|
basic.divider,
|
||||||
|
basic.divider,
|
||||||
|
basic.line_col_inactive,
|
||||||
|
{ '', { 'white', 'InactiveBg' } },
|
||||||
|
basic.progress_inactive,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local quickfix = {
|
||||||
|
filetypes = { 'qf', 'Trouble' },
|
||||||
|
active = {
|
||||||
|
{ '🚦 Quickfix ', { 'white', 'black' } },
|
||||||
|
{ helper.separators.slant_right, { 'black', 'black_light' } },
|
||||||
|
{
|
||||||
|
function()
|
||||||
|
return vim.fn.getqflist({ title = 0 }).title
|
||||||
|
end,
|
||||||
|
{ 'cyan', 'black_light' },
|
||||||
|
},
|
||||||
|
{ ' Total : %L ', { 'cyan', 'black_light' } },
|
||||||
|
{ helper.separators.slant_right, { 'black_light', 'InactiveBg' } },
|
||||||
|
{ ' ', { 'InactiveFg', 'InactiveBg' } },
|
||||||
|
basic.divider,
|
||||||
|
{ helper.separators.slant_right, { 'InactiveBg', 'black' } },
|
||||||
|
{ '🧛 ', { 'white', 'black' } },
|
||||||
|
},
|
||||||
|
show_in_active = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
local explorer = {
|
||||||
|
filetypes = { 'fern', 'NvimTree', 'lir' },
|
||||||
|
active = {
|
||||||
|
{ ' ', { 'white', 'black' } },
|
||||||
|
{ helper.separators.slant_right, { 'black', 'black_light' } },
|
||||||
|
{ b_components.divider, '' },
|
||||||
|
{ b_components.file_name(''), { 'white', 'black_light' } },
|
||||||
|
},
|
||||||
|
show_in_active = true,
|
||||||
|
}
|
||||||
|
windline.setup({
|
||||||
|
colors_name = function(colors)
|
||||||
|
-- ADD MORE COLOR HERE ----
|
||||||
|
return colors
|
||||||
|
end,
|
||||||
|
statuslines = {
|
||||||
|
default,
|
||||||
|
quickfix,
|
||||||
|
explorer,
|
||||||
|
},
|
||||||
|
})
|
|
@ -6,6 +6,8 @@ if !exists('autocommands_loaded') && has('autocmd')
|
||||||
|
|
||||||
aug OnInsert
|
aug OnInsert
|
||||||
au InsertLeave * if &paste | setlocal nopaste | endif
|
au InsertLeave * if &paste | setlocal nopaste | endif
|
||||||
|
au InsertLeave * set nocursorline
|
||||||
|
au InsertEnter * set cursorline
|
||||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||||
aug END
|
aug END
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
colorscheme gruvbox
|
||||||
|
hi! Normal ctermbg=NONE guibg=NONE
|
||||||
|
hi! NonText ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
||||||
|
hi! SignColumn ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
|
@ -12,7 +12,6 @@ local disabled_builtin_plugins = {
|
||||||
"logipat",
|
"logipat",
|
||||||
"rrhelper",
|
"rrhelper",
|
||||||
"matchit",
|
"matchit",
|
||||||
"matchparen",
|
|
||||||
'remote_plugins'
|
'remote_plugins'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,10 @@ nnoremap <silent> {q :cprev<CR>
|
||||||
nnoremap <silent> }q :cnext<CR>
|
nnoremap <silent> }q :cnext<CR>
|
||||||
nnoremap <silent> {Q :cfirst<CR>
|
nnoremap <silent> {Q :cfirst<CR>
|
||||||
nnoremap <silent> }Q :clast<CR>
|
nnoremap <silent> }Q :clast<CR>
|
||||||
nnoremap <silent> {o :call append(line('.'), '')<CR>
|
nnoremap <silent> {h :lprevious<CR>
|
||||||
nnoremap <silent> }o :call append(line('.')-1, '')<CR>
|
nnoremap <silent> }l :lnext<CR>
|
||||||
|
nnoremap <silent> }o :call append(line('.'), '')<CR>
|
||||||
|
nnoremap <silent> {o :call append(line('.')-1, '')<CR>
|
||||||
|
|
||||||
" Find
|
" Find
|
||||||
nnoremap <leader>F :find <C-R>=expand('%:h').'/*'<CR>
|
nnoremap <leader>F :find <C-R>=expand('%:h').'/*'<CR>
|
||||||
|
@ -56,8 +58,8 @@ nnoremap J mzJ`z
|
||||||
nnoremap <silent> <leader><space> :noh<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
|
nnoremap <silent> <leader><space> :noh<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
|
||||||
|
|
||||||
" Shift lines up and down
|
" Shift lines up and down
|
||||||
nnoremap <leader>j :m .+1<cr>==
|
nnoremap <silent> <leader>j :m .+1<cr>==
|
||||||
nnoremap <leader>k :m .-2<cr>==
|
nnoremap <silent> <leader>k :m .-2<cr>==
|
||||||
|
|
||||||
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
||||||
nnoremap <buffer><silent><expr>j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
nnoremap <buffer><silent><expr>j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
||||||
|
@ -85,3 +87,6 @@ map q <nop>
|
||||||
|
|
||||||
" Paths
|
" Paths
|
||||||
cnoremap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
|
cnoremap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
|
||||||
|
|
||||||
|
" Run the last command
|
||||||
|
nnoremap <leader>C :<up>
|
||||||
|
|
|
@ -3,3 +3,5 @@ tnoremap <M-h> <C-\><C-n><C-w>h
|
||||||
tnoremap <M-j> <C-\><C-n><C-w>j
|
tnoremap <M-j> <C-\><C-n><C-w>j
|
||||||
tnoremap <M-k> <C-\><C-n><C-w>k
|
tnoremap <M-k> <C-\><C-n><C-w>k
|
||||||
tnoremap <M-l> <C-\><C-n><C-w>l
|
tnoremap <M-l> <C-\><C-n><C-w>l
|
||||||
|
tnoremap <S-Space> <Space>
|
||||||
|
tnoremap <C-Space> <Space>
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
vnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
|
vnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
|
||||||
vnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
|
vnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
|
||||||
|
|
||||||
|
" Gotta Go Fast (save, buffers, quit, messages, indent, SOF, EOF)
|
||||||
|
nnoremap <Bar> gg
|
||||||
|
nnoremap ¿ G
|
||||||
|
|
||||||
"Shift lines up and down
|
"Shift lines up and down
|
||||||
vnoremap J :m '>+1<cr>gv=gv
|
vnoremap J :m '>+1<cr>gv=gv
|
||||||
vnoremap K :m '<-2<cr>gv=gv
|
vnoremap K :m '<-2<cr>gv=gv
|
||||||
|
|
|
@ -14,7 +14,7 @@ set cursorline
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set scrolloff=5
|
set scrolloff=5
|
||||||
set sidescroll=5
|
set sidescroll=5
|
||||||
set shortmess+=aoIOWsc
|
set shortmess+=aoIOWc
|
||||||
set nosmarttab
|
set nosmarttab
|
||||||
set ttimeoutlen=10
|
set ttimeoutlen=10
|
||||||
set nowritebackup
|
set nowritebackup
|
||||||
|
@ -27,7 +27,7 @@ set diffopt+=algorithm:patience,indent-heuristic
|
||||||
set diffopt+=foldcolumn:0
|
set diffopt+=foldcolumn:0
|
||||||
set diffopt+=vertical
|
set diffopt+=vertical
|
||||||
set fillchars=diff:\ ,eob:\ ,stlnc:\ ,stl:\ ,vert:\│
|
set fillchars=diff:\ ,eob:\ ,stlnc:\ ,stl:\ ,vert:\│
|
||||||
set formatoptions=tnqj
|
set formatoptions=cnqj
|
||||||
set completeopt=menu,menuone,noselect,noinsert
|
set completeopt=menu,menuone,noselect,noinsert
|
||||||
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
||||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||||
|
@ -44,6 +44,3 @@ let g:netrw_winsize = 25
|
||||||
let g:netrw_liststyle = 3
|
let g:netrw_liststyle = 3
|
||||||
let g:netrw_localrmdir='rm -r'
|
let g:netrw_localrmdir='rm -r'
|
||||||
nnoremap <silent><F5> :Vex!<cr>
|
nnoremap <silent><F5> :Vex!<cr>
|
||||||
|
|
||||||
let g:LoupeClearHighlightMap = 1
|
|
||||||
let g:LoupeCenterResults=0
|
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
local actions = require('telescope.actions')
|
|
||||||
require('telescope').setup {
|
|
||||||
defaults = {
|
|
||||||
vimgrep_arguments = {
|
|
||||||
'rg',
|
|
||||||
'--no-heading',
|
|
||||||
'--with-filename',
|
|
||||||
'--line-number',
|
|
||||||
'--column',
|
|
||||||
'--smart-case',
|
|
||||||
'--hidden'
|
|
||||||
},
|
|
||||||
prompt_title = " ",
|
|
||||||
results_title = " ",
|
|
||||||
preview_title = " ",
|
|
||||||
sorting_strategy = "ascending",
|
|
||||||
layout_config = {
|
|
||||||
width = 0.75,
|
|
||||||
prompt_position = "top",
|
|
||||||
preview_cutoff = 120,
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
find_files = {
|
|
||||||
find_command = {'fd', '-t f', '-c always', '-H'},
|
|
||||||
hidden = true,
|
|
||||||
},
|
|
||||||
file_browser = {
|
|
||||||
hidden = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
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,
|
|
||||||
["<esc>"] = actions.close,
|
|
||||||
},
|
|
||||||
n = {
|
|
||||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
require('telescope').load_extension('fzf')
|
|
||||||
|
|
||||||
local map = vim.api.nvim_set_keymap
|
|
||||||
local default_opts = {noremap = true, silent = true}
|
|
||||||
map('n', '<F1>', '<cmd>Telescope help_tags<CR>', default_opts)
|
|
||||||
map('n', '<F2>', '<cmd>lua require("telescope.builtin").find_files({cwd = "%:h", hidden=true})<CR>', default_opts)
|
|
||||||
map('n', '<F3>', '<cmd>Telescope file_browser hidden=true<CR>', default_opts)
|
|
||||||
map('n', '<F4>', '<cmd>Telescope buffers<CR>', default_opts)
|
|
||||||
map('n', '<M-f>', '<cmd>Telescope live_grep<CR>', default_opts)
|
|
||||||
map('n', '<M-g>', '<cmd>Telescope git_commits<CR>', default_opts)
|
|
||||||
map('n', '<M-S-r>', '<cmd>Telescope resume<CR>', default_opts)
|
|
|
@ -2,6 +2,8 @@
|
||||||
set -gs default-terminal "tmux-256color" # Optional
|
set -gs default-terminal "tmux-256color" # Optional
|
||||||
set -gas terminal-overrides "*:Tc"
|
set -gas terminal-overrides "*:Tc"
|
||||||
set -gas terminal-overrides "*:RGB"
|
set -gas terminal-overrides "*:RGB"
|
||||||
|
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
|
||||||
|
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
|
||||||
set -g set-titles-string "#S > #{=-15:?window_name,#{window_name},#{s/corpse/home/:?pane_current_path,#{b:pane_current_path},}} (#T)"
|
set -g set-titles-string "#S > #{=-15:?window_name,#{window_name},#{s/corpse/home/:?pane_current_path,#{b:pane_current_path},}} (#T)"
|
||||||
set -g mode-keys vi
|
set -g mode-keys vi
|
||||||
set -g history-limit 102400
|
set -g history-limit 102400
|
||||||
|
@ -29,7 +31,7 @@ set -g monitor-activity on
|
||||||
set -g bell-action none
|
set -g bell-action none
|
||||||
|
|
||||||
# Statusbar
|
# Statusbar
|
||||||
set -g pane-border-format "#[align=centre] #{?pane_active,*,} #{pane_index} #[fg=terminal]#{pane_current_command} "
|
set -g pane-border-format "#[align=centre] #{?pane_active,*,} #{pane_index} #[fg=terminal]#{pane_current_command} "
|
||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
set -g pane-border-status bottom
|
set -g pane-border-status bottom
|
||||||
set -g automatic-rename-format '#{s/zsh//:pane_current_command}'
|
set -g automatic-rename-format '#{s/zsh//:pane_current_command}'
|
||||||
|
@ -54,6 +56,10 @@ unbind-key C-b
|
||||||
unbind-key '"'
|
unbind-key '"'
|
||||||
unbind-key %
|
unbind-key %
|
||||||
unbind-key -
|
unbind-key -
|
||||||
|
unbind-key Up
|
||||||
|
unbind-key Down
|
||||||
|
unbind-key Left
|
||||||
|
unbind-key Right
|
||||||
|
|
||||||
# Prefijo
|
# Prefijo
|
||||||
set -g prefix F12
|
set -g prefix F12
|
||||||
|
@ -79,6 +85,10 @@ bind-key % delete-buffer
|
||||||
# Paneles
|
# Paneles
|
||||||
bind-key ( swap-pane -s :. -t :.- \; select-pane -t :.-
|
bind-key ( swap-pane -s :. -t :.- \; select-pane -t :.-
|
||||||
bind-key ) swap-pane -s :. -t :.+ \; select-pane -t :.+
|
bind-key ) swap-pane -s :. -t :.+ \; select-pane -t :.+
|
||||||
|
bind-key Up select-pane -U
|
||||||
|
bind-key Down select-pane -D
|
||||||
|
bind-key Left select-pane -L
|
||||||
|
bind-key Right select-pane -R
|
||||||
|
|
||||||
# Ventanas
|
# Ventanas
|
||||||
bind-key < previous-window
|
bind-key < previous-window
|
||||||
|
|
|
@ -5,14 +5,11 @@ ln= :\
|
||||||
or= :\
|
or= :\
|
||||||
ex= :\
|
ex= :\
|
||||||
.git= :\
|
.git= :\
|
||||||
Desktop= :\
|
doc= :\
|
||||||
Documents= :\
|
etc= :\
|
||||||
Downloads= :\
|
mus= :\
|
||||||
Music= :\
|
img= :\
|
||||||
Pictures= :\
|
vid= :\
|
||||||
Public= :\
|
|
||||||
Templates= :\
|
|
||||||
Videos= :\
|
|
||||||
mail= :\
|
mail= :\
|
||||||
.mail= :\
|
.mail= :\
|
||||||
.cache= :\
|
.cache= :\
|
||||||
|
@ -20,7 +17,6 @@ mail= :\
|
||||||
trash= :\
|
trash= :\
|
||||||
Trash= :\
|
Trash= :\
|
||||||
bin= :\
|
bin= :\
|
||||||
hexagons= :\
|
|
||||||
xresources= :\
|
xresources= :\
|
||||||
xinitrc= :\
|
xinitrc= :\
|
||||||
.bashprofile= :\
|
.bashprofile= :\
|
||||||
|
|
Loading…
Reference in New Issue