1
0
Fork 0

Arroz para nvim y lf. saque plugins viejos y puse un par nuevos.

principalmente nuevo status y bufferline (todavia en progreso), y
algunos plugins de prueba (saga, tint, kiwi). Para lf agregue iconos
nativos y solucione por ahora el uso de fzf. Actualizar algunas configs
de zsh
This commit is contained in:
deadguy 2023-09-10 16:18:16 -03:00
parent 1458e6aebc
commit 5b20b47166
Signed by: dgy
GPG Key ID: 37CA55B52CF63730
37 changed files with 1213 additions and 827 deletions

433
lf/icons Normal file
View File

@ -0,0 +1,433 @@
# vim:ft=conf
# These examples require Nerd Fonts or a compatible font to be used.
# See https://www.nerdfonts.com for more information.
# default values from lf (with matching order)
# ln l # LINK
# or l # ORPHAN
# tw t # STICKY_OTHER_WRITABLE
# ow d # OTHER_WRITABLE
# st t # STICKY
# di d # DIR
# pi p # FIFO
# so s # SOCK
# bd b # BLK
# cd c # CHR
# su u # SETUID
# sg g # SETGID
# ex x # EXEC
# fi - # FILE
# file types (with matching order)
ln  # LINK
or  # ORPHAN
tw  # STICKY_OTHER_WRITABLE
ow  # OTHER_WRITABLE
st  # STICKY
di  # DIR
pi 󰟥 # FIFO
so 󰤅 # SOCK
bd  # BLK
cd 󱕍 # CHR
su  # SETUID
sg 󰡉 # SETGID
ex  # EXEC
fi  # FILE
# file extensions (vim-devicons)
*.styl 
*.sass 
*.scss 
*.htm 
*.html 
*.slim 
*.haml 
*.ejs 
*.css 
*.less 
*.md 
*.mdx 
*.markdown 
*.rmd 
*.json 
*.webmanifest 
*.js 
*.mjs 
*.jsx 
*.rb 
*.gemspec 
*.rake 
*.php 
*.py 
*.pyc 
*.pyo 
*.pyd 
*.coffee 
*.mustache 
*.hbs 
*.conf 
*.cfg 
*.ini 
*.yml 
*.yaml 
*.toml 
*.bat 
*.mk 
*.jpg 
*.jpeg 
*.bmp 
*.png 
*.webp 
*.gif 
*.ico 
*.twig 
*.cpp 
*.c++ 
*.cxx 
*.cc 
*.cp 
*.c 
*.cs 󰌛
*.h 
*.hh 
*.hpp 
*.hxx 
*.hs 
*.lhs 
*.nix 
*.lua 
*.java 
*.sh 
*.fish 
*.bash 
*.zsh 
*.ksh 
*.csh 
*.awk 
*.ps1 
*.ml λ
*.mli λ
*.diff 
*.db 
*.sql 
*.dump 
*.clj 
*.cljc 
*.cljs 
*.edn 
*.scala 
*.go 
*.dart 
*.xul 
*.sln 
*.suo 
*.pl 
*.pm 
*.t 
*.rss 
'*.f#' 
*.fsscript 
*.fsx 
*.fs 
*.fsi 
*.rs 
*.rlib 
*.d 
*.erl 
*.hrl 
*.ex 
*.exs 
*.eex 
*.leex 
*.heex 
*.vim 
*.ai 
*.psd 
*.psb 
*.ts 
*.tsx 
*.jl 
*.pp 
*.vue 
*.elm 
*.swift 
*.xcplayground 
*.tex 󰙩
*.r 󰟔
*.rproj 󰗆
*.sol 󰡪
*.pem 
# file names (vim-devicons) (case-insensitive not supported in lf)
*gruntfile.coffee 
*gruntfile.js 
*gruntfile.ls 
*gulpfile.coffee 
*gulpfile.js 
*gulpfile.ls 
*mix.lock 
*dropbox 
*.ds_store 
*.gitconfig 
*.gitignore 
*.gitattributes 
*.gitmodules 
*.gitlab-ci.yml 
*.bashrc 
*.zshrc 
*.zshenv 
*.zprofile 
*.vimrc 
*.gvimrc 
*_vimrc 
*_gvimrc 
*.bashprofile 
*favicon.ico 
*license 
*node_modules 
*react.jsx 
*procfile 
*dockerfile 
*docker-compose.yml 
*rakefile 
*config.ru 
*gemfile 
*makefile 
*cmakelists.txt 
*robots.txt 󰚩
# file names (case-sensitive adaptations)
*Gruntfile.coffee 
*Gruntfile.js 
*Gruntfile.ls 
*Gulpfile.coffee 
*Gulpfile.js 
*Gulpfile.ls 
*Dropbox 
*.DS_Store 
*LICENSE 
*React.jsx 
*Procfile 
*Dockerfile 
*Docker-compose.yml 
*Rakefile 
*Gemfile 
*Makefile 
*CMakeLists.txt 
# file patterns (vim-devicons) (patterns not supported in lf)
# .*jquery.*\.js$ 
# .*angular.*\.js$ 
# .*backbone.*\.js$ 
# .*require.*\.js$ 
# .*materialize.*\.js$ 
# .*materialize.*\.css$ 
# .*mootools.*\.js$ 
# .*vimrc.* 
# Vagrantfile$ 
# file patterns (file name adaptations)
*jquery.min.js 
*angular.min.js 
*backbone.min.js 
*require.min.js 
*materialize.min.js 
*materialize.min.css 
*mootools.min.js 
*vimrc 
Vagrantfile 
# archives or compressed (extensions from dircolors defaults)
*.tar 
*.tgz 
*.arc 
*.arj 
*.taz 
*.lha 
*.lz4 
*.lzh 
*.lzma 
*.tlz 
*.txz 
*.tzo 
*.t7z 
*.zip 
*.z 
*.dz 
*.gz 
*.lrz 
*.lz 
*.lzo 
*.xz 
*.zst 
*.tzst 
*.bz2 
*.bz 
*.tbz 
*.tbz2 
*.tz 
*.deb 
*.rpm 
*.jar 
*.war 
*.ear 
*.sar 
*.rar 
*.alz 
*.ace 
*.zoo 
*.cpio 
*.7z 
*.rz 
*.cab 
*.wim 
*.swm 
*.dwm 
*.esd 
# image formats (extensions from dircolors defaults)
*.jpg 
*.jpeg 
*.mjpg 
*.mjpeg 
*.gif 
*.bmp 
*.pbm 
*.pgm 
*.ppm 
*.tga 
*.xbm 
*.xpm 
*.tif 
*.tiff 
*.png 
*.svg 
*.svgz 
*.mng 
*.pcx 
*.mov 
*.mpg 
*.mpeg 
*.m2v 
*.mkv 
*.webm 
*.ogm 
*.mp4 
*.m4v 
*.mp4v 
*.vob 
*.qt 
*.nuv 
*.wmv 
*.asf 
*.rm 
*.rmvb 
*.flc 
*.avi 
*.fli 
*.flv 
*.gl 
*.dl 
*.xcf 
*.xwd 
*.yuv 
*.cgm 
*.emf 
*.ogv 
*.ogx 
# audio formats (extensions from dircolors defaults)
*.aac 
*.au 
*.flac 
*.m4a 
*.mid 
*.midi 
*.mka 
*.mp3 
*.mpc 
*.ogg 
*.ra 
*.wav 
*.oga 
*.opus 
*.spx 
*.xspf 
# other formats
*.key 
*.bin 
*.cue 󰲸
*.rom 
*.dat 󱘲
*.bak 󰁯
*.pdf 
*.blend 
*.list 󰴍
*.desktop 
*.torrent 
*.added 
*.scd 
*.theme 
*.iso 
*.url 
*.part 
*.nfo 
*.pd 
*.ttf 
*.otf 
*.bdf 
*.pcf 
*.1 
*.o 
*.lock 
*.kra 
*.xml 
*.txt 
*.rc 
*.log 
*.cbr 
*.cbz 
*.pk3 
*.doc 
*.docx 
*.apk 
*.dmg 
*.m3u 
*.pls 
*.woff 𝑾
*.woff2 𝑾
*.eot 𝑬
*.wad 󰜃
*.WAD 󰜃
*.git 
*.src 󰳐
*.odt 󰈙
*.xls 󱎏
*.pdsettings 
*.recently-used 
*.profile 
*.mime.types 
*.jack-settings 
*.pulse-cookie 
*.mail 
*.cache 
*.config 
TODO 
user-dirs.dirs 
xresources 
xinitrc 
Xauthority 
ledger 
config 
gitignore 
doc 
etc 
mus 
img 
vid 
mail 
trash 
Trash 
bin 

