diff options
Diffstat (limited to '.config')
52 files changed, 542 insertions, 2158 deletions
diff --git a/.config/Thunar/accels.scm b/.config/Thunar/accels.scm index b140458..520380d 100644 --- a/.config/Thunar/accels.scm +++ b/.config/Thunar/accels.scm @@ -1,4 +1,4 @@ -; Thunar GtkAccelMap rc-file -*- scheme -*- +; thunar GtkAccelMap rc-file -*- scheme -*- ; this file is an automated accelerator map dump ; ; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-type" "") diff --git a/.config/X11/Xresources b/.config/X11/Xresources index fcc61aa..9ce1a52 100644 --- a/.config/X11/Xresources +++ b/.config/X11/Xresources @@ -1,12 +1,12 @@ -Xcursor.size: 40 -Xcursor.theme: Banana +Xcursor.theme: elementary +Xcursor.size: 32 !! Transparency (0-1): st.alpha: 0.95 st.alphaOffset: 0.1 !! Set a default font and font size as below: -st.font: MesloLGS Nerd\ Font:size=17 +*.font: monospace:size=16 ! st.termname: st-256color ! st.borderpx: 2 diff --git a/.config/X11/xprofile b/.config/X11/xprofile index 46c2b18..ebd736b 100644 --- a/.config/X11/xprofile +++ b/.config/X11/xprofile @@ -2,16 +2,18 @@ # gui -e +setdp xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xresources" & xrdbpid=$! numlockx on & logdir="${XDG_STATE_HOME:-$HOME/.local/state}/startup" -autostart="copyq dunst pipewire syncthing remapd gammastep setdp prime-offload" +autostart="copyq dunst pipewire syncthing remapd setdp gammastep prime-offload mailsyncd background-cleanup" +sleep 1 mkdir -pv "$logdir" for program in $autostart; do pidof -sx "$program" || "$program" >"$logdir/$program.stdout.log" 2>"$logdir/$program.stderr.log" & done -{ sleep 5; wireplumber; } & +{ sleep 5 && wireplumber; } & [ -n "$xrdbpid" ] && wait "$xrdbpid" diff --git a/.config/Zeal/Zeal.conf b/.config/Zeal/Zeal.conf index 2344fae..7b4d6ad 100644 --- a/.config/Zeal/Zeal.conf +++ b/.config/Zeal/Zeal.conf @@ -1,6 +1,6 @@ [General] check_for_update=true -hide_on_close=false +hide_on_close=true minimize_to_systray=false show_systray_icon=true start_minimized=false @@ -25,7 +25,7 @@ smooth_scrolling=true path=/home/master/.local/share/Zeal/Zeal/docsets [global_shortcuts] -show=Meta+/ +show=Meta+Z [internal] install_id=7cf1e6a2-9a52-4dfc-a7de-bc1acd562804 diff --git a/.config/git/config b/.config/git/config index e63dac2..5ad6ffe 100644 --- a/.config/git/config +++ b/.config/git/config @@ -3,3 +3,5 @@ name = Vikas Kushwaha [init] defaultBranch = master +[http] + postbuffer = 10g diff --git a/.config/gtk-2.0/gtkrc-2.0 b/.config/gtk-2.0/gtkrc-2.0 index 73dbc57..3b9adea 100644 --- a/.config/gtk-2.0/gtkrc-2.0 +++ b/.config/gtk-2.0/gtkrc-2.0 @@ -4,9 +4,8 @@ include "/home/master/.gtkrc-2.0.mine" gtk-theme-name="Arc-Dark" gtk-icon-theme-name="Gruvbox-Plus-Dark" -gtk-font-name="Fira Sans 14" -gtk-cursor-theme-size=24 -gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-font-name="Fira Sans 16" +gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=1 gtk-menu-images=1 @@ -16,4 +15,3 @@ gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle="hintmedium" gtk-xft-rgba="none" -gtk-modules="canberra-gtk-module:gail:atk-bridge" diff --git a/.config/gtk-2.0/gtkrc-2.0.bak b/.config/gtk-2.0/gtkrc-2.0.bak deleted file mode 100644 index c8d0af9..0000000 --- a/.config/gtk-2.0/gtkrc-2.0.bak +++ /dev/null @@ -1,20 +0,0 @@ -# DO NOT EDIT! This file will be overwritten by LXAppearance. -# Any customization should be done in ~/.gtkrc-2.0.mine instead. - -include "/home/master/.gtkrc-2.0.mine" -gtk-theme-name="Arc-Dark" -gtk-icon-theme-name="Gruvbox-Material-Dark" -gtk-font-name="Fira Sans 14" -gtk-cursor-theme-name="Qogir-dark" -gtk-cursor-theme-size=24 -gtk-toolbar-style=GTK_TOOLBAR_ICONS -gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=1 -gtk-menu-images=1 -gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=1 -gtk-xft-antialias=1 -gtk-xft-hinting=1 -gtk-xft-hintstyle="hintfull" -gtk-xft-rgba="none" -gtk-modules="canberra-gtk-module:gail:atk-bridge" diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index ce89467..d02b49f 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -8,8 +8,8 @@ gtk-font-name=Fira Sans 16 gtk-menu-images=1 gtk-button-images=1 gtk-toolbar-style=GTK_TOOLBAR_BOTH -gtk-cursor-theme-name=Banana -gtk-cursor-theme-size=40 +gtk-cursor-theme-name=elementary +gtk-cursor-theme-size=32 gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-enable-event-sounds=1 gtk-enable-input-feedback-sounds=1 diff --git a/.config/i3/config b/.config/i3/config index 952f000..12cbff0 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -18,6 +18,7 @@ # exec --no-startup-id pasystray exec st -c dropdown_tmuxdd -e tmux new -A -s ddterm +exec sh -c "sleep 1 && i3-msg scratchpad show" ################################ ### Commonly Used Variables: ### @@ -27,11 +28,6 @@ exec st -c dropdown_tmuxdd -e tmux new -A -s ddterm # - Make sure that you give the absolute path to the binary / program / executable # - You may specify any additional arguments required by the binary / executable -### Wallpaper: ### -# - You need to specify homescreen wallpaper using azote -set $lockScreenWallpaper '/usr/share/wallpapers/garuda-wallpapers/Garuda-Desert.png' -set $homeScreenWallpaper '/usr/share/wallpapers/garuda-wallpapers/background.jpg' - ### Applications: ### set $preferredTerminalEmulator $TERMINAL set $preferredBrowser librewolf @@ -50,6 +46,7 @@ set $right l set $super Mod4 set $alt Mod1 +set $passmenu '$PASSWORD_STORE_DIR=$HOME/Phone/Backup/pass passmenu' @@ -59,11 +56,13 @@ set $alt Mod1 bindsym $super+F2 exec --no-startup-id dmenu-unicode bindsym $super+Shift+F2 exec --no-startup-id dmenu-unicode get-code -bindsym $super+F3 exec --no-startup-id st -c "dropdown_sender" -e fsend -bindsym $super+F4 exec --no-startup-id passmenu -bindsym $super+Shift+F4 exec --no-startup-id passmenu --type +bindsym $super+F3 exec --no-startup-id dmenu-file-history +bindsym $super+F4 exec --no-startup-id $passmenu +bindsym $super+Shift+F4 exec --no-startup-id $passmenu --type bindsym $super+F5 exec --no-startup-id dmenu-zeal +bindsym $super+F6 exec --no-startup-id st -c "dropdown_sender" -e fsend bindsym $super+F7 exec --no-startup-id sh -c 'find ~/.librewolf -mindepth 1 -maxdepth 1 -type d -name '????????.*' -printf "%f\n" | cut -d. -f2- | dmenu -p "LibreWolf Profile" | xargs -I{} setsid -f librewolf -P "{}"' +bindsym $super+F8 exec --no-startup-id sh -c 'yth dmenu | xclip -in -sel clip' bindsym $super+b exec --no-startup-id librewolf-open bindsym $super+c exec --no-startup-id edit-graphical-buffer bindsym $super+x exec --no-startup-id toggle-xeyes @@ -100,7 +99,9 @@ bindsym Ctrl+Print exec --no-startup-id $preferredScreenCaptureTool # - $TERMINAL & xfce4-terminal can also be started using their individual keybindings bindsym $super+Return exec --no-startup-id $preferredTerminalEmulator +bindsym $super+Shift+Return exec --no-startup-id sh -c 'cd "$(tail -1 $CD_HISTFILE)" && $TERMINAL' bindsym $super+t exec --no-startup-id xfce4-terminal +bindsym $super+Shift+t exec --no-startup-id notify-send Temprature "$(sensors --no-adapter coretemp-isa-0000 | tail +2 | sed "s|(.*)||")" font pango: source code pro 16 @@ -168,13 +169,13 @@ bindsym $super+Ctrl+Left exec $brightnessDown bindsym $super+Ctrl+Up exec --no-startup-id $raiseVolume bindsym $super+Ctrl+Down exec --no-startup-id $lowerVolume -bindsym $super+Ctrl+Insert exec --no-startup-id $muteOutput -bindsym $super+Ctrl+Del exec --no-startup-id $muteInput +bindsym $super+Ctrl+Home exec --no-startup-id volctl toggle +bindsym $super+Ctrl+End exec --no-startup-id $muteInput bindsym $super+Ctrl+Next exec $nextAudio bindsym $super+Ctrl+Prior exec $prevAudio -bindsym $super+Ctrl+Home exec $playAudio -bindsym $super+Ctrl+End exec $stopAudio +# bindsym $super+Ctrl+Home exec $playAudio +# bindsym $super+Ctrl+End exec $stopAudio # bindsym XF86TouchpadToggle exec ~/bin/toggletouchpad.sh @@ -194,6 +195,7 @@ bindsym $super+Shift+Print --release exec --no-startup-id i3-scrot -s # kill focused window bindsym $super+q kill +bindsym $super+Shift+q exec xkill -id "$(xdotool getactivewindow)" # split in horizontal orientation # bindsym $super+apostrophe split h @@ -283,15 +285,10 @@ bindsym $super+Shift+Right move right ################## # navigate workspaces -bindsym $super+bracketleft workspace $ws1 bindsym $super+n workspace next bindsym $super+p workspace prev -bindsym $super+bracketright workspace $ws10 - -bindsym $super+Home workspace $ws1 bindsym $super+Prior workspace prev bindsym $super+Next workspace next -bindsym $super+End workspace $ws10 bindsym $super+Tab workspace back_and_forth bindsym $super+Shift+Tab move container to workspace back_and_forth; workspace back_and_forth @@ -406,7 +403,6 @@ workspace $ws7 output "HDMI-0" workspace $ws8 output "HDMI-0" workspace $ws9 output "HDMI-0" workspace $ws10 output "HDMI-0" -workspace "12: W " output "HDMI-0" #################### @@ -467,6 +463,7 @@ for_window [window_type='dialog'] move position center for_window [title="Android Emulator - *"] floating enable border none sticky enable for_window [title="Emulator"] floating enable border none sticky enable for_window [class="mpv"] floating enable +for_window [class="flameshot"] floating enable # for_window [class="Zeal"] floating enable move position below # #---Dropdown Windows---# # @@ -546,6 +543,7 @@ bar { bar { output nonprimary + status_command exec i3blocks -c ~/.config/i3blocks/bar2 bindsym --release button3 exec jgmenu --at-pointer workspace_min_width 40 strip_workspace_numbers yes @@ -642,6 +640,6 @@ mode "$mode_system" { # TODO: create your own i3exit script as ?syst-power # Lock screen -bindsym $super+Escape exec i3lock -t -i $lockScreenWallpaper +bindsym $super+Escape exec i3exit lock # exec_always xrandr --output eDP-1-1-1 --auto --primary diff --git a/.config/i3blocks/bar2 b/.config/i3blocks/bar2 new file mode 100644 index 0000000..575a78d --- /dev/null +++ b/.config/i3blocks/bar2 @@ -0,0 +1,87 @@ +# i3blocks configuration file +# +# The i3blocks man page describes the usage of the binary, +# and its website describes the configuration: +# https://vivien.github.io/i3blocks +# +# List of valid properties: +# align +# color +# command +# full_text +# instance +# interval +# label +# min_width +# name +# separator +# separator_block_width +# short_text +# signal +# urgent + + +# Global properties +separator=false +separator_block_width=60 + +# Guess the weather hourly +[weather] +separator=true +separator_block_width=50 +command=i3weather info +interval=1800 +color=#A4C2F4 + +# [badwidth] +# seprator=false +# command=echo "$(i3bandwidth)" +# interval=1 + +# [wifi] +# # command=echo "📡 $(i3wifi wlp0s20f3)" +# command=i3wifi wlp0s20f3 +# interval=1 + +# [battery] +# command=i3battery +# interval=1 + +# [cpu] +# command=echo " $(i3cpu)" +# interval=3 + +# [memory] +# separator=true +# separator_block_width=50 +# command=echo " $(i3memory)" +# interval=1 + +[disk_root] +label= +instance=/ +interval=30 +command=disk_usage + +[disk-io] +separator=true +separator_block_width=60 +command=disk-io +#command=$SCRIPT_DIR/disk-io -w 3 -M -P 0 +interval=persist +markup=pango +LABEL= +#instance=/^sda/ +#DT=5 +#MB_ONLY=0 #0 or 1 +#KB_ONLY=0 #0 or 1 +#WIDTH=4 +#MB_PRECISION=1 +#KB_PRECISION=0 +#REGEX=/^(s|h)d[a-zA-Z]+/ +#THRESHOLD=0 +#WARN_COLOR="#FF0000" +#SEPARATOR=/ +#PREFIX= +#SUFFIX="B/s" + diff --git a/.config/i3blocks/config b/.config/i3blocks/config index 638f638..8b7838c 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -29,7 +29,7 @@ separator_block_width=35 [weather] separator=true separator_block_width=50 -command=i3weather +command=i3weather cache interval=1800 color=#A4C2F4 @@ -58,13 +58,18 @@ command=echo " $(i3memory)" interval=1 [datetime] -separator=false -separator_block_width=25 -# command=case "$BLOCK_BUTTON" in 1) TERM=256colors clearx -n 'cal -y --color=always | less' ;; 2) $TERMINAL -e nvim ~/.config/i3blocks/config ;; esac; date +'🕒 %H:%M:%S 🗓️ %a %d.%m.%Y ' -command=case "$BLOCK_BUTTON" in 1) $TERMINAL -e sh -c 'cal -y --color=always | less' ;; 2) $TERMINAL -e nvim ~/.config/i3blocks/config ;; esac; date +' %H:%M:%S %a %d.%m.%Y ' -color=#CCFFFF +separator=true +command=sb-clock +color=#BBDDDD interval=1 +# [cross] +# separator=true +# separator_block_width=25 +# command=echo "☦" +# color=#CCFFFF +# interval=once + # [ip] # command=hostname -i # | awk '{ print "IP:" $1 }' # interval=once diff --git a/.config/i3blocks/systeminfo b/.config/i3blocks/systeminfo deleted file mode 100644 index 68a6944..0000000 --- a/.config/i3blocks/systeminfo +++ /dev/null @@ -1,50 +0,0 @@ -# i3blocks configuration file -# -# The i3blocks man page describes the usage of the binary, -# and its website describes the configuration: -# https://vivien.github.io/i3blocks -# -# List of valid properties: -# align -# color -# command -# full_text -# instance -# interval -# label -# min_width -# name -# separator -# separator_block_width -# short_text -# signal -# urgent - - -# Global properties -separator=false -separator_block_width=35 - -[badwidth] -seprator=false -command=echo "$(i3bandwidth)" -interval=1 - -[wifi] -# command=echo "📡 $(i3wifi wlp0s20f3)" -command=i3wifi wlp0s20f3 -interval=1 - -[battery] -command=i3battery -interval=1 - -[cpu] -command=echo " $(i3cpu)" -interval=3 - -[memory] -separator=true -separator_block_width=50 -command=echo " $(i3memory)" -interval=1 diff --git a/.config/keepassxc/keepassxc.ini b/.config/keepassxc/keepassxc.ini index be49131..c84bbd3 100644 --- a/.config/keepassxc/keepassxc.ini +++ b/.config/keepassxc/keepassxc.ini @@ -17,9 +17,11 @@ CheckForUpdates=false CompactMode=false HidePreviewPanel=true HideToolbar=false -MinimizeOnClose=false +MinimizeOnClose=true MinimizeOnStartup=true -TrayIconAppearance=monochrome-light +MinimizeToTray=true +ShowTrayIcon=true +TrayIconAppearance=colorful [KeeShare] Active="<?xml version=\"1.0\"?><KeeShare><Active/></KeeShare>\n" diff --git a/.config/lf/lfrc b/.config/lf/lfrc index a9b2874..2d10228 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -112,13 +112,13 @@ map <backtab> :toggle; up map Z :toggle; up map <c-j> select_eval "fzf --reverse --track --header-first --header='Jump to location' --query \"^${f##*/}$\" --bind 'load:change-query(!/$ )'" map <backspace> ${{ lf -remote "send $id select \"$(cat "${OPEN_HISTFILE:-${XDG_STATE_HOME:-$HOME/.local/state}/open_history}" | - fzf --reverse --tac --header-first --header='File History')\"" }} + fzf --reverse --tac --no-sort --header-first --header='File History')\"" }} map <c-k> ${{ lf -remote "send $id cd \"$(cat ${CD_HISTFILE:-${XDG_STATE_HOME:-$HOME/.local/state}/cd_history} | - fzf --reverse --tac --header-first --header='Path History')\"" }} + fzf --reverse --tac --no-sort --header-first --header='Path History')\"" }} map <c-c> select_eval "fzf --reverse --track --header-first --header='Jump to location' --query \"^${f##*/}/$\" --bind 'load:change-query(/$ )'" -map c map d +map c push :$mk<space>""<c-b> map I :rename; cmd-home map i :rename; cmd-word-back; cmd-left map a :rename; cmd-right @@ -128,12 +128,12 @@ map o $LESSOPEN="|preview %s" less -r $f map O $mimeopen --ask $f map . set hidden! map x cut -map M $lf -remote "send $id select \"$(FZF_DEFAULT_OPTS="--track --query '^${f##*/}$' --bind 'load:clear-query'" fmd)\"" +map M $lf -remote "send $id select \"$(FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --track --query '^${f##*/}$' --bind 'load:clear-query'" fmd)\"" map D delete map W $setsid -f $TERMINAL >/dev/null 2>&1 map X !$f -map T push :$touch<space>""<c-b> map b $vidir +map B $find . | vidir - map V push :!nvim<space>""<c-b> map P :link diff --git a/.config/nvim/autoload/airline/themes/onedark.vim b/.config/nvim/autoload/airline/themes/onedark.vim deleted file mode 100644 index 65181dd..0000000 --- a/.config/nvim/autoload/airline/themes/onedark.vim +++ /dev/null @@ -1,130 +0,0 @@ -" [onedark.vim](https://github.com/joshdick/onedark.vim/) - -" This is a [vim-airline](https://github.com/vim-airline/vim-airline) theme for use with -" the [onedark.vim](https://github.com/joshdick/onedark.vim) colorscheme. - -" It is based on vim-airline's ["tomorrow" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/tomorrow.vim). -function! airline#themes#onedark#refresh() - let s:colors = onedark#GetColors() - - if get(g:, 'onedark_termcolors', 256) == 16 - let s:term_red = s:colors.red.cterm16 - let s:term_green = s:colors.green.cterm16 - let s:term_yellow = s:colors.yellow.cterm16 - let s:term_blue = s:colors.blue.cterm16 - let s:term_purple = s:colors.purple.cterm16 - let s:term_white = s:colors.white.cterm16 - let s:term_cursor_grey = s:colors.cursor_grey.cterm16 - let s:term_visual_grey = s:colors.visual_grey.cterm16 - else - let s:term_red = s:colors.red.cterm - let s:term_green = s:colors.green.cterm - let s:term_yellow = s:colors.yellow.cterm - let s:term_blue = s:colors.blue.cterm - let s:term_purple = s:colors.purple.cterm - let s:term_white = s:colors.white.cterm - let s:term_cursor_grey = s:colors.cursor_grey.cterm - let s:term_visual_grey = s:colors.visual_grey.cterm - endif - - let g:airline#themes#onedark#palette = {} - - let g:airline#themes#onedark#palette.accents = { - \ 'red': [ s:colors.red.gui, '', s:term_red, 0 ] - \ } - - let s:N1 = [ s:colors.cursor_grey.gui, s:colors.green.gui, s:term_cursor_grey, s:term_green ] - let s:N2 = [ s:colors.white.gui, s:colors.visual_grey.gui, s:term_white, s:term_visual_grey ] - let s:N3 = [ s:colors.green.gui, s:colors.cursor_grey.gui, s:term_green, s:term_cursor_grey ] - let g:airline#themes#onedark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) - - let group = airline#themes#get_highlight('vimCommand') - let g:airline#themes#onedark#palette.normal_modified = { - \ 'airline_c': [ group[0], '', group[2], '', '' ] - \ } - - let s:I1 = [ s:colors.cursor_grey.gui, s:colors.blue.gui, s:term_cursor_grey, s:term_blue ] - let s:I2 = s:N2 - let s:I3 = [ s:colors.blue.gui, s:colors.cursor_grey.gui, s:term_blue, '' ] - let g:airline#themes#onedark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) - let g:airline#themes#onedark#palette.insert_modified = g:airline#themes#onedark#palette.normal_modified - - let s:R1 = [ s:colors.cursor_grey.gui, s:colors.red.gui, s:term_cursor_grey, s:term_red ] - let s:R2 = s:N2 - let s:R3 = [ s:colors.red.gui, s:colors.cursor_grey.gui, s:term_red, '' ] - let g:airline#themes#onedark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) - let g:airline#themes#onedark#palette.replace_modified = g:airline#themes#onedark#palette.normal_modified - - let s:V1 = [ s:colors.cursor_grey.gui, s:colors.purple.gui, s:term_cursor_grey, s:term_purple ] - let s:V2 = s:N2 - let s:V3 = [ s:colors.purple.gui, s:colors.cursor_grey.gui, s:term_purple, '' ] - let g:airline#themes#onedark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) - let g:airline#themes#onedark#palette.visual_modified = g:airline#themes#onedark#palette.normal_modified - - let s:IA1 = [ s:colors.cursor_grey.gui, s:colors.white.gui, s:term_cursor_grey, s:term_white ] - let s:IA2 = [ s:colors.white.gui, s:colors.visual_grey.gui, s:term_white, s:term_visual_grey ] - let s:IA3 = s:N2 - let g:airline#themes#onedark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3) - let g:airline#themes#onedark#palette.inactive_modified = { - \ 'airline_c': [ group[0], '', group[2], '', '' ] - \ } - - " Warning/Error styling code from vim-airline's ["base16" theme](https://github.com/vim-airline/vim-airline-themes/blob/master/autoload/airline/themes/base16.vim) - - " Warnings - let s:WI = [ s:colors.cursor_grey.gui, s:colors.yellow.gui, s:term_cursor_grey, s:term_yellow ] - let g:airline#themes#onedark#palette.normal.airline_warning = [ - \ s:WI[0], s:WI[1], s:WI[2], s:WI[3] - \ ] - - let g:airline#themes#onedark#palette.normal_modified.airline_warning = - \ g:airline#themes#onedark#palette.normal.airline_warning - - let g:airline#themes#onedark#palette.insert.airline_warning = - \ g:airline#themes#onedark#palette.normal.airline_warning - - let g:airline#themes#onedark#palette.insert_modified.airline_warning = - \ g:airline#themes#onedark#palette.normal.airline_warning - - let g:airline#themes#onedark#palette.visual.airline_warning = - \ g:airline#themes#onedark#palette.normal.airline_warning - - let g:airline#themes#onedark#palette.visual_modified.airline_warning = - \ g:airline#themes#onedark#palette.normal.airline_warning - - let g:airline#themes#onedark#palette.replace.airline_warning = - \ g:airline#themes#onedark#palette.normal.airline_warning - - let g:airline#themes#onedark#palette.replace_modified.airline_warning = - \ g:airline#themes#onedark#palette.normal.airline_warning - - " Errors - let s:ER = [ s:colors.cursor_grey.gui, s:colors.red.gui, s:term_cursor_grey, s:term_red ] - let g:airline#themes#onedark#palette.normal.airline_error = [ - \ s:ER[0], s:ER[1], s:ER[2], s:ER[3] - \ ] - - let g:airline#themes#onedark#palette.normal_modified.airline_error = - \ g:airline#themes#onedark#palette.normal.airline_error - - let g:airline#themes#onedark#palette.insert.airline_error = - \ g:airline#themes#onedark#palette.normal.airline_error - - let g:airline#themes#onedark#palette.insert_modified.airline_error = - \ g:airline#themes#onedark#palette.normal.airline_error - - let g:airline#themes#onedark#palette.visual.airline_error = - \ g:airline#themes#onedark#palette.normal.airline_error - - let g:airline#themes#onedark#palette.visual_modified.airline_error = - \ g:airline#themes#onedark#palette.normal.airline_error - - let g:airline#themes#onedark#palette.replace.airline_error = - \ g:airline#themes#onedark#palette.normal.airline_error - - let g:airline#themes#onedark#palette.replace_modified.airline_error = - \ g:airline#themes#onedark#palette.normal.airline_error - -endfunction - -call airline#themes#onedark#refresh() diff --git a/.config/nvim/autoload/lightline/colorscheme/onedark.vim b/.config/nvim/autoload/lightline/colorscheme/onedark.vim deleted file mode 100644 index d04a501..0000000 --- a/.config/nvim/autoload/lightline/colorscheme/onedark.vim +++ /dev/null @@ -1,58 +0,0 @@ -" [onedark.vim](https://github.com/joshdick/onedark.vim/) - -" This is a [lightline.vim](https://github.com/itchyny/lightline.vim) colorscheme for use with -" the [onedark.vim](https://github.com/joshdick/onedark.vim) colorscheme. - -let s:colors = onedark#GetColors() - -if get(g:, 'onedark_termcolors', 256) == 16 - let s:term_red = s:colors.red.cterm16 - let s:term_green = s:colors.green.cterm16 - let s:term_yellow = s:colors.yellow.cterm16 - let s:term_blue = s:colors.blue.cterm16 - let s:term_purple = s:colors.purple.cterm16 - let s:term_white = s:colors.white.cterm16 - let s:term_cursor_grey = s:colors.cursor_grey.cterm16 - let s:term_visual_grey = s:colors.visual_grey.cterm16 -else - let s:term_red = s:colors.red.cterm - let s:term_green = s:colors.green.cterm - let s:term_yellow = s:colors.yellow.cterm - let s:term_blue = s:colors.blue.cterm - let s:term_purple = s:colors.purple.cterm - let s:term_white = s:colors.white.cterm - let s:term_cursor_grey = s:colors.cursor_grey.cterm - let s:term_visual_grey = s:colors.visual_grey.cterm -endif - -let s:red = [ s:colors.red.gui, s:term_red ] -let s:green = [ s:colors.green.gui, s:term_green ] -let s:yellow = [ s:colors.yellow.gui, s:term_yellow ] -let s:blue = [ s:colors.blue.gui, s:term_blue ] -let s:purple = [ s:colors.purple.gui, s:term_purple ] -let s:white = [ s:colors.white.gui, s:term_white ] -let s:cursor_grey = [ s:colors.cursor_grey.gui, s:term_cursor_grey ] -let s:visual_grey = [ s:colors.visual_grey.gui, s:term_visual_grey ] - -let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} -let s:p.normal.left = [ [ s:cursor_grey, s:green ], [ s:white, s:visual_grey ] ] -let s:p.normal.right = [ [ s:cursor_grey, s:green ], [ s:white, s:visual_grey ] ] -let s:p.inactive.left = [ [ s:white, s:visual_grey ], [ s:white, s:visual_grey ] ] -let s:p.inactive.right = [ [ s:cursor_grey, s:white ], [ s:cursor_grey, s:white ] ] -let s:p.insert.left = [ [ s:cursor_grey, s:blue ], [ s:white, s:visual_grey ] ] -let s:p.insert.right = [ [ s:cursor_grey, s:blue ], [ s:white, s:visual_grey ] ] -let s:p.replace.left = [ [ s:cursor_grey, s:red ], [ s:white, s:visual_grey ] ] -let s:p.replace.right = [ [ s:cursor_grey, s:red ], [ s:white, s:visual_grey ] ] -let s:p.visual.left = [ [ s:cursor_grey, s:purple ], [ s:white, s:visual_grey ] ] -let s:p.visual.right = [ [ s:cursor_grey, s:purple ], [ s:white, s:visual_grey ] ] -let s:p.normal.middle = [ [ s:white, s:cursor_grey ] ] -let s:p.inactive.middle = [ [ s:white, s:visual_grey ] ] -let s:p.tabline.left = [ [ s:white, s:visual_grey ] ] -let s:p.tabline.tabsel = [ [ s:cursor_grey, s:white ] ] -let s:p.tabline.middle = [ [ s:white, s:cursor_grey ] ] -let s:p.tabline.right = [ [ s:white, s:visual_grey ] ] -let s:p.normal.error = [ [ s:cursor_grey, s:red ] ] -let s:p.normal.warning = [ [ s:cursor_grey, s:yellow ] ] - -let g:lightline#colorscheme#onedark#palette = lightline#colorscheme#flatten(s:p) - diff --git a/.config/nvim/autoload/onedark.vim b/.config/nvim/autoload/onedark.vim deleted file mode 100644 index 4630ff4..0000000 --- a/.config/nvim/autoload/onedark.vim +++ /dev/null @@ -1,29 +0,0 @@ -" [onedark.vim](https://github.com/joshdick/onedark.vim/) - -let s:overrides = get(g:, "onedark_color_overrides", {}) - -let s:colors = { - \ "red": get(s:overrides, "red", { "gui": "#E06C75", "cterm": "204", "cterm16": "1" }), - \ "dark_red": get(s:overrides, "dark_red", { "gui": "#BE5046", "cterm": "196", "cterm16": "9" }), - \ "green": get(s:overrides, "green", { "gui": "#98C379", "cterm": "114", "cterm16": "2" }), - \ "yellow": get(s:overrides, "yellow", { "gui": "#E5C07B", "cterm": "180", "cterm16": "3" }), - \ "dark_yellow": get(s:overrides, "dark_yellow", { "gui": "#D19A66", "cterm": "173", "cterm16": "11" }), - \ "blue": get(s:overrides, "blue", { "gui": "#61AFEF", "cterm": "39", "cterm16": "4" }), - \ "purple": get(s:overrides, "purple", { "gui": "#C678DD", "cterm": "170", "cterm16": "5" }), - \ "cyan": get(s:overrides, "cyan", { "gui": "#56B6C2", "cterm": "38", "cterm16": "6" }), - \ "white": get(s:overrides, "white", { "gui": "#ABB2BF", "cterm": "145", "cterm16": "15" }), - \ "black": get(s:overrides, "black", { "gui": "#282C34", "cterm": "235", "cterm16": "0" }), - \ "foreground": get(s:overrides, "foreground", { "gui": "#ABB2BF", "cterm": "145", "cterm16": "NONE" }), - \ "background": get(s:overrides, "background", { "gui": "#282C34", "cterm": "235", "cterm16": "NONE" }), - \ "comment_grey": get(s:overrides, "comment_grey", { "gui": "#5C6370", "cterm": "59", "cterm16": "7" }), - \ "gutter_fg_grey": get(s:overrides, "gutter_fg_grey", { "gui": "#4B5263", "cterm": "238", "cterm16": "8" }), - \ "cursor_grey": get(s:overrides, "cursor_grey", { "gui": "#2C323C", "cterm": "236", "cterm16": "0" }), - \ "visual_grey": get(s:overrides, "visual_grey", { "gui": "#3E4452", "cterm": "237", "cterm16": "8" }), - \ "menu_grey": get(s:overrides, "menu_grey", { "gui": "#3E4452", "cterm": "237", "cterm16": "7" }), - \ "special_grey": get(s:overrides, "special_grey", { "gui": "#3B4048", "cterm": "238", "cterm16": "7" }), - \ "vertsplit": get(s:overrides, "vertsplit", { "gui": "#3E4452", "cterm": "59", "cterm16": "7" }), - \} - -function! onedark#GetColors() - return s:colors -endfunction diff --git a/.config/nvim/coc.vim b/.config/nvim/coc.vim new file mode 100644 index 0000000..2ba6c06 --- /dev/null +++ b/.config/nvim/coc.vim @@ -0,0 +1,49 @@ +source ~/.config/nvim/init.vim + +packadd! onedark.vim +" packadd! fzf +" packadd! fzf.vim +packadd! vim-jsx-pretty +" packadd! copilot.vim + +" --> Fzf +" source ~/.config/nvim/plugins.conf.d/fzf.vim +" set rtp+=/usr/share/vim/vimfiles + +" --> Zeal +source ~/.config/nvim/plugins.conf.d/zeal.vim + +" --> Onedark theme +source ~/.config/nvim/plugins.conf.d/onedark.vim + +" --> Vimspector +source ~/.config/nvim/plugins.conf.d/vimspector.vim + +" --> COC +autocmd! User coc.nvim source $HOME/.config/nvim/plugins.conf.d/coc-onload.vim +let g:coc_config_home = '$HOME/.config/nvim/plugins.conf.d' +let g:coc_data_home = '$HOME/.local/share/nvim/site/coc' +let g:coc_global_extensions = [ + \ 'coc-json', + \ 'coc-marketplace', + \ 'coc-css', + \ 'coc-tsserver', + \ 'coc-pyright', + \ 'coc-sh', + \ ] +nnoremap <silent><nowait> <leader>ca :<C-u>CocList diagnostics<cr> +nnoremap <silent><nowait> <leader>ce :<C-u>CocList extensions<cr> +nnoremap <silent><nowait> <leader>cc :<C-u>CocList commands<cr> +nnoremap <silent><nowait> <leader>co :<C-u>CocList outline<cr> +nnoremap <silent><nowait> <leader>cs :<C-u>CocList -I symbols<cr> +nnoremap <silent><nowait> <leader>cj :<C-u>CocNext<CR> +nnoremap <silent><nowait> <leader>ck :<C-u>CocPrev<CR> +nnoremap <silent><nowait> <leader>cp :<C-u>CocListResume<CR> +nnoremap <leader>cm :CocList marketplace<CR> +nnoremap <leader>cff :Format<CR> +inoremap <silent><expr><c-l> coc#refresh() + +nnoremap <leader><C-r> :source ~/.config/nvim/coc.vim<CR> + +AirlineTheme +CocList extensions diff --git a/.config/nvim/colors/onedark.vim b/.config/nvim/colors/onedark.vim deleted file mode 100644 index 6769d6c..0000000 --- a/.config/nvim/colors/onedark.vim +++ /dev/null @@ -1,713 +0,0 @@ -" vim:fdm=marker -" Vim Color File -" Name: onedark.vim -" Maintainer: https://github.com/joshdick/onedark.vim/ -" License: The MIT License (MIT) -" Based On: https://github.com/MaxSt/FlatColor/ - -" Companion statusline plugin and terminal themes are included with onedark.vim: -" * https://github.com/joshdick/onedark.vim#lightlinevim-colorscheme -" * https://github.com/joshdick/onedark.vim#vim-airline-theme -" * https://github.com/joshdick/onedark.vim/tree/main/term - -" Color Reference {{{ - -" The following colors were measured inside Atom using its built-in inspector. - -" +---------------------------------------------+ -" | Color Name | RGB | Hex | -" |--------------+--------------------+---------| -" | Black | rgb(40, 44, 52) | #282c34 | -" |--------------+--------------------+---------| -" | White | rgb(171, 178, 191) | #abb2bf | -" |--------------+--------------------+---------| -" | Light Red | rgb(224, 108, 117) | #e06c75 | -" |--------------+--------------------+---------| -" | Dark Red | rgb(190, 80, 70) | #be5046 | -" |--------------+--------------------+---------| -" | Green | rgb(152, 195, 121) | #98c379 | -" |--------------+--------------------+---------| -" | Light Yellow | rgb(229, 192, 123) | #e5c07b | -" |--------------+--------------------+---------| -" | Dark Yellow | rgb(209, 154, 102) | #d19a66 | -" |--------------+--------------------+---------| -" | Blue | rgb(97, 175, 239) | #61afef | -" |--------------+--------------------+---------| -" | Magenta | rgb(198, 120, 221) | #c678dd | -" |--------------+--------------------+---------| -" | Cyan | rgb(86, 182, 194) | #56b6c2 | -" |--------------+--------------------+---------| -" | Gutter Grey | rgb(76, 82, 99) | #4b5263 | -" |--------------+--------------------+---------| -" | Comment Grey | rgb(92, 99, 112) | #5c6370 | -" +---------------------------------------------+ - -" }}} - -" Initialization {{{ - -highlight clear - -if exists("syntax_on") - syntax reset -endif - -set t_Co=256 - -let g:colors_name="onedark" - -" Set to "256" for 256-color terminals, or -" set to "16" to use your terminal emulator's native colors -" (a 16-color palette for this color scheme is available; see -" < https://github.com/joshdick/onedark.vim/blob/main/README.md > -" for more information.) -if !exists("g:onedark_termcolors") - let g:onedark_termcolors = 256 -endif - -" Not all terminals support italics properly. If yours does, opt-in. -if !exists("g:onedark_terminal_italics") - let g:onedark_terminal_italics = 0 -endif - -" This function is based on one from FlatColor: https://github.com/MaxSt/FlatColor/ -" Which in turn was based on one found in hemisu: https://github.com/noahfrederick/vim-hemisu/ -let s:group_colors = {} " Cache of default highlight group settings, for later reference via `onedark#extend_highlight` -function! s:h(group, style, ...) - if (a:0 > 0) " Will be true if we got here from onedark#extend_highlight - let s:highlight = s:group_colors[a:group] - for style_type in ["fg", "bg", "sp"] - if (has_key(a:style, style_type)) - let l:default_style = (has_key(s:highlight, style_type) ? copy(s:highlight[style_type]) : { "cterm16": "NONE", "cterm": "NONE", "gui": "NONE" }) - let s:highlight[style_type] = extend(l:default_style, a:style[style_type]) - endif - endfor - if (has_key(a:style, "gui")) - let s:highlight.gui = a:style.gui - endif - if (has_key(a:style, "cterm")) - let s:highlight.cterm = a:style.cterm - endif - else - let s:highlight = a:style - let s:group_colors[a:group] = s:highlight " Cache default highlight group settings - endif - - if g:onedark_terminal_italics == 0 - if has_key(s:highlight, "cterm") && s:highlight["cterm"] == "italic" - unlet s:highlight.cterm - endif - if has_key(s:highlight, "gui") && s:highlight["gui"] == "italic" - unlet s:highlight.gui - endif - endif - - if g:onedark_termcolors == 16 - let l:ctermfg = (has_key(s:highlight, "fg") ? s:highlight.fg.cterm16 : "NONE") - let l:ctermbg = (has_key(s:highlight, "bg") ? s:highlight.bg.cterm16 : "NONE") - else - let l:ctermfg = (has_key(s:highlight, "fg") ? s:highlight.fg.cterm : "NONE") - let l:ctermbg = (has_key(s:highlight, "bg") ? s:highlight.bg.cterm : "NONE") - endif - - execute "highlight" a:group - \ "guifg=" (has_key(s:highlight, "fg") ? s:highlight.fg.gui : "NONE") - \ "guibg=" (has_key(s:highlight, "bg") ? s:highlight.bg.gui : "NONE") - \ "guisp=" (has_key(s:highlight, "sp") ? s:highlight.sp.gui : "NONE") - \ "gui=" (has_key(s:highlight, "gui") ? s:highlight.gui : "NONE") - \ "ctermfg=" . l:ctermfg - \ "ctermbg=" . l:ctermbg - \ "cterm=" (has_key(s:highlight, "cterm") ? s:highlight.cterm : "NONE") -endfunction - -" public {{{ - -function! onedark#set_highlight(group, style) - call s:h(a:group, a:style) -endfunction - -function! onedark#extend_highlight(group, style) - call s:h(a:group, a:style, 1) -endfunction - -" }}} - -" }}} - -" Color Variables {{{ - -let s:colors = onedark#GetColors() - -let s:red = s:colors.red -let s:dark_red = s:colors.dark_red -let s:green = s:colors.green -let s:yellow = s:colors.yellow -let s:dark_yellow = s:colors.dark_yellow -let s:blue = s:colors.blue -let s:purple = s:colors.purple -let s:cyan = s:colors.cyan -let s:white = s:colors.white -let s:black = s:colors.black -let s:foreground = s:colors.foreground -let s:background = s:colors.background -let s:comment_grey = s:colors.comment_grey -let s:gutter_fg_grey = s:colors.gutter_fg_grey -let s:cursor_grey = s:colors.cursor_grey -let s:visual_grey = s:colors.visual_grey -let s:menu_grey = s:colors.menu_grey -let s:special_grey = s:colors.special_grey -let s:vertsplit = s:colors.vertsplit - -" }}} - -" Terminal Colors {{{ - -if has('nvim') - let g:terminal_color_0 = s:black.gui - let g:terminal_color_1 = s:red.gui - let g:terminal_color_2 = s:green.gui - let g:terminal_color_3 = s:yellow.gui - let g:terminal_color_4 = s:blue.gui - let g:terminal_color_5 = s:purple.gui - let g:terminal_color_6 = s:cyan.gui - let g:terminal_color_7 = s:comment_grey.gui - let g:terminal_color_8 = s:visual_grey.gui - let g:terminal_color_9 = s:red.gui - let g:terminal_color_10 = s:green.gui - let g:terminal_color_11 = s:yellow.gui - let g:terminal_color_12 = s:blue.gui - let g:terminal_color_13 = s:purple.gui - let g:terminal_color_14 = s:cyan.gui - let g:terminal_color_15 = s:white.gui -else - let g:terminal_ansi_colors = [ - \ s:black.gui, s:red.gui, s:green.gui, s:yellow.gui, - \ s:blue.gui, s:purple.gui, s:cyan.gui, s:comment_grey.gui, - \ s:visual_grey.gui, s:red.gui, s:green.gui, s:yellow.gui, - \ s:blue.gui, s:purple.gui, s:cyan.gui, s:white.gui - \] -endif - -" }}} - -" Syntax Groups (descriptions and ordering from `:h w18`) {{{ - -call s:h("Comment", { "fg": s:comment_grey, "gui": "italic", "cterm": "italic" }) " any comment -call s:h("Constant", { "fg": s:cyan }) " any constant -call s:h("String", { "fg": s:green }) " a string constant: "this is a string" -call s:h("Character", { "fg": s:green }) " a character constant: 'c', '\n' -call s:h("Number", { "fg": s:dark_yellow }) " a number constant: 234, 0xff -call s:h("Boolean", { "fg": s:dark_yellow }) " a boolean constant: TRUE, false -call s:h("Float", { "fg": s:dark_yellow }) " a floating point constant: 2.3e10 -call s:h("Identifier", { "fg": s:red }) " any variable name -call s:h("Function", { "fg": s:blue }) " function name (also: methods for classes) -call s:h("Statement", { "fg": s:purple }) " any statement -call s:h("Conditional", { "fg": s:purple }) " if, then, else, endif, switch, etc. -call s:h("Repeat", { "fg": s:purple }) " for, do, while, etc. -call s:h("Label", { "fg": s:purple }) " case, default, etc. -call s:h("Operator", { "fg": s:purple }) " sizeof", "+", "*", etc. -call s:h("Keyword", { "fg": s:purple }) " any other keyword -call s:h("Exception", { "fg": s:purple }) " try, catch, throw -call s:h("PreProc", { "fg": s:yellow }) " generic Preprocessor -call s:h("Include", { "fg": s:blue }) " preprocessor #include -call s:h("Define", { "fg": s:purple }) " preprocessor #define -call s:h("Macro", { "fg": s:purple }) " same as Define -call s:h("PreCondit", { "fg": s:yellow }) " preprocessor #if, #else, #endif, etc. -call s:h("Type", { "fg": s:yellow }) " int, long, char, etc. -call s:h("StorageClass", { "fg": s:yellow }) " static, register, volatile, etc. -call s:h("Structure", { "fg": s:yellow }) " struct, union, enum, etc. -call s:h("Typedef", { "fg": s:yellow }) " A typedef -call s:h("Special", { "fg": s:blue }) " any special symbol -call s:h("SpecialChar", { "fg": s:dark_yellow }) " special character in a constant -call s:h("Tag", {}) " you can use CTRL-] on this -call s:h("Delimiter", {}) " character that needs attention -call s:h("SpecialComment", { "fg": s:comment_grey }) " special things inside a comment -call s:h("Debug", {}) " debugging statements -call s:h("Underlined", { "gui": "underline", "cterm": "underline" }) " text that stands out, HTML links -call s:h("Ignore", {}) " left blank, hidden -call s:h("Error", { "fg": s:red }) " any erroneous construct -call s:h("Todo", { "fg": s:purple }) " anything that needs extra attention; mostly the keywords TODO FIXME and XXX - -" }}} - -" Highlighting Groups (descriptions and ordering from `:h highlight-groups`) {{{ -call s:h("ColorColumn", { "bg": s:cursor_grey }) " used for the columns set with 'colorcolumn' -call s:h("Conceal", {}) " placeholder characters substituted for concealed text (see 'conceallevel') -call s:h("Cursor", { "fg": s:black, "bg": s:blue }) " the character under the cursor -call s:h("CursorIM", {}) " like Cursor, but used when in IME mode -call s:h("CursorColumn", { "bg": s:cursor_grey }) " the screen column that the cursor is in when 'cursorcolumn' is set -if &diff - " Don't change the background color in diff mode - call s:h("CursorLine", { "gui": "underline" }) " the screen line that the cursor is in when 'cursorline' is set -else - call s:h("CursorLine", { "bg": s:cursor_grey }) " the screen line that the cursor is in when 'cursorline' is set -endif -call s:h("Directory", { "fg": s:blue }) " directory names (and other special names in listings) -call s:h("DiffAdd", { "bg": s:green, "fg": s:black }) " diff mode: Added line -call s:h("DiffChange", { "fg": s:yellow, "gui": "underline", "cterm": "underline" }) " diff mode: Changed line -call s:h("DiffDelete", { "bg": s:red, "fg": s:black }) " diff mode: Deleted line -call s:h("DiffText", { "bg": s:yellow, "fg": s:black }) " diff mode: Changed text within a changed line -if get(g:, 'onedark_hide_endofbuffer', 0) - " If enabled, will style end-of-buffer filler lines (~) to appear to be hidden. - call s:h("EndOfBuffer", { "fg": s:black }) " filler lines (~) after the last line in the buffer -endif -call s:h("ErrorMsg", { "fg": s:red }) " error messages on the command line -call s:h("VertSplit", { "fg": s:vertsplit }) " the column separating vertically split windows -call s:h("Folded", { "fg": s:comment_grey }) " line used for closed folds -call s:h("FoldColumn", {}) " 'foldcolumn' -call s:h("SignColumn", {}) " column where signs are displayed -call s:h("IncSearch", { "fg": s:yellow, "bg": s:comment_grey }) " 'incsearch' highlighting; also used for the text replaced with ":s///c" -call s:h("LineNr", { "fg": s:gutter_fg_grey }) " Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. -call s:h("CursorLineNr", {}) " Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. -call s:h("MatchParen", { "fg": s:blue, "gui": "underline", "cterm": "underline" }) " The character under the cursor or just before it, if it is a paired bracket, and its match. -call s:h("ModeMsg", {}) " 'showmode' message (e.g., "-- INSERT --") -call s:h("MoreMsg", {}) " more-prompt -call s:h("NonText", { "fg": s:special_grey }) " '~' and '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). -call s:h("Normal", { "fg": s:foreground, "bg": s:background }) " normal text -call s:h("Pmenu", { "fg": s:white, "bg": s:menu_grey }) " Popup menu: normal item. -call s:h("PmenuSel", { "fg": s:cursor_grey, "bg": s:blue }) " Popup menu: selected item. -call s:h("PmenuSbar", { "bg": s:cursor_grey }) " Popup menu: scrollbar. -call s:h("PmenuThumb", { "bg": s:white }) " Popup menu: Thumb of the scrollbar. -call s:h("Question", { "fg": s:purple }) " hit-enter prompt and yes/no questions -call s:h("QuickFixLine", { "fg": s:black, "bg": s:yellow }) " Current quickfix item in the quickfix window. -call s:h("Search", { "fg": s:black, "bg": s:yellow }) " Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. -call s:h("SpecialKey", { "fg": s:special_grey }) " Meta and special keys listed with ":map", also for text used to show unprintable characters in the text, 'listchars'. Generally: text that is displayed differently from what it really is. -call s:h("SpellBad", { "fg": s:red, "gui": "underline", "cterm": "underline" }) " Word that is not recognized by the spellchecker. This will be combined with the highlighting used otherwise. -call s:h("SpellCap", { "fg": s:dark_yellow }) " Word that should start with a capital. This will be combined with the highlighting used otherwise. -call s:h("SpellLocal", { "fg": s:dark_yellow }) " Word that is recognized by the spellchecker as one that is used in another region. This will be combined with the highlighting used otherwise. -call s:h("SpellRare", { "fg": s:dark_yellow }) " Word that is recognized by the spellchecker as one that is hardly ever used. spell This will be combined with the highlighting used otherwise. -call s:h("StatusLine", { "fg": s:white, "bg": s:cursor_grey }) " status line of current window -call s:h("StatusLineNC", { "fg": s:comment_grey }) " status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. -call s:h("StatusLineTerm", { "fg": s:white, "bg": s:cursor_grey }) " status line of current :terminal window -call s:h("StatusLineTermNC", { "fg": s:comment_grey }) " status line of non-current :terminal window -call s:h("TabLine", { "fg": s:comment_grey }) " tab pages line, not active tab page label -call s:h("TabLineFill", {}) " tab pages line, where there are no labels -call s:h("TabLineSel", { "fg": s:white }) " tab pages line, active tab page label -call s:h("Terminal", { "fg": s:white, "bg": s:black }) " terminal window (see terminal-size-color) -call s:h("Title", { "fg": s:green }) " titles for output from ":set all", ":autocmd" etc. -call s:h("Visual", { "bg": s:visual_grey }) " Visual mode selection -call s:h("VisualNOS", { "bg": s:visual_grey }) " Visual mode selection when vim is "Not Owning the Selection". Only X11 Gui's gui-x11 and xterm-clipboard supports this. -call s:h("WarningMsg", { "fg": s:yellow }) " warning messages -call s:h("WildMenu", { "fg": s:black, "bg": s:blue }) " current match in 'wildmenu' completion - -" }}} - -" Termdebug highlighting for Vim 8.1+ {{{ - -" See `:h hl-debugPC` and `:h hl-debugBreakpoint`. -call s:h("debugPC", { "bg": s:special_grey }) " the current position -call s:h("debugBreakpoint", { "fg": s:black, "bg": s:red }) " a breakpoint - -" }}} - -" Language-Specific Highlighting {{{ - -" CSS -call s:h("cssAttrComma", { "fg": s:purple }) -call s:h("cssAttributeSelector", { "fg": s:green }) -call s:h("cssBraces", { "fg": s:white }) -call s:h("cssClassName", { "fg": s:dark_yellow }) -call s:h("cssClassNameDot", { "fg": s:dark_yellow }) -call s:h("cssDefinition", { "fg": s:purple }) -call s:h("cssFontAttr", { "fg": s:dark_yellow }) -call s:h("cssFontDescriptor", { "fg": s:purple }) -call s:h("cssFunctionName", { "fg": s:blue }) -call s:h("cssIdentifier", { "fg": s:blue }) -call s:h("cssImportant", { "fg": s:purple }) -call s:h("cssInclude", { "fg": s:white }) -call s:h("cssIncludeKeyword", { "fg": s:purple }) -call s:h("cssMediaType", { "fg": s:dark_yellow }) -call s:h("cssProp", { "fg": s:white }) -call s:h("cssPseudoClassId", { "fg": s:dark_yellow }) -call s:h("cssSelectorOp", { "fg": s:purple }) -call s:h("cssSelectorOp2", { "fg": s:purple }) -call s:h("cssTagName", { "fg": s:red }) - -" Fish Shell -call s:h("fishKeyword", { "fg": s:purple }) -call s:h("fishConditional", { "fg": s:purple }) - -" Go -call s:h("goDeclaration", { "fg": s:purple }) -call s:h("goBuiltins", { "fg": s:cyan }) -call s:h("goFunctionCall", { "fg": s:blue }) -call s:h("goVarDefs", { "fg": s:red }) -call s:h("goVarAssign", { "fg": s:red }) -call s:h("goVar", { "fg": s:purple }) -call s:h("goConst", { "fg": s:purple }) -call s:h("goType", { "fg": s:yellow }) -call s:h("goTypeName", { "fg": s:yellow }) -call s:h("goDeclType", { "fg": s:cyan }) -call s:h("goTypeDecl", { "fg": s:purple }) - -" HTML (keep consistent with Markdown, below) -call s:h("htmlArg", { "fg": s:dark_yellow }) -call s:h("htmlBold", { "fg": s:dark_yellow, "gui": "bold", "cterm": "bold" }) -call s:h("htmlBoldItalic", { "fg": s:green, "gui": "bold,italic", "cterm": "bold,italic" }) -call s:h("htmlEndTag", { "fg": s:white }) -call s:h("htmlH1", { "fg": s:red }) -call s:h("htmlH2", { "fg": s:red }) -call s:h("htmlH3", { "fg": s:red }) -call s:h("htmlH4", { "fg": s:red }) -call s:h("htmlH5", { "fg": s:red }) -call s:h("htmlH6", { "fg": s:red }) -call s:h("htmlItalic", { "fg": s:purple, "gui": "italic", "cterm": "italic" }) -call s:h("htmlLink", { "fg": s:cyan, "gui": "underline", "cterm": "underline" }) -call s:h("htmlSpecialChar", { "fg": s:dark_yellow }) -call s:h("htmlSpecialTagName", { "fg": s:red }) -call s:h("htmlTag", { "fg": s:white }) -call s:h("htmlTagN", { "fg": s:red }) -call s:h("htmlTagName", { "fg": s:red }) -call s:h("htmlTitle", { "fg": s:white }) - -" JavaScript -call s:h("javaScriptBraces", { "fg": s:white }) -call s:h("javaScriptFunction", { "fg": s:purple }) -call s:h("javaScriptIdentifier", { "fg": s:purple }) -call s:h("javaScriptNull", { "fg": s:dark_yellow }) -call s:h("javaScriptNumber", { "fg": s:dark_yellow }) -call s:h("javaScriptRequire", { "fg": s:cyan }) -call s:h("javaScriptReserved", { "fg": s:purple }) -" https://github.com/pangloss/vim-javascript -call s:h("jsArrowFunction", { "fg": s:purple }) -call s:h("jsClassKeyword", { "fg": s:purple }) -call s:h("jsClassMethodType", { "fg": s:purple }) -call s:h("jsDocParam", { "fg": s:blue }) -call s:h("jsDocTags", { "fg": s:purple }) -call s:h("jsExport", { "fg": s:purple }) -call s:h("jsExportDefault", { "fg": s:purple }) -call s:h("jsExtendsKeyword", { "fg": s:purple }) -call s:h("jsFrom", { "fg": s:purple }) -call s:h("jsFuncCall", { "fg": s:blue }) -call s:h("jsFunction", { "fg": s:purple }) -call s:h("jsGenerator", { "fg": s:yellow }) -call s:h("jsGlobalObjects", { "fg": s:yellow }) -call s:h("jsImport", { "fg": s:purple }) -call s:h("jsModuleAs", { "fg": s:purple }) -call s:h("jsModuleWords", { "fg": s:purple }) -call s:h("jsModules", { "fg": s:purple }) -call s:h("jsNull", { "fg": s:dark_yellow }) -call s:h("jsOperator", { "fg": s:purple }) -call s:h("jsStorageClass", { "fg": s:purple }) -call s:h("jsSuper", { "fg": s:red }) -call s:h("jsTemplateBraces", { "fg": s:dark_red }) -call s:h("jsTemplateVar", { "fg": s:green }) -call s:h("jsThis", { "fg": s:red }) -call s:h("jsUndefined", { "fg": s:dark_yellow }) -" https://github.com/othree/yajs.vim -call s:h("javascriptArrowFunc", { "fg": s:purple }) -call s:h("javascriptClassExtends", { "fg": s:purple }) -call s:h("javascriptClassKeyword", { "fg": s:purple }) -call s:h("javascriptDocNotation", { "fg": s:purple }) -call s:h("javascriptDocParamName", { "fg": s:blue }) -call s:h("javascriptDocTags", { "fg": s:purple }) -call s:h("javascriptEndColons", { "fg": s:white }) -call s:h("javascriptExport", { "fg": s:purple }) -call s:h("javascriptFuncArg", { "fg": s:white }) -call s:h("javascriptFuncKeyword", { "fg": s:purple }) -call s:h("javascriptIdentifier", { "fg": s:red }) -call s:h("javascriptImport", { "fg": s:purple }) -call s:h("javascriptMethodName", { "fg": s:white }) -call s:h("javascriptObjectLabel", { "fg": s:white }) -call s:h("javascriptOpSymbol", { "fg": s:cyan }) -call s:h("javascriptOpSymbols", { "fg": s:cyan }) -call s:h("javascriptPropertyName", { "fg": s:green }) -call s:h("javascriptTemplateSB", { "fg": s:dark_red }) -call s:h("javascriptVariable", { "fg": s:purple }) - -" JSON -call s:h("jsonCommentError", { "fg": s:white }) -call s:h("jsonKeyword", { "fg": s:red }) -call s:h("jsonBoolean", { "fg": s:dark_yellow }) -call s:h("jsonNumber", { "fg": s:dark_yellow }) -call s:h("jsonQuote", { "fg": s:white }) -call s:h("jsonMissingCommaError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonNoQuotesError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonNumError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonString", { "fg": s:green }) -call s:h("jsonStringSQError", { "fg": s:red, "gui": "reverse" }) -call s:h("jsonSemicolonError", { "fg": s:red, "gui": "reverse" }) - -" LESS -call s:h("lessVariable", { "fg": s:purple }) -call s:h("lessAmpersandChar", { "fg": s:white }) -call s:h("lessClass", { "fg": s:dark_yellow }) - -" Markdown (keep consistent with HTML, above) -call s:h("markdownBlockquote", { "fg": s:comment_grey }) -call s:h("markdownBold", { "fg": s:dark_yellow, "gui": "bold", "cterm": "bold" }) -call s:h("markdownBoldItalic", { "fg": s:green, "gui": "bold,italic", "cterm": "bold,italic" }) -call s:h("markdownCode", { "fg": s:green }) -call s:h("markdownCodeBlock", { "fg": s:green }) -call s:h("markdownCodeDelimiter", { "fg": s:green }) -call s:h("markdownH1", { "fg": s:red }) -call s:h("markdownH2", { "fg": s:red }) -call s:h("markdownH3", { "fg": s:red }) -call s:h("markdownH4", { "fg": s:red }) -call s:h("markdownH5", { "fg": s:red }) -call s:h("markdownH6", { "fg": s:red }) -call s:h("markdownHeadingDelimiter", { "fg": s:red }) -call s:h("markdownHeadingRule", { "fg": s:comment_grey }) -call s:h("markdownId", { "fg": s:purple }) -call s:h("markdownIdDeclaration", { "fg": s:blue }) -call s:h("markdownIdDelimiter", { "fg": s:purple }) -call s:h("markdownItalic", { "fg": s:purple, "gui": "italic", "cterm": "italic" }) -call s:h("markdownLinkDelimiter", { "fg": s:purple }) -call s:h("markdownLinkText", { "fg": s:blue }) -call s:h("markdownListMarker", { "fg": s:red }) -call s:h("markdownOrderedListMarker", { "fg": s:red }) -call s:h("markdownRule", { "fg": s:comment_grey }) -call s:h("markdownUrl", { "fg": s:cyan, "gui": "underline", "cterm": "underline" }) - -" Perl -call s:h("perlFiledescRead", { "fg": s:green }) -call s:h("perlFunction", { "fg": s:purple }) -call s:h("perlMatchStartEnd",{ "fg": s:blue }) -call s:h("perlMethod", { "fg": s:purple }) -call s:h("perlPOD", { "fg": s:comment_grey }) -call s:h("perlSharpBang", { "fg": s:comment_grey }) -call s:h("perlSpecialString",{ "fg": s:dark_yellow }) -call s:h("perlStatementFiledesc", { "fg": s:red }) -call s:h("perlStatementFlow",{ "fg": s:red }) -call s:h("perlStatementInclude", { "fg": s:purple }) -call s:h("perlStatementScalar",{ "fg": s:purple }) -call s:h("perlStatementStorage", { "fg": s:purple }) -call s:h("perlSubName",{ "fg": s:yellow }) -call s:h("perlVarPlain",{ "fg": s:blue }) - -" PHP -call s:h("phpVarSelector", { "fg": s:red }) -call s:h("phpOperator", { "fg": s:white }) -call s:h("phpParent", { "fg": s:white }) -call s:h("phpMemberSelector", { "fg": s:white }) -call s:h("phpType", { "fg": s:purple }) -call s:h("phpKeyword", { "fg": s:purple }) -call s:h("phpClass", { "fg": s:yellow }) -call s:h("phpUseClass", { "fg": s:white }) -call s:h("phpUseAlias", { "fg": s:white }) -call s:h("phpInclude", { "fg": s:purple }) -call s:h("phpClassExtends", { "fg": s:green }) -call s:h("phpDocTags", { "fg": s:white }) -call s:h("phpFunction", { "fg": s:blue }) -call s:h("phpFunctions", { "fg": s:cyan }) -call s:h("phpMethodsVar", { "fg": s:dark_yellow }) -call s:h("phpMagicConstants", { "fg": s:dark_yellow }) -call s:h("phpSuperglobals", { "fg": s:red }) -call s:h("phpConstants", { "fg": s:dark_yellow }) - -" Ruby -call s:h("rubyBlockParameter", { "fg": s:red}) -call s:h("rubyBlockParameterList", { "fg": s:red }) -call s:h("rubyClass", { "fg": s:purple}) -call s:h("rubyConstant", { "fg": s:yellow}) -call s:h("rubyControl", { "fg": s:purple }) -call s:h("rubyEscape", { "fg": s:red}) -call s:h("rubyFunction", { "fg": s:blue}) -call s:h("rubyGlobalVariable", { "fg": s:red}) -call s:h("rubyInclude", { "fg": s:blue}) -call s:h("rubyIncluderubyGlobalVariable", { "fg": s:red}) -call s:h("rubyInstanceVariable", { "fg": s:red}) -call s:h("rubyInterpolation", { "fg": s:cyan }) -call s:h("rubyInterpolationDelimiter", { "fg": s:red }) -call s:h("rubyInterpolationDelimiter", { "fg": s:red}) -call s:h("rubyRegexp", { "fg": s:cyan}) -call s:h("rubyRegexpDelimiter", { "fg": s:cyan}) -call s:h("rubyStringDelimiter", { "fg": s:green}) -call s:h("rubySymbol", { "fg": s:cyan}) - -" Sass -" https://github.com/tpope/vim-haml -call s:h("sassAmpersand", { "fg": s:red }) -call s:h("sassClass", { "fg": s:dark_yellow }) -call s:h("sassControl", { "fg": s:purple }) -call s:h("sassExtend", { "fg": s:purple }) -call s:h("sassFor", { "fg": s:white }) -call s:h("sassFunction", { "fg": s:cyan }) -call s:h("sassId", { "fg": s:blue }) -call s:h("sassInclude", { "fg": s:purple }) -call s:h("sassMedia", { "fg": s:purple }) -call s:h("sassMediaOperators", { "fg": s:white }) -call s:h("sassMixin", { "fg": s:purple }) -call s:h("sassMixinName", { "fg": s:blue }) -call s:h("sassMixing", { "fg": s:purple }) -call s:h("sassVariable", { "fg": s:purple }) -" https://github.com/cakebaker/scss-syntax.vim -call s:h("scssExtend", { "fg": s:purple }) -call s:h("scssImport", { "fg": s:purple }) -call s:h("scssInclude", { "fg": s:purple }) -call s:h("scssMixin", { "fg": s:purple }) -call s:h("scssSelectorName", { "fg": s:dark_yellow }) -call s:h("scssVariable", { "fg": s:purple }) - -" TeX -call s:h("texStatement", { "fg": s:purple }) -call s:h("texSubscripts", { "fg": s:dark_yellow }) -call s:h("texSuperscripts", { "fg": s:dark_yellow }) -call s:h("texTodo", { "fg": s:dark_red }) -call s:h("texBeginEnd", { "fg": s:purple }) -call s:h("texBeginEndName", { "fg": s:blue }) -call s:h("texMathMatcher", { "fg": s:blue }) -call s:h("texMathDelim", { "fg": s:blue }) -call s:h("texDelimiter", { "fg": s:dark_yellow }) -call s:h("texSpecialChar", { "fg": s:dark_yellow }) -call s:h("texCite", { "fg": s:blue }) -call s:h("texRefZone", { "fg": s:blue }) - -" TypeScript -call s:h("typescriptReserved", { "fg": s:purple }) -call s:h("typescriptEndColons", { "fg": s:white }) -call s:h("typescriptBraces", { "fg": s:white }) - -" XML -call s:h("xmlAttrib", { "fg": s:dark_yellow }) -call s:h("xmlEndTag", { "fg": s:red }) -call s:h("xmlTag", { "fg": s:red }) -call s:h("xmlTagName", { "fg": s:red }) - -" }}} - -" Plugin Highlighting {{{ - -" airblade/vim-gitgutter -call s:h("GitGutterAdd", { "fg": s:green }) -call s:h("GitGutterChange", { "fg": s:yellow }) -call s:h("GitGutterDelete", { "fg": s:red }) - -" dense-analysis/ale -call s:h("ALEError", { "fg": s:red, "gui": "underline", "cterm": "underline" }) -call s:h("ALEWarning", { "fg": s:yellow, "gui": "underline", "cterm": "underline" }) -call s:h("ALEInfo", { "gui": "underline", "cterm": "underline" }) -call s:h("ALEErrorSign", { "fg": s:red }) -call s:h("ALEWarningSign", { "fg": s:yellow }) -call s:h("ALEInfoSign", { }) - -" easymotion/vim-easymotion -call s:h("EasyMotionTarget", { "fg": s:red, "gui": "bold", "cterm": "bold" }) -call s:h("EasyMotionTarget2First", { "fg": s:yellow, "gui": "bold", "cterm": "bold" }) -call s:h("EasyMotionTarget2Second", { "fg": s:dark_yellow, "gui": "bold", "cterm": "bold" }) -call s:h("EasyMotionShade", { "fg": s:comment_grey }) - -" lewis6991/gitsigns.nvim -hi link GitSignsAdd GitGutterAdd -hi link GitSignsChange GitGutterChange -hi link GitSignsDelete GitGutterDelete - -" mhinz/vim-signify -hi link SignifySignAdd GitGutterAdd -hi link SignifySignChange GitGutterChange -hi link SignifySignDelete GitGutterDelete - -" neoclide/coc.nvim -call s:h("CocErrorSign", { "fg": s:red }) -call s:h("CocWarningSign", { "fg": s:yellow }) -call s:h("CocInfoSign", { "fg": s:blue }) -call s:h("CocHintSign", { "fg": s:cyan }) -call s:h("CocFadeOut", { "fg": s:comment_grey }) -" https://github.com/joshdick/onedark.vim/issues/313 -highlight! link CocMenuSel PmenuSel - -" neomake/neomake -call s:h("NeomakeErrorSign", { "fg": s:red }) -call s:h("NeomakeWarningSign", { "fg": s:yellow }) -call s:h("NeomakeInfoSign", { "fg": s:blue }) - -" plasticboy/vim-markdown (keep consistent with Markdown, above) -call s:h("mkdDelimiter", { "fg": s:purple }) -call s:h("mkdHeading", { "fg": s:red }) -call s:h("mkdLink", { "fg": s:blue }) -call s:h("mkdURL", { "fg": s:cyan, "gui": "underline", "cterm": "underline" }) - -" prabirshrestha/vim-lsp -call s:h("LspErrorText", { "fg": s:red }) -call s:h("LspWarningText", { "fg": s:yellow }) -call s:h("LspInformationText", { "fg":s:blue }) -call s:h("LspHintText", { "fg":s:cyan }) -call s:h("LspErrorHighlight", { "fg": s:red, "gui": "underline", "cterm": "underline" }) -call s:h("LspWarningHighlight", { "fg": s:yellow, "gui": "underline", "cterm": "underline" }) -call s:h("LspInformationHighlight", { "fg":s:blue, "gui": "underline", "cterm": "underline" }) -call s:h("LspHintHighlight", { "fg":s:cyan, "gui": "underline", "cterm": "underline" }) - -" tpope/vim-fugitive -call s:h("diffAdded", { "fg": s:green }) -call s:h("diffRemoved", { "fg": s:red }) - -" }}} - -" Git Highlighting {{{ - -call s:h("gitcommitComment", { "fg": s:comment_grey }) -call s:h("gitcommitUnmerged", { "fg": s:green }) -call s:h("gitcommitOnBranch", {}) -call s:h("gitcommitBranch", { "fg": s:purple }) -call s:h("gitcommitDiscardedType", { "fg": s:red }) -call s:h("gitcommitSelectedType", { "fg": s:green }) -call s:h("gitcommitHeader", {}) -call s:h("gitcommitUntrackedFile", { "fg": s:cyan }) -call s:h("gitcommitDiscardedFile", { "fg": s:red }) -call s:h("gitcommitSelectedFile", { "fg": s:green }) -call s:h("gitcommitUnmergedFile", { "fg": s:yellow }) -call s:h("gitcommitFile", {}) -call s:h("gitcommitSummary", { "fg": s:white }) -call s:h("gitcommitOverflow", { "fg": s:red }) -hi link gitcommitNoBranch gitcommitBranch -hi link gitcommitUntracked gitcommitComment -hi link gitcommitDiscarded gitcommitComment -hi link gitcommitSelected gitcommitComment -hi link gitcommitDiscardedArrow gitcommitDiscardedFile -hi link gitcommitSelectedArrow gitcommitSelectedFile -hi link gitcommitUnmergedArrow gitcommitUnmergedFile - -" }}} - -" Neovim-Specific Highlighting {{{ - -if has("nvim") - " Neovim terminal colors {{{ - let g:terminal_color_0 = s:black.gui - let g:terminal_color_1 = s:red.gui - let g:terminal_color_2 = s:green.gui - let g:terminal_color_3 = s:yellow.gui - let g:terminal_color_4 = s:blue.gui - let g:terminal_color_5 = s:purple.gui - let g:terminal_color_6 = s:cyan.gui - let g:terminal_color_7 = s:white.gui - let g:terminal_color_8 = s:visual_grey.gui - let g:terminal_color_9 = s:dark_red.gui - let g:terminal_color_10 = s:green.gui " No dark version - let g:terminal_color_11 = s:dark_yellow.gui - let g:terminal_color_12 = s:blue.gui " No dark version - let g:terminal_color_13 = s:purple.gui " No dark version - let g:terminal_color_14 = s:cyan.gui " No dark version - let g:terminal_color_15 = s:comment_grey.gui - let g:terminal_color_background = s:background.gui - let g:terminal_color_foreground = s:foreground.gui - " }}} - - " Neovim Diagnostics {{{ - call s:h("DiagnosticError", { "fg": s:red }) - call s:h("DiagnosticWarn", { "fg": s:yellow }) - call s:h("DiagnosticInfo", { "fg": s:blue }) - call s:h("DiagnosticHint", { "fg": s:cyan }) - call s:h("DiagnosticUnderlineError", { "fg": s:red, "gui": "underline", "cterm": "underline" }) - call s:h("DiagnosticUnderlineWarn", { "fg": s:yellow, "gui": "underline", "cterm": "underline" }) - call s:h("DiagnosticUnderlineInfo", { "fg": s:blue, "gui": "underline", "cterm": "underline" }) - call s:h("DiagnosticUnderlineHint", { "fg": s:cyan, "gui": "underline", "cterm": "underline" }) - " }}} - - " Neovim LSP (for versions < 0.5.1) {{{ - hi link LspDiagnosticsDefaultError DiagnosticError - hi link LspDiagnosticsDefaultWarning DiagnosticWarn - hi link LspDiagnosticsDefaultInformation DiagnosticInfo - hi link LspDiagnosticsDefaultHint DiagnosticHint - hi link LspDiagnosticsUnderlineError DiagnosticUnderlineError - hi link LspDiagnosticsUnderlineWarning DiagnosticUnderlineWarn - hi link LspDiagnosticsUnderlineInformation DiagnosticUnderlineInfo - hi link LspDiagnosticsUnderlineHint DiagnosticUnderlineHint - " }}} -endif - -" }}} - -" Must appear at the end of the file to work around this oddity: -" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ -set background=dark diff --git a/.config/nvim/dev.vim b/.config/nvim/dev.vim deleted file mode 100644 index 149b931..0000000 --- a/.config/nvim/dev.vim +++ /dev/null @@ -1,104 +0,0 @@ -source ~/.config/nvim/init.vim - -packadd! onedark.vim -" packadd! fzf -packadd! fzf.vim -packadd! vim-jsx-pretty - -" --> Fzf -source ~/.config/nvim/other/fzf.vim -set rtp+=/usr/share/vim/vimfiles - -" --> Zeal docs -let g:zv_disable_mapping = 1 -nmap <leader>z <Plug>Zeavim -vmap <leader>z <Plug>ZVVisSelection -nmap gz <Plug>ZVOperator -nmap <leader><leader>z <Plug>ZVKeyDocset - -" --> COC -autocmd! User coc.nvim source $HOME/.config/nvim/coc/coc-onload.vim -let g:coc_config_home = '$HOME/.config/nvim/coc' -let g:coc_data_home = '$HOME/.local/share/nvim/site/coc' -let g:coc_global_extensions = [ - \ 'coc-json', - \ 'coc-marketplace', - \ 'coc-css', - \ 'coc-tsserver', - \ 'coc-pyright', - \ 'coc-sh', - \ ] -nnoremap <silent><nowait> <leader>ca :<C-u>CocList diagnostics<cr> -nnoremap <silent><nowait> <leader>ce :<C-u>CocList extensions<cr> -nnoremap <silent><nowait> <leader>cc :<C-u>CocList commands<cr> -nnoremap <silent><nowait> <leader>co :<C-u>CocList outline<cr> -nnoremap <silent><nowait> <leader>cs :<C-u>CocList -I symbols<cr> -nnoremap <silent><nowait> <leader>cj :<C-u>CocNext<CR> -nnoremap <silent><nowait> <leader>ck :<C-u>CocPrev<CR> -nnoremap <silent><nowait> <leader>cp :<C-u>CocListResume<CR> -nnoremap <leader>cm :CocList marketplace<CR> -nnoremap <leader>cff :Format<CR> - -" --> Vimspector -let g:vimspector_base_dir = expand('$HOME/.local/share/nvim/vimspector') -let g:vimspector_enable_mappings = 'HUMAN' -nnoremap <leader>dc <Plug>VimspectorContinue -nnoremap <leader>ds <Plug>VimspectorStop -nnoremap <leader>dr <Plug>VimspectorRestart -nnoremap <leader>dp <Plug>VimspectorPause -nnoremap <leader>dl <Plug>VimspectorBreakpoints -nnoremap <leader>dd <Plug>VimspectorToggleBreakpoint -nnoremap <leader>db <Plug>VimspectorToggleConditionalBreakpoint -nnoremap <leader>df <Plug>VimspectorAddFunctionBreakpoint -nnoremap <leader>dg <Plug>VimspectorGoToCurrentLine -nnoremap <leader>dx :call vimspector#ClearBreakpoints()<CR> -nnoremap <leader>dq :VimspectorReset<CR> -nnoremap <A-C> <Plug>VimspectorContinue -nnoremap <A-n> <Plug>VimspectorStepOver -nnoremap <A-i> <Plug>VimspectorStepInto -nnoremap <A-o> <Plug>VimspectorStepOut -nnoremap <A-b> <Plug>VimspectorToggleBreakpoint -nnoremap <A-c> <Plug>VimspectorRunToCursor - -" --> onedark theme -if exists('+termguicolors') - let g:airline_theme = 'onedark' - let g:onedark_terminal_italics = 1 - let g:onedark_color_overrides = { - \ "foreground": { "gui": "#BBC2CF", "cterm": "145", "cterm16": "NONE" }, - \ "background": { "gui": "#181C24", "cterm": "235", "cterm16": "NONE" }, - \ "comment_grey": { "gui": "#6C7380", "cterm": "59", "cterm16": "7" }, - \ "gutter_fg_grey": { "gui": "#6272A4", "cterm": "238", "cterm16": "8" }, - \ "special_grey": { "gui": "#5Ba078", "cterm": "238", "cterm16": "7" }, - \ } - " \ "background": { "gui": "#202426", "cterm": "235", "cterm16": "NONE" }, - " - " \ "red": { "gui": "#E06C75", "cterm": "204", "cterm16": "1" }, - " \ "dark_red": { "gui": "#BE5046", "cterm": "196", "cterm16": "9" }, - " \ "green": { "gui": "#98C379", "cterm": "114", "cterm16": "2" }, - " \ "yellow": { "gui": "#E5C07B", "cterm": "180", "cterm16": "3" }, - " \ "dark_yellow": { "gui": "#D19A66", "cterm": "173", "cterm16": "11" }, - " \ "blue": { "gui": "#61AFEF", "cterm": "39", "cterm16": "4" }, - " \ "purple": { "gui": "#C678DD", "cterm": "170", "cterm16": "5" }, - " \ "cyan": { "gui": "#56B6C2", "cterm": "38", "cterm16": "6" }, - " \ "black": { "gui": "#282C34", "cterm": "235", "cterm16": "0" }, - " \ "white": { "gui": "#ABB2BF", "cterm": "145", "cterm16": "15" }, - " \ "cursor_grey": { "gui": "#2C323C", "cterm": "236", "cterm16": "0" }, - " \ "visual_grey": { "gui": "#3E4452", "cterm": "237", "cterm16": "8" }, - " \ "menu_grey": { "gui": "#3E4452", "cterm": "237", "cterm16": "7" }, - " \ "vertsplit": { "gui": "#3E4452", "cterm": "59", "cterm16": "7" }, - - " autocmd ColorScheme * call onedark#extend_highlight("LineNr", { - " \ "fg": { "gui": "#6272A4", "cterm": "238", "cterm16": "8" }, - " \ }) - let &t_8f="\<Esc>[38;2;%lu;%lu;%lum" - let &t_8b="\<Esc>[48;2;%lu;%lu;%lum" - " set termguicolors noshowmode - colorscheme onedark - " autocmd VimEnter * AirlineTheme -endif - -nnoremap <leader><C-r> :source ~/.config/nvim/dev.vim<CR> - -AirlineTheme -CocList extensions diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index e9772ee..fbda0fa 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -32,6 +32,10 @@ if filereadable(config_dir . "autoload/plug.vim") call plug#end() endif +packadd! fzf.vim +source ~/.config/nvim/plugins.conf.d/fzf.vim +set rtp+=/usr/share/vim/vimfiles + let g:Verdin#autocomplete = 1 let g:livepreview_previewer = 'zathura' let g:tex_flavor = 'latex' @@ -51,33 +55,18 @@ colorscheme vim highlight NonText ctermfg=242 highlight ColorColumn ctermbg=238 highlight! link CursorColumn ColorColumn +highlight FloatermBorder guibg=orange guifg=cyan autocmd FileType text,fstab setlocal tabstop=8 shiftwidth=8 -autocmd FileType html setlocal tabstop=2 shiftwidth=2 list nolinebreak autocmd FileType sql setlocal commentstring=--\ %s +autocmd BufWritePre * %s/\s\+$//e autocmd BufEnter bm-files,bm-dirs setlocal tabstop=8 shiftwidth=8 autocmd BufWritePost bm-files,bm-dirs silent !shortcuts -autocmd VimLeave *.tex !dev clean "%" autocmd BufWritePost config.def.h !cd "%:h"; rm -f config.h; sudo make install autocmd BufWritePost config.h !cd "%:h"; sudo make install -autocmd BufWritePre * %s/\s\+$//e -au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif - -autocmd BufWritePost */Documents/Notes/*.md silent !pandoc % -o "$HOME/Documents/Notes/.out/$(basename % .md).html" -" autocmd BufWritePost */Documents/latex/resume/resume.tex !cd "%:h"; pdflatex resume.tex; cp -v resume.pdf ~/Dev/vikas.rocks/static/dox/ autocmd BufWritePost *Xresources silent !xrdb "%" autocmd BufRead,BufNewFile *.yt* set filetype=conf - -function SourceTemplate() - let b:template = glob("${XDG_CONFIG_HOME:-$HOME/.config}/nvim/templates/_default." . expand('%:e')) - if !empty(b:template) - execute('0r' . b:template) - endif -endfunction - -autocmd BufNewFile * call SourceTemplate() - -autocmd TermOpen * startinsert -command! -nargs=* T split | terminal <args> +autocmd VimLeave *.tex !dev clean "%" +au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif " --> Scratch buffer if exists('g:loaded_scratch') @@ -98,6 +87,75 @@ nnoremap <Esc>o :LfWorkingDirectory<CR> nnoremap <leader>l :LfCurrentFileNewTab<CR> nnoremap <leader>o :LfWorkingDirectoryExistingOrNewTab<CR> + +" --> Sessions + +let g:session_filename = '.session.vim' + +function! SaveSess() + execute 'mksession! ' . getcwd() . '/' . g:session_filename +endfunction + +function! RestoreSess() + execute 'so ' . getcwd() . '/' . g:session_filename + if bufexists(1) + for l in range(1, bufnr('$')) + if bufwinnr(l) == -1 + exec 'sbuffer ' . l + endif + endfor + endif +endfunction + +if argc() == 0 && filereadable(getcwd() . '/' . g:session_filename) + autocmd VimLeave * call SaveSess() + autocmd VimEnter * nested call RestoreSess() +endif + +command! -nargs=0 Mksession :call SaveSess() + + +" --> Template Management + +let g:templates_dir = "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/templates" + +function ReadDefaultTemplate() + let b:default_template = glob(g:templates_dir . "/_default." . expand('%:e')) + if !empty(b:default_template) + execute('0r ' . b:default_template) + endif +endfunction + +autocmd BufNewFile * call ReadDefaultTemplate() + +function ReadTemplate(template) + execute('r ' . a:template) +endfunction + +function FzfTemplates() + call fzf#run(fzf#wrap({ + \ 'source': 'find ' . g:templates_dir . '/' . &filetype . ' -mindepth 1', + \ 'sink': function('ReadTemplate'), + \ 'options': ['--delimiter', '/templates/' . &filetype . '/', '--with-nth', '2..'], + \ })) +endfunction + +command -nargs=0 Templates call FzfTemplates() +nnoremap <leader>t :Templates<CR> + + +" --> Other commands + +autocmd TermOpen * startinsert +command! -nargs=* TermSplit split | terminal <args> +command! -nargs=* TermVSplit vsplit | terminal <args> + +command -nargs=* T tabnew <args> +command Gi execute "tabnew" system('EDITOR=echo gi') + + +" --> Bindings + if !exists('g:lasttab') let g:lasttab = 1 endif @@ -118,31 +176,44 @@ vnoremap <C-A-c> "*d :let @+=@*<CR> noremap <C-p> "+p noremap <C-A-p> "+P -nnoremap c "_c +nnoremap c "cc inoremap jk <Esc> " map ;n /<++><Enter>c4l inoremap ;n <Esc>/<++><Enter>c4l nnoremap <leader>n /<++><Enter>c4l -inoremap ;s ><Esc>bi<<Esc>ea -inoremap ;c ><Esc>bi</<Esc>ea -inoremap ;i <Esc>b"tywi<<Esc>ea></><Esc>PF<i -inoremap ;I <Esc>b"tywi<<Esc>ea><++></><Esc>P2F>i<Space> -inoremap ;b <Esc>b"tywi<<Esc>ea><CR></<Esc>"tpa><CR><++><Esc>kO -inoremap ;B <Esc>b"tywi<<Esc>ea><CR><++><CR></<Esc>"tpa><CR><++><Esc>3k$i<Space> -inoremap ;ap <p><CR><++><CR></p><CR><++><Esc>3k$i -inoremap ;aa <a href=""><CR><++><CR></a><CR><++><Esc>3k$hi +augroup Web + autocmd! + autocmd FileType html,javascript call SetWebOptions() + function SetWebOptions() + setlocal tabstop=2 shiftwidth=2 list nolinebreak + inoremap ;s ><Esc>bi<<Esc>ea + inoremap ;c ><Esc>bi</<Esc>ea + inoremap ;i <Esc>b"tywi<<Esc>ea></><Esc>PF<i + inoremap ;I <Esc>b"tywi<<Esc>ea><++></><Esc>P2F>i<Space> + inoremap ;b <Esc>b"tywi<<Esc>ea><CR></<Esc>"tpa><CR><++><Esc>kO + inoremap ;B <Esc>b"tywi<<Esc>ea><CR><++><CR></<Esc>"tpa><CR><++><Esc>3k$i<Space> + inoremap ;ap <p><CR></p><CR><++><Esc>kO + inoremap ;aP <p></p><Esc>F<i + inoremap ;aa <a href=""><CR><++><CR></a><CR><++><Esc>3k$hi + inoremap ;aA <a href=""><++></a><Esc>F"i + inoremap ;cl console.log("");<Esc>F"i + endfunction +augroup END augroup Tex autocmd! - autocmd FileType tex inoremap ;b <Esc>b"tywi\begin{<Esc>ea}<CR>\end{<Esc>"tpa}<Esc>kA - autocmd FileType tex inoremap ;s \section{}<Esc>i - autocmd FileType tex inoremap ;at \begin{tikzpicture}<CR>\end{tikzpicture}<Esc>O - autocmd FileType tex inoremap ;ap \usepackage{}<Esc>i - autocmd FileType tex inoremap ;aP \usepackage[]{}<Esc>F[a - autocmd FileType tex inoremap ;ab \textbf{}<Esc>i - autocmd FileType tex inoremap ;ai \textit{}<Esc>i - autocmd FileType tex inoremap ;au \underline{}<Esc>i + autocmd FileType tex call SetTexOptions() + function SetTexOptions() + inoremap ;b <Esc>b"tywi\begin{<Esc>ea}<CR>\end{<Esc>"tpa}<Esc>kA + inoremap ;s \section{}<Esc>i + inoremap ;at \begin{tikzpicture}<CR>\end{tikzpicture}<Esc>O + inoremap ;ap \usepackage{}<Esc>i + inoremap ;aP \usepackage[]{}<Esc>F[a + inoremap ;ab \textbf{}<Esc>i + inoremap ;ai \textit{}<Esc>i + inoremap ;au \underline{}<Esc>i + endfunction augroup END autocmd FileType go inoremap ;ae err<Space>:=<Space><++><CR>if<Space>err<Space>!=<Space>nil<Space>{<CR>return<Space>err<CR>}<Esc>3kI @@ -150,36 +221,31 @@ autocmd FileType go inoremap ;ae err<Space>:=<Space><++><CR>if<Space>err<Space>! nnoremap <leader>fl :w<CR>:!dev lint "%"<CR> nnoremap <leader>fm :w<CR>:%!dev format "%"<CR> nnoremap <leader>fM :w<CR>:%!dev minify "%"<CR> -nnoremap <leader>fc :w<CR>:!dev compile "%"<CR> -nnoremap <leader>fe :w<CR>:!dev run "%"<CR> -nnoremap <leader>ft :w<CR>:!dev test "%"<CR> -nnoremap <leader>fb :w<CR>:!dev build "%"<CR> +nnoremap <leader>fc :w<CR>:se nornu<CR>:!dev compile "%"<CR>:se rnu<CR> +nnoremap <leader>fe :w<CR>:se nornu<CR>:!dev run "%"<CR>:se rnu<CR> +nnoremap <leader>fa :w<CR>:se nornu<CR>:!dev test "%"<CR>:se rnu<CR> +nnoremap <leader>fb :w<CR>:se nornu<CR>:!dev build "%"<CR>:se rnu<CR> nnoremap <leader>fr :w<CR>:!dev clean "%"<CR> -nnoremap <leader>Fl :w<CR>:T dev lint "%"<CR> -nnoremap <leader>Fm :w<CR>:T dev format "%"<CR> -nnoremap <leader>Fc :w<CR>:T dev compile "%"<CR> -nnoremap <leader>Fe :w<CR>:T dev run "%"<CR> -nnoremap <leader>Ft :w<CR>:T dev test "%"<CR> -nnoremap <leader>Fr :w<CR>:T dev clean "%"<CR> - -autocmd BufEnter * nmap <leader>b :w<CR>:se nornu<CR>:!dev build "%"<CR>:se rnu<CR> -autocmd BufEnter * nmap <leader>B :w<CR>:se nornu<CR>:T dev build "%"<CR> -autocmd BufEnter * nmap <leader>t :w<CR>:se nornu<CR>:!dev test "%"<CR>:se rnu<CR> -autocmd BufEnter * nmap <leader>T :w<CR>:se nornu<CR>:T dev test "%"<CR> - -autocmd BufEnter vartak-results-data.pl nmap <leader>t :w<CR>:se nornu<CR>:!vartak-results-data.pl ~/GDrive/vartak/results/university/1S002557.pdf<CR>:se rnu<CR> +nnoremap <leader>Fl :w<CR>:TermSplit dev lint "%"<CR> +nnoremap <leader>Fm :w<CR>:TermSplit dev format "%"<CR> +nnoremap <leader>Fc :w<CR>:se nornu<CR>:TermSplit dev compile "%"<CR> +nnoremap <leader>Fe :w<CR>:se nornu<CR>:TermSplit dev run "%"<CR> +nnoremap <leader>Fb :w<CR>:se nornu<CR>:TermSplit dev build "%"<CR> +nnoremap <leader>Fa :w<CR>:se nornu<CR>:TermSplit dev test "%"<CR> +nnoremap <leader>Fr :w<CR>:TermSplit dev clean "%"<CR> +nnoremap <leader>a :w<CR>:se nornu<CR>:!dev test "%"<CR>:se rnu<CR> nnoremap <leader>w :set wrap!<CR> nnoremap <leader>fo :!opout "%:p"<CR> -nnoremap <leader>ei :tabnew ~/.config/nvim/init.vim<CR> -nnoremap <leader>eo :tabnew ~/.config/nvim/coc/coc-onload.vim<CR> -nnoremap <leader>ec :tabnew ~/.config/nvim/coc/coc-settings.json<CR> -nnoremap <leader>ed :tabnew ~/.config/nvim/dev.vim<CR> nnoremap <leader><C-r> :source ~/.config/nvim/init.vim<CR> nnoremap <leader>s :%s//gc<Left><Left><Left> -nnoremap <leader>gc :T git add --all && git commit<CR> +nnoremap <leader>gc :TermSplit git add --all && git commit<CR> +nnoremap <leader>gp :TermSplit gitpush<CR> + + +" --> Update shortcuts let shortcuts = config_dir . "shortcuts.vim" if filereadable(shortcuts) diff --git a/.config/nvim/other/learn.vim b/.config/nvim/other/learn.vim deleted file mode 100644 index c3272d9..0000000 --- a/.config/nvim/other/learn.vim +++ /dev/null @@ -1,649 +0,0 @@ -" ############## -" Introduction -" ############## -" -" Vim script (also called VimL) is the subset of Vim's ex-commands which -" supplies a number of features one would expect from a scripting language, -" such as values, variables, functions or loops. Always keep in the back of -" your mind that a Vim script file is just a sequence of ex-commands. It is -" very common for a script to mix programming-language features and raw -" ex-commands. -" -" You can run Vim script directly by entering the commands in command-line mode -" (press `:` to enter command-line mode), or you can write them to a file -" (without the leading `:`) and source it in a running Vim instance (`:source -" path/to/file`). Some files are sourced automatically as part of your -" configuration (see |startup|). This guide assumes that you are familiar -" with ex-commands and will only cover the scripting. Help topics to the -" relevant manual sections are included. -" -" See |usr_41.txt| for the official introduction to Vim script. A comment is -" anything following an unmatched `"` until the end of the line, and `|` -" separates instructions (what `;` does in most other languages). References to -" the manual as surrounded with `|`, such as |help.txt|. - -" This is a comment - -" The vertical line '|' (pipe) separates commands -echo 'Hello' | echo 'world!' - -" Putting a comment after a command usually works -pwd " Displays the current working directory - -" Except for some commands it does not; use the command delimiter before the -" comment (echo assumes that the quotation mark begins a string) -echo 'Hello world!' | " Displays a message - -" Line breaks can be escaped by placing a backslash as the first non-whitespace -" character on the *following* line. Only works in script files, not on the -" command line -echo " Hello - \ world " - -echo [1, - \ 2] - -echo { - \ 'a': 1, - \ 'b': 2 -\} - - -" ####### -" Types -" ####### -" -" For an overview of types see |E712|. For an overview of operators see -" |expression-syntax| - -" Numbers (|expr-number|) -" ####### - -echo 123 | " Decimal -echo 0b1111011 | " Binary -echo 0173 | " Octal -echo 0x7B | " Hexadecimal -echo 123.0 | " Floating-point -echo 1.23e2 | " Floating-point (scientific notation) - -" Note that an *integer* number with a leading `0` is in octal notation. The -" usual arithmetic operations are supported. - -echo 1 + 2 | " Addition -echo 1 - 2 | " Subtraction -echo - 1 | " Negation (unary minus) -echo + 1 | " Unary plus (does nothing really, but still legal) -echo 1 * 2 | " Multiplication -echo 1 / 2 | " Division -echo 1 % 2 | " Modulo (remainder) - -" Booleans (|Boolean|) -" ######## -" -" The number 0 is false, every other number is true. Strings are implicitly -" converted to numbers (see below). There are two pre-defined semantic -" constants. - -echo v:true | " Evaluates to 1 or the string 'v:true' -echo v:false | " Evaluates to 0 or the string 'v:false' - -" Boolean values can result from comparison of two objects. - -echo x == y | " Equality by value -echo x != y | " Inequality -echo x > y | " Greater than -echo x >= y | " Greater than or equal -echo x < y | " Smaller than -echo x <= y | " Smaller than or equal -echo x is y | " Instance identity (lists and dictionaries) -echo x isnot y | " Instance non-identity (lists and dictionaries) - -" Strings are compared based on their alphanumerical ordering -" echo 'a' < 'b'. Case sensitivity depends on the setting of 'ignorecase' -" -" Explicit case-sensitivity is specified by appending '#' (match case) or '?' -" (ignore case) to the operator. Prefer explicitly case sensitivity when writing -" portable scripts. - -echo 'a' < 'B' | " True or false depending on 'ignorecase' -echo 'a' <? 'B' | " True -echo 'a' <# 'B' | " False - -" Regular expression matching -echo "hi" =~ "hello" | " Regular expression match, uses 'ignorecase' -echo "hi" =~# "hello" | " Regular expression match, case sensitive -echo "hi" =~? "hello" | " Regular expression match, case insensitive -echo "hi" !~ "hello" | " Regular expression unmatch, use 'ignorecase' -echo "hi" !~# "hello" | " Regular expression unmatch, case sensitive -echo "hi" !~? "hello" | " Regular expression unmatch, case insensitive - -" Boolean operations are possible. - -echo v:true && v:false | " Logical AND -echo v:true || v:false | " Logical OR -echo ! v:true | " Logical NOT -echo v:true ? 'yes' : 'no' | " Ternary operator - - -" Strings (|String|) -" ####### -" -" An ordered zero-indexed sequence of bytes. The encoding of text into bytes -" depends on the option |'encoding'|. - -" Literal constructors -echo "Hello world\n" | " The last two characters stand for newline -echo 'Hello world\n' | " The last two characters are literal -echo 'Let''s go!' | " Two single quotes become one quote character - -" Single-quote strings take all characters are literal, except two single -" quotes, which are taken to be a single quote in the string itself. See -" |expr-quote| for all possible escape sequences. - -" String concatenation -" The .. operator is preferred, but only supported in since Vim 8.1.1114 -echo 'Hello ' . 'world' | " String concatenation -echo 'Hello ' .. 'world' | " String concatenation (new variant) - -" String indexing -echo 'Hello'[0] | " First byte -echo 'Hello'[1] | " Second byte -echo 'Hellö'[4] | " Returns a byte, not the character 'ö' - -" Substrings (second index is inclusive) -echo 'Hello'[:] | " Copy of entire string -echo 'Hello'[1:3] | " Substring, second to fourth byte -echo 'Hello'[1:-2] | " Substring until second to last byte -echo 'Hello'[1:] | " Substring with starting index -echo 'Hello'[:2] | " Substring with ending index -echo 'Hello'[-2:] | " Substring relative to end of string - -" A negative index is relative to the end of the string. See -" |string-functions| for all string-related functions. - -" Lists (|List|) -" ##### -" -" An ordered zero-indexed heterogeneous sequence of arbitrary Vim script -" objects. - -" Literal constructor -echo [] | " Empty list -echo [1, 2, 'Hello'] | " List with elements -echo [1, 2, 'Hello', ] | " Trailing comma permitted -echo [[1, 2], 'Hello'] | " Lists can be nested arbitrarily - -" List concatenation -echo [1, 2] + [3, 4] | " Creates a new list - -" List indexing, negative is relative to end of list (|list-index|) -echo [1, 2, 3, 4][2] | " Third element -echo [1, 2, 3, 4][-1] | " Last element - -" List slicing (|sublist|) -echo [1, 2, 3, 4][:] | " Shallow copy of entire list -echo [1, 2, 3, 4][:2] | " Sublist until third item (inclusive) -echo [1, 2, 3, 4][2:] | " Sublist from third item (inclusive) -echo [1, 2, 3, 4][:-2] | " Sublist until second-to-last item (inclusive) - -" All slicing operations create new lists. To modify a list in-place use list -" functions (|list-functions|) or assign directly to an item (see below about -" variables). - - -" Dictionaries (|Dictionary|) -" ############ -" -" An unordered sequence of key-value pairs, keys are always strings (numbers -" are implicitly converted to strings). - -" Dictionary literal -echo {} | " Empty dictionary -echo {'a': 1, 'b': 2} | " Dictionary literal -echo {'a': 1, 'b': 2, } | " Trailing comma permitted -echo {'x': {'a': 1, 'b': 2}} | " Nested dictionary - -" Indexing a dictionary -echo {'a': 1, 'b': 2}['a'] | " Literal index -echo {'a': 1, 'b': 2}.a | " Syntactic sugar for simple keys - -" See |dict-functions| for dictionary manipulation functions. - - -" Funcref (|Funcref|) -" ####### -" -" Reference to a function, uses the function name as a string for construction. -" When stored in a variable the name of the variable has the same restrictions -" as a function name (see below). - -echo function('type') | " Reference to function type() -" Note that `funcref('type')` will throw an error because the argument must be -" a user-defined function; see further below for defining your own functions. -echo funcref('type') | " Reference by identity, not name -" A lambda (|lambda|) is an anonymous function; it can only contain one -" expression in its body, which is also its implicit return value. -echo {x -> x * x} | " Anonymous function -echo function('substitute', ['hello']) | " Partial function - - -" Regular expression (|regular-expression|) -" ################## -" -" A regular expression pattern is generally a string, but in some cases you can -" also use a regular expression between a pair of delimiters (usually `/`, but -" you can choose anything). - -" Substitute 'hello' for 'Hello' -substitute/hello/Hello/ - - -" ########################### -" Implicit type conversions -" ########################### -" -" Strings are converted to numbers, and numbers to strings when necessary. A -" number becomes its decimal notation as a string. A string becomes its -" numerical value if it can be parsed to a number, otherwise it becomes zero. - -echo "1" + 1 | " Number -echo "1" .. 1 | " String -echo "0xA" + 1 | " Number - -" Strings are treated like numbers when used as booleans -echo "true" ? 1 : 0 | " This string is parsed to 0, which is false - -" ########### -" Variables -" ########### -" -" Variables are bound within a scope; if no scope is provided a default is -" chosen by Vim. Use `:let` and `:const` to bind a value and `:unlet` to unbind -" it. - -let b:my_var = 1 | " Local to current buffer -let w:my_var = 1 | " Local to current window -let t:my_var = 1 | " Local to current tab page -let g:my_var = 1 | " Global variable -let l:my_var = 1 | " Local to current function (see functions below) -let s:my_var = 1 | " Local to current script file -let a:my_arg = 1 | " Function argument (see functions below) - -" The Vim scope is read-only -echo v:true | " Special built-in Vim variables (|v:var|) - -" Access special Vim memory like variables -let @a = 'Hello' | " Register -let $PATH='' | " Environment variable -let &textwidth = 79 | " Option -let &l:textwidth = 79 | " Local option -let &g:textwidth = 79 | " Global option - -" Access scopes as dictionaries (can be modified like all dictionaries) -" See the |dict-functions|, especially |get()|, for access and manipulation -echo b: | " All buffer variables -echo w: | " All window variables -echo t: | " All tab page variables -echo g: | " All global variables -echo l: | " All local variables -echo s: | " All script variables -echo a: | " All function arguments -echo v: | " All Vim variables - -" Constant variables -const x = 10 | " See |:const|, |:lockvar| - -" Function reference variables have the same restrictions as function names -let IsString = {x -> type(x) == type('')} | " Global: capital letter -let s:isNumber = {x -> type(x) == type(0)} | " Local: any name allowed - -" When omitted the scope `g:` is implied, except in functions, there `l:` is -" implied. - - -" Multiple value binding (list unpacking) -" ####################################### -" -" Assign values of list to multiple variables (number of items must match) -let [x, y] = [1, 2] - -" Assign the remainder to a rest variable (note the semicolon) -let [mother, father; children] = ['Alice', 'Bob', 'Carol', 'Dennis', 'Emily'] - - -" ############## -" Flow control -" ############## - -" Conditional (|:if|, |:elseif|, |:else|, |:endif|) -" ########### -" -" Conditions are set between `if` and `endif`. They can be nested. - -let condition = v:true - -if condition - echo 'First condition' -elseif another_condition - echo 'Second condition' -else - echo 'Fail' -endif - -" Loops (|:for|, |:endfor|, |:while|, |:endwhile|, |:break|, |:continue|) -" ##### -" -" Two types of loops: `:for` and `:while`. Use `:continue` to skip to the next -" iteration, `:break` to break out of the loop. - -" For-loop (|:for|, |:endfor|) -" ======== -" -" For-loops iterate over lists and nothing else. If you want to iterate over -" another sequence you need to use a function which will create a list. - -" Iterate over a list -for person in ['Alice', 'Bob', 'Carol', 'Dennis', 'Emily'] - echo 'Hello ' .. person -endfor - -" Iterate over a nested list by unpacking it -for [x, y] in [[1, 0], [0, 1], [-1, 0], [0, -1]] - echo 'Position: x =' .. x .. ', y = ' .. y -endfor - -" Iterate over a range of numbers -for i in range(10, 0, -1) " Count down from 10 - echo 'T minus' .. i -endfor - -" Iterate over the keys of a dictionary -for symbol in keys({'π': 3.14, 'e': 2.71}) - echo 'The constant ' .. symbol .. ' is a transcendent number' -endfor - -" Iterate over the values of a dictionary -for value in values({'π': 3.14, 'e': 2.71}) - echo 'The value ' .. value .. ' approximates a transcendent number' -endfor - -" Iterate over the keys and values of a dictionary -for [symbol, value] in items({'π': 3.14, 'e': 2.71}) - echo 'The number ' .. symbol .. ' is approximately ' .. value -endfor - -" While-loops (|:while|, |:endwhile|) - -let there_yet = v:true -while !there_yet - echo 'Are we there yet?' -endwhile - - -" Exception handling (|exception-handling|) -" ################## -" -" Throw new exceptions as strings, catch them by pattern-matching a regular -" expression against the string - -" Throw new exception -throw "Wrong arguments" - -" Guard against an exception (the second catch matches any exception) -try - source path/to/file -catch /Cannot open/ - echo 'Looks like that file does not exist' -catch /.*/ - echo 'Something went wrong, but I do not know what' -finally - echo 'I am done trying' -endtry - - -" ########## -" Functions -" ########## - -" Defining functions (|:function|, |:endfunction|) -" ################## - -" Unscoped function names have to start with a capital letter -function! AddNumbersLoudly(x, y) - " Use a: scope to access arguments - echo 'Adding' .. a:x .. 'and' .. a:y | " A side effect - return a:x + a:y | " A return value -endfunction - -" Scoped function names may start with a lower-case letter -function! s:addNumbersLoudly(x, y) - echo 'Adding' .. a:x .. 'and' .. a:y - return a:x + a:y -endfunction - -" Without the exclamation mark it would be an error to re-define a function, -" with the exclamation mark the new definition can replace the old one. Since -" Vim script files can be reloaded several times over the course of a session -" it is best to use the exclamation mark unless you really know what you are -" doing. - -" Function definitions can have special qualifiers following the argument list. - -" Range functions define two implicit arguments, which will be set to the range -" of the ex-command -function! FirstAndLastLine() range - echo [a:firstline, a:lastline] -endfunction - -" Prints the first and last line that match a pattern (|cmdline-ranges|) -/^#!/,/!#$/call FirstAndLastLine() - -" Aborting functions, abort once error occurs (|:func-abort|) -function! SourceMyFile() abort - source my-file.vim | " Try sourcing non-existing file - echo 'This will never be printed' -endfunction - -" Closures, functions carrying values from outer scope (|:func-closure|) -function! MakeAdder(x) - function! Adder(n) closure - return a:n + a:x - endfunction - return funcref('Adder') -endfunction -let AddFive = MakeAdder(5) -echo AddFive(3) | " Prints 8 - -" Dictionary functions, poor man's OOP methods (|Dictionary-function|) -function! Mylen() dict - return len(self.data) | " Implicit variable self -endfunction -let mydict = {'data': [0, 1, 2, 3], 'len': function("Mylen")} -echo mydict.len() - -" Alternatively, more concise -let mydict = {'data': [0, 1, 2, 3]} -function! mydict.len() - return len(self.data) -endfunction - -" Calling functions (|:call|) -" ################# - -" Call a function for its return value, and possibly for its side effects -let animals = keys({'cow': 'moo', 'dog': 'woof', 'cat': 'meow'}) - -" Call a function for its side effects only, ignore potential return value -call sign_undefine() - -" The call() function calls a function reference and passes parameters as a -" list, and returns the function's result. -echo call(function('get'), [{'a': 1, 'b': 2}, 'c', 3]) | " Prints 3 - -" Recall that Vim script is embedded within the ex-commands, that is why we -" cannot just call a function directly, we have to use the `:call` ex-command. - -" Function namespaces (|write-library-script|, |autoload|) -" ################### - -" Must be defined in autoload/foo/bar.vim -" Namspaced function names do not have to start with a capital letter -function! foo#bar#log(value) - echomsg value -endfunction - -call foo#bar#log('Hello') - - -" ############################# -" Frequently used ex-commands -" ############################# - - -" Sourcing runtime files (|'runtimepath'|) -" ###################### - -" Source first match among runtime paths -runtime plugin/my-plugin.vim - - -" Defining new ex-commands (|40.2|, |:command|) -" ######################## - -" First argument here is the name of the command, rest is the command body -command! SwapAdjacentLines normal! ddp - -" The exclamation mark works the same as with `:function`. User-defined -" commands must start with a capital letter. The `:command` command can take a -" number of attributes (some of which have their own parameters with `=`), such -" as `-nargs`, all of them start with a dash to set them apart from the command -" name. - -command! -nargs=1 Error echoerr <args> - - -" Defining auto-commands (|40.3|, |autocmd|, |autocommand-events|) -" ###################### - -" The arguments are "events", "patterns", rest is "commands" -autocmd BufWritePost $MYVIMRC source $MYVIMRC - -" Events and patterns are separated by commas with no space between. See -" |autocmd-events| for standard events, |User| for custom events. Everything -" else are the ex-commands which will be executed. - -" Auto groups -" =========== -" -" When a file is sourced multiple times the auto-commands are defined anew, -" without deleting the old ones, causing auto-commands to pile up over time. -" Use auto-groups and the following ritual to guard against this. - -augroup auto-source | " The name of the group is arbitrary - autocmd! | " Deletes all auto-commands in the current group - autocmd BufWritePost $MYVIMRC source $MYVIMRC -augroup END | " Switch back to default auto-group - -" It is also possible to assign a group directly. This is useful if the -" definition of the group is in one script and the definition of the -" auto-command is in another script. - -" In one file -augroup auto-source - autocmd! -augroup END - -" In another file -autocmd auto-source BufWritePost $MYVIMRC source $MYVIMRC - -" Executing (run-time macros of sorts) -" #################################### - -" Sometimes we need to construct an ex-command where part of the command is not -" known until runtime. - -let line = 3 | " Line number determined at runtime -execute line .. 'delete' | " Delete a line - -" Executing normal-mode commands -" ############################## -" -" Use `:normal` to play back a sequence of normal mode commands from the -" command-line. Add an exclamation mark to ignore user mappings. - -normal! ggddGp | " Transplant first line to end of buffer - -" Window commands can be used with :normal, or with :wincmd if :normal would -" not work -wincmd L | " Move current window all the way to the right - - -" ########################### -" Frequently used functions -" ########################### - -" Feature check -echo has('nvim') | " Running Neovim -echo has('python3') | " Support for Python 3 plugins -echo has('unix') | " Running on a Unix system -echo has('win32') | " Running on a Windows system - - -" Test if something exists -echo exists('&mouse') | " Option (exists only) -echo exists('+mouse') | " Option (exists and works) -echo exists('$HOSTNAME') | " Environment variable -echo exists('*strftime') | " Built-in function -echo exists('**s:MyFunc') | " User-defined function -echo exists('bufcount') | " Variable (scope optional) -echo exists('my_dict["foo"]') | " Variable (dictionary entry) -echo exists('my_dict["foo"]') | " Variable (dictionary entry) -echo exists(':Make') | " Command -echo exists("#CursorHold") | " Auto-command defined for event -echo exists("#BufReadPre#*.gz") | " Event and pattern -echo exists("#filetypeindent") | " Auto-command group -echo exists("##ColorScheme") | " Auto-command supported for event - -" Various dynamic values (see |expand()|) -echo expand('%') | " Current file name -echo expand('<cword>') | " Current word under cursor -echo expand('%:p') | " Modifier are possible - -" Type tests -" There are unique constants defined for the following types. Older versions -" of Vim lack the type variables, see the reference " documentation for a -" workaround -echo type(my_var) == v:t_number | " Number -echo type(my_var) == v:t_string | " String -echo type(my_var) == v:t_func | " Funcref -echo type(my_var) == v:t_list | " List -echo type(my_var) == v:t_dict | " Dictionary -echo type(my_var) == v:t_float | " Float -echo type(my_var) == v:t_bool | " Explicit Boolean -" For the null object should compare it against itself -echo my_var is v:null - -" Format strings -echo printf('%d in hexadecimal is %X', 123, 123) - - -" ##################### -" Tricks of the trade -" ##################### - -" Source guard -" ############ - -" Prevent a file from being sourced multiple times; users can set the variable -" in their configuration to prevent the plugin from loading at all. -if exists('g:loaded_my_plugin') - finish -endif -let g:loaded_my_plugin = v:true - -" Default values -" ############## - -" Get a default value: if the user defines a variable use it, otherwise use a -" hard-coded default. Uses the fact that a scope is also a dictionary. -let s:greeting = get(g:, 'my_plugin_greeting', 'Hello') diff --git a/.config/nvim/pack/plugins/opt/auto-session b/.config/nvim/pack/plugins/opt/auto-session new file mode 160000 +Subproject 00334ee24b9a05001ad50221c8daffbeedaa084 diff --git a/.config/nvim/pack/plugins/opt/copilot.vim b/.config/nvim/pack/plugins/opt/copilot.vim new file mode 160000 +Subproject 7167958954532a0a1b83f2db2f591b43aebff44 diff --git a/.config/nvim/pack/plugins/opt/vim-verdin b/.config/nvim/pack/plugins/opt/vim-verdin new file mode 160000 +Subproject b96fc398ffe09c9910bd469f22ee5170b5a46a1 diff --git a/.config/nvim/coc/coc-onload.vim b/.config/nvim/plugins.conf.d/coc-onload.vim index c2835cc..b3db607 100644 --- a/.config/nvim/coc/coc-onload.vim +++ b/.config/nvim/plugins.conf.d/coc-onload.vim @@ -53,6 +53,9 @@ nmap <silent> gy <Plug>(coc-type-definition) nmap <silent> gi <Plug>(coc-implementation) nmap <silent> gr <Plug>(coc-references) +" Override neovim's builtin referencing +nmap <silent> grr <Plug>(coc-references) + " Use K to show documentation in preview window nnoremap <silent> <C-k> :call ShowDocumentation()<CR> diff --git a/.config/nvim/coc/coc-settings.json b/.config/nvim/plugins.conf.d/coc-settings.json index 8b56371..437572d 100644 --- a/.config/nvim/coc/coc-settings.json +++ b/.config/nvim/plugins.conf.d/coc-settings.json @@ -3,5 +3,8 @@ "diagnostic.enable": true, "python.linting.pycodestyleEnabled": true, "html.autoCreateQuotes": false, - "coc.preferences.formatOnType": true + "coc.preferences.formatOnType": true, + "copilot.showRemainingText": true, + "copilot.enable": false, + "typescript.autoClosingTags": false } diff --git a/.config/nvim/other/fzf.vim b/.config/nvim/plugins.conf.d/fzf.vim index 371b680..49fec8d 100644 --- a/.config/nvim/other/fzf.vim +++ b/.config/nvim/plugins.conf.d/fzf.vim @@ -1,4 +1,7 @@ " --> Fzf + +let g:fzf_history_dir = system('echo "${XDG_STATE_HOME:-$HOME/.local/state}/fzf/fzf_vim_history') + let g:fzf_layout = { 'window': { 'width': 1, 'height': 1 } } command! -bang -nargs=? -complete=dir Files \ call fzf#vim#files(<q-args>, {'options': ['--info=inline', '--preview', 'preview {}']}, <bang>0) @@ -14,6 +17,7 @@ imap <c-x><c-f> <plug>(fzf-complete-path) imap <c-x><c-l> <plug>(fzf-complete-line) " Fzf keybindings +nnoremap <leader>fh :History<CR> nnoremap <leader>ff :Files<CR> -nnoremap <leader>f. :Files %:p:h<CR> +nnoremap <leader>f. :Files %:p:h<CR> diff --git a/.config/nvim/plugins.conf.d/onedark.vim b/.config/nvim/plugins.conf.d/onedark.vim new file mode 100644 index 0000000..6f526bd --- /dev/null +++ b/.config/nvim/plugins.conf.d/onedark.vim @@ -0,0 +1,38 @@ +" --> Onedark Theme +if exists('+termguicolors') + let g:airline_theme = 'onedark' + let g:onedark_terminal_italics = 1 + let g:onedark_color_overrides = { + \ "foreground": { "gui": "#BBC2CF", "cterm": "145", "cterm16": "NONE" }, + \ "background": { "gui": "#181C24", "cterm": "235", "cterm16": "NONE" }, + \ "comment_grey": { "gui": "#6C7380", "cterm": "59", "cterm16": "7" }, + \ "gutter_fg_grey": { "gui": "#6272A4", "cterm": "238", "cterm16": "8" }, + \ "special_grey": { "gui": "#5Ba078", "cterm": "238", "cterm16": "7" }, + \ } + " \ "background": { "gui": "#202426", "cterm": "235", "cterm16": "NONE" }, + " + " \ "red": { "gui": "#E06C75", "cterm": "204", "cterm16": "1" }, + " \ "dark_red": { "gui": "#BE5046", "cterm": "196", "cterm16": "9" }, + " \ "green": { "gui": "#98C379", "cterm": "114", "cterm16": "2" }, + " \ "yellow": { "gui": "#E5C07B", "cterm": "180", "cterm16": "3" }, + " \ "dark_yellow": { "gui": "#D19A66", "cterm": "173", "cterm16": "11" }, + " \ "blue": { "gui": "#61AFEF", "cterm": "39", "cterm16": "4" }, + " \ "purple": { "gui": "#C678DD", "cterm": "170", "cterm16": "5" }, + " \ "cyan": { "gui": "#56B6C2", "cterm": "38", "cterm16": "6" }, + " \ "black": { "gui": "#282C34", "cterm": "235", "cterm16": "0" }, + " \ "white": { "gui": "#ABB2BF", "cterm": "145", "cterm16": "15" }, + " \ "cursor_grey": { "gui": "#2C323C", "cterm": "236", "cterm16": "0" }, + " \ "visual_grey": { "gui": "#3E4452", "cterm": "237", "cterm16": "8" }, + " \ "menu_grey": { "gui": "#3E4452", "cterm": "237", "cterm16": "7" }, + " \ "vertsplit": { "gui": "#3E4452", "cterm": "59", "cterm16": "7" }, + + " autocmd ColorScheme * call onedark#extend_highlight("LineNr", { + " \ "fg": { "gui": "#6272A4", "cterm": "238", "cterm16": "8" }, + " \ }) + let &t_8f="\<Esc>[38;2;%lu;%lu;%lum" + let &t_8b="\<Esc>[48;2;%lu;%lu;%lum" + " set termguicolors noshowmode + colorscheme onedark + " autocmd VimEnter * AirlineTheme +endif + diff --git a/.config/nvim/other/out.vim b/.config/nvim/plugins.conf.d/out.vim index 6e4e1f1..6e4e1f1 100644 --- a/.config/nvim/other/out.vim +++ b/.config/nvim/plugins.conf.d/out.vim diff --git a/.config/nvim/plugins.conf.d/vimspector.vim b/.config/nvim/plugins.conf.d/vimspector.vim new file mode 100644 index 0000000..521e252 --- /dev/null +++ b/.config/nvim/plugins.conf.d/vimspector.vim @@ -0,0 +1,21 @@ +" --> Vimspector +let g:vimspector_base_dir = expand('$HOME/.local/share/nvim/vimspector') +let g:vimspector_enable_mappings = 'HUMAN' +nnoremap <leader>dc <Plug>VimspectorContinue +nnoremap <leader>ds <Plug>VimspectorStop +nnoremap <leader>dr <Plug>VimspectorRestart +nnoremap <leader>dp <Plug>VimspectorPause +nnoremap <leader>dl <Plug>VimspectorBreakpoints +nnoremap <leader>dd <Plug>VimspectorToggleBreakpoint +nnoremap <leader>db <Plug>VimspectorToggleConditionalBreakpoint +nnoremap <leader>df <Plug>VimspectorAddFunctionBreakpoint +nnoremap <leader>dg <Plug>VimspectorGoToCurrentLine +nnoremap <leader>dx :call vimspector#ClearBreakpoints()<CR> +nnoremap <leader>dq :VimspectorReset<CR> +nnoremap <A-C> <Plug>VimspectorContinue +nnoremap <A-n> <Plug>VimspectorStepOver +nnoremap <A-i> <Plug>VimspectorStepInto +nnoremap <A-o> <Plug>VimspectorStepOut +nnoremap <A-b> <Plug>VimspectorToggleBreakpoint +nnoremap <A-c> <Plug>VimspectorRunToCursor + diff --git a/.config/nvim/plugins.conf.d/zeal.vim b/.config/nvim/plugins.conf.d/zeal.vim new file mode 100644 index 0000000..1b2734f --- /dev/null +++ b/.config/nvim/plugins.conf.d/zeal.vim @@ -0,0 +1,7 @@ +" --> Zeal docs +let g:zv_disable_mapping = 1 +nmap <leader>z <Plug>Zeavim +vmap <leader>z <Plug>ZVVisSelection +nmap gz <Plug>ZVOperator +nmap <leader><leader>z <Plug>ZVKeyDocset + diff --git a/.config/nvim/templates/_default.sh b/.config/nvim/templates/_default.sh new file mode 100644 index 0000000..13f4793 --- /dev/null +++ b/.config/nvim/templates/_default.sh @@ -0,0 +1,2 @@ +#!/bin/sh + diff --git a/.config/nvim/templates/sh/err.sh b/.config/nvim/templates/sh/err.sh new file mode 100644 index 0000000..a4414cd --- /dev/null +++ b/.config/nvim/templates/sh/err.sh @@ -0,0 +1,2 @@ +err() { printf '%s: %s\n' "$0" "$@" >&2; exit 1; } + diff --git a/.config/nvim/templates/sh/getopts.sh b/.config/nvim/templates/sh/getopts.sh new file mode 100644 index 0000000..9013ff9 --- /dev/null +++ b/.config/nvim/templates/sh/getopts.sh @@ -0,0 +1,6 @@ +while getopts 'h' o; do case "$o" in + h) help >&2; exit ;; + *) err "invalid option -- '$OPTARG'" ;; +esac done +shift $((OPTIND - 1)) + diff --git a/.config/nvim/templates/sh/help.sh b/.config/nvim/templates/sh/help.sh new file mode 100644 index 0000000..953de68 --- /dev/null +++ b/.config/nvim/templates/sh/help.sh @@ -0,0 +1,10 @@ +help() { echo "<++> - + +USAGE: + <++> [OPTION]... + +OPTIONS: + -h show this help message"; } + +[ "$#" -lt 1 ] && help >&2 && exit 1 + diff --git a/.config/nvim/vim.log b/.config/nvim/vim.log deleted file mode 100644 index 67ecb5b..0000000 --- a/.config/nvim/vim.log +++ /dev/null @@ -1,170 +0,0 @@ - - -times in msec - clock self+sourced self: sourced script - clock elapsed: other lines - -000.009 000.009: --- NVIM STARTING --- -000.119 000.110: event init -000.186 000.067: early init -000.230 000.043: locale set -000.260 000.030: init first window -000.469 000.209: inits 1 -000.483 000.014: window checked -000.484 000.001: parsing arguments -000.872 000.051 000.051: require('vim.shared') -000.971 000.034 000.034: require('vim._meta') -000.973 000.095 000.061: require('vim._editor') -000.974 000.190 000.044: require('vim._init_packages') -000.975 000.301: init lua interpreter -001.027 000.053: expanding arguments -001.058 000.031: inits 2 -001.316 000.258: init highlight -001.317 000.001: waiting for UI -001.475 000.157: done waiting for UI -001.481 000.007: clear screen -001.588 000.107: init default mappings & autocommands -001.883 000.041 000.041: sourcing /usr/share/nvim/runtime/ftplugin.vim -001.936 000.022 000.022: sourcing /usr/share/nvim/runtime/indent.vim -001.982 000.009 000.009: sourcing /usr/share/nvim/archlinux.vim -001.985 000.030 000.021: sourcing /etc/xdg/nvim/sysinit.vim -006.183 000.919 000.919: sourcing /home/master/.config/nvim/autoload/plug.vim -012.319 000.007 000.007: sourcing /home/master/.local/share/nvim/plugged/vim-polyglot/filetype.vim -012.437 000.007 000.007: sourcing /home/master/.local/share/nvim/plugged/vim-polyglot/ftdetect/polyglot.vim -012.556 000.010 000.010: sourcing /usr/share/vim/vimfiles/ftdetect/PKGBUILD.vim -012.580 000.008 000.008: sourcing /usr/share/vim/vimfiles/ftdetect/SRCINFO.vim -012.604 000.007 000.007: sourcing /usr/share/vim/vimfiles/ftdetect/augeas.vim -012.634 000.014 000.014: sourcing /usr/share/vim/vimfiles/ftdetect/conkyrc.vim -012.672 000.022 000.022: sourcing /usr/share/vim/vimfiles/ftdetect/espeakfiletype.vim -012.703 000.015 000.015: sourcing /usr/share/vim/vimfiles/ftdetect/lf.vim -012.755 000.024 000.024: sourcing /usr/share/vim/vimfiles/ftdetect/nginx.vim -023.697 011.642 011.528: sourcing /home/master/.local/share/nvim/plugged/vim-polyglot/autoload/polyglot/init.vim -023.708 011.710 000.068: sourcing /home/master/.local/share/nvim/plugged/vim-polyglot/filetype.vim -023.840 000.085 000.085: sourcing /usr/share/nvim/runtime/filetype.lua -024.243 000.011 000.011: sourcing /usr/share/nvim/runtime/ftplugin.vim -024.319 000.007 000.007: sourcing /usr/share/nvim/runtime/indent.vim -024.499 000.063 000.063: sourcing /usr/share/nvim/runtime/syntax/synload.vim -024.563 000.201 000.137: sourcing /usr/share/nvim/runtime/syntax/syntax.vim -024.947 000.306 000.306: sourcing /usr/share/nvim/runtime/syntax/nosyntax.vim -025.066 000.054 000.054: sourcing /usr/share/nvim/runtime/syntax/synload.vim -025.118 000.505 000.145: sourcing /usr/share/nvim/runtime/syntax/syntax.vim -025.229 000.008 000.008: sourcing /home/master/.local/share/nvim/plugged/vim-polyglot/filetype.vim -025.302 000.053 000.053: sourcing /usr/share/nvim/runtime/filetype.lua -025.391 000.008 000.008: sourcing /usr/share/nvim/runtime/ftplugin.vim -025.499 000.007 000.007: sourcing /home/master/.local/share/nvim/plugged/vim-polyglot/filetype.vim -025.566 000.048 000.048: sourcing /usr/share/nvim/runtime/filetype.lua -025.652 000.008 000.008: sourcing /usr/share/nvim/runtime/ftplugin.vim -025.723 000.006 000.006: sourcing /usr/share/nvim/runtime/indent.vim -025.809 023.804 010.228: sourcing /home/master/.config/nvim/init.vim -025.815 000.331: sourcing vimrc file(s) -026.068 000.043 000.043: sourcing /home/master/.config/nvim/plugin/coc.vim -026.166 000.080 000.080: sourcing /home/master/.config/nvim/plugin/debug.vim -026.202 000.018 000.018: sourcing /home/master/.config/nvim/plugin/docs.vim -026.303 000.082 000.082: sourcing /home/master/.config/nvim/plugin/fzf.vim -026.366 000.041 000.041: sourcing /home/master/.config/nvim/plugin/scratch.vim -026.863 000.071 000.071: sourcing /home/master/.config/nvim/autoload/onedark.vim -039.423 012.982 012.912: sourcing /home/master/.config/nvim/colors/onedark.vim -039.454 013.068 000.086: sourcing /home/master/.config/nvim/plugin/ui.vim -039.812 000.227 000.227: sourcing /home/master/.local/share/nvim/plugged/vim-surround/plugin/surround.vim -039.967 000.084 000.084: sourcing /home/master/.local/share/nvim/plugged/vim-commentary/plugin/commentary.vim -040.116 000.063 000.063: sourcing /home/master/.local/share/nvim/plugged/lf.vim/plugin/lf.vim -040.371 000.185 000.185: sourcing /home/master/.local/share/nvim/plugged/vim-floaterm/plugin/floaterm.vim -040.855 000.418 000.418: sourcing /home/master/.local/share/nvim/plugged/fzf/plugin/fzf.vim -041.550 000.617 000.617: sourcing /home/master/.local/share/nvim/plugged/fzf.vim/plugin/fzf.vim -041.693 000.073 000.073: sourcing /home/master/.local/share/nvim/plugged/zeavim.vim/plugin/zeavim.vim -042.133 000.339 000.339: sourcing /home/master/.local/share/nvim/plugged/vim-polyglot/plugin/polyglot.vim -042.506 000.152 000.152: sourcing /usr/share/nvim/runtime/plugin/gzip.vim -042.533 000.007 000.007: sourcing /usr/share/nvim/runtime/plugin/health.vim -042.939 000.118 000.118: sourcing /usr/share/nvim/runtime/pack/dist/opt/matchit/plugin/matchit.vim -043.016 000.466 000.348: sourcing /usr/share/nvim/runtime/plugin/matchit.vim -043.131 000.099 000.099: sourcing /usr/share/nvim/runtime/plugin/matchparen.vim -043.494 000.345 000.345: sourcing /usr/share/nvim/runtime/plugin/netrwPlugin.vim -044.073 000.113 000.113: sourcing /usr/share/nvim/runtime/autoload/remote/host.vim -044.305 000.089 000.089: sourcing /usr/share/nvim/runtime/autoload/remote/define.vim -044.761 001.141 000.938: sourcing /home/master/.local/share/nvim/rplugin.vim -044.768 001.244 000.103: sourcing /usr/share/nvim/runtime/plugin/rplugin.vim -044.886 000.091 000.091: sourcing /usr/share/nvim/runtime/plugin/shada.vim -044.928 000.017 000.017: sourcing /usr/share/nvim/runtime/plugin/spellfile.vim -045.070 000.121 000.121: sourcing /usr/share/nvim/runtime/plugin/tarPlugin.vim -045.154 000.058 000.058: sourcing /usr/share/nvim/runtime/plugin/tohtml.vim -045.193 000.013 000.013: sourcing /usr/share/nvim/runtime/plugin/tutor.vim -045.365 000.151 000.151: sourcing /usr/share/nvim/runtime/plugin/zipPlugin.vim -045.471 000.012 000.012: sourcing /usr/share/vim/vimfiles/plugin/fzf.vim -045.579 000.089 000.089: sourcing /usr/share/vim/vimfiles/plugin/redact_pass.vim -046.186 000.100 000.100: sourcing /usr/share/nvim/runtime/plugin/editorconfig.lua -046.313 000.104 000.104: sourcing /usr/share/nvim/runtime/plugin/man.lua -046.371 000.037 000.037: sourcing /usr/share/nvim/runtime/plugin/nvim.lua -046.425 002.166: loading rtp plugins -046.501 000.075: loading packages -046.527 000.027: loading after plugins -046.535 000.007: inits 3 -049.346 002.812: reading ShaDa -049.563 000.216: opening buffers -049.592 000.029: BufEnter autocommands -049.594 000.002: editing files in windows -051.092 000.064 000.064: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/init.vim -051.660 000.278 000.278: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/parts.vim -051.828 000.011 000.011: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/formatter/short_path.vim -052.601 000.102 000.102: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/util.vim -052.898 000.159 000.159: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions.vim -053.025 000.030 000.030: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim -053.204 000.108 000.108: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline.vim -053.349 000.020 000.020: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/netrw.vim -053.463 000.021 000.021: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/fzf.vim -053.692 000.064 000.064: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/term.vim -055.576 000.118 000.118: require('vim.lsp.log') -056.062 000.483 000.483: require('vim.lsp.protocol') -057.439 000.324 000.324: require('vim.lsp._snippet') -057.532 000.090 000.090: require('vim.highlight') -057.538 000.004 000.004: require('vim.F') -057.556 001.459 001.041: require('vim.lsp.util') -057.570 002.492 000.432: require('vim.lsp.handlers') -057.977 000.405 000.405: require('vim.lsp.rpc') -058.150 000.171 000.171: require('vim.lsp.sync') -058.648 000.496 000.496: require('vim.lsp.semantic_tokens') -059.000 000.349 000.349: require('vim.lsp.buf') -059.135 000.133 000.133: require('vim.lsp.diagnostic') -059.350 000.213 000.213: require('vim.lsp.codelens') -059.382 005.520 001.261: require('vim.lsp') -059.504 000.044 000.044: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/nvimlsp.vim -059.696 000.071 000.071: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/whitespace.vim -059.933 000.037 000.037: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/po.vim -060.085 000.056 000.056: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/wordcount.vim -060.283 000.019 000.019: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/keymap.vim -060.481 000.028 000.028: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/searchcount.vim -064.384 000.073 000.073: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/section.vim -064.878 000.238 000.238: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/highlighter.vim -068.911 000.072 000.072: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/themes.vim -069.476 000.931 000.859: sourcing /home/master/.config/nvim/autoload/airline/themes/onedark.vim -072.884 000.370 000.370: sourcing /home/master/.config/nvim/autoload/airline/themes/onedark.vim -085.154 000.083 000.083: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/builder.vim -085.516 000.050 000.050: sourcing /home/master/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/default.vim -102.172 051.614 043.237: sourcing /home/master/.local/share/nvim/plugged/vim-airline/plugin/airline.vim -102.485 000.031 000.031: sourcing /home/master/.local/share/nvim/plugged/vim-airline-themes/plugin/airline-themes.vim -103.232 001.993: VimEnter autocommands -103.235 000.003: UIEnter autocommands -103.236 000.001: before starting main loop -103.996 000.760: first screen update -103.998 000.002: --- NVIM STARTED --- - - -times in msec - clock self+sourced self: sourced script - clock elapsed: other lines - -000.009 000.009: --- NVIM STARTING --- -000.188 000.179: event init -000.251 000.063: early init -000.292 000.041: locale set -000.329 000.036: init first window -000.545 000.217: inits 1 -000.551 000.006: window checked -000.553 000.002: parsing arguments -000.937 000.026 000.026: require('vim.shared') -001.012 000.032 000.032: require('vim._meta') -001.014 000.073 000.041: require('vim._editor') -001.015 000.160 000.061: require('vim._init_packages') -001.016 000.302: init lua interpreter -001.515 000.500: expanding arguments -001.559 000.044: inits 2 -001.793 000.233: init highlight diff --git a/.config/picom.conf b/.config/picom.conf index b3c84bd..ae5a4b3 100644 --- a/.config/picom.conf +++ b/.config/picom.conf @@ -110,8 +110,8 @@ shadow-ignore-shaped = false; # ################################# -inactive-opacity = 0.90; -active-opacity = 0.95; +inactive-opacity = 0.95; +active-opacity = 0.97; frame-opacity = 1; inactive-opacity-override = false; diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 37a847c..888705d 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -8,10 +8,9 @@ alias md='mkdir' alias s='sudo' alias l='ls -A' alias ll='ls -al' -alias lr='ls -aR' # open -alias o='${OPENER:-xdg-open}' -alias e='${EDITOR:-vi}' +alias o="${OPENER:-xdg-open}" +alias e="${EDITOR:-vi}" alias se='sudoedit' alias lf='lfcd' alias sr='ff ~/.config ~/.local/bin ~/bin' @@ -21,16 +20,16 @@ alias gpu='gitpush' lt() { tree -aC --dirsfirst -I "$IGNORE_GLOB" "$@" | less -F; } dul() { du -ahd 1 "$@" | sort -h | less -FX; } -v() { LESSOPEN="|preview %s" less -r -F "${1:-.}"; } +v() { LESSOPEN="|preview %s" less -r -F -X "${@:-.}"; } ff() { find -H "$@" ! -wholename '*.git*' ! \( -type d -printf '%p/\n' , ! -type d -print \) | fzf -m; } senv() { source "${XDG_DATA_HOME:-$HOME/.local/share}/virtualenvs/${1:-main}/bin/activate"; } sudoedit() { - if command -V vim >/dev/null; then + if command -V nvim >/dev/null; then + sudo nvim -u "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim" "$@" + elif command -V vim >/dev/null; then [ -f "$HOME/.vim/vimrc" ] && VIMRC="$HOME/.vim/vimrc" sudo vim -u "${VIMRC:-$HOME/.vimrc}" "$@" - elif command -V nvim >/dev/null; then - sudo nvim -u "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim" "$@" else command sudoedit "$@" fi @@ -83,3 +82,4 @@ alias grep='grep --color=auto' alias tree='tree -C --dirsfirst' alias ls='ls -h --group-directories-first --color=auto --classify=auto' alias info='info --vi-keys --init-file ~/.config/infokey' +alias rsync='rsync -h' diff --git a/.config/shell/bm-dirs b/.config/shell/bm-dirs index 603136b..794d362 100644 --- a/.config/shell/bm-dirs +++ b/.config/shell/bm-dirs @@ -1,56 +1,44 @@ # You can add comments to these files with # -cac ${XDG_CACHE_HOME:-$HOME/.cache} -cg ${XDG_CONFIG_HOME:-$HOME/.config} -lsh ${XDG_DATA_DIR:-$HOME/.local/share} -lsha ${XDG_DATA_DIR:-$HOME/.local/share}/applications +ch ${XDG_CACHE_HOME:-$HOME/.cache} # CacHe +cf ${XDG_CONFIG_HOME:-$HOME/.config} # ConFig +lb ${XDG_SCRIPTS_DIR:-$HOME/.local/bin} # Local Bin +dt ${XDG_DATA_DIR:-$HOME/.local/share} # DaTa +hs ${XDG_STATE_DIR:-$HOME/.local/state} # HiStory +sr ${XDG_SOURCE_DIR:-$HOME/.local/src} # SRc +ds ${XDG_DOWNLOAD_DIR:-$HOME/Desktop} # DeSktop +dn ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} # DowNloads +dx ${XDG_DOCUMENTS_DIR:-$HOME/Documents} # DoX +ms ${XDG_MUSIC_DIR:-$HOME/Music} # MuSic +px ${XDG_PICTURES_DIR:-$HOME/Pictures} # PiX +vd ${XDG_VIDEOS_DIR:-$HOME/Videos} # ViDeos + +lsa ${XDG_DATA_DIR:-$HOME/.local/share}/applications vnv ${XDG_DATA_DIR:-$HOME/.local/share}/virtualenvs ltr ${XDG_DATA_DIR:-$HOME/.local/share}/Trash -lsr ${XDG_DATA_DIR:-$HOME/.local/src} -lst ${XDG_DATA_DIR:-$HOME/.local/state} -dn ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} -dx ${XDG_DOCUMENTS_DIR:-$HOME/Documents} -dl ${XDG_DOCUMENTS_DIR:-$HOME/Documents}/latex -dr ${XDG_DOCUMENTS_DIR:-$HOME/Documents}/latex/resume -nt ${XDG_DOCUMENTS_DIR:-$HOME/Documents}/Notes -ms ${XDG_MUSIC_DIR:-$HOME/Music} -px ${XDG_PICTURES_DIR:-$HOME/Pictures} -vd ${XDG_VIDEOS_DIR:-$HOME/Videos} -lbn ~/.local/bin bn ~/bin sd ~/sdcard rp ~/repos an ~/Android -ap ~/Applications dv ~/Dev -cm ~/Dev/cloud-maker -cs ~/Dev/sites/csstudent41.github.io -vrd ~/Dev/sites/vikas.rocks -vrc ~/Dev/sites/vikas.rocks/content -vrl ~/Dev/sites/vikas.rocks/layouts -vrp ~/Dev/sites/vikas.rocks/public -td ~/Dev/test -gd ~/GDrive/vartak/CS/sem6 -gp ~/GDrive/vartak/CS/sem6/practicals -gj ~/GDrive/vartak/CS/sem6/journals -gz ~/GDrive/vartak/CS/practical-zip/sem5 -gn ~/GDrive/vartak/CS/sem6/notes -rs ~/GDrive/vartak/results -ph ~/Phone -stv ~/Phone/.stversions +dp ~/Dev/sites/personal +td ~/Dev/test # Test Dir +gd ~/GDrive # Google Drive +ph ~/Phone # PHone +stv ~/Phone/.stversions # SyncThing Versions pw ~/Phone/Android/media/com.whatsapp.w4b/WhatsApp\ Business/Media/WhatsApp\ Business\ Documents mn /mnt -stg ${STORAGE:-/mnt/storage} -lbr ${STORAGE:-/mnt/storage}/Library -med ${STORAGE:-/mnt/storage}/Media -sts ${STORAGE:-/mnt/storage}/sites +sg ${STORAGE:-/mnt/storage} +lr ${STORAGE:-/mnt/storage}/Library +md ${STORAGE:-/mnt/storage}/Media +st ${STORAGE:-/mnt/storage}/sites sd /sdcard mp /run/media/$USER/ mtp /run/user/1000/gvfs usr ${PREFIX:-/usr} ush /usr/share usd /usr/share/doc -usha /usr/share/applications +usa /usr/share/applications tmp /tmp -tmu /tmp/mozilla_${USER}0 +mzt /tmp/mozilla_${USER}0 diff --git a/.config/shell/bm-files b/.config/shell/bm-files index 898e080..6324347 100644 --- a/.config/shell/bm-files +++ b/.config/shell/bm-files @@ -4,26 +4,27 @@ bf ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files bd ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs -pf ~/.profile -zp ~/.zprofile -xp ~/.xprofile -gi ~/.gitignore -zc ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zshrc +cfpf ~/.profile +cfzp ~/.zprofile +cfxp ~/.xprofile +cfgi ~/.gitignore +cfzc ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zshrc +cfar ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc +cflc ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc +cfsx ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler +cfin ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim +cfac ${XDG_CONFIG_HOME:-$HOME/.config}/alacritty/alacritty.toml +cfza ${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc +cfxr ${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xresources +cfxi ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xinitrc +cfml ${XDG_CONFIG_HOME:-$HOME/.config}/mimeapps.list +cffi ${XDG_CONFIG_HOME:-$HOME/.config}/fd/ignore +cfsc ~/.ssh/config + zh ${XDG_STATE_HOME:-$HOME/.local/state}/zsh/history -za ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc -arc ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc -spf ${XDG_CONFIG_HOME:-$HOME/.config}/shell/server.profile -lc ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc -sx ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler -in ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim -ac ${XDG_CONFIG_HOME:-$HOME/.config}/alacritty/alacritty.toml -xr ${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xresources -xi ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xinitrc -mm ${XDG_CONFIG_HOME:-$HOME/.config}/mimeapps.list -fdi ${XDG_CONFIG_HOME:-$HOME/.config}/fd/ignore -ssc ~/.ssh/config qn ${XDG_DOCUMENTS_HOME:-$HOME/Documents}/Notes/QuickNote.md bm ${XDG_DOCUMENTS_HOME:-$HOME/Documents}/Notes/bookmarks.txt -akn ${XDG_DOCUMENTS_HOME:-$HOME/Documents}/Notes/ak47.txt li ${XDG_DOCUMENTS_HOME:-$HOME/Documents}/latex/lorem-ipsum.txt -vrh ~/Dev/sites/vikas.rocks/layouts/_default/home.html +vh ~/Dev/sites/vikas.rocks/layouts/_default/home.html +wtr /tmp/wttr.txt + diff --git a/.config/shell/profile b/.config/shell/profile index 234b1c2..d512687 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -1,5 +1,10 @@ #!/bin/sh +XDG_CONFIG_HOME="$HOME/.config" +XDG_DATA_HOME="$HOME/.local/share" +XDG_STATE_HOME="$HOME/.local/state" +XDG_CACHE_HOME="$HOME/.cache" + export OPENER="open" export PAGER="less" export EDITOR="nvim" @@ -8,20 +13,16 @@ export FILES="lf" export TERMINAL="st" export PREVIEWER="preview" -XDG_CONFIG_HOME="$HOME/.config" -XDG_DATA_HOME="$HOME/.local/share" -XDG_STATE_HOME="$HOME/.local/state" -XDG_CACHE_HOME="$HOME/.cache" - export MOUNTPATH="/run/media/$USER" -export PASSWORD_STORE_DIR="$HOME/Phone/Backup/pass" +export CUSTOM_PASSWORD_STORE="$HOME/Phone/Backup/pass" export SSH_AUTH_SOCK="$HOME/.ssh/ssh_auth_sock" export NCFTPDIR="$XDG_DATA_HOME/ncftp" export R_ENVIRON_USER="$XDG_DATA_HOME/R/.Renviron" export GOPATH="$XDG_DATA_HOME/go" export ANDROID_USER_HOME="$XDG_DATA_HOME/android" -export __GL_SHADER_DISK_CACHE_PATH="$HOME/.cache/nv" +export ANDROID_HOME="$HOME/Android/Sdk" export PYENV_ROOT="$XDG_DATA_HOME/pyenv" +export __GL_SHADER_DISK_CACHE_PATH="$HOME/.cache/nv" export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" export ZDOTDIR="$XDG_CONFIG_HOME/zsh" @@ -49,6 +50,7 @@ export CD_HISTFILE="$XDG_STATE_HOME/cd_history" export LESS='-fiR --mouse --use-color -j 10 -Dd+r -Du+b' export LESSOPEN='|lessopen.sh %s' export GROFF_NO_SGR=1 +export SUDO_ASKPASS='/usr/lib/ssh/ssh-askpass' export GTK_IM_MODULE='fcitx' export QT_IM_MODULE='fcitx' export SDL_IM_MODULE='fcitx' @@ -61,14 +63,14 @@ export CHROME_EXECUTABLE='chromium' export FZF_DEFAULT_COMMAND="find -H . ! -wholename '*.git*' ! \( -type d -printf '%p/\n' , ! -type d -print \)" export FZF_DEFAULT_OPTS=" --history='$FZF_HISTFILE' - --preview='\$PREVIEWER {}' --preview-window=hidden + --preview='\$PREVIEWER {}' + --preview-window='<30(up,border-bottom),right,border-left,hidden' --bind 'ctrl-s:toggle-sort' --bind 'ctrl-y:execute-silent(printf \"%s\\\n\" {+} | xsel --clipboard)' --bind 'ctrl-v:toggle-preview,ctrl-space:toggle-preview' --bind 'alt-space:toggle-preview,alt-w:toggle-preview-wrap' - --bind 'alt-enter:print-query' --bind 'ctrl-alt-c:change-preview-window(up|left:50%|down|right:50%)' - --bind 'ctrl-alt-k:change-preview-window(50%|60%|70%|80%|90%)' + --bind 'ctrl-alt-k:change-preview-window(60%|70%|80%|90%)' --bind 'ctrl-alt-j:change-preview-window(50%|40%|30%|20%)' --bind 'ctrl-alt-a:select-all,ctrl-alt-d:deselect-all' --bind 'alt-n:half-page-down,alt-p:half-page-up' @@ -78,8 +80,6 @@ export FZF_DEFAULT_OPTS=" --bind 'alt-j:preview-half-page-down,alt-k:preview-half-page-up' --bind 'alt-l:preview-page-down,alt-h:preview-page-up' --bind 'alt-H:preview-top,alt-L:preview-bottom' - --bind 'alt-g:preview-top,alt-G:preview-bottom' - --bind 'alt-s:execute(dmenu-send {})' --bind 'alt-0:change-preview(echo {})' --bind 'alt-1:change-preview(text-preview {})' --bind 'alt-2:change-preview(\$PREVIEWER {})' @@ -91,7 +91,7 @@ export FZF_DEFAULT_OPTS=" --bind 'alt-e:execute(append-to-history {q} \"$FZF_HISTFILE\"; eval \"\${EDITOR:-vi} {}\")' --bind 'alt-O:execute(append-to-history {q} \"$FZF_HISTFILE\"; mimeopen --ask {})' --bind 'alt-o:execute(append-to-history {q} \"$FZF_HISTFILE\"; eval \"\${FILES:-lf} {}\")' - --bind 'alt-D:become(append-to-history {q} \"$FZF_HISTFILE\"; dirname {} )' + --bind 'alt-s:execute(append-to-history {q} \"$FZF_HISTFILE\"; fsend {} )' " ## Custom themes for GTypist diff --git a/.config/starship.toml b/.config/starship.toml index 06f8b23..127847f 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -35,6 +35,9 @@ min_time = 50 format = "took [$duration]($style)" disabled = false +[line_break] +disabled = true + ## SECOND LINE/ROW: Prompt # Somethere at the beginning @@ -47,24 +50,21 @@ disabled = true [[battery.display]] # "bold red" style when capacity is between 0% and 10% threshold = 15 style = "bold red" -disabled = true [[battery.display]] # "bold yellow" style when capacity is between 10% and 30% threshold = 50 style = "bold yellow" -disabled = true [[battery.display]] # "bold green" style when capacity is between 10% and 30% threshold = 80 style = "bold green" -disabled = true # Prompt: optional param 1 [time] -format = " 🕙 $time($style)\n" +format = " [ $time]($style)\n" time_format = "%T" -style = "bright-white" -disabled = true +style = "#aaaa33" +disabled = false # # Prompt: param 2 └─ # [character] diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index cc53fde..cc14782 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -1,9 +1,9 @@ -if-shell '[ "$COLORTERM" != "${COLORTERM#*truecolor}" ]' { - set -g default-terminal "tmux-256color" - set -ga terminal-overrides ',*256col*:Tc' - source ~/.config/tmux/tmux-gruvbox-dark.conf - # run 'bash ~/.config/tmux/tmux-onedark-theme.tmux' -} +# if-shell '[ "$COLORTERM" != "${COLORTERM#*truecolor}" ]' { +# set -g default-terminal "tmux-256color" +# set -ga terminal-overrides ',*256col*:Tc' +# source ~/.config/tmux/tmux-gruvbox-dark.conf +# # run 'bash ~/.config/tmux/tmux-onedark-theme.tmux' +# } if-shell '[ -z "$SSH_CONNECTION" ] && [ -n "$TERMUX_VERSION" ]' { set -g status-right "" diff --git a/.config/yt-dlp/channel.conf b/.config/yt-dlp/channel.conf index c742d18..925cb02 100644 --- a/.config/yt-dlp/channel.conf +++ b/.config/yt-dlp/channel.conf @@ -1,12 +1,14 @@ ---config videos.conf +--config config --output '%(channel)s/%(title)s.%(ext)s' --output 'thumbnail:%(channel)s/.thumbnail/%(title)s.%(ext)s' --output 'description:%(channel)s/.description/%(title)s.txt' ---print-to-file %(title)s.%(ext)s %(channel)s/%(channel)s.channel.pl.txt +--print-to-file %(title)s %(channel)s/%(channel)s.channel.pl.txt # --playlist-items ::-1 +--write-description --write-thumbnail +--embed-thumbnail --write-playlist-metafiles --download-archive .info/archive.txt diff --git a/.config/yt-dlp/config b/.config/yt-dlp/config index 3c9c2e1..9e817f8 100644 --- a/.config/yt-dlp/config +++ b/.config/yt-dlp/config @@ -1,5 +1,5 @@ ---output %(title)s.%(ext)s --restrict-filenames +--output %(title)s.%(ext)s --format bestvideo*[height<=1080][fps<=30]+bestaudio --prefer-free-format @@ -9,6 +9,5 @@ --convert-subs srt --embed-subs ---write-description --embed-metadata --embed-chapters diff --git a/.config/yt-dlp/playlist.conf b/.config/yt-dlp/playlist.conf index 26adc67..43ed334 100644 --- a/.config/yt-dlp/playlist.conf +++ b/.config/yt-dlp/playlist.conf @@ -1,4 +1,4 @@ ---config videos.conf +--config config --output '%(playlist)s/%(title)s.%(ext)s' --output 'thumbnail:%(playlist)s/.thumbnail/%(title)s.%(ext)s' @@ -7,6 +7,8 @@ --print-to-file %(title)s %(playlist)s/%(playlist)s.pl.txt --playlist-items ::-1 +--write-description --write-thumbnail +--embed-thumbnail --write-playlist-metafiles --download-archive archive.txt diff --git a/.config/yt-dlp/videos.conf b/.config/yt-dlp/videos.conf index c9e8013..10d2564 100644 --- a/.config/yt-dlp/videos.conf +++ b/.config/yt-dlp/videos.conf @@ -1,2 +1,4 @@ --config config --format bestvideo*[height<=1080][fps<=60]+bestaudio +--write-description +--print-to-file "%(original_url)s %(channel)s %(title)s %(filepath)s" $HOME/.local/state/yt_history.tsv diff --git a/.config/ytignore b/.config/ytignore index 6bc17cd..9ba10af 100644 --- a/.config/ytignore +++ b/.config/ytignore @@ -1,5 +1,6 @@ *.srt *.vtt +*.meta *.description *.info.json *.live_chat.json diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 22bf62f..d3ba554 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -6,9 +6,13 @@ bindkey -e alias find="2> >(grep -v 'Permission denied' >&2) find" source ~/.profile + [ -n "$SDOTDIR" ] || SDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/shell" [ -n "$ZDOTDIR" ] || ZDOTDIR="${XDG_CONFIG_HOME:-HOME/.config}/zsh" -source "/usr/share/fzf/completion.zsh" +[ -n "$CD_HISTFILE" ] || CD_HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/cd_history" +[ -n "$OPEN_HISTFILE" ] || OPEN_HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/open_history" + +source "${PREFIX:-/usr}/share/fzf/completion.zsh" source "$ZDOTDIR/command-tools.zsh" source "$ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" @@ -52,7 +56,7 @@ preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. # Completion. autoload -Uz compinit compinit -d ~/.cache/zshcompdump-$ZSH_VERSION -zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' # Case insensitive tab completion zstyle ':completion:*' rehash true # automatically find new executables in path zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc) zstyle ':completion:*' completer _expand _complete _ignored _approximate @@ -67,7 +71,9 @@ zstyle ':completion:*' cache-path ~/.cache/zsh # automatically load bash completion functions autoload -U +X bashcompinit && bashcompinit -source "$ZDOTDIR/completion/arduino-cli.zsh" + +unset WORDCHARS +stty -ixon ZSH_AUTOSUGGEST_STRATEGY=(history completion) ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(end-of-line vi-end-of-line vi-add-eol) @@ -77,14 +83,7 @@ HISTFILE="${XDG_STATE_HOME:=$HOME/.local/state}/zsh/history" HISTSIZE=100000 SAVEHIST=50000 -unset WORDCHARS -stty -ixon - -[ -z "$CD_HISTFILE" ] && - export CD_HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/cd_history" - -[ -z "$OPEN_HISTFILE" ] && - export OPEN_HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/open_history" +# source "$ZDOTDIR/completion/arduino-cli.zsh" # Angular # _ng_yargs_completions() @@ -99,12 +98,20 @@ stty -ixon # compdef _ng_yargs_completions ng +[ -n "$DISPLAY" ] && command -V xdotool >/dev/null && { + TERMINAL_WINDOW_ID="$(xdotool getactivewindow)" + function set_win_title() { + echo -ne "\033]0; $USER@$HOST:${PWD/$HOME/~} \007" + } + precmd_functions+=(set_win_title) +} + _command_fail_hook() { [ $? = 1 ] || return if [ -n "$TMUX" ]; then tmux send-keys C-p - elif [ -n "$XDOTOOL_WINDOW_ID" ]; then - xdotool key --window "$XDOTOOL_WINDOW_ID" ctrl+p + elif [ -n "$TERMINAL_WINDOW_ID" ]; then + xdotool key --window "$TERMINAL_WINDOW_ID" ctrl+p fi } add-zsh-hook precmd _command_fail_hook @@ -150,21 +157,18 @@ if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then fi -[ -n "$DISPLAY" ] && command -V xdotool >/dev/null && - XDOTOOL_WINDOW_ID="$(xdotool getactivewindow)" - [ -f "$BUFFER_CACHE" ] && { { if [ -n "$TMUX" ]; then tmux send-keys -l "$(cat "$BUFFER_CACHE")" elif [ -z "$TERMUX_VERSION" ]; then - xdotool type --window "$XDOTOOL_WINDOW_ID" "$(cat "$BUFFER_CACHE")" + xdotool type --window "$TERMINAL_WINDOW_ID" "$(cat "$BUFFER_CACHE")" fi rm -f "$BUFFER_CACHE" } & disown } -BUFFER_CACHE="${ZCACHEDIR:=$HOME/.cache/zsh}/previous-command-buffer-$$.tmp" +export BUFFER_CACHE="${ZCACHEDIR:=$HOME/.cache/zsh}/previous-command-buffer-$$.tmp" _exec-zsh() { echo "$BUFFER" > "$BUFFER_CACHE" BUFFER=' exec zsh' @@ -248,6 +252,7 @@ bindkey '^[H' get-help [ -f "$SDOTDIR/aliasrc" ] && source "$SDOTDIR/aliasrc" [ -f "$SDOTDIR/shortcutrc" ] && source "$SDOTDIR/shortcutrc" +[ -f "$SDOTDIR/shortcutenvrc" ] && source "$SDOTDIR/shortcutenvrc" [ -f "$ZDOTDIR/zshnameddirrc" ] && source "$ZDOTDIR/zshnameddirrc" @@ -263,30 +268,25 @@ case "$TERM" in *256*) } command -v fd >/dev/null && { - FZF_DEFAULT_COMMAND="fd --hidden --no-ignore-vcs --color=always | sort" + FZF_DEFAULT_COMMAND="fd --hidden --color=always" FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --ansi" - ff() { FZF_DEFAULT_COMMAND+="$@" fzf -m; } alias f='fd --hidden --no-ignore-vcs' alias sr='fd --no-ignore-vcs --color=always . ~/.config ~/.local/bin ~/bin | fzf --ansi' } command -v starship >/dev/null && { eval "$(starship init zsh)" - function set_win_title() { - echo -ne "\033]0; $USER@$HOST:${PWD/$HOME/~} \007" - } - precmd_functions+=(set_win_title) } ;; esac +alias s='sudo ' alias p='pacman' alias sp='sudo pacman' alias sv='sudo sv' +alias pm='PASSWORD_STORE_DIR=$CUSTOM_PASSWORD_STORE pass' alias mmv='noglob zmv -W' -alias s='sudo ' -alias fh='fzf --tac < "$OPEN_HISTFILE"' -alias ide='nvim -u "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/dev.vim"' +alias ide='nvim -u "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/coc.vim"' alias mirror='sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist-arch' alias mirrord='sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist-arch' alias cleanup='sudo pacman -Rns $(pacman -Qtdq)' @@ -294,14 +294,18 @@ alias fixpacman='sudo rm /var/lib/pacman/db.lck' alias gtypist="gtypist $GTYPIST_OPTS" alias typ='launch-gtypist -l "$(sed "/^gtypist lesson - \(.*\)$/!d; s//\1/" ~/Documents/Notes/QuickNote.md)"' alias typa='launch-gtypist -e 3 -l "$(sed "/^gtypist lesson - \(.*\)$/!d; s//\1/" ~/Documents/Notes/ak47.txt)"' +alias uc='cd ~ && gitpush' # update config +alias gpu='gitpush' +alias wtr='less -r /tmp/wttr.in' # Launch new (W)indow in background -W() { +new_window() { windowid="$(xdotool getactivewindow)" - setsid -f $TERMINAL >/dev/null 2>&1 + setsid -f $TERMINAL -e sh -c "${*:-$SHELL}" >/dev/null 2>&1 while [ "$(xdotool getactivewindow)" = "$windowid" ]; do sleep 0.1; done xdotool windowfocus "$windowid" } +alias W='new_window ' # Find command package F() { @@ -328,5 +332,5 @@ pyenvs() { } # Load syntax highlighter; should be last. -source "/home/master/.config/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh" +source "$ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" diff --git a/.config/zsh/command-tools.zsh b/.config/zsh/command-tools.zsh index 20126cb..fe17ed1 100644 --- a/.config/zsh/command-tools.zsh +++ b/.config/zsh/command-tools.zsh @@ -1,5 +1,5 @@ whereis_alias() { - location="$(zsh -xic exit 2>&1 | sed -E "/alias[ '$]*$1=/!d" | + location="$(zsh -xic exit 2>&1 | sed -E "/sh.*alias[ '$]*$1=/!d; /\/plugins\//d" | fzf --exit-0 --select-1 --ansi --header-first --header='Select alias location' | sed -n "s|^\+\(/.*:[0-9]*\)>.*$|\1|p")" diff --git a/.config/zsh/zprofile b/.config/zsh/zprofile index 16b64c6..3a9242f 100644 --- a/.config/zsh/zprofile +++ b/.config/zsh/zprofile @@ -1,17 +1,20 @@ #!/bin/zsh + . ~/.profile -[ -n "$TMUX" ] || [ -n "$TERMUX_VERSION" ] || [ "$SSH_CONNECTION" ] && +[ -n "$TMUX" ] || [ -n "$TERMUX_VERSION" ] || [ -n "$SSH_CONNECTION" ] && return on_ac_power="$(cat /sys/class/power_supply/ACAD/online)" -[ "$on_ac_power" = 0 ] && brightnessctl set 5% || brightnessctl set 20% +[ "$on_ac_power" = 0 ] && + brightnessctl set 5% || + brightnessctl set "$(<"${XDG_STATE_HOME:-$HOME/.local/state}/brightness")" case "$TTY" in /dev/tty1) command -V optimus-manager >/dev/null && [ "$on_ac_power" = 1 ] && { echo "Waiting for nvidia card to load up..." - until [ -e /dev/dri/card1 ]; do; sleep 0.1; done + until [ -e /dev/dri/card1 ]; do sleep 0.1; done } command -V startx >/dev/null && { pgrep startx || startx } ;; |