177
lf/lfrc
View File

@ -4,19 +4,16 @@ set shellopts '-euy'
set ifs "\n"
set errorfmt "\033[1;31m%s\033[0m"
set promptfmt "\033[34;1m%d\033[0m\033[1m%f\033[0m%S%F"
set scrolloff 5
set wrapscroll
set sortby time
set info size:time
set reverse
set incsearch
set hidden
set preview
set previewer lfview
set ratios 3:3
set icons
set nohistory
set nodircache
recol
%[ $LF_LEVEL -eq 1 ] || echo "Warning: You're in a nested lf instance!"
@ -24,13 +21,13 @@ recol
# Custom Functions
cmd open ${{
case $(file --mime-type "$(readlink -f $f)" -b) in
text/*|application/json) vix "$f";;
text/*|application/json) lf -remote "send $id \$vix \$fx";;
image/svg+xml) display -- $f ;;
image/*) setsid nsxiv-rifle $f 2>/dev/null & ;;
audio/*) mpv $f ;;
video/*) setsid mpv $f -quiet >/dev/null 2>&1 & ;;
application/cbz|application/cbr|image/vnd.djvu|application/pdf|application/octet-stream|application/postscript|application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
*) xdg-open "$f" &>/dev/null &;;
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
esac
}}
@ -46,69 +43,29 @@ cmd recol &{{
}}
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
old="$(mktemp)"
new="$(mktemp)"
if [ -n "$fs" ]; then
fs="$(basename -a $fs)"
else
fs="$(ls)"
fi
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
}}
# 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
}}
# 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
}}
cmd paste-rsync &{{
set -- $(cat ~/.local/share/lf/files)
mode="$1"
@ -140,38 +97,38 @@ cmd paste-overwrite %{{
cmd fzf_jump ${{
res="$(find . -maxdepth 3 | sed "s|^\./||" | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')"
if [ -d "$res" ]; then
cmd="cd"
else
cmd="select"
if [ -n "$res" ]; then
if [ -d "$res" ]; then
cmd="cd"
else
cmd="select"
fi
res="$(printf '%s' "$res")"
lf -remote "send $id $cmd \"$res\""
fi
lf -remote "send $id $cmd \"$res\""
}}
cmd Link %{{
lf -remote 'load' | while read file; do
if [ ! -n "${mode+1}" ]; then
mode="$file"
continue
fi
files+=("$file")
done
if [ "${#files[@]}" -le 1 ]; then
lf -remote "send $id echo no files to link"
exit 0
fi
# symbolicly copy mode is indicating a soft link
if [[ "$mode" == copy ]]; then
ln -sr $files -t .
# while a move mode is indicating a hard link
elif [[ "$mode" == move ]]; then
ln $files -t .
fi
set -- $(cat ~/.local/share/lf/files)
mode="$1"
shift
if [ "$#" -lt 1 ]; then
lf -remote "send $id echo no files to link"
exit 0
fi
case "$mode" in
# symbolically copy mode is indicating a soft link
copy) ln -sr -t . -- "$@";;
# while a move mode is indicating a hard link
move) ln -t . -- "$@";;
esac
rm ~/.local/share/lf/files
lf -remote "send clear"
}}
cmd git_branch ${{
git branch | fzf | xargs git checkout
pwd_shell=$(pwd)
pwd_shell=$(pwd | sed 's/\\/\\\\/g;s/"/\\"/g')
lf -remote "send $id updir"
lf -remote "send $id cd \"$pwd_shell\""
}}
@ -217,24 +174,36 @@ cmd yank-basename-without-extension ${{
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
# compress current file or selected files with tar and gunzip
cmd tar ${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}
# compress current file or selected files with zip
cmd zip ${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}
# Bindings
# Remove some defaults
map "'"
map '"'
map m
map n
map d
map p
map w
map y
map c
map /
map r
map G
cmap <esc> cmd-escape
map <f-2> push A<c-u> # new rename
map <f-2> :rename; cmd-end; cmd-delete-home
map <f-3> cut
map <f-4> copy
map <f-5> reload
@ -256,9 +225,9 @@ map yn yank-dirname
map yp yank-path
map yn yank-basename
map yw yank-basename-without-extension
map pp paste
map po paste-overwrite
map pr paste-rsync
map pp :paste; clear
map po paste-overwrite; clear
map pr paste-rsync; clear
map o &mimeopen $f
map O $mimeopen --ask $f
map cx $chmod +x "$f"
@ -270,15 +239,13 @@ map zf $file-roller "$f"
map zc $zip -9 -r "$f".cbz $f
map zx $zx "$f"
map zm $zip "$f"
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> # at the very beginning
map a push A<a-b> # after extention
map i rename
map I :rename; cmd-home
map a :rename; cmd-delete-home
map A :rename; cmd-end
map B bulkrename
map L :Link
map f fzf_jump
map / $lf -remote "send $id select \"$(FZF_DEFAULT_COMMAND='fd --max-depth=1 --strip-cwd-prefix' fzf)\""
map F $find | lf -remote "send $id select $(fzf --reverse --border --margin 2% --inline-info --color border:#005688,bg+:#16252E,fg+:#26c6da,hl+:#ffffff,hl:#26c6da)"
map Gb :git_branch
map Gp ${{clear; git pull --rebase || true; echo "press ENTER"; read ENTER}}
@ -304,4 +271,4 @@ map ge cd ~/etc
map gi cd ~/img
map gc cd /mnt/cell
map gx cd /mnt/vb/graveyard
map gg cd /mnt/wd1tb/catacombs
map gw cd /mnt/wd1tb/catacombs

View File

@ -0,0 +1,10 @@
vim.keymap.set('n', 'o', function()
local line = vim.api.nvim_get_current_line()
local should_add_comma = string.find(line, '[^,{[]$')
if should_add_comma then
return 'A,<cr>'
else
return 'o'
end
end, { buffer = true, expr = true })

View File

@ -4,10 +4,20 @@ vim.bo.expandtab = false
vim.bo.smartindent = false
vim.bo.textwidth = 80
vim.wo.colorcolumn = '80'
vim.bo.spelllang = 'es,cjk'
vim.bo.spelllang = 'en,es,cjk'
vim.bo.complete = 'kspell'
vim.wo.conceallevel = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.commentstring = '<!-- %s -->'
vim.g.markdown_fenced_languages = {
'bash=sh',
'console=sh',
'javascript',
'lua',
'typescript',
'zsh=sh',
}
-- Spellcheck
vim.keymap.set('n', '<F7>', '[s', { silent = true, buffer = true })

View File

@ -4,7 +4,7 @@ vim.bo.expandtab = false
vim.bo.smartindent = false
vim.bo.textwidth = 80
vim.wo.colorcolumn = '80'
vim.bo.spelllang = 'es,cjk'
vim.bo.spelllang = 'en,es,cjk'
vim.bo.complete = 'kspell'
-- Spellcheck

View File

@ -21,10 +21,6 @@ setlocal noruler
setlocal colorcolumn=0
setlocal signcolumn=no
set statusline=%#User1#%f
set statusline+=%=
set statusline+=%h
wincmd L
" Quick close

View File

@ -13,11 +13,11 @@ for _, provider in pairs(disabled_providers) do
end
if vim.g.noplugins == nil then
require 'diagnostico'
require 'columna'
require 'pereza'
else
require('gruvbox').setup {
contrast = 'hard',
transparent_mode = true,
}
vim.cmd.colorscheme 'gruvbox'
require 'estatus'
require 'pestañas'
vim.cmd.colorscheme 'habamax'
end

111
nvim/lua/estatus.lua Normal file
View File

@ -0,0 +1,111 @@
local M = {}
vim.opt.fillchars = { diff = ' ', eob = ' ', stlnc = '', stl = '', vert = '', msgsep = '' }
-- custom highlights
vim.api.nvim_set_hl(0, 'User1', { fg = '#458588', bg = 'NONE' })
vim.api.nvim_set_hl(0, 'User2', { fg = '#fe8019', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User3', { fg = '#fb4934', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User4', { fg = '#fabd2f', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User5', { fg = '#83a598', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User6', { fg = '#d3869b', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User8', { fg = '#ebdbb2', bg = 'NONE' })
-- statusline colors
M.colors = {
flags = '%#User8#',
inactive = '%#StatusLineNC#',
line_col = '%#User1#',
}
-- setup truncation limits
M.trunc_width = setmetatable({
filename = 140,
line_col = 60,
}, {
__index = function()
return 80
end,
})
-- is buffer horizontally truncated
M.is_truncated = function(_, width)
local current_width = vim.api.nvim_win_get_width(0)
return current_width < width
end
-- get current line/col
M.get_line_col = function(self)
if self:is_truncated(self.trunc_width.line_col) then
return ' %l:%c'
else
return ' :%l/%L ─ :%c/%-2{virtcol("$") - 1} ─ %p%%'
end
end
M.get_flags = function()
return '%h%w%m '
end
M.get_words = function()
if vim.o.filetype == 'text' then
if vim.fn.has_key(vim.fn.wordcount(), 'visual_words') == 1 then
return 'W:' .. vim.fn.wordcount().visual_words .. '/' .. vim.fn.wordcount().words .. ' '
else
return 'W:' .. vim.fn.wordcount().cursor_words .. '/' .. vim.fn.wordcount().words .. ' '
end
else
return ''
end
end
-- get current file name
M.get_filename = function(self)
local filename = vim.fn.expand '%:t'
local fullname = '%<%F'
if filename == '' then
return ''
end
if self:is_truncated(self.trunc_width.filename) then
return ' ' .. filename .. ' '
else
return ' ' .. fullname .. ' '
end
end
-- create active statusline
M.set_active = function(self)
local palabras = self.colors.flags .. self:get_words()
local flags = self.colors.flags .. self:get_flags()
local filename = string.format('%s%s', self.colors.filename or '', self:get_filename())
local line_col = self.colors.line_col .. self:get_line_col()
return table.concat {
palabras,
flags,
'%=',
filename,
'%=',
line_col,
}
end
-- create inactive statusline
M.set_inactive = function(self)
return self.colors.inactive .. '%= %m %F %='
end
-- set statusline
Statusline = setmetatable(M, {
__call = function(self, mode)
return self['set_' .. mode](self)
end,
})
vim.cmd [[
augroup Statusline
au!
au WinEnter,BufEnter * setlocal statusline=%!v:lua.Statusline('active')
au WinLeave,BufLeave * setlocal statusline=%!v:lua.Statusline('inactive')
augroup END
]]

View File

@ -1,38 +1,42 @@
{
"Comment.nvim": { "branch": "master", "commit": "d0cbbfb539898a275dc4398446ab0ae3b94819bf" },
"LuaSnip": { "branch": "master", "commit": "99a94cc35ec99bf06263d0346128e908a204575c" },
"catppuccin": { "branch": "main", "commit": "057c34f849cf21059487d849e2f3b3efcd4ee0eb" },
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" },
"catppuccin": { "branch": "main", "commit": "81096cabe67f360acb06d64c0f7db8dd840afeba" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"friendly-snippets": { "branch": "main", "commit": "bc38057e513458cb2486b6cd82d365fa294ee398" },
"gitsigns.nvim": { "branch": "main", "commit": "5d73da785a3c05fd63ac31769079db05169a6ec7" },
"kiwi.nvim": { "branch": "master", "commit": "a19716890802415094d4ae6c776334849bbe9732" },
"lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" },
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
"gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" },
"heirline.nvim": { "branch": "master", "commit": "7f1e805dfc001d5dbb7d894105063f463f6c7dcc" },
"kiwi.nvim": { "branch": "master", "commit": "e3cf41b1faa3d048fa26b0a3f35b0d95d98f683d" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" },
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
"nvim-dap": { "branch": "master", "commit": "1c63f37f95cd4fb54512898168138d9a75d1516a" },
"lspsaga.nvim": { "branch": "main", "commit": "e5cefc8581e3d2e2755bee4ee8b102d6caa8f6c5" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-autopairs": { "branch": "master", "commit": "a52fc6eeec116746110b703381777c46d89d9e27" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-dap": { "branch": "master", "commit": "31e1ece773e10448dcb616d5144290946a6264b7" },
"nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" },
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
"nvim-lspconfig": { "branch": "master", "commit": "c0de180ddb3df36feef8ac3607670894d0e7497f" },
"nvim-surround": { "branch": "main", "commit": "10b20ca7d9da1ac8df8339e140ffef94f9ab3b18" },
"nvim-treesitter": { "branch": "master", "commit": "6c93c86272633937090806fedb2a20fe11025876" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" },
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" },
"nvim-surround": { "branch": "main", "commit": "1c2ef599abeeb98e40706830bcd27e90e259367a" },
"nvim-treesitter": { "branch": "master", "commit": "17b943e7c5cc2b2db3ac7b5720fbd42e75a00d8d" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" },
"nvim-web-devicons": { "branch": "master", "commit": "bc11ee2498de2310de5776477dd9dce65d03b464" },
"plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" },
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "6fe423eea6604c2fcbb906ff5f7e27f748a6ed87" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "0f75ea809c46af8997c64f49c52e3c641d887885" },
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "851c0997d55601f2afd7290db0f90dc364e29f58" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" },
"telescope-undo.nvim": { "branch": "main", "commit": "3dec002ea3e7952071d26fbb5d01e2038a58a554" },
"telescope.nvim": { "branch": "master", "commit": "d2e17ba18a6840b7e7079764b282616c3188e0de" },
"trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" },
"telescope.nvim": { "branch": "master", "commit": "3fae9c1e14910e6669bb8ecbb473aba6a9e13b33" },
"tint.nvim": { "branch": "master", "commit": "862835626941d263466754b9c8e2ce2cb004f5ac" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"troublesum.nvim": { "branch": "master", "commit": "b00301bb565bfcb6fcfa41f2012e43a0528da65b" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }
}

View File

@ -31,8 +31,8 @@ return {
end,
},
mapping = cmp.mapping.preset.insert {
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-d>'] = cmp.mapping.scroll_docs(-1),
['<C-f>'] = cmp.mapping.scroll_docs(1),
['<C-Space>'] = cmp.mapping(function(_)
return vim.fn.pumvisible() == 1 and cmp.close() or cmp.complete()
end),
@ -40,9 +40,15 @@ return {
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
},
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
['<CR>'] = cmp.mapping {
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false }
else
fallback()
end
end,
s = cmp.mapping.confirm { select = true },
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
@ -91,13 +97,14 @@ return {
return kind
end,
},
sources = {
{ name = 'luasnip', max_item_count = 5, group_index = 1 },
sources = cmp.config.sources({
{ name = 'luasnip', max_item_count = 10, group_index = 1 },
{ name = 'nvim_lsp', max_item_count = 20, group_index = 1 },
{ name = 'nvim_lua', group_index = 1 },
}, {
{ name = 'path', group_index = 2 },
{ name = 'buffer', keyword_length = 2, max_item_count = 5, group_index = 2 },
},
}),
}
local presentAutopairs, cmp_autopairs = pcall(require, 'nvim-autopairs.completion.cmp')

View File

@ -1,14 +1,6 @@
return {
'neovim/nvim-lspconfig',
ft = { 'lua', 'rust', 'python' },
dependencies = {
{
'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
config = function()
require('lsp_lines').setup()
end,
},
},
config = function()
require('lspconfig.ui.windows').default_options = {
border = 'single',
@ -19,6 +11,7 @@ return {
})
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = 'single',
close_events = { 'CursorMoved', 'BufHidden', 'InsertCharPre' },
})
local on_attach = function(client, bufnr)
@ -48,9 +41,13 @@ return {
local builtin = require 'telescope.builtin'
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
nmap('gd', builtin.lsp_definitions, '[G]oto [D]efinition')
-- nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
-- nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
-- nmap('gd', builtin.lsp_definitions, '[G]oto [D]efinition')
nmap('<leader>rn', '<cmd>Lspsaga rename<CR>', '[R]e[n]ame')
nmap('<leader>ca', '<cmd>Lspsaga code_action<CR>', '[C]ode [A]ction')
nmap('gf', '<cmd>Lspsaga finder<CR>', '[G]oto [F]inder')
nmap('gd', '<cmd>Lspsaga peek_definition<CR>', '[G]oto [D]efinition')
nmap('gr', builtin.lsp_references, '[G]oto [R]eferences')
nmap('gI', builtin.lsp_implementations, '[G]oto [I]mplementation')
nmap('<leader>D', builtin.lsp_type_definitions, 'Type [D]efinition')
@ -58,7 +55,8 @@ return {
nmap('<leader>ws', builtin.lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
-- See `:help K` for why this keymap
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
-- nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
nmap('K', '<cmd>Lspsaga hover_doc<CR>', 'Hover Documentation')
vim.keymap.set({ 'n', 'i' }, '<C-k>', vim.lsp.buf.signature_help, { buffer = bufnr, desc = 'Signature Help' })
-- Lesser used LSP functionality

View File

@ -1,6 +1,6 @@
return {
'serenevoid/kiwi.nvim',
ft = { 'markdown', 'text' },
ft = { 'markdown' },
config = function()
require('kiwi').setup {
{

281
nvim/lua/vago/lineas.lua Normal file
View File

@ -0,0 +1,281 @@
return {
'rebelot/heirline.nvim',
opts = function(_, opts)
vim.opt.showtabline = 2
vim.cmd([[au FileType * if index(['wipe', 'delete'], &bufhidden) >= 0 | set nobuflisted | endif]])
vim.opt.showmode = false
vim.opt.fillchars = { diff = ' ', eob = ' ', stlnc = '', stl = '', vert = '', msgsep = '' }
local conditions = require 'heirline.conditions'
local utils = require 'heirline.utils'
local Align = { provider = '%=' }
local Space = { provider = '───' }
local Blank = { provider = ' ' }
local Git = {
condition = conditions.is_git_repo,
init = function(self)
self.status_dict = vim.b.gitsigns_status_dict
self.has_changes = self.status_dict.added ~= 0 or self.status_dict.removed ~= 0 or self.status_dict.changed ~= 0
end,
{ -- git branch name
provider = function(self)
return '' .. self.status_dict.head .. ' '
end,
hl = { fg = 'orange', bold = true },
},
{
provider = function(self)
local count = self.status_dict.added or 0
return count > 0 and ('+' .. count .. ' ')
end,
hl = 'GitSignsAdd',
},
{
provider = function(self)
local count = self.status_dict.removed or 0
return count > 0 and ('-' .. count .. ' ')
end,
hl = 'GitSignsDelete',
},
{
provider = function(self)
local count = self.status_dict.changed or 0
return count > 0 and ('~' .. count .. ' ')
end,
hl = 'GitSignsChange',
},
{
condition = function(self)
return self.has_changes
end,
provider = '',
},
}
local ViMode = {
init = function(self)
self.mode = vim.fn.mode(1) -- :h mode()
end,
static = {
mode_names = {
n = '',
no = ' OPERATOR PENDING ',
nov = ' OPERATOR PENDING ',
noV = ' OP LINE ',
['no\22'] = ' OP BLOCK ',
niI = ' (INSERT) ',
niR = ' (INSERT) REPLACE',
niV = ' (INSERT) VISUAL',
nt = '',
v = ' VISUAL ',
vs = ' VISUAL ',
V = ' VISUAL LINE ',
Vs = ' VISUAL LINE ',
['\22'] = ' VISUAL BLOCK ',
['\22s'] = ' VISUAL BLOCK ',
s = ' SELECT ',
S = ' SELECT LINE ',
['\19'] = ' SELECT BLOCK ',
i = ' INSERT ',
ic = ' COMPLETION ',
ix = ' COMPLETION ',
R = ' REPLACE ',
Rc = ' REPLACE ',
Rx = ' REPLACE ',
Rv = ' VIRTUAL REPLACE ',
Rvc = ' VIRTUAL REPLACE ',
Rvx = ' VIRTUAL REPLACE ',
c = ' COMMAND ',
cv = ' EX ',
r = ' ENTER ',
rm = ' MORE ',
['r?'] = ' CONFIRM ',
['!'] = ' SHELL ',
t = ' TERMINAL ',
},
mode_colors = {
n = 'NONE',
i = 'MediumSeaGreen',
v = 'DeepSkyBlue',
V = 'DeepSkyBlue',
['\22'] = 'DeepSkyBlue',
c = 'orange',
s = 'CornflowerBlue',
S = 'CornflowerBlue',
['\19'] = 'CornflowerBlue',
R = 'NavajoWhite1',
r = 'NavajoWhite1',
['!'] = 'tomato',
t = 'OrangeRed',
},
},
provider = function(self)
return '%2(' .. self.mode_names[self.mode] .. '%)'
end,
hl = function(self)
local mode = self.mode:sub(1, 1) -- get only the first mode character
return { fg = self.mode_colors[mode], bold = true }
end,
update = {
'ModeChanged',
pattern = '*:*',
callback = vim.schedule_wrap(function()
vim.cmd 'redrawstatus'
end),
},
}
local Ruler = {
provider = ' :%l/%L ─ :%c/%-2{virtcol("$") - 1} ─ %p%% ',
hl = 'Normal',
}
local HelpFileName = {
condition = function()
return vim.bo.filetype == 'help'
end,
provider = function()
local filename = vim.api.nvim_buf_get_name(0)
local formatted = vim.fn.fnamemodify(filename, ':t')
return ' ' .. formatted .. ' '
end,
hl = { fg = 'CornflowerBlue' },
}
local TerminalName = {
provider = function()
local tname = '%{b:term_title}'
return ' ' .. '' .. tname .. ' '
end,
hl = { fg = 'orange' },
}
-- statusline
local DefaultStatusline = {
Space,
Git,
Space,
ViMode,
Align,
Ruler,
Space,
}
local InactiveStatusline = {
condition = conditions.is_not_active,
Align,
}
local SpecialStatusline = {
condition = function()
return conditions.buffer_matches {
buftype = { 'nofile', 'prompt', 'help', 'quickfix' },
filetype = { '^git.*', 'fugitive', },
}
end,
Align,
HelpFileName,
Align,
Space,
}
local TerminalStatusline = {
condition = function()
return conditions.buffer_matches { buftype = { 'terminal' } }
end,
hl = { fg = 'OrangeRed' },
{ condition = conditions.is_active, Space, ViMode },
Align,
TerminalName,
Align,
Space,
}
opts.statusline = {
fallthrough = false,
SpecialStatusline,
TerminalStatusline,
InactiveStatusline,
DefaultStatusline,
}
opts.disable_winbar_cb = function (args)
return conditions.buffer_matches ({
buftype = { 'nofile', 'prompt', 'help', 'quickfix' },
filetype = { '^git.*', 'fugitive', 'Trouble' },
}, args.buf)
end
-- tabline
local TablineFileName = {
provider = function(self)
local filename = self.filename
filename = filename == '' and '[No Name]' or vim.fn.fnamemodify(filename, ':t')
return filename
end,
}
local TablineFileFlags = {
{
condition = function(self)
return vim.api.nvim_buf_get_option(self.bufnr, 'modified')
end,
provider = '',
hl = { fg = 'turquoise' },
},
{
condition = function(self)
return not vim.api.nvim_buf_get_option(self.bufnr, 'modifiable')
or vim.api.nvim_buf_get_option(self.bufnr, 'readonly')
end,
provider = function(self)
if vim.api.nvim_buf_get_option(self.bufnr, 'buftype') == 'terminal' then
return ''
else
return ''
end
end,
hl = { fg = 'OrangeRed' },
},
}
local FileIcon = {
init = function(self)
local filename = self.filename
local extension = vim.fn.fnamemodify(filename, ':e')
self.icon, self.icon_color =
require('nvim-web-devicons').get_icon_color(filename, extension, { default = true })
end,
provider = function(self)
return self.icon and (self.icon .. ' ')
end,
hl = function(self)
return { fg = self.icon_color }
end,
}
local TablineFileNameBlock = {
init = function(self)
self.filename = vim.api.nvim_buf_get_name(self.bufnr)
end,
hl = function(self)
if self.is_active then
return 'TabLineSel'
else
return 'TabLine'
end
end,
Blank,
FileIcon,
TablineFileName,
Blank,
TablineFileFlags,
Blank,
}
local BufferLine = utils.make_buflist(TablineFileNameBlock)
local Tabpage = {
provider = function(self)
return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
end,
hl = function(self)
if not self.is_active then
return 'TabLineSel'
else
return 'TabLine'
end
end,
}
local TabPages = {
condition = function()
return #vim.api.nvim_list_tabpages() >= 2
end,
utils.make_tablist(Tabpage),
}
opts.tabline = { BufferLine, Align, TabPages }
end,
}

View File

@ -4,4 +4,19 @@ return {
{ 'nvim-tree/nvim-web-devicons', event = 'VeryLazy' },
{ 'nvim-lua/plenary.nvim', event = 'VeryLazy' },
{ 'tpope/vim-sleuth', event = 'VeryLazy' },
{
'ivanjermakov/troublesum.nvim',
ft = { 'lua', 'rust', 'python' },
opts = {
enabled = function()
return vim.bo.filetype ~= 'lazy'
end,
severity_format = {
vim.fn.sign_getdefined('DiagnosticSignError')[1].text,
vim.fn.sign_getdefined('DiagnosticSignWarn')[1].text,
vim.fn.sign_getdefined('DiagnosticSignInfo')[1].text,
vim.fn.sign_getdefined('DiagnosticSignHint')[1].text,
},
},
},
}

View File

@ -10,5 +10,5 @@ return {
vim.keymap.set('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>'),
vim.keymap.set('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>'),
vim.keymap.set('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>'),
vim.keymap.set('n', 'gR', '<cmd>TroubleToggle lsp_references<cr>'),
vim.keymap.set('n', '<leader>gR', '<cmd>TroubleToggle lsp_references<cr>'),
}

View File

@ -14,8 +14,8 @@ return {
history = true,
enable_autosnippets = true,
store_selection_keys = '<Tab>',
region_check_events = 'InsertEnter',
delete_check_events = 'InsertLeave',
delete_check_events = 'TextChanged',
region_check_events = 'CursorMoved',
ext_opts = {
[require('luasnip.util.types').choiceNode] = {
active = {

44
nvim/lua/vago/saga.lua Normal file
View File

@ -0,0 +1,44 @@
return {
'nvimdev/lspsaga.nvim',
ft = { 'lua', 'rust', 'python' },
config = function()
require('lspsaga').setup {
lightbulb = {
enable = false,
},
symbol_in_winbar = {
show_file = false,
},
-- ui = {
-- kind = {
-- File = ' ',
-- Module = ' ',
-- Namespace = ' ',
-- Package = ' ',
-- Class = ' ',
-- Method = ' ',
-- Property = ' ',
-- Field = ' ',
-- Constructor = ' ',
-- Enum = ' ',
-- Interface = ' ',
-- Function = ' ',
-- Variable = ' ',
-- Constant = ' ',
-- String = ' ',
-- Number = ' ',
-- Boolean = ' ',
-- Array = ' ',
-- Object = ' ',
-- Key = ' ',
-- Null = ' ',
-- EnumMember = ' ',
-- Struct = ' ',
-- Event = ' ',
-- Operator = ' ',
-- TypeParameter = ' ',
-- },
-- },
}
end,
}

View File

@ -8,7 +8,6 @@ return {
return false
end
end,
event = { 'BufReadPre', 'BufNewFile' },
config = function()
require('gitsigns').setup {
numhl = true,
@ -21,60 +20,6 @@ return {
changedelete = { text = '' },
untracked = { text = '' },
},
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', '}c', function()
if vim.wo.diff then
return '}c'
end
vim.schedule(function()
gs.next_hunk()
end)
return '<Ignore>'
end, { expr = true })
map('n', '{c', function()
if vim.wo.diff then
return '{c'
end
vim.schedule(function()
gs.prev_hunk()
end)
return '<Ignore>'
end, { expr = true })
-- Actions
map({ 'n', 'v' }, '<leader>gs', ':Gitsigns stage_hunk<CR>')
map({ 'n', 'v' }, '<leader>gr', ':Gitsigns reset_hunk<CR>')
map('n', '<leader>gS', gs.stage_buffer)
map('n', '<leader>gu', gs.undo_stage_hunk)
map('n', '<leader>gr', gs.reset_buffer)
map('n', '<leader>gp', gs.preview_hunk)
map('n', '<leader>gb', function()
gs.blame_line { full = true }
end)
map('n', '<leader>tb', gs.toggle_current_line_blame)
map('n', '<leader>gd', gs.diffthis)
map('n', '<leader>gD', function()
gs.diffthis '~'
end)
map('n', '<leader>td', gs.toggle_deleted)
-- Text object
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
end,
}
vim.keymap.set('n', 'gh', ':diffget //2<CR>')
vim.keymap.set('n', 'gl', ':diffget //3<CR>')
vim.keymap.set({ 'n', 'x' }, '<leader>g}', ':diffput<CR>')
vim.keymap.set({ 'n', 'x' }, '<leader>{g', ':diffget<CR>')
end,
}

View File

@ -1,6 +1,5 @@
return {
'nvim-telescope/telescope.nvim',
event = 'VeryLazy',
dependencies = {
'nvim-telescope/telescope-ui-select.nvim',
'nvim-telescope/telescope-file-browser.nvim',

34
nvim/lua/vago/tinte.lua Normal file
View File

@ -0,0 +1,34 @@
return {
'levouh/tint.nvim',
event = 'VeryLazy',
config = function()
local tint = require 'tint'
local transforms = require 'tint.transforms'
tint.setup {
tint = -25,
transforms = {
transforms.tint_with_threshold(-100, '#151515', 70),
transforms.saturate(0.5),
},
tint_background_colors = true,
highlight_ignore_patterns = {
'SignColumn',
'LineNr',
'CursorLine',
'WinSeparator',
'VertSplit',
'StatusLineNC',
},
}
vim.api.nvim_create_autocmd('FocusGained', {
callback = function()
tint.untint(vim.api.nvim_get_current_win())
end,
})
vim.api.nvim_create_autocmd('FocusLost', {
callback = function()
tint.tint(vim.api.nvim_get_current_win())
end,
})
end,
}

View File

@ -58,19 +58,8 @@ vim.api.nvim_create_autocmd({ 'VimResized' }, {
})
vim.api.nvim_create_augroup('Terms', { clear = true })
vim.api.nvim_create_autocmd('TermOpen', {
callback = function()
vim.wo.statusline = '%{b:term_title}'
vim.wo.number = false
vim.wo.signcolumn = 'no'
end,
group = 'Terms',
})
vim.api.nvim_create_autocmd('BufEnter', {
callback = function()
vim.wo.statusline = '%= %{b:term_title} %='
vim.wo.number = true
vim.wo.signcolumn = 'no'
vim.cmd 'startinsert'
end,
group = 'Terms',
@ -78,8 +67,6 @@ vim.api.nvim_create_autocmd('BufEnter', {
})
vim.api.nvim_create_autocmd('BufLeave', {
callback = function()
vim.wo.number = true
vim.wo.signcolumn = 'auto:9'
vim.cmd 'stopinsert'
end,
group = 'Terms',

View File

@ -1,109 +0,0 @@
local gitsigns_bar = '│'
local gitsigns_hl_pool = {
GitSignsAdd = 'DiagnosticOk',
GitSignsChange = 'DiagnosticWarn',
GitSignsChangedelete = 'DiagnosticWarn',
GitSignsDelete = 'DiagnosticError',
GitSignsTopdelete = 'DiagnosticError',
GitSignsUntracked = 'NonText',
}
local diag_signs_icons = {
DiagnosticSignError = ' ',
DiagnosticSignWarn = ' ',
DiagnosticSignInfo = ' ',
DiagnosticSignHint = ' ',
DiagnosticSignOk = ' ',
}
local function get_sign_name(cur_sign)
if cur_sign == nil then
return nil
end
cur_sign = cur_sign[1]
if cur_sign == nil then
return nil
end
cur_sign = cur_sign.signs
if cur_sign == nil then
return nil
end
cur_sign = cur_sign[1]
if cur_sign == nil then
return nil
end
return cur_sign['name']
end
local function mk_hl(group, sym)
return table.concat { '%#', group, '#', sym, '%*' }
end
local function get_name_from_group(bufnum, lnum, group)
local cur_sign_tbl = vim.fn.sign_getplaced(bufnum, {
group = group,
lnum = lnum,
})
return get_sign_name(cur_sign_tbl)
end
_G.get_statuscol_gitsign = function(bufnr, lnum)
local cur_sign_nm = get_name_from_group(bufnr, lnum, 'gitsigns_vimfn_signs_')
if cur_sign_nm ~= nil then
return mk_hl(gitsigns_hl_pool[cur_sign_nm], gitsigns_bar)
else
return ' '
end
end
_G.get_statuscol_diag = function(bufnum, lnum)
local cur_sign_nm = get_name_from_group(bufnum, lnum, '*')
if cur_sign_nm ~= nil and vim.startswith(cur_sign_nm, 'DiagnosticSign') then
return mk_hl(cur_sign_nm, diag_signs_icons[cur_sign_nm])
else
return ' '
end
end
_G.get_statuscol = function()
local str_table = {}
local parts = {
['diagnostics'] = '%{%v:lua.get_statuscol_diag(bufnr(), v:lnum)%}',
['fold'] = '%C',
['gitsigns'] = '%{%v:lua.get_statuscol_gitsign(bufnr(), v:lnum)%}',
['num'] = '%{v:lnum}',
['sep'] = '%=',
['signcol'] = '%s',
['space'] = ' ',
}
local order = {
'diagnostics',
'sep',
'num',
'space',
'gitsigns',
'fold',
'space',
}
for _, val in ipairs(order) do
table.insert(str_table, parts[val])
end
return table.concat(str_table)
end
vim.o.statuscolumn = '%!v:lua.get_statuscol()'

View File

@ -1,7 +1,6 @@
local options = {
title = true,
undofile = true,
autowrite = true,
smartindent = true,
splitbelow = true,
splitright = true,
@ -27,7 +26,6 @@ local options = {
completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' },
titlestring = '%(%m%) %(%{expand("%:~")}%)',
formatlistpat = '^\\s*\\(\\d\\+[\\]:.)}\\t ]\\|[*-][\\t ]\\)\\s*',
fillchars = { diff = ' ', eob = ' ', stlnc = ' ', stl = ' ', vert = '', msgsep = '' },
}
vim.opt.nrformats:append 'alpha'
@ -40,7 +38,7 @@ vim.opt.diffopt:append {
foldcolumn = 0,
'linematch:60',
}
vim.opt.formatoptions = vim.opt.formatoptions - 'a' - 't' + 'c' + 'q' - 'o' - 'r' + 'n' + 'j' - '2'
vim.opt.formatoptions = vim.opt.formatoptions - 'a' - 't' - 'o' - 'r' - '2' + 'c' + 'q' + 'n' + 'j'
for k, v in pairs(options) do
vim.opt[k] = v

View File

@ -1,213 +0,0 @@
local M = {}
-- custom highlights
vim.api.nvim_set_hl(0, 'User1', { fg = '#458588', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User2', { fg = '#fe8019', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User3', { fg = '#fb4934', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User4', { fg = '#fabd2f', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User5', { fg = '#83a598', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User6', { fg = '#d3869b', bg = '#1d2021' })
vim.api.nvim_set_hl(0, 'User8', { fg = '#ebdbb2', bg = '#282828' })
-- statusline colors
M.colors = {
flags = '%#User8#',
inactive = '%#StatusLineNC#',
line_col = '%#User1#',
git = '%#User2#',
diag = {
err = '%#User3#',
warn = '%#User4#',
nfo = '%#User5#',
hnt = '%#User6#',
},
}
-- diagnostics symbol config
M.lsp_icon = {
hint = '',
info = '',
warn = '',
error = '',
git = '',
serv = '',
}
-- setup truncation limits
M.trunc_width = setmetatable({
git_status = 100,
lsp_name = 100,
filename = 140,
line_col = 60,
}, {
__index = function()
return 80
end,
})
-- is buffer horizontally truncated
M.is_truncated = function(_, width)
local current_width = vim.api.nvim_win_get_width(0)
return current_width < width
end
M.get_lsp_name = function(self)
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return ''
end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
if self:is_truncated(self.trunc_width.lsp_name) then
return self.lsp_icon.serv
else
return self.lsp_icon.serv .. client.name .. ' '
end
end
end
return ''
end
-- get git information of current file
M.get_git_status = function(self)
local signs = vim.b.gitsigns_status_dict or { head = '' }
local is_head_empty = signs.head ~= ''
if self:is_truncated(self.trunc_width.git_status) then
return is_head_empty and self.lsp_icon.git or ''
end
return is_head_empty and string.format(' %s %s', self.lsp_icon.git, signs.head) or ''
end
-- get current line/col
M.get_line_col = function(self)
if self:is_truncated(self.trunc_width.line_col) then
return ' %l:%c'
else
return ' :%l :%c %p%%'
end
end
M.get_flags = function()
return '%h%w%m'
end
-- get current file diagnostics
M.get_diagnostics = function(self)
if #vim.lsp.buf_get_clients(0) == 0 then
return ''
end
local status_parts = {}
local warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
local hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
local infos = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
local errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
if errors > 0 then
table.insert(status_parts, self.colors.diag.err .. self.lsp_icon.error .. errors)
end
if warnings > 0 then
table.insert(status_parts, self.colors.diag.warn .. self.lsp_icon.warn .. warnings)
end
if infos > 0 then
table.insert(status_parts, self.colors.diag.nfo .. self.lsp_icon.info .. infos)
end
if hints > 0 then
table.insert(status_parts, self.colors.diag.hnt .. self.lsp_icon.hint .. hints)
end
local status_diagnostics = vim.trim(table.concat(status_parts, ' '))
if status_diagnostics ~= '' then
return status_diagnostics .. ' '
end
return ''
end
-- get wordcount. only used in plaintext files
M.get_words = function()
if vim.o.filetype == 'text' then
if vim.fn.has_key(vim.fn.wordcount(), 'visual_words') == 1 then
return 'W:' .. vim.fn.wordcount().visual_words .. '/' .. vim.fn.wordcount().words .. ' '
else
return 'W:' .. vim.fn.wordcount().cursor_words .. '/' .. vim.fn.wordcount().words .. ' '
end
else
return ''
end
end
-- get current file name
M.get_filename = function(self)
local filename = vim.fn.expand '%:t'
local extension = vim.fn.expand '%:e'
local fullname = '%<%F'
if filename == '' then
return ''
end
local status_ok, devicons = pcall(require, 'nvim-web-devicons')
if not status_ok then
if self:is_truncated(self.trunc_width.filename) then
return filename
else
return fullname
end
else
local icon, icon_color = devicons.get_icon_color(filename, extension, { default = true })
vim.api.nvim_set_hl(0, 'User7', { fg = icon_color, bg = '#282828' })
self.colors.filename = '%#User7#'
if self:is_truncated(self.trunc_width.filename) then
return ' ' .. icon .. ' ' .. filename
else
return ' ' .. icon .. ' ' .. fullname
end
end
end
-- create active statusline
M.set_active = function(self)
local lsp = self:get_diagnostics()
local servs = self.colors.line_col .. self:get_lsp_name()
local palabras = self.colors.flags .. self:get_words()
local flags = self.colors.flags .. self:get_flags()
local filename = string.format('%s%s', self.colors.filename or '', self:get_filename())
local git = self.colors.git .. self:get_git_status()
local line_col = self.colors.line_col .. self:get_line_col()
return table.concat {
lsp,
servs,
palabras,
flags,
'%=',
filename,
'%=',
git,
line_col,
}
end
-- create inactive statusline
M.set_inactive = function(self)
return self.colors.inactive .. '%= %m %F %='
end
-- set statusline
Statusline = setmetatable(M, {
__call = function(self, mode)
return self['set_' .. mode](self)
end,
})
vim.cmd [[
augroup Statusline
au!
au WinEnter,BufEnter * setlocal statusline=%!v:lua.Statusline('active')
au WinLeave,BufLeave * setlocal statusline=%!v:lua.Statusline('inactive')
augroup END
]]

View File

@ -1,15 +1,15 @@
-- Ñ master race
vim.keymap.set('n', 'ñ', ';')
vim.keymap.set('n', 'Ñ', ',')
vim.keymap.set('n', '{q', ':cprev<CR>', { silent = true })
vim.keymap.set('n', '{q', ':cprev<CR>zz', { silent = true, desc="[Q]uickfix backward" })
vim.keymap.set('n', '{Q', ':cfirst<CR>', { silent = true })
vim.keymap.set('n', '{l', ':lprevious<CR>', { silent = true })
vim.keymap.set('n', '{l', ':lprev<CR>zz', { silent = true, desc="[L]oclist backward" })
vim.keymap.set('n', '{o', ':call append(line(".")-1, "")<CR>', { silent = true })
vim.keymap.set('n', '{b', ':bprev<CR>', { silent = true, desc = 'Previous buffer' })
vim.keymap.set('n', '{t', ':tabfirst<CR>', { silent = true, desc = 'First Tab' })
vim.keymap.set('n', '}q', ':cnext<CR>', { silent = true })
vim.keymap.set('n', '}q', ':cnext<CR>zz', { silent = true, desc="[Q]uickfix forward" })
vim.keymap.set('n', '}Q', ':clast<CR>', { silent = true })
vim.keymap.set('n', '}l', ':lnext<CR>', { silent = true })
vim.keymap.set('n', '}l', ':lnext<CR>zz', { silent = true, desc="[L]oclist forward" })
vim.keymap.set('n', '}o', ':call append(line("."), "")<CR>', { silent = true })
vim.keymap.set('n', '}b', ':bnext<CR>', { silent = true, desc = 'Next buffer' })
vim.keymap.set('n', '}t', ':tablast<CR>', { silent = true, desc = 'Last Tab' })
@ -144,6 +144,12 @@ vim.keymap.set('x', 'g/', '<esc>/\\%V', { silent = false, desc = 'Search inside
vim.keymap.set('x', '*', [[y/\V<C-R>=escape(@", '/\')<CR><CR>]])
vim.keymap.set('x', '#', [[y?\V<C-R>=escape(@", '?\')<CR><CR>]])
-- diff mode
vim.keymap.set('n', 'gh', ':diffget //2<CR>')
vim.keymap.set('n', 'gl', ':diffget //3<CR>')
vim.keymap.set({ 'n', 'x' }, '<leader>g}', ':diffput<CR>')
vim.keymap.set({ 'n', 'x' }, '<leader>{g', ':diffget<CR>')
-- Write and quit typos
local typos = { 'W', 'Wq', 'WQ', 'Wqa', 'WQa', 'WQA', 'WqA', 'Q', 'Qa', 'QA' }
for _, cmd in ipairs(typos) do

View File

@ -72,8 +72,8 @@ bind-key Right select-pane -R
# Ventanas
bind-key C-p previous-window
bind-key C-n next-window
bind-key [ swap-window -t :-1 -d
bind-key ] swap-window -t :+1 -d
bind-key < swap-window -t :-1 -d
bind-key > swap-window -t :+1 -d
bind-key Tab choose-window
bind-key Enter new-window
bind-key W choose-tree -Zw "swap-window -t '%%'"

View File

@ -84,7 +84,7 @@ export FZF_VIM_LOG=$(git config --get alias.l | awk '{$1=""; print $0;}' | tr -d
# }}}
# Less {{{
export LESSCHARSET=UTF-8
export LESS=FRXix4
export LESS=FRXi
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
@ -94,7 +94,7 @@ export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export LESSPROMPT='?f%f .?ltLine %lt:?pt%pt\%:?btByte %bt:-...'
export LESSHISTFILE="-"
export LESSHISTFILE="/dev/null"
# }}}
# Path {{{
typeset -U PATH path

View File

@ -1,13 +1,11 @@
# Programas
alias \
v='$EDITOR ' \
x='xui' \
x='xui' \
m='neomutt' \
z='zathura' \
g='git' \
vv='nvi' \
bc='bc -iq' \
vc='nvim --cmd ":lua vim.g.noplugins=1" ' \
se='doas nvim ' \
am='alsamixer' \
pm='pulsemixer' \
@ -83,7 +81,6 @@ alias \
alias \
ll='ls -coghptFAB --group-directories-first --time-style=+"%d-%m-%Y %H:%M"' \
sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}' \
\
df='df -hT --total' \
free='free -ht' \
du='du -sh' \
@ -91,7 +88,7 @@ alias \
dd='dd status=progress' \
dfc='dfc -dmT' \
wget='wget --no-hsts' \
sol='ttysolitaire --no-background-color -p 10' # lsblk='lsblk -o "KNAME,HOTPLUG,SIZE,FSTYPE,TYPE,LABEL,MOUNTPOINT,UUID,MODEL,SERIAL"' \
sol='ttysolitaire --no-background-color -p 10'
# Comandos
alias \

View File

@ -20,21 +20,21 @@
command -v fzf >/dev/null 2>&1 || return
if [[ -z "${FZF_MARKS_FILE}" ]] ; then
if [[ -z ${FZF_MARKS_FILE-} ]] ; then
FZF_MARKS_FILE="${XDG_CONFIG_HOME}/fzf-marks"
fi
if [[ ! -f "${FZF_MARKS_FILE}" ]]; then
touch "${FZF_MARKS_FILE}"
if [[ ! -f $FZF_MARKS_FILE ]]; then
touch "$FZF_MARKS_FILE"
fi
if [[ -z "${FZF_MARKS_COMMAND}" ]] ; then
if [[ -z ${FZF_MARKS_COMMAND-} ]] ; then
FZF_VERSION=$(fzf --version | awk -F. '{ print $1 * 1e6 + $2 * 1e3 + $3 }')
MINIMUM_VERSION=16001
_fzm_FZF_VERSION=$(fzf --version | awk -F. '{ print $1 * 1e6 + $2 * 1e3 + $3 }')
_fzm_MINIMUM_VERSION=16001
if [[ $FZF_VERSION -gt $MINIMUM_VERSION ]]; then
FZF_MARKS_COMMAND="fzf --height 40% --reverse --header='ctrl-y:jump, ctrl-t:toggle, ctrl-d:delete' --with-nth=1"
if [[ $_fzm_FZF_VERSION -gt $_fzm_MINIMUM_VERSION ]]; then
FZF_MARKS_COMMAND="fzf --height 40% --reverse"
elif [[ ${FZF_TMUX:-1} -eq 1 ]]; then
FZF_MARKS_COMMAND="fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}"
else
@ -44,18 +44,18 @@ fi
function mark {
local mark_to_add
mark_to_add="$* : $(pwd)"
mark_to_add="${*:-$(basename "$(pwd)")} : $(pwd)"
if grep -qxFe "${mark_to_add}" "${FZF_MARKS_FILE}"; then
echo "** The following mark already exists **"
else
echo "${mark_to_add}" >> "${FZF_MARKS_FILE}"
printf '%s\n' "${mark_to_add}" >> "${FZF_MARKS_FILE}"
echo "** The following mark has been added **"
fi
echo "${mark_to_add}" | _color_marks
_fzm_color_marks <<< $mark_to_add
}
function _handle_symlinks {
function _fzm_handle_symlinks {
local fname link
if [ -L "${FZF_MARKS_FILE}" ]; then
link=$(readlink "${FZF_MARKS_FILE}")
@ -66,7 +66,7 @@ function _handle_symlinks {
else
fname=${FZF_MARKS_FILE}
fi
echo "${fname}"
printf '%s\n' "${fname}"
}
# Ensure precmds are run after cd
@ -79,8 +79,8 @@ function redraw-prompt {
}
zle -N redraw-prompt
function _color_marks {
if [[ "${FZF_MARKS_NO_COLORS}" == "1" ]]; then
function _fzm_color_marks {
if [[ "${FZF_MARKS_NO_COLORS-}" == "1" ]]; then
cat
else
local esc c_lhs c_rhs c_colon
@ -92,14 +92,21 @@ function _color_marks {
fi
}
function _fzm_paste_command {
local directory="$1"
LBUFFER="${LBUFFER}$directory"
zle reset-prompt > /dev/null 2>&1
}
function fzm {
local lines key
lines=$(_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \
local delete_key=${FZF_MARKS_DELETE:-ctrl-d} paste_key=${FZF_MARKS_PASTE:-ctrl-v}
local lines=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \
--ansi \
--expect="${FZF_MARKS_DELETE:-ctrl-d}" \
--expect='"$delete_key,$paste_key"' \
--multi \
--bind=ctrl-y:accept,ctrl-t:toggle \
--query="\"$*\"" \
--bind=ctrl-y:accept,ctrl-t:toggle+down \
--header='"ctrl-y:jump, ctrl-t:toggle, $delete_key:delete, $paste_key:paste"' \
--query='"$*"' \
--select-1 \
--tac)
if [[ -z "$lines" ]]; then
@ -107,10 +114,13 @@ function fzm {
return 1
fi
key=$(head -1 <<< "$lines")
local key=$(head -1 <<< "$lines")
if [[ $key == "${FZF_MARKS_DELETE:-ctrl-d}" ]]; then
if [[ $key == "$delete_key" ]]; then
dmark "-->-->-->" "$(sed 1d <<< "$lines")"
elif [[ $key == "$paste_key" || ! -t 1 ]]; then
zle && local FZF_MARKS_PASTE_COMMAND=_fzm_paste_command
pmark "-->-->-->" "$(tail -1 <<< "$lines")"
else
jump "-->-->-->" "$(tail -1 <<< "${lines}")"
fi
@ -121,28 +131,54 @@ function jump {
if [[ $1 == "-->-->-->" ]]; then
jumpline=$2
else
jumpline=$(_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} --ansi --bind=ctrl-y:accept --query="$*" --select-1 --tac)
jumpline=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \
--ansi \
--bind=ctrl-y:accept \
--header='"ctrl-y:jump"' \
--query='"$*"' \
--select-1 \
--tac)
fi
if [[ -n ${jumpline} ]]; then
jumpdir=$(echo "${jumpline}" | sed 's/.*: \(.*\)$/\1/' | sed "s#^~#${HOME}#")
bookmarks=$(_handle_symlinks)
$EDITOR "${jumpdir}" || return
if ! [[ "${FZF_MARKS_KEEP_ORDER}" == 1 ]]; then
jumpdir=$(sed 's/.*: \(.*\)$/\1/;'"s#^~#${HOME}#" <<< $jumpline)
bookmarks=$(_fzm_handle_symlinks)
nvim --cmd ":lua vim.g.noplugins=1" "${jumpdir}" || return
if [[ ! "${FZF_MARKS_KEEP_ORDER}" == 1 && -w ${FZF_MARKS_FILE} ]]; then
perl -n -i -e "print unless /^\\Q${jumpline//\//\\/}\\E\$/" "${bookmarks}"
echo "${jumpline}" >> "${FZF_MARKS_FILE}"
printf '%s\n' "${jumpline}" >> "${FZF_MARKS_FILE}"
fi
fi
zle && zle redraw-prompt
}
function pmark {
local selected
if [[ $1 == "-->-->-->" ]]; then
selected=$2
else
selected=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \
--ansi \
--bind=ctrl-y:accept --header='"ctrl-y:paste"' \
--query='"$*"' --select-1 --tac)
fi
if [[ $selected ]]; then
selected=$(sed 's/.*: \(.*\)$/\1/;'"s#^~#${HOME}#" <<< "$selected")
local paste_command=${FZF_MARKS_PASTE_COMMAND:-"printf '%s\n'"}
eval -- "$paste_command \"\$selected\""
fi
}
function dmark {
local marks_to_delete line bookmarks
if [[ $1 == "-->-->-->" ]]; then
marks_to_delete=$2
else
marks_to_delete=$(_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} -m --ansi --bind=ctrl-y:accept,ctrl-t:toggle --query="$*" --tac)
marks_to_delete=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \
-m --ansi \
--bind=ctrl-y:accept,ctrl-t:toggle+down --header='"ctrl-y:delete, ctrl-t:toggle"' \
--query='"$*"' --tac)
fi
bookmarks=$(_handle_symlinks)
bookmarks=$(_fzm_handle_symlinks)
if [[ -n ${marks_to_delete} ]]; then
while IFS='' read -r line; do
@ -152,17 +188,16 @@ function dmark {
[[ $(wc -l <<< "${marks_to_delete}") == 1 ]] \
&& echo "** The following mark has been deleted **" \
|| echo "** The following marks have been deleted **"
echo "${marks_to_delete}" | _color_marks
_fzm_color_marks <<< $marks_to_delete
fi
zle && zle reset-prompt
}
zle -N jump
zle -N dmark
zle -N fzm
bindkey ${FZF_MARKS_JUMP:-'^g'} fzm
if [ "${FZF_MARKS_DMARK}" ]; then
if [ "${FZF_MARKS_DMARK-}" ]; then
bindkey ${FZF_MARKS_DMARK} dmark
fi

47
zsh/conf/40_funciones.zsh Normal file
View File

@ -0,0 +1,47 @@
function v {
if [ "$(fd -tf --exact-depth=1 -e lua -e py -e rs)" ]; then
"$EDITOR" "$*"
else
nvim --cmd ":lua vim.g.noplugins=1" "$*"
fi
}
function ae {
cd ~/.local/bin || exit
fd -c always -tf -d 1 --strip-cwd-prefix | fzf +m --cycle --preview-window=right:90%:wrap --preview='bat --color=always {}' --height='45%' | xargs -r edit_or
}
function ytp {
yt-dlp --add-metadata --no-youtube-include-dash-manifest -i --no-cache-dir --geo-bypass -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' "$@"
}
function ytdl {
yt-dlp --add-metadata --no-youtube-include-dash-manifest -i --no-cache-dir --geo-bypass -P "/mnt/samsung/necropolis/vid/" -o "%(title)s.%(ext)s" "$@"
}
function paclist {
xbps-query -m > ~/.config/xbpaketes
}
function bak {
doas mount -t nfs 192.168.0.100:/mnt/wd1/graveyard/ /mnt/vb/graveyard
}
function winclass {
xprop | grep WM_CLASS
}
function upd {
doas xbps-install -Su
echo "Actualizando la lista de paquetes..."
paclist
echo "Listo."
}
function disks {
echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─"; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; dfc -ds;
}
function cbzip {
for i in */; do zip -9 -r "${i%/}.cbz" "$i"; done
}

10
zsh/x/fonts.zsh Normal file
View File

@ -0,0 +1,10 @@
if [ ! -z $DISPLAY ]; then
[[ -d ~/.fonts ]] && xset +fp ~/.fonts 2>/dev/null
[[ -d ~/.local/share/fonts ]] && xset +fp ~/.local/share/fonts/ 2>/dev/null
for font in /usr/share/fonts/*; do
xset +fp "${font}" 2>/dev/null
done
xset fp rehash
fi

View File

@ -1,226 +0,0 @@
export LF_ICONS="\
di= :\
fi= :\
ln= :\
or= :\
ex= :\
.git= :\
doc= :\
etc= :\
mus= :\
img= :\
vid= :\
mail= :\
.mail= :\
.cache= :\
.config= :\
trash= :\
Trash= :\
bin= :\
xresources= :\
xinitrc= :\
.bashprofile= :\
.zprofile= :\
.bashrc= :\
.zshrc= :\
.zshenv= :\
.dmrc= :\
.ds_store= :\
.fasd= :\
.gitconfig= :\
.gitignore= :\
gitignore= :\
.jack-settings= :\
.mime.types= :\
.pam_environment= :\
.profile= :\
.recently-used= :\
.selected_editor= :\
.vimrc= :\
config= :\
exact-match-case-sensitive-1.txt=X1:\
exact-match-case-sensitive-2=X2:\
favicon.ico= :\
gruntfile.coffee= :\
gruntfile.js= :\
gruntfile.ls= :\
gulpfile.coffee= :\
gulpfile.js= :\
gulpfile.ls= :\
ini= :\
ledger= :\
mimeapps.list= :\
node_modules= :\
procfile= :\
react.jsx= :\
user-dirs.dirs= :\
Makefile= :\
TODO= :\
LICENSE= :\
COPYING= :\
*.vim= :\
*.dmg= :\
*.toml= :\
*.m3u= :\
*.pls= :\
*.woff=𝑾:\
*.woff2=𝑾:\
*.eot=𝑬:\
*.yaml= :\
*.yml= :\
*.wad=ﰁ :\
*.WAD=ﰁ :\
*.pk3= :\
*.doc= :\
*.docx= :\
*.webp= :\
*.bib=﬜ :\
*.7z= :\
*.ai= :\
*.apk= :\
*.avi= :\
*.bat= :\
*.bmp= :\
*.bz2= :\
*.c= :\
*.c++= :\
*.cab= :\
*.cbr= :\
*.cbz= :\
*.cc= :\
*.clj= :\
*.cljc= :\
*.cljs= :\
*.coffee= :\
*.conf= :\
*.cp= :\
*.cpio= :\
*.cpp= :\
*.css= :\
*.cxx= :\
*.d= :\
*.dart= :\
*.db= :\
*.deb= :\
*.diff= :\
*.dump= :\
*.edn= :\
*.ejs= :\
*.epub= :\
*.erl= :\
*.exe= :\
*.f#= :\
*.fish= :\
*.flac= :\
*.flv= :\
*.fs= :\
*.fsi= :\
*.fsscript= :\
*.fsx= :\
*.gem= :\
*.gif= :\
*.go= :\
*.gz= :\
*.gzip= :\
*.hbs= :\
*.hrl= :\
*.hs= :\
*.htm= :\
*.html= :\
*.ico= :\
*.ini= :\
*.java= :\
*.jl= :\
*.jpeg= :\
*.jpg= :\
*.js= :\
*.json= :\
*.jsx= :\
*.less= :\
*.lha= :\
*.lhs= :\
*.log= :\
*.lua= :\
*.lzh= :\
*.lzma= :\
*.m4a= :\
*.markdown= :\
*.md= :\
*.mkv= :\
*.ml=λ:\
*.mli=λ:\
*.mov= :\
*.mp3= :\
*.mp4= :\
*.mpeg= :\
*.mpg= :\
*.mustache= :\
*.ogg= :\
*.pdf= :\
*.php= :\
*.pl= :\
*.pm= :\
*.png= :\
*.psb= :\
*.psd= :\
*.py= :\
*.pyc= :\
*.pyd= :\
*.pyo= :\
*.rar= :\
*.rb= :\
*.rc= :\
*.rlib= :\
*.rpm= :\
*.rs= :\
*.rss= :\
*.scala= :\
*.scss= :\
*.sh= :\
*.slim= :\
*.sln= :\
*.sql= :\
*.styl= :\
*.suo= :\
*.t= :\
*.tar= :\
*.tgz= :\
*.ts= :\
*.twig= :\
*.wav= :\
*.webm= :\
*.xml= :\
*.xul= :\
*.xz= :\
*.zip= :\
*.zsh= :\
*.kra= :\
*.xcf= :\
*.go= :\
*.tex= :\
*.txt= :\
*.lock= :\
*.h= :\
*.o= :\
*.blend= :\
*.1= :\
*.jar= :\
*.desktop= :\
*.mk= :\
*.torrent= :\
*.added= :\
*.pem= :\
*.svg= :\
*.scd= :\
*.theme= :\
*.iso= :\
*.mid= :\
*.url= :\
*.part= :\
*.nfo= :\
*.pd= :\
*.ttf= :\
*.otf= :\
*.bdf= :\
*.pcf= :\
"