mirror of
https://github.com/ksyasuda/rice.git
synced 2024-10-28 09:04:10 -07:00
Merge branch 'dev' of github.com:ksyasuda/SudacodeRice into dev
This commit is contained in:
commit
5acf50265e
6
.gitignore
vendored
6
.gitignore
vendored
@ -145,3 +145,9 @@ dmypy.json
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
lvim/ignore
|
||||
lvim/lsp-settings/*
|
||||
lvim/plugin/*
|
||||
lvim/after/*
|
||||
lvim/plugin/packer_compiled.lua
|
||||
|
71
bspwm/bspwm/bspwmrc
Executable file
71
bspwm/bspwm/bspwmrc
Executable file
@ -0,0 +1,71 @@
|
||||
#! /bin/sh
|
||||
|
||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||
|
||||
bspc monitor DP-4 -d I II III IV
|
||||
bspc monitor DP-0 -d V VI VII VIII IX X
|
||||
|
||||
bspc config border_width 6
|
||||
bspc config window_gap 15
|
||||
bspc config top_padding 40
|
||||
|
||||
bspc config split_ratio 0.55
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
bspc config pointer_follows_focus true
|
||||
bspc config focus_follows_pointer true
|
||||
|
||||
bspc rule -a Gimp desktop='^8' state=floating follow=on
|
||||
bspc rule -a Chromium desktop='^5'
|
||||
bspc rule -a firefox desktop='^5'
|
||||
bspc rule -a mplayer2 state=floating
|
||||
bspc rule -a Yad state=floating
|
||||
bspc rule -a Kupfer.py focus=on
|
||||
bspc rule -a Screenkey manage=off
|
||||
bspc rule -a gl state=floating
|
||||
bspc rule -a Gl state=floating
|
||||
bspc rule -a mpv state=floating
|
||||
|
||||
# Border
|
||||
# dracula blue
|
||||
# bspc config focused_border_color "#bd93f9"
|
||||
bspc config focused_border_color "#2C4762"
|
||||
bspc config normal_border_color "#073642"
|
||||
bspc config active_border_color "#073642"
|
||||
|
||||
#
|
||||
# Autostart
|
||||
#
|
||||
# Set display from arandr saved script
|
||||
sh ~/.screenlayout/monitor.sh &
|
||||
# Notifications
|
||||
/usr/bin/dunst &
|
||||
# Polkit
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
# Dex
|
||||
dex -a -s /etc/xdg/autostart/:~/.config/autostart/
|
||||
# Picom
|
||||
picom --config ~/.config/picom/picom.conf &
|
||||
# Network Applet
|
||||
nm-applet --indicator &
|
||||
|
||||
# lxsession
|
||||
if ! pgrep -qaf lxsession; then
|
||||
lxsession -s bspwm -e BSPWM &
|
||||
fi
|
||||
|
||||
# SmoothVideoProject
|
||||
SVPManager &
|
||||
|
||||
# screensaver
|
||||
xss-lock -- xscreensaver-command -lock &
|
||||
|
||||
# Bar
|
||||
# ~/.config/polybar/launch.sh &
|
||||
~/SudacodeRice/scripts/launch_desktop.sh
|
||||
|
||||
# Cursor
|
||||
# xsetroot -cursor_name left_ptr &
|
||||
|
||||
# Low battery notifier
|
||||
# ~/.config/bspwm/scripts/low_bat_notifier.sh
|
104
bspwm/bspwm/keybindings
Normal file
104
bspwm/bspwm/keybindings
Normal file
@ -0,0 +1,104 @@
|
||||
For the latest version of Endeavour OS Bspwm Edition configs, visit our GitHub repository
|
||||
https://github.com/EndeavourOS-Community-Editions/bspwm
|
||||
|
||||
For a quick start guide, read our wiki page
|
||||
https://discovery.endeavouros.com/window-tiling-managers/bspwm-2/2021/03/
|
||||
|
||||
To share your suggestions, please visit our forum thread
|
||||
https://forum.endeavouros.com/t/bspwm-edition/8511
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###################
|
||||
|
||||
Utility Keyboard Shortcuts
|
||||
|
||||
###################
|
||||
|
||||
-> Open terminal (xfce4-terminal)
|
||||
Super + Return
|
||||
|
||||
-> App launcher (Rofi)
|
||||
Super + d
|
||||
|
||||
-> Window switcher
|
||||
Super + Ctrl
|
||||
|
||||
-> Show SSH sessions
|
||||
Super + Shift + d
|
||||
|
||||
-> Power Menu
|
||||
Super + Shift + e
|
||||
|
||||
-> Reload Sxhkd (you need to do this after you modify sxhkdrc)
|
||||
Super + Escape
|
||||
|
||||
-> Screen shot full monitor and save in Pictures folder
|
||||
Print
|
||||
|
||||
-> Show screenshot menu
|
||||
Super + Print
|
||||
|
||||
-> Launch Firefox
|
||||
Super + w
|
||||
|
||||
-> Launch Thunar
|
||||
Super + n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###################
|
||||
|
||||
Bspwm Keyboard Shortcuts
|
||||
|
||||
###################
|
||||
|
||||
-> Restart Bspwm
|
||||
Super + Alt + r
|
||||
|
||||
-> Quit Bspwm
|
||||
Super + Alt + q
|
||||
|
||||
-> Close focused window
|
||||
Super + Shift + q
|
||||
|
||||
-> Switch between tiled and monocle layout
|
||||
Super + m
|
||||
|
||||
-> Swap current and largest window
|
||||
Super + g
|
||||
|
||||
-> Change focus {west, south, north, east}
|
||||
Super + {h, j, k, l}
|
||||
It's like vim keys :)
|
||||
|
||||
-> Switch to different desktop
|
||||
Super + <number>
|
||||
|
||||
-> Send current node to different desktop
|
||||
Super + Shift + <number>
|
||||
|
||||
-> Expand a window {left, bottom, top, right}
|
||||
Super + Alt + {h, j, k l}
|
||||
|
||||
-> Contract a window {left, bottom, top, right}
|
||||
Super + Alt + Shift + {h, j, k, l}
|
||||
|
||||
-> Move a floating window
|
||||
Super + {left, down, up, right}
|
||||
|
||||
-> Focus the last node
|
||||
Super + grave
|
||||
|
||||
-> Focus the last desktop
|
||||
Super + Tab
|
||||
|
||||
-> Focus older node in focus history
|
||||
Super + o
|
||||
|
||||
-> Focus newer node in focus history
|
||||
Super + i
|
BIN
bspwm/bspwm/scripts/i3lock-fancy/circlelock.png
Normal file
BIN
bspwm/bspwm/scripts/i3lock-fancy/circlelock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
bspwm/bspwm/scripts/i3lock-fancy/circlelockdark.png
Normal file
BIN
bspwm/bspwm/scripts/i3lock-fancy/circlelockdark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
141
bspwm/bspwm/scripts/i3lock-fancy/i3lock-fancy.sh
Executable file
141
bspwm/bspwm/scripts/i3lock-fancy/i3lock-fancy.sh
Executable file
@ -0,0 +1,141 @@
|
||||
#!/usr/bin/env bash
|
||||
# Author: Dolores Portalatin <hello@doloresportalatin.info>
|
||||
# Dependencies: imagemagick, i3lock-color-git, scrot, wmctrl (optional)
|
||||
|
||||
# Aquired from https://github.com/meskarune/i3lock-fancy
|
||||
# Modified for use
|
||||
|
||||
set -o errexit -o noclobber -o nounset
|
||||
|
||||
hue=(-level "0%,100%,0.6")
|
||||
effect=(-filter Gaussian -resize 20% -define "filter:sigma=1.5" -resize 500.5%)
|
||||
# default system sans-serif font
|
||||
font=$(convert -list font | awk "{ a[NR] = \$2 } /family: $(fc-match sans -f "%{family}\n")/ { print a[NR-1]; exit }")
|
||||
image=$(mktemp --suffix=.png)
|
||||
shot=(import -window root)
|
||||
desktop=""
|
||||
i3lock_cmd=(i3lock -i "$image")
|
||||
shot_custom=false
|
||||
|
||||
options="Options:
|
||||
-h, --help This help menu.
|
||||
|
||||
-d, --desktop Attempt to minimize all windows before locking.
|
||||
|
||||
-g, --greyscale Set background to greyscale instead of color.
|
||||
|
||||
-p, --pixelate Pixelate the background instead of blur, runs faster.
|
||||
|
||||
-f <fontname>, --font <fontname> Set a custom font.
|
||||
|
||||
-t <text>, --text <text> Set a custom text prompt.
|
||||
|
||||
-l, --listfonts Display a list of possible fonts for use with -f/--font.
|
||||
Note: this option will not lock the screen, it displays
|
||||
the list and exits immediately.
|
||||
|
||||
-n, --nofork Do not fork i3lock after starting.
|
||||
|
||||
-- Must be last option. Set command to use for taking a
|
||||
screenshot. Default is 'import -window root'. Using 'scrot'
|
||||
or 'maim' will increase script speed and allow setting
|
||||
custom flags like having a delay."
|
||||
|
||||
# move pipefail down as for some reason "convert -list font" returns 1
|
||||
set -o pipefail
|
||||
trap 'rm -f "$image"' EXIT
|
||||
temp="$(getopt -o :hdnpglt:f: -l desktop,help,listfonts,nofork,pixelate,greyscale,text:,font: --name "$0" -- "$@")"
|
||||
eval set -- "$temp"
|
||||
|
||||
# l10n support
|
||||
text="Type password to unlock"
|
||||
case "${LANG:-}" in
|
||||
af_* ) text="Tik wagwoord om te ontsluit" ;; # Afrikaans
|
||||
de_* ) text="Bitte Passwort eingeben" ;; # Deutsch
|
||||
da_* ) text="Indtast adgangskode" ;; # Danish
|
||||
en_* ) text="Type password to unlock" ;; # English
|
||||
es_* ) text="Ingrese su contraseña" ;; # Española
|
||||
fr_* ) text="Entrez votre mot de passe" ;; # Français
|
||||
he_* ) text="הליענה לטבל המסיס דלקה" ;; # Hebrew עברית (convert doesn't play bidi well)
|
||||
hi_* ) text="अनलॉक करने के लिए पासवर्ड टाईप करें" ;; #Hindi
|
||||
id_* ) text="Masukkan kata sandi Anda" ;; # Bahasa Indonesia
|
||||
it_* ) text="Inserisci la password" ;; # Italian
|
||||
ja_* ) text="パスワードを入力してください" ;; # Japanese
|
||||
lv_* ) text="Ievadi paroli" ;; # Latvian
|
||||
nb_* ) text="Skriv inn passord" ;; # Norwegian
|
||||
pl_* ) text="Podaj hasło" ;; # Polish
|
||||
pt_* ) text="Digite a senha para desbloquear" ;; # Português
|
||||
tr_* ) text="Giriş yapmak için şifrenizi girin" ;; # Turkish
|
||||
ru_* ) text="Введите пароль" ;; # Russian
|
||||
* ) text="Type password to unlock" ;; # Default to English
|
||||
esac
|
||||
|
||||
while true ; do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
printf "Usage: %s [options]\n\n%s\n\n" "${0##*/}" "$options"; exit 1 ;;
|
||||
-d|--desktop) desktop=$(command -V wmctrl) ; shift ;;
|
||||
-g|--greyscale) hue=(-level "0%,100%,0.6" -set colorspace Gray -average) ; shift ;;
|
||||
-p|--pixelate) effect=(-scale 10% -scale 1000%) ; shift ;;
|
||||
-f|--font)
|
||||
case "$2" in
|
||||
"") shift 2 ;;
|
||||
*) font=$2 ; shift 2 ;;
|
||||
esac ;;
|
||||
-t|--text) text=$2 ; shift 2 ;;
|
||||
-l|--listfonts)
|
||||
convert -list font | awk -F: '/Font: / { print $2 }' | sort -du | command -- ${PAGER:-less}
|
||||
exit 0 ;;
|
||||
-n|--nofork) i3lock_cmd+=(--nofork) ; shift ;;
|
||||
--) shift; shot_custom=true; break ;;
|
||||
*) echo "error" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if "$shot_custom" && [[ $# -gt 0 ]]; then
|
||||
shot=("$@");
|
||||
fi
|
||||
|
||||
command -- "${shot[@]}" "$image"
|
||||
|
||||
value="60" #brightness value to compare to
|
||||
|
||||
color=$(convert "$image" -gravity center -crop 100x100+0+0 +repage -colorspace hsb \
|
||||
-resize 1x1 txt:- | awk -F '[%$]' 'NR==2{gsub(",",""); printf "%.0f\n", $(NF-1)}');
|
||||
|
||||
if [[ $color -gt $value ]]; then #white background image and black text
|
||||
bw="black"
|
||||
icon="/home/$USER/.config/bspwm/scripts/i3lock-fancy/circlelockdark.png"
|
||||
param=("--insidecolor=0000001c" "--ringcolor=0000003e" \
|
||||
"--linecolor=00000000" "--keyhlcolor=ffffff80" "--ringvercolor=ffffff00" \
|
||||
"--separatorcolor=22222260" "--insidevercolor=ffffff1c" \
|
||||
"--ringwrongcolor=ffffff55" "--insidewrongcolor=ffffff1c" \
|
||||
"--verifcolor=ffffff00" "--wrongcolor=ff000000" "--timecolor=ffffff00" \
|
||||
"--datecolor=ffffff00" "--layoutcolor=ffffff00")
|
||||
else #black
|
||||
bw="white"
|
||||
icon="/home/$USER/.config/bspwm/scripts/i3lock-fancy/circlelock.png"
|
||||
param=("--insidecolor=ffffff1c" "--ringcolor=ffffff3e" \
|
||||
"--linecolor=ffffff00" "--keyhlcolor=00000080" "--ringvercolor=00000000" \
|
||||
"--separatorcolor=22222260" "--insidevercolor=0000001c" \
|
||||
"--ringwrongcolor=00000055" "--insidewrongcolor=0000001c" \
|
||||
"--verifcolor=00000000" "--wrongcolor=ff000000" "--timecolor=00000000" \
|
||||
"--datecolor=00000000" "--layoutcolor=00000000")
|
||||
fi
|
||||
|
||||
convert "$image" "${hue[@]}" "${effect[@]}" -font "$font" -pointsize 26 -fill "$bw" -gravity center \
|
||||
-annotate +0+160 "$text" "$icon" -gravity center -composite "$image"
|
||||
|
||||
# If invoked with -d/--desktop, we'll attempt to minimize all windows (ie. show
|
||||
# the desktop) before locking.
|
||||
${desktop} ${desktop:+-k on}
|
||||
|
||||
# try to use i3lock with prepared parameters
|
||||
if ! "${i3lock_cmd[@]}" "${param[@]}" >/dev/null 2>&1; then
|
||||
# We have failed, lets get back to stock one
|
||||
"${i3lock_cmd[@]}"
|
||||
fi
|
||||
|
||||
# As above, if we were passed -d/--desktop, we'll attempt to restore all windows
|
||||
# after unlocking.
|
||||
${desktop} ${desktop:+-k off}
|
5
bspwm/bspwm/scripts/keybindings_rofi.sh
Executable file
5
bspwm/bspwm/scripts/keybindings_rofi.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
awk '/^[a-z]/ && last {print "<small>",$0,"\t",last,"</small>"} {last=""} /^#/{last=$0}' ~/.config/sxhkd/sxhkdrc |
|
||||
column -t -s $'\t' |
|
||||
rofi -dmenu -i -p "keybindings:" -markup-rows -no-show-icons -width 1000 -lines 15 -yoffset 40
|
60
bspwm/bspwm/scripts/low_bat_notifier.sh
Executable file
60
bspwm/bspwm/scripts/low_bat_notifier.sh
Executable file
@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
### VARIABLES
|
||||
|
||||
POLL_INTERVAL=60 # seconds at which to check battery level
|
||||
LOW_BAT=33 # lesser than this is considered low battery
|
||||
|
||||
# If BAT0 doesn't work for you, check available devices with command below
|
||||
#
|
||||
# $ ls -1 /sys/class/power_supply/
|
||||
#
|
||||
BAT_PATH=/sys/class/power_supply/BAT0
|
||||
BAT_STAT=$BAT_PATH/status
|
||||
|
||||
if [[ -f $BAT_PATH/charge_full ]]
|
||||
then
|
||||
BAT_FULL=$BAT_PATH/charge_full
|
||||
BAT_NOW=$BAT_PATH/charge_now
|
||||
elif [[ -f $BAT_PATH/energy_full ]]
|
||||
then
|
||||
BAT_FULL=$BAT_PATH/energy_full
|
||||
BAT_NOW=$BAT_PATH/energy_now
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
### END OF VARIABLES
|
||||
|
||||
kill_running() { # stop older instances to not get multiple notifications
|
||||
local mypid=$$
|
||||
|
||||
declare pids=($(pgrep -f ${0##*/}))
|
||||
|
||||
for pid in ${pids[@]/$mypid/}; do
|
||||
kill $pid
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
# Run only if battery is detected
|
||||
if ls -1qA /sys/class/power_supply/ | grep -q .
|
||||
then
|
||||
|
||||
kill_running
|
||||
|
||||
while true
|
||||
do
|
||||
bf=$(cat $BAT_FULL)
|
||||
bn=$(cat $BAT_NOW)
|
||||
bs=$(cat $BAT_STAT)
|
||||
|
||||
bat_percent=$(( 100 * $bn / $bf ))
|
||||
|
||||
if [[ $bat_percent -lt $LOW_BAT && "$bs" = "Discharging" ]]
|
||||
then
|
||||
notify-send --urgency=critical "$bat_percent% : Low Battery!"
|
||||
fi
|
||||
sleep $POLL_INTERVAL
|
||||
done
|
||||
fi
|
20
bspwm/bspwm/scripts/screenshot.sh
Normal file
20
bspwm/bspwm/scripts/screenshot.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# options to be displayed
|
||||
option0="screen"
|
||||
option1="area"
|
||||
option2="window"
|
||||
|
||||
# options to be displyed
|
||||
options="$option0\n$option1\n$option2"
|
||||
|
||||
selected="$(echo -e "$options" | rofi -lines 3 -dmenu -p "scrot")"
|
||||
case $selected in
|
||||
$option0)
|
||||
cd ~/Pictures/ && sleep 1 && scrot;;
|
||||
$option1)
|
||||
cd ~/Pictures/ && scrot -s;;
|
||||
$option2)
|
||||
cd ~/Pictures/ && sleep 1 && scrot -u;;
|
||||
esac
|
||||
|
1
bspwm/bspwm/sxhkdrc
Symbolic link
1
bspwm/bspwm/sxhkdrc
Symbolic link
@ -0,0 +1 @@
|
||||
../sxhkd/sxhkdrc
|
429
dotfiles/.vimrc
429
dotfiles/.vimrc
@ -1,96 +1,95 @@
|
||||
syntax on
|
||||
set laststatus=2 "enable status bar
|
||||
set number "turn on line numbers
|
||||
set colorcolumn=80 "set color column on col 80
|
||||
set laststatus=2
|
||||
set number
|
||||
set colorcolumn=80
|
||||
set tw=80
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
set autoindent "auto indents code
|
||||
set smartindent "smart indents code
|
||||
set hlsearch "highlight search
|
||||
set smartcase "set search case based on search query
|
||||
set noerrorbells "no error bells
|
||||
set title "set title of vim based on file open
|
||||
set mouse=a " enable mouse in vim
|
||||
set nospell
|
||||
set autoindent
|
||||
set smartindent
|
||||
set hlsearch
|
||||
set smartcase
|
||||
set ignorecase
|
||||
set noerrorbells
|
||||
set title
|
||||
set mouse=a
|
||||
set relativenumber
|
||||
set splitright
|
||||
set expandtab
|
||||
set cursorline
|
||||
set scrolloff=8
|
||||
set sidescrolloff=8
|
||||
" show candidates for vim commands with tab
|
||||
set wildmenu
|
||||
|
||||
set encoding=UTF-8
|
||||
set guifont=FiraCode\ Nerd\ Font\ 18
|
||||
|
||||
" lsp handled by coc
|
||||
let g:ale_disable_lsp = 1
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
|
||||
" Plug 'valloric/youcompleteme'
|
||||
|
||||
Plug 'tabnine/YouCompleteMe'
|
||||
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
Plug 'vim-scripts/SQLUtilities'
|
||||
|
||||
Plug 'itchyny/vim-gitbranch'
|
||||
|
||||
Plug 'ap/vim-css-color'
|
||||
|
||||
Plug 'wakatime/vim-wakatime'
|
||||
|
||||
Plug 'itchyny/lightline.vim'
|
||||
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
|
||||
Plug 'mhinz/vim-startify'
|
||||
|
||||
Plug 'alvan/vim-closetag'
|
||||
|
||||
Plug 'MathSquared/vim-python-sql'
|
||||
|
||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
||||
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
Plug 'shime/vim-livedown'
|
||||
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
|
||||
Plug '~/.fzf'
|
||||
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
Plug 'kristijanhusak/vim-carbon-now-sh'
|
||||
|
||||
Plug 'prabirshrestha/vim-lsp'
|
||||
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
|
||||
|
||||
Plug 'morhetz/gruvbox'
|
||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'pechorin/any-jump.vim'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'shime/vim-livedown'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'alvan/vim-closetag'
|
||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'wakatime/vim-wakatime'
|
||||
Plug 'itchyny/vim-gitbranch'
|
||||
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'dense-analysis/ale'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'maximbaz/lightline-ale'
|
||||
" On-demand lazy load
|
||||
Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] }
|
||||
" colorschemes
|
||||
Plug 'joshdick/onedark.vim'
|
||||
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
||||
Plug 'sainnhe/sonokai'
|
||||
Plug 'romgrk/doom-one.vim'
|
||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
||||
|
||||
call plug#end()
|
||||
|
||||
let g:doom_one_terminal_colors = v:true
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Carbon Now
|
||||
"------------------------------------------------------------------------------
|
||||
" carbon now
|
||||
" let g:carbon_now_sh_base_url = 'http://localhost:8888'
|
||||
let g:carbon_now_sh_browser = 'firefox'
|
||||
|
||||
|
||||
"jump to remembered position in file if available
|
||||
if has("autocmd")
|
||||
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
||||
endif
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"fzf
|
||||
"
|
||||
"------------------------------------------------------------------------------
|
||||
" This is the default extra key bindings
|
||||
let g:fzf_commands_expect = 'ctrl-enter'
|
||||
let g:fzf_buffers_jump = 1
|
||||
let g:fzf_tags_command = 'ctags -R'
|
||||
" This is the default option:
|
||||
" - Preview window on the right with 50% width
|
||||
" - CTRL-/ will toggle preview window.
|
||||
" - Note that this array is passed as arguments to fzf#vim#with_preview function.
|
||||
" - To learn more about preview window options, see `--preview-window` section of `man fzf`.
|
||||
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
|
||||
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.75 } }
|
||||
|
||||
let g:fzf_action = {
|
||||
\ 'ctrl-t': 'tab split',
|
||||
\ 'ctrl-x': 'split',
|
||||
@ -109,10 +108,6 @@ let g:fzf_action = {
|
||||
\ 'ctrl-x': 'split',
|
||||
\ 'ctrl-v': 'vsplit' }
|
||||
|
||||
"Center of screen and popup
|
||||
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
|
||||
|
||||
|
||||
" Customize fzf colors to match your color scheme
|
||||
" - fzf#wrap translates this to a set of `--color` options
|
||||
let g:fzf_colors =
|
||||
@ -136,7 +131,9 @@ let g:fzf_colors =
|
||||
" 'previous-history' instead of 'down' and 'up'.
|
||||
let g:fzf_history_dir = '~/.local/share/fzf-history'
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"livedown
|
||||
"------------------------------------------------------------------------------
|
||||
" should markdown preview get shown automatically upon opening markdown buffer
|
||||
let g:livedown_autorun = 0
|
||||
" should the browser window pop-up upon previewing
|
||||
@ -146,6 +143,9 @@ let g:livedown_port = 3001
|
||||
" the browser to use, can also be firefox, chrome or other, depending on your executable
|
||||
let g:livedown_browser = "firefox"
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"ale
|
||||
"------------------------------------------------------------------------------
|
||||
function! FormatShell(buffer) abort
|
||||
return {
|
||||
\ 'command': 'shfmt -i=0 -ci -sr'
|
||||
@ -154,7 +154,6 @@ endfunction
|
||||
|
||||
execute ale#fix#registry#Add('shfmt', 'FormatShell', ['sh'], 'shfmt for shell')
|
||||
|
||||
"ale
|
||||
let g:ale_linter_aliases = {'javascriptreact': ['css', 'javascript'], 'typescriptreact': ['css', 'javascript']}
|
||||
let g:ale_linters = {'javascriptreact': ['css', 'javascript'], 'typescriptreact': ['css', 'javascript'], 'python': ['pylint','pycodestyle', 'pydocstyle'], 'sh': ['shellcheck']}
|
||||
" Fix files with prettier, and then ESLint.
|
||||
@ -163,7 +162,9 @@ let g:ale_fixers = {'*': ['remove_trailing_lines', 'trim_whitespace'], 'javascri
|
||||
let g:ale_fix_on_save = 1
|
||||
let g:ale_virtualenv_dir_names = ['env']
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"vim-closetag
|
||||
"------------------------------------------------------------------------------
|
||||
" filenames like *.xml, *.html, *.xhtml, ...
|
||||
" These are the file extensions where this plugin is enabled.
|
||||
let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.js,*.ts,*.jsx,*.tsx'
|
||||
@ -195,7 +196,9 @@ let g:closetag_regions = {
|
||||
\ 'javascript.jsx': 'jsxRegion',
|
||||
\ }
|
||||
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" YOUCOMPLETEME (replaced with coc)
|
||||
"------------------------------------------------------------------------------
|
||||
let g:ycm_autoclose_preview_window_after_insertion = 1 "close ycm help window after accepting option
|
||||
let g:ycm_language_server =
|
||||
\ [
|
||||
@ -212,6 +215,9 @@ let g:ycm_language_server =
|
||||
\ ]
|
||||
let g:ycm_autoclose_preview_window_after_completion = 1
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" WAKATIME
|
||||
"------------------------------------------------------------------------------
|
||||
let g:wakatime_PythonBinary = '/usr/bin/python' " (Default: 'python')
|
||||
let g:wakatime_OverrideCommandPrefix = '/usr/bin/wakatime' " (Default: '')
|
||||
|
||||
@ -220,13 +226,14 @@ let vim_markdown_preview_github=1
|
||||
let vim_markdown_preview_toggle=1
|
||||
let vim_markdown_preview_temp_file=0
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"NERDTREE
|
||||
"autocmd vimenter * NERDTree "launch nerdtree on vim start
|
||||
"------------------------------------------------------------------------------
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
let g:NERDTreeWinPos = "right" "open nerdtree on the right
|
||||
let NERDTreeShowHidden=0 "show hidden files use capital 'I' to toggle
|
||||
let g:NERDTreeWinSize=45
|
||||
"autocmd VimEnter * wincmd p "put the cursor back into the editing pane on start
|
||||
|
||||
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
||||
\ 'Modified' :'✹',
|
||||
\ 'Staged' :'✚',
|
||||
@ -244,14 +251,11 @@ let g:NERDTreeGitStatusUseNerdFonts = 1
|
||||
autocmd BufEnter * if bufname('#') =~# "^NERD_tree_" && winnr('$') > 1 | b# | endif
|
||||
"avoid crashes when calling vim-plug functions while the cursor is on the NERDTree window
|
||||
let g:plug_window = 'noautocmd vertical topleft new'
|
||||
|
||||
" NERDTress File highlighting
|
||||
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
|
||||
exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
|
||||
exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
|
||||
endfunction
|
||||
|
||||
|
||||
"NERDTree hilight files by extension
|
||||
call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#282c34')
|
||||
call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#282c34')
|
||||
@ -271,7 +275,6 @@ call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#282c34')
|
||||
call NERDTreeHighlightFile('cpp', 'blue', 'none', 'blue', '#282c34')
|
||||
call NERDTreeHighlightFile('h', 'cyan', 'none', 'cyan', '#282c34')
|
||||
call NERDTreeHighlightFile('txt', 'blue', 'none', 'red', '#282c34')
|
||||
|
||||
let g:NERDTreeColorMapCustom = {
|
||||
\ "Modified" : ["#528AB3", "NONE", "NONE", "NONE"],
|
||||
\ "Staged" : ["#538B54", "NONE", "NONE", "NONE"],
|
||||
@ -280,37 +283,64 @@ let g:NERDTreeColorMapCustom = {
|
||||
\ "Clean" : ["#87939A", "NONE", "NONE", "NONE"]
|
||||
\ }
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"PRETTIER
|
||||
"------------------------------------------------------------------------------
|
||||
packloadall "enable prettier
|
||||
let g:prettier#autoformat = 1
|
||||
let g:prettier#autoformat_require_pragma = 0
|
||||
let g:prettier#exec_cmd_path = "/usr/bin/prettier"
|
||||
|
||||
"LIGHTLINE
|
||||
" 'onedark', 'material', 'darcula'
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'deus',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'fugitive', 'filename' ] ],
|
||||
\ 'right': [ [ 'lineinfo' ],
|
||||
\ [ 'percent' ],
|
||||
\ [ 'charvaluehex', 'fileformat', 'fileencoding', 'filetype' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
"------------------------------------------------------------------------------
|
||||
" Lightline
|
||||
"------------------------------------------------------------------------------
|
||||
let g:lightline = {}
|
||||
" 'one', 'material', 'darcula', 'deus'
|
||||
let g:lightline.colorscheme = "deus"
|
||||
let g:lightline.component_function = {
|
||||
\ 'fugitive': 'MyFugitive',
|
||||
\ 'readonly': 'Readonly',
|
||||
\ 'modified': 'Modified',
|
||||
\ 'filename': 'Filename'
|
||||
\
|
||||
\ },
|
||||
\ 'component': {
|
||||
\ 'charhexvalue': '0x%B'
|
||||
\ },
|
||||
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
|
||||
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
|
||||
\ 'filename': 'Filename',
|
||||
\ 'cocstatus': 'coc#status',
|
||||
\}
|
||||
|
||||
let g:lightline.component = { 'charhexvalue': '0x%B' }
|
||||
let g:lightline.separator = { 'left': "\ue0b0", 'right': "\ue0b2" }
|
||||
let g:lightline.subseparator = { 'left': "\ue0b1", 'right': "\ue0b3" }
|
||||
|
||||
let g:lightline.component_expand = {
|
||||
\ 'linter_checking': 'lightline#ale#checking',
|
||||
\ 'linter_infos': 'lightline#ale#infos',
|
||||
\ 'linter_warnings': 'lightline#ale#warnings',
|
||||
\ 'linter_errors': 'lightline#ale#errors',
|
||||
\ 'linter_ok': 'lightline#ale#ok',
|
||||
\ }
|
||||
|
||||
let g:lightline.component_type = {
|
||||
\ 'linter_checking': 'right',
|
||||
\ 'linter_infos': 'right',
|
||||
\ 'linter_warnings': 'warning',
|
||||
\ 'linter_errors': 'error',
|
||||
\ 'linter_ok': 'right',
|
||||
\ }
|
||||
|
||||
let g:lightline.active = {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'cocstatus', 'fugitive', 'filename' ] ],
|
||||
\ 'right': [ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok' ],
|
||||
\ [ 'lineinfo' ],
|
||||
\ [ 'percent' ],
|
||||
\ [ 'fileformat', 'fileencoding', 'filetype'] ] }
|
||||
|
||||
let g:lightline#ale#indicator_checking = "\uf110 "
|
||||
let g:lightline#ale#indicator_infos = "\uf129 "
|
||||
let g:lightline#ale#indicator_warnings = "\uf071 "
|
||||
let g:lightline#ale#indicator_errors = "\uf05e "
|
||||
let g:lightline#ale#indicator_ok = "\uf00c "
|
||||
|
||||
" Use autocmd to force lightline update.
|
||||
autocmd User CocStatusChange,CocDiagnosticChange call lightline#update()
|
||||
function! Modified()
|
||||
if &filetype == "help"
|
||||
return ""
|
||||
@ -344,35 +374,27 @@ function! Filename()
|
||||
\ ('' != Modified() ? ' ' . Modified() : '')
|
||||
endfunction
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"COLORSCHEME
|
||||
if !has('gui_running')
|
||||
set t_Co=256
|
||||
endif
|
||||
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
set t_Co=256
|
||||
set termguicolors
|
||||
set noshowmode "disable default vim insert text at bottom
|
||||
let g:onedark_termcolors=256 "enable 256 colors
|
||||
" packadd! onedark.vim "add onedark colorcheme may not work
|
||||
" colorscheme onedark "set colorsheme as onedark
|
||||
|
||||
"material theme
|
||||
" let g:material_theme_style = 'default' | 'palenight' | 'ocean' | 'lighter' | 'darker' | 'default-community' | 'palenight-community' | 'ocean-community' | 'lighter-community' | 'darker-community'
|
||||
let g:material_terminal_italics = 1
|
||||
let g:material_theme_style = 'darker'
|
||||
" let g:material_theme_style = 'default'
|
||||
" let g:material_theme_style = 'darker-community'
|
||||
colorscheme material
|
||||
|
||||
let g:doom_one_terminal_colors = v:true
|
||||
" colorscheme doom-one
|
||||
|
||||
"Tokyo night conifg
|
||||
let g:tokyonight_style='night'
|
||||
let g:tokyonight_transparent_background=1
|
||||
let g:tokyonight_enable_italic=1
|
||||
|
||||
"let g:molokai_original = 1
|
||||
let g:rehash256 = 1
|
||||
|
||||
|
||||
"bash language server
|
||||
"------------------------------------------------------------------------------
|
||||
"""bash language server
|
||||
"------------------------------------------------------------------------------
|
||||
if executable('bash-language-server')
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'bash-language-server',
|
||||
@ -381,15 +403,180 @@ if executable('bash-language-server')
|
||||
\ })
|
||||
endif
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" NICE COC
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
set hidden
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
set cmdheight=2
|
||||
set updatetime=300
|
||||
" Don't pass messages to |ins-completion-menu|.
|
||||
set shortmess+=c
|
||||
" Always show the signcolumn, otherwise it would shift the text each time
|
||||
" diagnostics appear/become resolved.
|
||||
if has("nvim-0.5.0") || has("patch-8.1.1564")
|
||||
" Recently vim can merge signcolumn and number column into one
|
||||
set signcolumn=number
|
||||
else
|
||||
set signcolumn=yes
|
||||
endif
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
" format on enter, <cr> could be remapped by other vim plugin
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
" GoTo code navigation.
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
" Use K to show documentation in preview window.
|
||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
elseif (coc#rpc#ready())
|
||||
call CocActionAsync('doHover')
|
||||
else
|
||||
execute '!' . &keywordprg . " " . expand('<cword>')
|
||||
endif
|
||||
endfunction
|
||||
" Highlight the symbol and its references when holding the cursor.
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
" Symbol renaming.
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
" Formatting selected code.
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
augroup mygroup
|
||||
autocmd!
|
||||
" Setup formatexpr specified filetype(s).
|
||||
autocmd FileType typescript,json,python,py,sh,bash setl formatexpr=CocAction('formatSelected')
|
||||
" Update signature help on jump placeholder.
|
||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
augroup end
|
||||
" Applying codeAction to the selected region.
|
||||
" Example: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
" Remap keys for applying codeAction to the current buffer.
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Apply AutoFix to problem on the current line.
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
" Run the Code Lens action on the current line.
|
||||
nmap <leader>cl <Plug>(coc-codelens-action)
|
||||
" Map function and class text objects
|
||||
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
|
||||
xmap if <Plug>(coc-funcobj-i)
|
||||
omap if <Plug>(coc-funcobj-i)
|
||||
xmap af <Plug>(coc-funcobj-a)
|
||||
omap af <Plug>(coc-funcobj-a)
|
||||
xmap ic <Plug>(coc-classobj-i)
|
||||
omap ic <Plug>(coc-classobj-i)
|
||||
xmap ac <Plug>(coc-classobj-a)
|
||||
omap ac <Plug>(coc-classobj-a)
|
||||
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
||||
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
||||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
||||
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
||||
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
endif
|
||||
" Use CTRL-S for selections ranges.
|
||||
" Requires 'textDocument/selectionRange' support of language server.
|
||||
nmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
xmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
" Add `:Format` command to format current buffer.
|
||||
command! -nargs=0 Format :call CocActionAsync('format')
|
||||
" Add `:Fold` command to fold current buffer.
|
||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||
" Add `:OR` command for organize imports of the current buffer.
|
||||
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')
|
||||
" Add (Neo)Vim's native statusline support.
|
||||
" NOTE: Please see `:h coc-status` for integrations with external plugins that
|
||||
" provide custom statusline: lightline.vim, vim-airline.
|
||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||
" Mappings for CoCList
|
||||
" Show all diagnostics.
|
||||
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
|
||||
" Manage extensions.
|
||||
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
|
||||
" Show commands.
|
||||
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
|
||||
" Find symbol of current document.
|
||||
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
|
||||
" Search workspace symbols.
|
||||
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
|
||||
" Do default action for next item.
|
||||
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
|
||||
" Do default action for previous item.
|
||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
||||
" Resume latest coc list.
|
||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" custom commands
|
||||
"------------------------------------------------------------------------------
|
||||
command! Reload execute "source ~/.vimrc"
|
||||
command! Config execute ":e ~/.vimrc"
|
||||
"------------------------------------------------------------------------------
|
||||
"KEYBINDINGS
|
||||
map <C-c> :nohls<Cr>
|
||||
map <F2> :NERDTreeToggle<CR>
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
map <C-s> <Plug>(Prettier)
|
||||
map<C-c> :nohls<CR>
|
||||
"------------------------------------------------------------------------------
|
||||
let mapleader = "\<Space>"
|
||||
map <F5> :!
|
||||
map <C-T> :ter++close<CR>
|
||||
map <C-D> :YcmShowDetailedDiagnostic<CR>
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
map <C-l> :LivedownToggle<CR>
|
||||
map <C-o> :FZF ~<CR>
|
||||
nnoremap <C-T> :wa<CR>:vertical botright term ++kill=term<CR>
|
||||
" fzf
|
||||
nmap // :CocCommand fzf-preview.Lines<CR>
|
||||
nmap ?? :CocCommand fzf-preview.BufferLines<CR>
|
||||
nmap <leader>sf :FZF<CR>
|
||||
" buffers
|
||||
nmap <leader>bb :CocCommand fzf-preview.Buffers<CR>
|
||||
nmap <leader>bB :CocCommand fzf-preview.AllBuffers<CR>
|
||||
nmap <leader>bk :bdelete<CR>
|
||||
nmap <leader>bn :enew<CR>
|
||||
" git
|
||||
nmap <leader>gg :tab term ++close lazygit<CR>
|
||||
nmap <leader>gc :CocCommand fzf-preview.GitLogs<CR>
|
||||
nmap <leader>gf :CocCommand fzf-preview.GitFiles<CR>
|
||||
nmap <leader>gs :CocCommand fzf-preview.GitStatus<CR>
|
||||
" help
|
||||
nmap <leader>hc :CocCommand fzf-preview.CommandPalette<CR>
|
||||
nmap <leader>hk :Maps<CR>
|
||||
" any jump plugin
|
||||
nmap <leader>j :AnyJump<CR>
|
||||
" toggle/open
|
||||
nmap <leader>on :NERDTreeToggle<CR>
|
||||
nmap <leader>ot :vertical botright ter<CR>
|
||||
" peek/preview
|
||||
nmap <leader>pr :CocCommand fzf-preview.CocReferences<Cr>
|
||||
nmap <leader>pi :CocCommand fzf-preview.CocImplementations<Cr>
|
||||
nmap <leader>pd :CocCommand fzf-preview.CocDiagnostics<Cr>
|
||||
" search
|
||||
nmap <leader>sc :nohls<Cr>
|
||||
"toggle coc outline
|
||||
nmap <leader>to :CocOutline<CR>
|
||||
"which key
|
||||
set timeoutlen=400
|
||||
nnoremap <silent> <leader> :WhichKey '<Space>'<CR>
|
||||
|
@ -10,12 +10,13 @@ fi
|
||||
#If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
|
||||
export ZSH="/home/sudacode/.oh-my-zsh"
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
export PATH="$HOME/scripts:$PATH"
|
||||
export PATH="$HOME/Work/scripts:$PATH"
|
||||
export PATH="$HOME/Work/rofi/:$PATH"
|
||||
export PATH="$HOME/.bin:$PATH"
|
||||
export PATH="$HOME/Projects/Python/Sudasong/src/:$PATH"
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export EDITOR=vim
|
||||
export VISUAL=vim
|
||||
|
||||
@ -223,29 +224,29 @@ PS2="===>"
|
||||
|
||||
# # Add gem to PATH
|
||||
# export PATH=$PATH:/home/sudacode/.gem/ruby/2.7.0/bin
|
||||
#
|
||||
#
|
||||
# # Add go to PATH
|
||||
# export PATH=$PATH:/home/sudacode/go/bin
|
||||
#
|
||||
#
|
||||
# alias freud='cd /home/sudacode/'
|
||||
#
|
||||
#
|
||||
# # Add yarn to PATH
|
||||
# export PATH="$PATH:`yarn global bin`"
|
||||
#
|
||||
#
|
||||
# # set terminal color to 256 color
|
||||
# export TERM=xterm-256color
|
||||
#
|
||||
export TERM=xterm-256color
|
||||
#
|
||||
# export PATH=$PATH:/home/sudacode/.local/bin
|
||||
#
|
||||
#
|
||||
# add emacs to path
|
||||
export PATH=$PATH:/home/sudacode/.emacs.d/bin
|
||||
#
|
||||
#
|
||||
#Enable tab completions for flags in colorls
|
||||
source $(dirname $(gem which colorls))/tab_complete.sh
|
||||
#
|
||||
#
|
||||
# # add pythno to PATH
|
||||
# export PATH="$PATH:/usr/bin/python"
|
||||
#
|
||||
#
|
||||
# # add jdk-8 to path
|
||||
# export PATH="$PATH:/usr/lib/jvm/java-8-openjdk/bin"
|
||||
# export CLASSPATH="$CLASSPATH:/usr/share/java/mariadb-jdbc/mariadb-java-client.jar"
|
||||
@ -261,7 +262,9 @@ ibus-daemon -drx
|
||||
export VISUAL=vim
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_DIR="$HOME/.cache"
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
# export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
|
||||
bindkey '^ ' autosuggest-accept
|
||||
|
||||
|
||||
# source the Xmodmap file to get custom keybindings
|
||||
@ -287,3 +290,10 @@ export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
# # <<< conda initialize <<<
|
||||
|
||||
# neofetch
|
||||
|
||||
# added by Snowflake SnowSQL installer
|
||||
export PATH=/home/sudacode/.bin:$PATH
|
||||
|
||||
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/yubikey-agent/yubikey-agent.sock"
|
||||
|
||||
eval $(thefuck --alias)
|
||||
|
@ -34,7 +34,7 @@
|
||||
origin = top-right
|
||||
|
||||
# Offset from the origin
|
||||
offset = 22x54
|
||||
offset = 14x48
|
||||
|
||||
# Scale factor. It is auto-detected if value is 0.
|
||||
scale = 0
|
||||
@ -69,7 +69,8 @@
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
|
||||
transparency = 0
|
||||
# transparency = 0
|
||||
transparency = 15;
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
@ -87,7 +88,7 @@
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 7
|
||||
frame_width = 4
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#aaaaaa"
|
||||
@ -300,18 +301,17 @@
|
||||
#new_icon = /path/to/icon
|
||||
|
||||
[urgency_normal]
|
||||
background = "#282c34"
|
||||
foreground = "#b26cc6"
|
||||
# frame_color = "#51afef"
|
||||
background = "#24282f"
|
||||
foreground = "#c678dd"
|
||||
frame_color = "#98be65"
|
||||
timeout = 5
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#new_icon = /path/to/icon
|
||||
|
||||
[urgency_critical]
|
||||
background = "#900000"
|
||||
background = "#ff6c6b"
|
||||
foreground = "#ffffff"
|
||||
frame_color = "#ff0000"
|
||||
frame_color = "#900000"
|
||||
timeout = 0
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#new_icon = /path/to/icon
|
||||
|
293
lvim/config.lua
293
lvim/config.lua
@ -2,47 +2,22 @@
|
||||
lvim.log.level = "warn"
|
||||
lvim.format_on_save = true
|
||||
lvim.colorscheme = "onedarker"
|
||||
|
||||
lvim.leader = "space"
|
||||
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
|
||||
|
||||
-- custom settings
|
||||
local init_custom_options = function()
|
||||
local custom_options = {
|
||||
relativenumber = true,
|
||||
colorcolumn = "80",
|
||||
scrolloff = 10,
|
||||
ignorecase = true,
|
||||
smartcase = true,
|
||||
}
|
||||
|
||||
for k, v in pairs(custom_options) do
|
||||
vim.opt[k] = v
|
||||
end
|
||||
end
|
||||
init_custom_options()
|
||||
|
||||
lvim.builtin.dashboard.active = true
|
||||
lvim.builtin.terminal.active = true
|
||||
|
||||
-- Nvimtree
|
||||
lvim.builtin.nvimtree.setup.view.side = "left"
|
||||
lvim.builtin.nvimtree.show_icons.git = 1
|
||||
lvim.builtin.nvimtree.hide_dotfiles = 0
|
||||
|
||||
-- Treesitter
|
||||
lvim.builtin.treesitter.highlight.enabled = true
|
||||
lvim.builtin.treesitter.matchup.enable = true
|
||||
lvim.builtin.treesitter.context_commentstring.enable = true
|
||||
|
||||
local components = require("lvim.core.lualine.components")
|
||||
|
||||
lvim.builtin.lualine.sections.lualine_a = { "mode" }
|
||||
lvim.builtin.lualine.sections.lualine_c = { components.python_env }
|
||||
lvim.builtin.lualine.sections.lualine_y = {
|
||||
components.location,
|
||||
}
|
||||
|
||||
lvim.builtin.lualine.sections.lualine_y = { components.location, }
|
||||
lvim.builtin.treesitter.ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
@ -55,11 +30,14 @@ lvim.builtin.treesitter.ensure_installed = {
|
||||
"rust",
|
||||
"java",
|
||||
"yaml",
|
||||
"dockerfile",
|
||||
"markdown",
|
||||
"make"
|
||||
}
|
||||
|
||||
lvim.builtin.treesitter.ignore_install = { "haskell" }
|
||||
lvim.builtin.treesitter.highlight.enabled = true
|
||||
|
||||
-- formatters
|
||||
local formatters = require "lvim.lsp.null-ls.formatters"
|
||||
formatters.setup {
|
||||
{ exe = "black", filetypes = { "python" } },
|
||||
@ -72,20 +50,21 @@ formatters.setup {
|
||||
{ exe = "shfmt", filetypes = { "shell", "sh" }, args = {'-i=0','-sr', '-ci'} },
|
||||
}
|
||||
|
||||
-- -- set additional linters
|
||||
-- linters
|
||||
local linters = require "lvim.lsp.null-ls.linters"
|
||||
linters.setup {
|
||||
{ exe = "flake8", filetypes = { "python" } },
|
||||
{
|
||||
exe = "shellcheck",
|
||||
fieltypes = { "shell" },
|
||||
args = { "--severity", "warning" },
|
||||
}
|
||||
filetypes = { "shell", "sh" },
|
||||
args = { "--severity", "warning", "--shell", "/bin/bash", "--enable", "check-unassigned-uppercase,add-default-case,deprecate-which" },
|
||||
},
|
||||
}
|
||||
|
||||
-- lsp signature cfg
|
||||
local lsp_signature_cfg = {
|
||||
debug = false, -- set to true to enable debug logging
|
||||
log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
|
||||
-- log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
|
||||
-- default is ~/.cache/nvim/lsp_signature.log
|
||||
verbose = false, -- show debug line number
|
||||
|
||||
@ -109,7 +88,7 @@ local lsp_signature_cfg = {
|
||||
hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight
|
||||
max_height = 20, -- max height of signature floating_window, if content is more than max_height, you can scroll down
|
||||
-- to view the hiding contents
|
||||
max_width = 150, -- max_width of signature floating_window, line will be wrapped if exceed max_width
|
||||
max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width
|
||||
handler_opts = {
|
||||
border = "rounded" -- double, rounded, single, shadow, none
|
||||
},
|
||||
@ -122,11 +101,11 @@ local lsp_signature_cfg = {
|
||||
|
||||
padding = '', -- character to pad on left and right of signature can be ' ', or '|' etc
|
||||
|
||||
transparency = nil, -- disabled by default, allow floating win transparent value 1~100
|
||||
transparency = 85, -- disabled by default, allow floating win transparent value 1~100
|
||||
shadow_blend = 36, -- if you using shadow as border use this set the opacity
|
||||
shadow_guibg = 'Black', -- if you using shadow as border use this set the color e.g. 'Green' or '#121315'
|
||||
timer_interval = 200, -- default timer check interval set to lower value if you want to reduce latency
|
||||
toggle_key = nil -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
|
||||
toggle_key = '<C-l>' -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
|
||||
}
|
||||
|
||||
-- Additional Plugins
|
||||
@ -150,7 +129,7 @@ lvim.plugins = {
|
||||
"rmagatti/goto-preview",
|
||||
config = function()
|
||||
require('goto-preview').setup {
|
||||
width = 120; -- Width of the floating window
|
||||
width = 100; -- Width of the floating window
|
||||
height = 25; -- Height of the floating window
|
||||
default_mappings = false; -- Bind default mappings
|
||||
debug = false; -- Print debug information
|
||||
@ -188,6 +167,8 @@ lvim.plugins = {
|
||||
'wakatime/vim-wakatime',
|
||||
'ap/vim-css-color',
|
||||
"p00f/nvim-ts-rainbow",
|
||||
"tzachar/cmp-tabnine",
|
||||
"onsails/lspkind-nvim"
|
||||
}
|
||||
|
||||
-- add jedi_language_server
|
||||
@ -201,16 +182,96 @@ require'lspconfig'.sqlls.setup{}
|
||||
-- require('lspconfig').bashls.setup{}
|
||||
require'lspconfig'.bashls.setup{}
|
||||
|
||||
-- Setup nvim-cmp.
|
||||
local cmp = require'cmp'
|
||||
-- cmp.setup({
|
||||
-- snippet = {
|
||||
-- -- REQUIRED - you must specify a snippet engine
|
||||
-- expand = function(args)
|
||||
-- -- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- -- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
-- end,
|
||||
-- },
|
||||
-- mapping = {
|
||||
-- ['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
-- ['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||
-- ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||
-- ['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
||||
-- ['<C-e>'] = cmp.mapping({
|
||||
-- i = cmp.mapping.abort(),
|
||||
-- c = cmp.mapping.close(),
|
||||
-- }),
|
||||
-- ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
-- },
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = 'nvim_lsp' },
|
||||
-- }, {
|
||||
-- { name = 'buffer' },
|
||||
-- })
|
||||
-- })
|
||||
|
||||
-- -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
-- cmp.setup.cmdline('/', {
|
||||
-- sources = {
|
||||
-- { name = 'buffer' }
|
||||
-- }
|
||||
-- })
|
||||
|
||||
-- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
-- cmp.setup.cmdline(':', {
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = 'path' }
|
||||
-- }, {
|
||||
-- { name = 'cmdline' }
|
||||
-- })
|
||||
-- })
|
||||
|
||||
-- Setup lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
||||
require('lspconfig')['jedi_language_server'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['bashls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['dockerls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['jsonls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['sumneko_lua'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['pyright'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['dotls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['yamlls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['html'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['eslint'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
-- lsp_signature
|
||||
require'lsp_signature'.setup()
|
||||
-- require'lsp_signature'.setup(lsp_signature_cfg)
|
||||
|
||||
require('goto-preview').setup {
|
||||
width = 220; -- Width of the floating window
|
||||
height = 55; -- Height of the floating window
|
||||
width = 150; -- Width of the floating window
|
||||
height = 45; -- Height of the floating window
|
||||
border = {"↖", "─" ,"┐", "│", "┘", "─", "└", "│"}; -- Border characters of the floating window
|
||||
default_mappings = true; -- Bind default mappings
|
||||
debug = false; -- Print debug information
|
||||
opacity = nil; -- 0-100 opacity level of the floating window where 100 is fully transparent.
|
||||
opacity = 55; -- 0-100 opacity level of the floating window where 100 is fully transparent.
|
||||
resizing_mappings = false; -- Binds arrow keys to resizing the floating window.
|
||||
post_open_hook = nil; -- A function taking two arguments, a buffer and a window to be ran as a hook.
|
||||
-- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality.
|
||||
@ -227,7 +288,7 @@ vim.g.symbols_outline = {
|
||||
auto_preview = true,
|
||||
position = 'right',
|
||||
relative_width = true,
|
||||
width = 25,
|
||||
width = 30,
|
||||
show_numbers = false,
|
||||
show_relative_numbers = false,
|
||||
show_symbol_details = true,
|
||||
@ -273,89 +334,81 @@ vim.g.symbols_outline = {
|
||||
}
|
||||
}
|
||||
|
||||
vim.api.nvim_set_keymap("n", "ss", "<cmd>SymbolsOutline<CR>", {noremap=true})
|
||||
-- lsp-kind
|
||||
local lspkind = require('lspkind')
|
||||
cmp.setup {
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
with_text = false, -- do not show text alongside icons
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
|
||||
-- Setup nvim-cmp.
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
||||
['<C-e>'] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline('/', {
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
-- The function below will be called before any actual modifications from lspkind
|
||||
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
|
||||
-- before = function (entry, vim_item)
|
||||
-- ...
|
||||
-- return vim_item
|
||||
-- end
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
||||
-- Setup lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
||||
require('lspconfig')['jedi_language_server'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['bashls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['dockerls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['jsonls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['sumneko_lua'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['pyright'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['dotls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['yamlls'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['html'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require('lspconfig')['eslint'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
-- tabnine
|
||||
require'cmp'.setup {
|
||||
sources = {
|
||||
{ name = 'cmp_tabnine' },
|
||||
},
|
||||
}
|
||||
|
||||
local source_mapping = {
|
||||
buffer = "[Buffer]",
|
||||
nvim_lsp = "[LSP]",
|
||||
nvim_lua = "[Lua]",
|
||||
cmp_tabnine = "[TN]",
|
||||
path = "[Path]",
|
||||
}
|
||||
|
||||
require'cmp'.setup {
|
||||
sources = {
|
||||
{ name = 'cmp_tabnine' },
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
vim_item.kind = lspkind.presets.default[vim_item.kind]
|
||||
local menu = source_mapping[entry.source.name]
|
||||
if entry.source.name == 'cmp_tabnine' then
|
||||
if entry.completion_item.data ~= nil and entry.completion_item.data.detail ~= nil then
|
||||
menu = entry.completion_item.data.detail .. ' ' .. menu
|
||||
end
|
||||
vim_item.kind = ''
|
||||
end
|
||||
vim_item.menu = menu
|
||||
return vim_item
|
||||
end
|
||||
},
|
||||
}
|
||||
|
||||
-- custom settings
|
||||
local init_custom_options = function()
|
||||
local custom_options = {
|
||||
relativenumber = true,
|
||||
colorcolumn = "80",
|
||||
scrolloff = 10,
|
||||
ignorecase = true,
|
||||
smartcase = true,
|
||||
tabstop = 4,
|
||||
shiftwidth = 4,
|
||||
undofile = false,
|
||||
}
|
||||
|
||||
for k, v in pairs(custom_options) do
|
||||
vim.opt[k] = v
|
||||
end
|
||||
end
|
||||
init_custom_options()
|
||||
|
||||
-- move windows to right side of screen
|
||||
vim.cmd("autocmd! BufEnter * if &ft ==# 'help' | wincmd L | endif")
|
||||
vim.cmd("autocmd! BufEnter * if &ft ==# 'man' | wincmd L | endif")
|
||||
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
|
||||
-- lvim.autocommands.custom_groups = {
|
||||
-- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
|
||||
|
887
lvim/lv-settings.lua
Normal file
887
lvim/lv-settings.lua
Normal file
@ -0,0 +1,887 @@
|
||||
lvim.autocommands._auto_resize["1"]["1"] = "VimResized"
|
||||
lvim.autocommands._auto_resize["1"]["2"] = "*"
|
||||
lvim.autocommands._auto_resize["1"]["3"] = "tabdo wincmd ="
|
||||
lvim.autocommands._buffer_bindings["1"]["1"] = "FileType"
|
||||
lvim.autocommands._buffer_bindings["1"]["2"] = "floaterm"
|
||||
lvim.autocommands._buffer_bindings["1"]["3"] = "nnoremap <silent> <buffer> q :q<CR>"
|
||||
lvim.autocommands._filetypechanges["1"]["1"] = "BufWinEnter"
|
||||
lvim.autocommands._filetypechanges["1"]["2"] = ".tf"
|
||||
lvim.autocommands._filetypechanges["1"]["3"] = "setlocal filetype=terraform"
|
||||
lvim.autocommands._filetypechanges["2"]["1"] = "BufRead"
|
||||
lvim.autocommands._filetypechanges["2"]["2"] = "*.tf"
|
||||
lvim.autocommands._filetypechanges["2"]["3"] = "setlocal filetype=terraform"
|
||||
lvim.autocommands._filetypechanges["3"]["1"] = "BufNewFile"
|
||||
lvim.autocommands._filetypechanges["3"]["2"] = "*.tf"
|
||||
lvim.autocommands._filetypechanges["3"]["3"] = "setlocal filetype=terraform"
|
||||
lvim.autocommands._filetypechanges["4"]["1"] = "BufWinEnter"
|
||||
lvim.autocommands._filetypechanges["4"]["2"] = ".zsh"
|
||||
lvim.autocommands._filetypechanges["4"]["3"] = "setlocal filetype=sh"
|
||||
lvim.autocommands._filetypechanges["5"]["1"] = "BufRead"
|
||||
lvim.autocommands._filetypechanges["5"]["2"] = "*.zsh"
|
||||
lvim.autocommands._filetypechanges["5"]["3"] = "setlocal filetype=sh"
|
||||
lvim.autocommands._filetypechanges["6"]["1"] = "BufNewFile"
|
||||
lvim.autocommands._filetypechanges["6"]["2"] = "*.zsh"
|
||||
lvim.autocommands._filetypechanges["6"]["3"] = "setlocal filetype=sh"
|
||||
lvim.autocommands._formatoptions["1"]["1"] = "BufWinEnter,BufRead,BufNewFile"
|
||||
lvim.autocommands._formatoptions["1"]["2"] = "*"
|
||||
lvim.autocommands._formatoptions["1"]["3"] = "setlocal formatoptions-=c formatoptions-=r formatoptions-=o"
|
||||
lvim.autocommands._general_lsp["1"]["1"] = "FileType"
|
||||
lvim.autocommands._general_lsp["1"]["2"] = "lspinfo,lsp-installer,null-ls-info"
|
||||
lvim.autocommands._general_lsp["1"]["3"] = "nnoremap <silent> <buffer> q :close<CR>"
|
||||
lvim.autocommands._general_settings["1"]["1"] = "FileType"
|
||||
lvim.autocommands._general_settings["1"]["2"] = "qf,help,man"
|
||||
lvim.autocommands._general_settings["1"]["3"] = "nnoremap <silent> <buffer> q :close<CR>"
|
||||
lvim.autocommands._general_settings["2"]["1"] = "TextYankPost"
|
||||
lvim.autocommands._general_settings["2"]["2"] = "*"
|
||||
lvim.autocommands._general_settings["2"]["3"] = "lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200})"
|
||||
lvim.autocommands._general_settings["3"]["1"] = "BufWinEnter"
|
||||
lvim.autocommands._general_settings["3"]["2"] = "dashboard"
|
||||
lvim.autocommands._general_settings["3"]["3"] = "setlocal cursorline signcolumn=yes cursorcolumn number"
|
||||
lvim.autocommands._general_settings["4"]["1"] = "BufWritePost"
|
||||
lvim.autocommands._general_settings["4"]["2"] = "/home/sudacode/.config/lvim/config.lua"
|
||||
lvim.autocommands._general_settings["4"]["3"] = "lua require('lvim.config'):reload()"
|
||||
lvim.autocommands._general_settings["5"]["1"] = "FileType"
|
||||
lvim.autocommands._general_settings["5"]["2"] = "qf"
|
||||
lvim.autocommands._general_settings["5"]["3"] = "set nobuflisted"
|
||||
lvim.autocommands._git["1"]["1"] = "FileType"
|
||||
lvim.autocommands._git["1"]["2"] = "gitcommit"
|
||||
lvim.autocommands._git["1"]["3"] = "setlocal wrap"
|
||||
lvim.autocommands._git["2"]["1"] = "FileType"
|
||||
lvim.autocommands._git["2"]["2"] = "gitcommit"
|
||||
lvim.autocommands._git["2"]["3"] = "setlocal spell"
|
||||
lvim.autocommands._markdown["1"]["1"] = "FileType"
|
||||
lvim.autocommands._markdown["1"]["2"] = "markdown"
|
||||
lvim.autocommands._markdown["1"]["3"] = "setlocal wrap"
|
||||
lvim.autocommands._markdown["2"]["1"] = "FileType"
|
||||
lvim.autocommands._markdown["2"]["2"] = "markdown"
|
||||
lvim.autocommands._markdown["2"]["3"] = "setlocal spell"
|
||||
lvim.builtin.autopairs.active = true
|
||||
lvim.builtin.autopairs.check_ts = true
|
||||
lvim.builtin.autopairs.disable_filetype["1"] = "TelescopePrompt"
|
||||
lvim.builtin.autopairs.disable_filetype["2"] = "spectre_panel"
|
||||
lvim.builtin.autopairs.disable_in_macro = false
|
||||
lvim.builtin.autopairs.disable_in_visualblock = false
|
||||
lvim.builtin.autopairs.enable_afterquote = true
|
||||
lvim.builtin.autopairs.enable_check_bracket_line = false
|
||||
lvim.builtin.autopairs.enable_moveright = true
|
||||
lvim.builtin.autopairs.fast_wrap.chars["1"] = "{"
|
||||
lvim.builtin.autopairs.fast_wrap.chars["2"] = "["
|
||||
lvim.builtin.autopairs.fast_wrap.chars["3"] = "("
|
||||
lvim.builtin.autopairs.fast_wrap.chars["4"] = "\""
|
||||
lvim.builtin.autopairs.fast_wrap.chars["5"] = "'"
|
||||
lvim.builtin.autopairs.fast_wrap.check_comma = true
|
||||
lvim.builtin.autopairs.fast_wrap.end_key = "$"
|
||||
lvim.builtin.autopairs.fast_wrap.highlight_grey = "Comment"
|
||||
lvim.builtin.autopairs.fast_wrap.highlight = "Search"
|
||||
lvim.builtin.autopairs.fast_wrap.keys = "qwertyuiopzxcvbnmasdfghjkl"
|
||||
lvim.builtin.autopairs.fast_wrap.map = "<M-e>"
|
||||
lvim.builtin.autopairs.fast_wrap.offset = 0
|
||||
lvim.builtin.autopairs.fast_wrap.pattern = "[%'%\"%)%>%]%)%}%,]"
|
||||
lvim.builtin.autopairs.ignored_next_char = "[%w%%%'%[%\"%.]"
|
||||
lvim.builtin.autopairs.map_bs = true
|
||||
lvim.builtin.autopairs.map_char.all = "("
|
||||
lvim.builtin.autopairs.map_char.tex = "{"
|
||||
lvim.builtin.autopairs.map_c_w = false
|
||||
lvim.builtin.autopairs.ts_config.java = false
|
||||
lvim.builtin.autopairs.ts_config.javascript["1"] = "string"
|
||||
lvim.builtin.autopairs.ts_config.javascript["2"] = "template_string"
|
||||
lvim.builtin.autopairs.ts_config.lua["1"] = "string"
|
||||
lvim.builtin.autopairs.ts_config.lua["2"] = "source"
|
||||
lvim.builtin.bufferline.active = true
|
||||
lvim.builtin.cmp.completion.keyword_length = 1
|
||||
lvim.builtin.cmp.confirm_opts.behavior = "replace"
|
||||
lvim.builtin.cmp.confirm_opts.select = false
|
||||
lvim.builtin.cmp.documentation.border["1"] = "╭"
|
||||
lvim.builtin.cmp.documentation.border["2"] = "─"
|
||||
lvim.builtin.cmp.documentation.border["3"] = "╮"
|
||||
lvim.builtin.cmp.documentation.border["4"] = "│"
|
||||
lvim.builtin.cmp.documentation.border["5"] = "╯"
|
||||
lvim.builtin.cmp.documentation.border["6"] = "─"
|
||||
lvim.builtin.cmp.documentation.border["7"] = "╰"
|
||||
lvim.builtin.cmp.documentation.border["8"] = "│"
|
||||
lvim.builtin.cmp.experimental.ghost_text = true
|
||||
lvim.builtin.cmp.experimental.native_menu = false
|
||||
lvim.builtin.cmp.formatting.duplicates.buffer = 1
|
||||
lvim.builtin.cmp.formatting.duplicates_default = 0
|
||||
lvim.builtin.cmp.formatting.duplicates.luasnip = 1
|
||||
lvim.builtin.cmp.formatting.duplicates.nvim_lsp = 0
|
||||
lvim.builtin.cmp.formatting.duplicates.path = 1
|
||||
lvim.builtin.cmp.formatting.fields["1"] = "kind"
|
||||
lvim.builtin.cmp.formatting.fields["2"] = "abbr"
|
||||
lvim.builtin.cmp.formatting.fields["3"] = "menu"
|
||||
-- lvim.builtin.cmp.formatting.format = function ()
|
||||
lvim.builtin.cmp.formatting.kind_icons.Class = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Color = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Constant = "ﲀ "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Constructor = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.EnumMember = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Enum = "練"
|
||||
lvim.builtin.cmp.formatting.kind_icons.Event = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Field = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.File = ""
|
||||
lvim.builtin.cmp.formatting.kind_icons.Folder = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Function = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Interface = "ﰮ "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Keyword = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Method = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Module = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Operator = ""
|
||||
lvim.builtin.cmp.formatting.kind_icons.Property = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Reference = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Snippet = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Struct = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Text = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.TypeParameter = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Unit = "塞"
|
||||
lvim.builtin.cmp.formatting.kind_icons.Value = " "
|
||||
lvim.builtin.cmp.formatting.kind_icons.Variable = " "
|
||||
lvim.builtin.cmp.formatting.source_names.buffer = "(Buffer)"
|
||||
lvim.builtin.cmp.formatting.source_names.calc = "(Calc)"
|
||||
lvim.builtin.cmp.formatting.source_names.cmp_tabnine = "(Tabnine)"
|
||||
lvim.builtin.cmp.formatting.source_names.emoji = "(Emoji)"
|
||||
lvim.builtin.cmp.formatting.source_names.luasnip = "(Snippet)"
|
||||
lvim.builtin.cmp.formatting.source_names.nvim_lsp = "(LSP)"
|
||||
lvim.builtin.cmp.formatting.source_names.path = "(Path)"
|
||||
lvim.builtin.cmp.formatting.source_names.vsnip = "(Snippet)"
|
||||
-- lvim.builtin.cmp.mapping["<C-D>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<C-E>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<C-F>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<C-K>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<CR>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<C-Space>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<NL>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<S-Tab>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<S-Tab>"].s = function ()
|
||||
-- lvim.builtin.cmp.mapping["<Tab>"].i = function ()
|
||||
-- lvim.builtin.cmp.mapping["<Tab>"].s = function ()
|
||||
-- lvim.builtin.cmp.snippet.expand = function ()
|
||||
lvim.builtin.cmp.sources["10"].name = "crates"
|
||||
lvim.builtin.cmp.sources["1"].name = "nvim_lsp"
|
||||
lvim.builtin.cmp.sources["2"].name = "path"
|
||||
lvim.builtin.cmp.sources["3"].name = "luasnip"
|
||||
lvim.builtin.cmp.sources["4"].name = "cmp_tabnine"
|
||||
lvim.builtin.cmp.sources["5"].name = "nvim_lua"
|
||||
lvim.builtin.cmp.sources["6"].name = "buffer"
|
||||
lvim.builtin.cmp.sources["7"].name = "calc"
|
||||
lvim.builtin.cmp.sources["8"].name = "emoji"
|
||||
lvim.builtin.cmp.sources["9"].name = "treesitter"
|
||||
lvim.builtin.comment.active = true
|
||||
lvim.builtin.comment.ignore = "^$"
|
||||
lvim.builtin.comment.mappings.basic = true
|
||||
lvim.builtin.comment.mappings.extra = false
|
||||
lvim.builtin.comment.opleader.block = "gb"
|
||||
lvim.builtin.comment.opleader.line = "gc"
|
||||
lvim.builtin.comment.padding = true
|
||||
-- lvim.builtin.comment.pre_hook = function ()
|
||||
lvim.builtin.comment.toggler.block = "gbc"
|
||||
lvim.builtin.comment.toggler.line = "gcc"
|
||||
lvim.builtin.dap.active = false
|
||||
lvim.builtin.dap.breakpoint.linehl = ""
|
||||
lvim.builtin.dap.breakpoint.numhl = ""
|
||||
lvim.builtin.dap.breakpoint_rejected.linehl = ""
|
||||
lvim.builtin.dap.breakpoint_rejected.numhl = ""
|
||||
lvim.builtin.dap.breakpoint_rejected.text = ""
|
||||
lvim.builtin.dap.breakpoint_rejected.texthl = "LspDiagnosticsSignHint"
|
||||
lvim.builtin.dap.breakpoint.text = ""
|
||||
lvim.builtin.dap.breakpoint.texthl = "LspDiagnosticsSignError"
|
||||
lvim.builtin.dap.stopped.linehl = "DiagnosticUnderlineInfo"
|
||||
lvim.builtin.dap.stopped.numhl = "LspDiagnosticsSignInformation"
|
||||
lvim.builtin.dap.stopped.text = ""
|
||||
lvim.builtin.dap.stopped.texthl = "LspDiagnosticsSignInformation"
|
||||
lvim.builtin.dashboard.active = true
|
||||
lvim.builtin.dashboard.custom_header["1"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["10"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["11"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["12"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["13"] = "⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["14"] = "⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤"
|
||||
lvim.builtin.dashboard.custom_header["15"] = "⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿"
|
||||
lvim.builtin.dashboard.custom_header["16"] = "⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏"
|
||||
lvim.builtin.dashboard.custom_header["17"] = "⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃"
|
||||
lvim.builtin.dashboard.custom_header["18"] = "⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀"
|
||||
lvim.builtin.dashboard.custom_header["2"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["3"] = " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["4"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["5"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["6"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["7"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["8"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_header["9"] = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
|
||||
lvim.builtin.dashboard.custom_section.a.command = "Telescope find_files"
|
||||
lvim.builtin.dashboard.custom_section.a.description["1"] = " Find File "
|
||||
lvim.builtin.dashboard.custom_section.b.command = ":ene!"
|
||||
lvim.builtin.dashboard.custom_section.b.description["1"] = " New File "
|
||||
lvim.builtin.dashboard.custom_section.c.command = "Telescope projects"
|
||||
lvim.builtin.dashboard.custom_section.c.description["1"] = " Recent Projects "
|
||||
lvim.builtin.dashboard.custom_section.d.command = "Telescope oldfiles"
|
||||
lvim.builtin.dashboard.custom_section.d.description["1"] = " Recently Used Files"
|
||||
lvim.builtin.dashboard.custom_section.e.command = "Telescope live_grep"
|
||||
lvim.builtin.dashboard.custom_section.e.description["1"] = " Find Word "
|
||||
lvim.builtin.dashboard.custom_section.f.command = ":e /home/sudacode/.config/lvim/config.lua"
|
||||
lvim.builtin.dashboard.custom_section.f.description["1"] = " Configuration "
|
||||
lvim.builtin.dashboard.disable_at_vim_enter = 0
|
||||
lvim.builtin.dashboard.footer["1"] = "lunarvim.org"
|
||||
lvim.builtin.dashboard.search_handler = "telescope"
|
||||
lvim.builtin.dashboard.session_directory = "/home/sudacode/.cache/nvim/sessions"
|
||||
lvim.builtin.gitsigns.active = true
|
||||
lvim.builtin.gitsigns.opts.attach_to_untracked = true
|
||||
lvim.builtin.gitsigns.opts.current_line_blame = false
|
||||
lvim.builtin.gitsigns.opts.current_line_blame_formatter_opts.relative_time = false
|
||||
lvim.builtin.gitsigns.opts.current_line_blame_opts.delay = 1000
|
||||
lvim.builtin.gitsigns.opts.current_line_blame_opts.ignore_whitespace = false
|
||||
lvim.builtin.gitsigns.opts.current_line_blame_opts.virt_text_pos = "eol"
|
||||
lvim.builtin.gitsigns.opts.current_line_blame_opts.virt_text = true
|
||||
lvim.builtin.gitsigns.opts.keymaps.buffer = true
|
||||
lvim.builtin.gitsigns.opts.keymaps.noremap = true
|
||||
lvim.builtin.gitsigns.opts.linehl = false
|
||||
lvim.builtin.gitsigns.opts.max_file_length = 40000
|
||||
lvim.builtin.gitsigns.opts.numhl = false
|
||||
lvim.builtin.gitsigns.opts.preview_config.border = "rounded"
|
||||
lvim.builtin.gitsigns.opts.preview_config.col = 1
|
||||
lvim.builtin.gitsigns.opts.preview_config.relative = "cursor"
|
||||
lvim.builtin.gitsigns.opts.preview_config.row = 0
|
||||
lvim.builtin.gitsigns.opts.preview_config.style = "minimal"
|
||||
lvim.builtin.gitsigns.opts.signcolumn = true
|
||||
lvim.builtin.gitsigns.opts.sign_priority = 6
|
||||
lvim.builtin.gitsigns.opts.signs.add.hl = "GitSignsAdd"
|
||||
lvim.builtin.gitsigns.opts.signs.add.linehl = "GitSignsAddLn"
|
||||
lvim.builtin.gitsigns.opts.signs.add.numhl = "GitSignsAddNr"
|
||||
lvim.builtin.gitsigns.opts.signs.add.text = "▎"
|
||||
lvim.builtin.gitsigns.opts.signs.changedelete.hl = "GitSignsChange"
|
||||
lvim.builtin.gitsigns.opts.signs.changedelete.linehl = "GitSignsChangeLn"
|
||||
lvim.builtin.gitsigns.opts.signs.changedelete.numhl = "GitSignsChangeNr"
|
||||
lvim.builtin.gitsigns.opts.signs.changedelete.text = "▎"
|
||||
lvim.builtin.gitsigns.opts.signs.change.hl = "GitSignsChange"
|
||||
lvim.builtin.gitsigns.opts.signs.change.linehl = "GitSignsChangeLn"
|
||||
lvim.builtin.gitsigns.opts.signs.change.numhl = "GitSignsChangeNr"
|
||||
lvim.builtin.gitsigns.opts.signs.change.text = "▎"
|
||||
lvim.builtin.gitsigns.opts.signs.delete.hl = "GitSignsDelete"
|
||||
lvim.builtin.gitsigns.opts.signs.delete.linehl = "GitSignsDeleteLn"
|
||||
lvim.builtin.gitsigns.opts.signs.delete.numhl = "GitSignsDeleteNr"
|
||||
lvim.builtin.gitsigns.opts.signs.delete.text = "契"
|
||||
lvim.builtin.gitsigns.opts.signs.topdelete.hl = "GitSignsDelete"
|
||||
lvim.builtin.gitsigns.opts.signs.topdelete.linehl = "GitSignsDeleteLn"
|
||||
lvim.builtin.gitsigns.opts.signs.topdelete.numhl = "GitSignsDeleteNr"
|
||||
lvim.builtin.gitsigns.opts.signs.topdelete.text = "契"
|
||||
lvim.builtin.gitsigns.opts.update_debounce = 200
|
||||
lvim.builtin.gitsigns.opts.watch_gitdir.follow_files = true
|
||||
lvim.builtin.gitsigns.opts.watch_gitdir.interval = 1000
|
||||
lvim.builtin.gitsigns.opts.word_diff = false
|
||||
lvim.builtin.lualine.active = true
|
||||
lvim.builtin.lualine.extensions["1"] = "nvim-tree"
|
||||
lvim.builtin.lualine.inactive_sections.lualine_a["1"] = "filename"
|
||||
lvim.builtin.lualine.options.component_separators.left = ""
|
||||
lvim.builtin.lualine.options.component_separators.right = ""
|
||||
lvim.builtin.lualine.options.disabled_filetypes["1"] = "dashboard"
|
||||
lvim.builtin.lualine.options.disabled_filetypes["2"] = "NvimTree"
|
||||
lvim.builtin.lualine.options.disabled_filetypes["3"] = "Outline"
|
||||
lvim.builtin.lualine.options.icons_enabled = true
|
||||
lvim.builtin.lualine.options.section_separators.left = ""
|
||||
lvim.builtin.lualine.options.section_separators.right = ""
|
||||
lvim.builtin.lualine.options.theme = "onedarker"
|
||||
lvim.builtin.lualine.sections.lualine_a["1"] = "mode"
|
||||
lvim.builtin.lualine.sections.lualine_b["1"]["1"] = "b:gitsigns_head"
|
||||
lvim.builtin.lualine.sections.lualine_b["1"].color.gui = "bold"
|
||||
-- lvim.builtin.lualine.sections.lualine_b["1"].cond = function ()
|
||||
lvim.builtin.lualine.sections.lualine_b["1"].icon = " "
|
||||
lvim.builtin.lualine.sections.lualine_b["2"]["1"] = "filename"
|
||||
-- lvim.builtin.lualine.sections.lualine_c["1"]["1"] = function ()
|
||||
lvim.builtin.lualine.sections.lualine_c["1"].color.fg = "#98be65"
|
||||
-- lvim.builtin.lualine.sections.lualine_c["1"].cond = function ()
|
||||
lvim.builtin.lualine.sections.lualine_x["1"]["1"] = "diagnostics"
|
||||
-- lvim.builtin.lualine.sections.lualine_x["1"].cond = function ()
|
||||
lvim.builtin.lualine.sections.lualine_x["1"].sources["1"] = "nvim_diagnostic"
|
||||
lvim.builtin.lualine.sections.lualine_x["1"].symbols.error = " "
|
||||
lvim.builtin.lualine.sections.lualine_x["1"].symbols.hint = " "
|
||||
lvim.builtin.lualine.sections.lualine_x["1"].symbols.info = " "
|
||||
lvim.builtin.lualine.sections.lualine_x["1"].symbols.warn = " "
|
||||
-- lvim.builtin.lualine.sections.lualine_x["2"]["1"] = function ()
|
||||
lvim.builtin.lualine.sections.lualine_x["2"].color.fg = "#98be65"
|
||||
-- lvim.builtin.lualine.sections.lualine_x["2"].cond = function ()
|
||||
-- lvim.builtin.lualine.sections.lualine_x["3"]["1"] = function ()
|
||||
lvim.builtin.lualine.sections.lualine_x["3"].color.gui = "bold"
|
||||
-- lvim.builtin.lualine.sections.lualine_x["3"].cond = function ()
|
||||
lvim.builtin.lualine.sections.lualine_x["4"]["1"] = "filetype"
|
||||
-- lvim.builtin.lualine.sections.lualine_x["4"].cond = function ()
|
||||
lvim.builtin.lualine.sections.lualine_y["1"]["1"] = "location"
|
||||
-- lvim.builtin.lualine.sections.lualine_y["1"].cond = function ()
|
||||
-- lvim.builtin.lualine.sections.lualine_z["1"]["1"] = function ()
|
||||
lvim.builtin.lualine.sections.lualine_z["1"].color.bg = "#202328"
|
||||
lvim.builtin.lualine.sections.lualine_z["1"].color.fg = "#ECBE7B"
|
||||
lvim.builtin.lualine.sections.lualine_z["1"].padding.left = 0
|
||||
lvim.builtin.lualine.sections.lualine_z["1"].padding.right = 0
|
||||
lvim.builtin.lualine.style = "lvim"
|
||||
lvim.builtin.notify.active = false
|
||||
lvim.builtin.notify.opts.background_colour = "Normal"
|
||||
lvim.builtin.notify.opts.icons.DEBUG = ""
|
||||
lvim.builtin.notify.opts.icons.ERROR = ""
|
||||
lvim.builtin.notify.opts.icons.INFO = ""
|
||||
lvim.builtin.notify.opts.icons.TRACE = "✎"
|
||||
lvim.builtin.notify.opts.icons.WARN = ""
|
||||
lvim.builtin.notify.opts.minimum_width = 50
|
||||
lvim.builtin.notify.opts.render = "default"
|
||||
lvim.builtin.notify.opts.stages = "slide"
|
||||
lvim.builtin.notify.opts.timeout = 5000
|
||||
lvim.builtin.nvimtree.active = true
|
||||
lvim.builtin.nvimtree.disable_window_picker = 0
|
||||
lvim.builtin.nvimtree.git_hl = 1
|
||||
lvim.builtin.nvimtree.hide_dotfiles = 0
|
||||
lvim.builtin.nvimtree.icons.default = ""
|
||||
lvim.builtin.nvimtree.icons.folder.default = ""
|
||||
lvim.builtin.nvimtree.icons.folder.empty = ""
|
||||
lvim.builtin.nvimtree.icons.folder.empty_open = ""
|
||||
lvim.builtin.nvimtree.icons.folder.open = ""
|
||||
lvim.builtin.nvimtree.icons.folder.symlink = ""
|
||||
lvim.builtin.nvimtree.icons.git.deleted = ""
|
||||
lvim.builtin.nvimtree.icons.git.ignored = "◌"
|
||||
lvim.builtin.nvimtree.icons.git.renamed = "➜"
|
||||
lvim.builtin.nvimtree.icons.git.staged = "S"
|
||||
lvim.builtin.nvimtree.icons.git.unmerged = ""
|
||||
lvim.builtin.nvimtree.icons.git.unstaged = ""
|
||||
lvim.builtin.nvimtree.icons.git.untracked = "U"
|
||||
lvim.builtin.nvimtree.icons.symlink = ""
|
||||
lvim.builtin.nvimtree.quit_on_open = 0
|
||||
lvim.builtin.nvimtree.respect_buf_cwd = 1
|
||||
lvim.builtin.nvimtree.root_folder_modifier = ":t"
|
||||
lvim.builtin.nvimtree.setup.auto_close = true
|
||||
lvim.builtin.nvimtree.setup.diagnostics.enable = true
|
||||
lvim.builtin.nvimtree.setup.diagnostics.icons.error = ""
|
||||
lvim.builtin.nvimtree.setup.diagnostics.icons.hint = ""
|
||||
lvim.builtin.nvimtree.setup.diagnostics.icons.info = ""
|
||||
lvim.builtin.nvimtree.setup.diagnostics.icons.warning = ""
|
||||
lvim.builtin.nvimtree.setup.disable_netrw = false
|
||||
lvim.builtin.nvimtree.setup.filters.custom["1"] = ".git"
|
||||
lvim.builtin.nvimtree.setup.filters.custom["2"] = "node_modules"
|
||||
lvim.builtin.nvimtree.setup.filters.custom["3"] = ".cache"
|
||||
lvim.builtin.nvimtree.setup.filters.dotfiles = false
|
||||
lvim.builtin.nvimtree.setup.git.enable = true
|
||||
lvim.builtin.nvimtree.setup.git.ignore = true
|
||||
lvim.builtin.nvimtree.setup.git.timeout = 200
|
||||
lvim.builtin.nvimtree.setup.hijack_cursor = false
|
||||
lvim.builtin.nvimtree.setup.hijack_netrw = false
|
||||
lvim.builtin.nvimtree.setup.ignore_ft_on_setup["1"] = "startify"
|
||||
lvim.builtin.nvimtree.setup.ignore_ft_on_setup["2"] = "dashboard"
|
||||
lvim.builtin.nvimtree.setup.ignore_ft_on_setup["3"] = "alpha"
|
||||
lvim.builtin.nvimtree.setup.open_on_setup = false
|
||||
lvim.builtin.nvimtree.setup.open_on_tab = false
|
||||
lvim.builtin.nvimtree.setup.update_cwd = true
|
||||
lvim.builtin.nvimtree.setup.update_focused_file.enable = true
|
||||
lvim.builtin.nvimtree.setup.update_focused_file.update_cwd = true
|
||||
lvim.builtin.nvimtree.setup.update_to_buf_dir.auto_open = true
|
||||
lvim.builtin.nvimtree.setup.update_to_buf_dir.enable = true
|
||||
lvim.builtin.nvimtree.setup.view.auto_resize = true
|
||||
lvim.builtin.nvimtree.setup.view.height = 30
|
||||
lvim.builtin.nvimtree.setup.view.mappings.custom_only = false
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["1"].cb = ":lua require'nvim-tree'.on_keypress('edit')<CR>"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["1"].key["1"] = "l"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["1"].key["2"] = "<CR>"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["1"].key["3"] = "o"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["2"].cb = ":lua require'nvim-tree'.on_keypress('close_node')<CR>"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["2"].key = "h"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["3"].cb = ":lua require'nvim-tree'.on_keypress('vsplit')<CR>"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["3"].key = "v"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["4"].cb = ":lua require'nvim-tree'.on_keypress('cd')<CR>"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["4"].key = "C"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["5"].cb = "<cmd>lua require'lvim.core.nvimtree'.start_telescope('find_files')<cr>"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["5"].key = "gtf"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["6"].cb = "<cmd>lua require'lvim.core.nvimtree'.start_telescope('live_grep')<cr>"
|
||||
lvim.builtin.nvimtree.setup.view.mappings.list["6"].key = "gtg"
|
||||
lvim.builtin.nvimtree.setup.view.number = false
|
||||
lvim.builtin.nvimtree.setup.view.relativenumber = false
|
||||
lvim.builtin.nvimtree.setup.view.side = "left"
|
||||
lvim.builtin.nvimtree.setup.view.width = 30
|
||||
lvim.builtin.nvimtree.show_icons.files = 1
|
||||
lvim.builtin.nvimtree.show_icons.folder_arrows = 1
|
||||
lvim.builtin.nvimtree.show_icons.folders = 1
|
||||
lvim.builtin.nvimtree.show_icons.git = 1
|
||||
lvim.builtin.nvimtree.show_icons.tree_width = 30
|
||||
lvim.builtin.project.active = true
|
||||
lvim.builtin.project.datapath = "/home/sudacode/.cache/nvim"
|
||||
lvim.builtin.project.detection_methods["1"] = "pattern"
|
||||
lvim.builtin.project.manual_mode = false
|
||||
lvim.builtin.project.patterns["1"] = ".git"
|
||||
lvim.builtin.project.patterns["2"] = "_darcs"
|
||||
lvim.builtin.project.patterns["3"] = ".hg"
|
||||
lvim.builtin.project.patterns["4"] = ".bzr"
|
||||
lvim.builtin.project.patterns["5"] = ".svn"
|
||||
lvim.builtin.project.patterns["6"] = "Makefile"
|
||||
lvim.builtin.project.patterns["7"] = "package.json"
|
||||
lvim.builtin.project.show_hidden = false
|
||||
lvim.builtin.project.silent_chdir = true
|
||||
lvim.builtin.telescope.active = true
|
||||
lvim.builtin.telescope.defaults.borderchars["1"] = "─"
|
||||
lvim.builtin.telescope.defaults.borderchars["2"] = "│"
|
||||
lvim.builtin.telescope.defaults.borderchars["3"] = "─"
|
||||
lvim.builtin.telescope.defaults.borderchars["4"] = "│"
|
||||
lvim.builtin.telescope.defaults.borderchars["5"] = "╭"
|
||||
lvim.builtin.telescope.defaults.borderchars["6"] = "╮"
|
||||
lvim.builtin.telescope.defaults.borderchars["7"] = "╯"
|
||||
lvim.builtin.telescope.defaults.borderchars["8"] = "╰"
|
||||
lvim.builtin.telescope.defaults.color_devicons = true
|
||||
lvim.builtin.telescope.defaults.entry_prefix = " "
|
||||
lvim.builtin.telescope.defaults.initial_mode = "insert"
|
||||
lvim.builtin.telescope.defaults.layout_config.horizontal.mirror = false
|
||||
lvim.builtin.telescope.defaults.layout_config.preview_cutoff = 120
|
||||
lvim.builtin.telescope.defaults.layout_config.vertical.mirror = false
|
||||
lvim.builtin.telescope.defaults.layout_config.width = 0.75
|
||||
lvim.builtin.telescope.defaults.layout_strategy = "horizontal"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<C-c>"]["1"] = "close"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<C-j>"]["1"] = "cycle_history_next"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<C-k>"]["1"] = "cycle_history_prev"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<C-n>"]["1"] = "move_selection_next"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<C-p>"]["1"] = "move_selection_previous"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<C-q>"]["1"] = "smart_send_to_qflist"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<C-q>"]["2"] = "open_qflist"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<CR>"]["1"] = "select_default"
|
||||
lvim.builtin.telescope.defaults.mappings.i["<CR>"]["2"] = "center"
|
||||
lvim.builtin.telescope.defaults.mappings.n["<C-n>"]["1"] = "move_selection_next"
|
||||
lvim.builtin.telescope.defaults.mappings.n["<C-p>"]["1"] = "move_selection_previous"
|
||||
lvim.builtin.telescope.defaults.mappings.n["<C-q>"]["1"] = "smart_send_to_qflist"
|
||||
lvim.builtin.telescope.defaults.mappings.n["<C-q>"]["2"] = "open_qflist"
|
||||
lvim.builtin.telescope.defaults.path_display.shorten = 5
|
||||
lvim.builtin.telescope.defaults.pickers.find_files.find_command["1"] = "fd"
|
||||
lvim.builtin.telescope.defaults.pickers.find_files.find_command["2"] = "--type=file"
|
||||
lvim.builtin.telescope.defaults.pickers.find_files.find_command["3"] = "--hidden"
|
||||
lvim.builtin.telescope.defaults.pickers.find_files.find_command["4"] = "--smart-case"
|
||||
lvim.builtin.telescope.defaults.pickers.live_grep.only_sort_text = true
|
||||
lvim.builtin.telescope.defaults.prompt_prefix = " "
|
||||
lvim.builtin.telescope.defaults.selection_caret = " "
|
||||
lvim.builtin.telescope.defaults.selection_strategy = "reset"
|
||||
lvim.builtin.telescope.defaults.set_env.COLORTERM = "truecolor"
|
||||
lvim.builtin.telescope.defaults.sorting_strategy = "descending"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["1"] = "rg"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["2"] = "--color=never"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["3"] = "--no-heading"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["4"] = "--with-filename"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["5"] = "--line-number"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["6"] = "--column"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["7"] = "--smart-case"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["8"] = "--hidden"
|
||||
lvim.builtin.telescope.defaults.vimgrep_arguments["9"] = "--glob=!.git/"
|
||||
lvim.builtin.telescope.defaults.winblend = 0
|
||||
lvim.builtin.telescope.extensions.fzf.case_mode = "smart_case"
|
||||
lvim.builtin.telescope.extensions.fzf.fuzzy = true
|
||||
lvim.builtin.telescope.extensions.fzf.override_file_sorter = true
|
||||
lvim.builtin.telescope.extensions.fzf.override_generic_sorter = true
|
||||
-- lvim.builtin.telescope.file_previewer = function ()
|
||||
-- lvim.builtin.telescope.file_sorter = function ()
|
||||
-- lvim.builtin.telescope.generic_sorter = function ()
|
||||
-- lvim.builtin.telescope.grep_previewer = function ()
|
||||
lvim.builtin.telescope.mappings.i["<C-c>"]["1"] = "close"
|
||||
lvim.builtin.telescope.mappings.i["<C-j>"]["1"] = "cycle_history_next"
|
||||
lvim.builtin.telescope.mappings.i["<C-k>"]["1"] = "cycle_history_prev"
|
||||
lvim.builtin.telescope.mappings.i["<C-n>"]["1"] = "move_selection_next"
|
||||
lvim.builtin.telescope.mappings.i["<C-p>"]["1"] = "move_selection_previous"
|
||||
lvim.builtin.telescope.mappings.i["<C-q>"]["1"] = "smart_send_to_qflist"
|
||||
lvim.builtin.telescope.mappings.i["<C-q>"]["2"] = "open_qflist"
|
||||
lvim.builtin.telescope.mappings.i["<CR>"]["1"] = "select_default"
|
||||
lvim.builtin.telescope.mappings.i["<CR>"]["2"] = "center"
|
||||
lvim.builtin.telescope.mappings.n["<C-n>"]["1"] = "move_selection_next"
|
||||
lvim.builtin.telescope.mappings.n["<C-p>"]["1"] = "move_selection_previous"
|
||||
lvim.builtin.telescope.mappings.n["<C-q>"]["1"] = "smart_send_to_qflist"
|
||||
lvim.builtin.telescope.mappings.n["<C-q>"]["2"] = "open_qflist"
|
||||
-- lvim.builtin.telescope.qflist_previewer = function ()
|
||||
lvim.builtin.terminal.active = true
|
||||
lvim.builtin.terminal.close_on_exit = true
|
||||
lvim.builtin.terminal.direction = "float"
|
||||
lvim.builtin.terminal.execs["1"]["1"] = "lazygit"
|
||||
lvim.builtin.terminal.execs["1"]["2"] = "<leader>gg"
|
||||
lvim.builtin.terminal.execs["1"]["3"] = "LazyGit"
|
||||
lvim.builtin.terminal.execs["1"]["4"] = "float"
|
||||
lvim.builtin.terminal.execs["2"]["1"] = "lazygit"
|
||||
lvim.builtin.terminal.execs["2"]["2"] = "<c-\\><c-g>"
|
||||
lvim.builtin.terminal.execs["2"]["3"] = "LazyGit"
|
||||
lvim.builtin.terminal.execs["2"]["4"] = "float"
|
||||
lvim.builtin.terminal.float_opts.border = "curved"
|
||||
lvim.builtin.terminal.float_opts.highlights.background = "Normal"
|
||||
lvim.builtin.terminal.float_opts.highlights.border = "Normal"
|
||||
lvim.builtin.terminal.float_opts.winblend = 0
|
||||
lvim.builtin.terminal.hide_numbers = true
|
||||
lvim.builtin.terminal.insert_mappings = true
|
||||
lvim.builtin.terminal.open_mapping = "<c-t>"
|
||||
lvim.builtin.terminal.persist_size = false
|
||||
lvim.builtin.terminal.shade_terminals = true
|
||||
lvim.builtin.terminal.shading_factor = 2
|
||||
lvim.builtin.terminal.shell = "/usr/bin/zsh"
|
||||
lvim.builtin.terminal.size = 20
|
||||
lvim.builtin.terminal.start_in_insert = true
|
||||
lvim.builtin.treesitter.autotag.enable = false
|
||||
lvim.builtin.treesitter.context_commentstring.config.css = "/* %s */"
|
||||
lvim.builtin.treesitter.context_commentstring.config.html = "<!-- %s -->"
|
||||
lvim.builtin.treesitter.context_commentstring.config.json = ""
|
||||
lvim.builtin.treesitter.context_commentstring.config.scss = "/* %s */"
|
||||
lvim.builtin.treesitter.context_commentstring.config.svelte = "<!-- %s -->"
|
||||
lvim.builtin.treesitter.context_commentstring.config.typescript = "// %s"
|
||||
lvim.builtin.treesitter.context_commentstring.config.vue = "<!-- %s -->"
|
||||
lvim.builtin.treesitter.context_commentstring.enable = true
|
||||
lvim.builtin.treesitter.ensure_installed["10"] = "java"
|
||||
lvim.builtin.treesitter.ensure_installed["11"] = "yaml"
|
||||
lvim.builtin.treesitter.ensure_installed["12"] = "dockerfile"
|
||||
lvim.builtin.treesitter.ensure_installed["13"] = "markdown"
|
||||
lvim.builtin.treesitter.ensure_installed["14"] = "make"
|
||||
lvim.builtin.treesitter.ensure_installed["1"] = "bash"
|
||||
lvim.builtin.treesitter.ensure_installed["2"] = "c"
|
||||
lvim.builtin.treesitter.ensure_installed["3"] = "javascript"
|
||||
lvim.builtin.treesitter.ensure_installed["4"] = "json"
|
||||
lvim.builtin.treesitter.ensure_installed["5"] = "lua"
|
||||
lvim.builtin.treesitter.ensure_installed["6"] = "python"
|
||||
lvim.builtin.treesitter.ensure_installed["7"] = "typescript"
|
||||
lvim.builtin.treesitter.ensure_installed["8"] = "css"
|
||||
lvim.builtin.treesitter.ensure_installed["9"] = "rust"
|
||||
lvim.builtin.treesitter.highlight.additional_vim_regex_highlighting = true
|
||||
lvim.builtin.treesitter.highlight.disable["1"] = "latex"
|
||||
lvim.builtin.treesitter.highlight.enabled = true
|
||||
lvim.builtin.treesitter.highlight.enable = true
|
||||
lvim.builtin.treesitter.ignore_install["1"] = "haskell"
|
||||
lvim.builtin.treesitter.indent.disable["1"] = "yaml"
|
||||
lvim.builtin.treesitter.indent.enable = true
|
||||
lvim.builtin.treesitter.matchup.enable = true
|
||||
lvim.builtin.treesitter.playground.enable = false
|
||||
lvim.builtin.treesitter.playground.keybindings.focus_language = "f"
|
||||
lvim.builtin.treesitter.playground.keybindings.goto_node = "<cr>"
|
||||
lvim.builtin.treesitter.playground.keybindings.show_help = "?"
|
||||
lvim.builtin.treesitter.playground.keybindings.toggle_anonymous_nodes = "a"
|
||||
lvim.builtin.treesitter.playground.keybindings.toggle_hl_groups = "i"
|
||||
lvim.builtin.treesitter.playground.keybindings.toggle_injected_languages = "t"
|
||||
lvim.builtin.treesitter.playground.keybindings.toggle_language_display = "I"
|
||||
lvim.builtin.treesitter.playground.keybindings.toggle_query_editor = "o"
|
||||
lvim.builtin.treesitter.playground.keybindings.unfocus_language = "F"
|
||||
lvim.builtin.treesitter.playground.keybindings.update = "R"
|
||||
lvim.builtin.treesitter.playground.persist_queries = false
|
||||
lvim.builtin.treesitter.playground.updatetime = 25
|
||||
lvim.builtin.treesitter.rainbow.enable = false
|
||||
lvim.builtin.treesitter.rainbow.extended_mode = true
|
||||
lvim.builtin.treesitter.rainbow.max_file_lines = 1000
|
||||
lvim.builtin.treesitter.textobjects.select.enable = false
|
||||
lvim.builtin.treesitter.textobjects.swap.enable = false
|
||||
lvim.builtin.treesitter.textsubjects.enable = false
|
||||
lvim.builtin.treesitter.textsubjects.keymaps[";"] = "textsubjects-big"
|
||||
lvim.builtin.treesitter.textsubjects.keymaps["."] = "textsubjects-smart"
|
||||
lvim.builtin.which_key.active = true
|
||||
lvim.builtin.which_key.mappings[";"]["1"] = "<cmd>Dashboard<CR>"
|
||||
lvim.builtin.which_key.mappings["/"]["1"] = "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>"
|
||||
lvim.builtin.which_key.mappings["/"]["2"] = "Comment"
|
||||
lvim.builtin.which_key.mappings[";"]["2"] = "Dashboard"
|
||||
lvim.builtin.which_key.mappings.b.b["1"] = "<cmd>b#<cr>"
|
||||
lvim.builtin.which_key.mappings.b.b["2"] = "Previous"
|
||||
lvim.builtin.which_key.mappings.b.D["1"] = "<cmd>BufferOrderByDirectory<cr>"
|
||||
lvim.builtin.which_key.mappings.b.D["2"] = "Sort by directory"
|
||||
lvim.builtin.which_key.mappings.b.e["1"] = "<cmd>BufferCloseAllButCurrent<cr>"
|
||||
lvim.builtin.which_key.mappings.b.e["2"] = "Close all but current"
|
||||
lvim.builtin.which_key.mappings.b.f["1"] = "<cmd>Telescope buffers<cr>"
|
||||
lvim.builtin.which_key.mappings.b.f["2"] = "Find"
|
||||
lvim.builtin.which_key.mappings.b.h["1"] = "<cmd>BufferCloseBuffersLeft<cr>"
|
||||
lvim.builtin.which_key.mappings.b.h["2"] = "Close all to the left"
|
||||
lvim.builtin.which_key.mappings.b.j["1"] = "<cmd>BufferPick<cr>"
|
||||
lvim.builtin.which_key.mappings.b.j["2"] = "Jump"
|
||||
lvim.builtin.which_key.mappings.b.l["1"] = "<cmd>BufferCloseBuffersRight<cr>"
|
||||
lvim.builtin.which_key.mappings.b.L["1"] = "<cmd>BufferOrderByLanguage<cr>"
|
||||
lvim.builtin.which_key.mappings.b.l["2"] = "Close all to the right"
|
||||
lvim.builtin.which_key.mappings.b.L["2"] = "Sort by language"
|
||||
lvim.builtin.which_key.mappings.b.name = "Buffers"
|
||||
lvim.builtin.which_key.mappings.b.w["1"] = "<cmd>BufferWipeout<cr>"
|
||||
lvim.builtin.which_key.mappings.b.w["2"] = "Wipeout"
|
||||
lvim.builtin.which_key.mappings.c["1"] = "<cmd>BufferClose!<CR>"
|
||||
lvim.builtin.which_key.mappings.c["2"] = "Close Buffer"
|
||||
lvim.builtin.which_key.mappings.e["1"] = "<cmd>NvimTreeToggle<CR>"
|
||||
lvim.builtin.which_key.mappings.e["2"] = "Explorer"
|
||||
-- lvim.builtin.which_key.mappings.f["1"] = function ()
|
||||
lvim.builtin.which_key.mappings.f["2"] = "Find File"
|
||||
lvim.builtin.which_key.mappings.g.b["1"] = "<cmd>Telescope git_branches<cr>"
|
||||
lvim.builtin.which_key.mappings.g.b["2"] = "Checkout branch"
|
||||
lvim.builtin.which_key.mappings.g.C["1"] = "<cmd>Telescope git_bcommits<cr>"
|
||||
lvim.builtin.which_key.mappings.g.c["1"] = "<cmd>Telescope git_commits<cr>"
|
||||
lvim.builtin.which_key.mappings.g.c["2"] = "Checkout commit"
|
||||
lvim.builtin.which_key.mappings.g.C["2"] = "Checkout commit(for current file)"
|
||||
lvim.builtin.which_key.mappings.g.d["1"] = "<cmd>Gitsigns diffthis HEAD<cr>"
|
||||
lvim.builtin.which_key.mappings.g.d["2"] = "Git Diff"
|
||||
lvim.builtin.which_key.mappings.g.j["1"] = "<cmd>lua require 'gitsigns'.next_hunk()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.j["2"] = "Next Hunk"
|
||||
lvim.builtin.which_key.mappings.g.k["1"] = "<cmd>lua require 'gitsigns'.prev_hunk()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.k["2"] = "Prev Hunk"
|
||||
lvim.builtin.which_key.mappings.g.l["1"] = "<cmd>lua require 'gitsigns'.blame_line()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.l["2"] = "Blame"
|
||||
lvim.builtin.which_key.mappings.g.name = "Git"
|
||||
lvim.builtin.which_key.mappings.g.o["1"] = "<cmd>Telescope git_status<cr>"
|
||||
lvim.builtin.which_key.mappings.g.o["2"] = "Open changed file"
|
||||
lvim.builtin.which_key.mappings.g.p["1"] = "<cmd>lua require 'gitsigns'.preview_hunk()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.p["2"] = "Preview Hunk"
|
||||
lvim.builtin.which_key.mappings.g.R["1"] = "<cmd>lua require 'gitsigns'.reset_buffer()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.r["1"] = "<cmd>lua require 'gitsigns'.reset_hunk()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.R["2"] = "Reset Buffer"
|
||||
lvim.builtin.which_key.mappings.g.r["2"] = "Reset Hunk"
|
||||
lvim.builtin.which_key.mappings.g.s["1"] = "<cmd>lua require 'gitsigns'.stage_hunk()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.s["2"] = "Stage Hunk"
|
||||
lvim.builtin.which_key.mappings.g.u["1"] = "<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>"
|
||||
lvim.builtin.which_key.mappings.g.u["2"] = "Undo Stage Hunk"
|
||||
lvim.builtin.which_key.mappings.h["1"] = "<cmd>nohlsearch<CR>"
|
||||
lvim.builtin.which_key.mappings.h["2"] = "No Highlight"
|
||||
lvim.builtin.which_key.mappings.l.a["1"] = "<cmd>lua require('lvim.core.telescope').code_actions()<cr>"
|
||||
lvim.builtin.which_key.mappings.l.a["2"] = "Code Action"
|
||||
lvim.builtin.which_key.mappings.L.c["1"] = "<cmd>edit /home/sudacode/.config/lvim/config.lua<cr>"
|
||||
lvim.builtin.which_key.mappings.L.c["2"] = "Edit config.lua"
|
||||
lvim.builtin.which_key.mappings.l.d["1"] = "<cmd>Telescope diagnostics bufnr=0 theme=get_ivy<cr>"
|
||||
lvim.builtin.which_key.mappings.l.d["2"] = "Buffer Diagnostics"
|
||||
lvim.builtin.which_key.mappings.L.f["1"] = "<cmd>lua require('lvim.core.telescope.custom-finders').find_lunarvim_files()<cr>"
|
||||
lvim.builtin.which_key.mappings.l.f["1"] = "<cmd>lua vim.lsp.buf.formatting()<cr>"
|
||||
lvim.builtin.which_key.mappings.L.f["2"] = "Find LunarVim files"
|
||||
lvim.builtin.which_key.mappings.l.f["2"] = "Format"
|
||||
lvim.builtin.which_key.mappings.L.g["1"] = "<cmd>lua require('lvim.core.telescope.custom-finders').grep_lunarvim_files()<cr>"
|
||||
lvim.builtin.which_key.mappings.L.g["2"] = "Grep LunarVim files"
|
||||
lvim.builtin.which_key.mappings.l.i["1"] = "<cmd>LspInfo<cr>"
|
||||
lvim.builtin.which_key.mappings.l.I["1"] = "<cmd>LspInstallInfo<cr>"
|
||||
lvim.builtin.which_key.mappings.L.i["1"] = "<cmd>lua require('lvim.core.info').toggle_popup(vim.bo.filetype)<cr>"
|
||||
lvim.builtin.which_key.mappings.L.I["1"] = "<cmd>lua require('lvim.core.telescope.custom-finders').view_lunarvim_changelog()<cr>"
|
||||
lvim.builtin.which_key.mappings.l.i["2"] = "Info"
|
||||
lvim.builtin.which_key.mappings.l.I["2"] = "Installer Info"
|
||||
lvim.builtin.which_key.mappings.L.i["2"] = "Toggle LunarVim Info"
|
||||
lvim.builtin.which_key.mappings.L.I["2"] = "View LunarVim's changelog"
|
||||
lvim.builtin.which_key.mappings.l.j["1"] = "<cmd>lua vim.diagnostic.goto_next()<cr>"
|
||||
lvim.builtin.which_key.mappings.l.j["2"] = "Next Diagnostic"
|
||||
lvim.builtin.which_key.mappings.l.k["1"] = "<cmd>lua vim.diagnostic.goto_prev()<cr>"
|
||||
lvim.builtin.which_key.mappings.L.k["1"] = "<cmd>Telescope keymaps<cr>"
|
||||
lvim.builtin.which_key.mappings.l.k["2"] = "Prev Diagnostic"
|
||||
lvim.builtin.which_key.mappings.L.k["2"] = "View LunarVim's keymappings"
|
||||
lvim.builtin.which_key.mappings.l.l["1"] = "<cmd>lua vim.lsp.codelens.run()<cr>"
|
||||
lvim.builtin.which_key.mappings.l.l["2"] = "CodeLens Action"
|
||||
lvim.builtin.which_key.mappings.L.l.d["1"] = "<cmd>lua require('lvim.core.terminal').toggle_log_view(require('lvim.core.log').get_path())<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.D["1"] = "<cmd>lua vim.fn.execute('edit ' .. require('lvim.core.log').get_path())<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.D["2"] = "Open the default logfile"
|
||||
lvim.builtin.which_key.mappings.L.l.d["2"] = "view default log"
|
||||
lvim.builtin.which_key.mappings.L.l.l["1"] = "<cmd>lua require('lvim.core.terminal').toggle_log_view(vim.lsp.get_log_path())<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.L["1"] = "<cmd>lua vim.fn.execute('edit ' .. vim.lsp.get_log_path())<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.L["2"] = "Open the LSP logfile"
|
||||
lvim.builtin.which_key.mappings.L.l.l["2"] = "view lsp log"
|
||||
lvim.builtin.which_key.mappings.L.l.N["1"] = "<cmd>edit $NVIM_LOG_FILE<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.n["1"] = "<cmd>lua require('lvim.core.terminal').toggle_log_view(os.getenv('NVIM_LOG_FILE'))<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.N["2"] = "Open the Neovim logfile"
|
||||
lvim.builtin.which_key.mappings.L.l.n["2"] = "view neovim log"
|
||||
lvim.builtin.which_key.mappings.L.l.name = "+logs"
|
||||
lvim.builtin.which_key.mappings.L.l.P["1"] = "<cmd>exe 'edit '.stdpath('cache').'/packer.nvim.log'<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.p["1"] = "<cmd>lua require('lvim.core.terminal').toggle_log_view('packer.nvim')<cr>"
|
||||
lvim.builtin.which_key.mappings.L.l.P["2"] = "Open the Packer logfile"
|
||||
lvim.builtin.which_key.mappings.L.l.p["2"] = "view packer log"
|
||||
lvim.builtin.which_key.mappings.l.name = "LSP"
|
||||
lvim.builtin.which_key.mappings.L.name = "+LunarVim"
|
||||
lvim.builtin.which_key.mappings.l.p.d["1"] = "<cmd>lua require('lvim.lsp.peek').Peek('definition')<cr>"
|
||||
lvim.builtin.which_key.mappings.l.p.d["2"] = "Definition"
|
||||
lvim.builtin.which_key.mappings.l.p.i["1"] = "<cmd>lua require('lvim.lsp.peek').Peek('implementation')<cr>"
|
||||
lvim.builtin.which_key.mappings.l.p.i["2"] = "Implementation"
|
||||
lvim.builtin.which_key.mappings.l.p.name = "Peek"
|
||||
lvim.builtin.which_key.mappings.l.p.t["1"] = "<cmd>lua require('lvim.lsp.peek').Peek('typeDefinition')<cr>"
|
||||
lvim.builtin.which_key.mappings.l.p.t["2"] = "Type Definition"
|
||||
lvim.builtin.which_key.mappings.l.q["1"] = "<cmd>lua vim.diagnostic.setloclist()<cr>"
|
||||
lvim.builtin.which_key.mappings.l.q["2"] = "Quickfix"
|
||||
lvim.builtin.which_key.mappings.l.r["1"] = "<cmd>lua vim.lsp.buf.rename()<cr>"
|
||||
lvim.builtin.which_key.mappings.L.r["1"] = "<cmd>LvimReload<cr>"
|
||||
lvim.builtin.which_key.mappings.L.r["2"] = "Reload LunarVim's configuration"
|
||||
lvim.builtin.which_key.mappings.l.r["2"] = "Rename"
|
||||
lvim.builtin.which_key.mappings.l.s["1"] = "<cmd>Telescope lsp_document_symbols<cr>"
|
||||
lvim.builtin.which_key.mappings.l.S["1"] = "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>"
|
||||
lvim.builtin.which_key.mappings.l.s["2"] = "Document Symbols"
|
||||
lvim.builtin.which_key.mappings.l.S["2"] = "Workspace Symbols"
|
||||
lvim.builtin.which_key.mappings.L.u["1"] = "<cmd>LvimUpdate<cr>"
|
||||
lvim.builtin.which_key.mappings.L.u["2"] = "Update LunarVim"
|
||||
lvim.builtin.which_key.mappings.l.w["1"] = "<cmd>Telescope diagnostics<cr>"
|
||||
lvim.builtin.which_key.mappings.l.w["2"] = "Diagnostics"
|
||||
lvim.builtin.which_key.mappings.p.c["1"] = "<cmd>PackerCompile<cr>"
|
||||
lvim.builtin.which_key.mappings.p.c["2"] = "Compile"
|
||||
lvim.builtin.which_key.mappings.p.i["1"] = "<cmd>PackerInstall<cr>"
|
||||
lvim.builtin.which_key.mappings.p.i["2"] = "Install"
|
||||
lvim.builtin.which_key.mappings.p.name = "Packer"
|
||||
lvim.builtin.which_key.mappings.p.r["1"] = "<cmd>lua require('lvim.plugin-loader').recompile()<cr>"
|
||||
lvim.builtin.which_key.mappings.p.r["2"] = "Re-compile"
|
||||
lvim.builtin.which_key.mappings.p.S["1"] = "<cmd>PackerStatus<cr>"
|
||||
lvim.builtin.which_key.mappings.p.s["1"] = "<cmd>PackerSync<cr>"
|
||||
lvim.builtin.which_key.mappings.p.S["2"] = "Status"
|
||||
lvim.builtin.which_key.mappings.p.s["2"] = "Sync"
|
||||
lvim.builtin.which_key.mappings.p.u["1"] = "<cmd>PackerUpdate<cr>"
|
||||
lvim.builtin.which_key.mappings.p.u["2"] = "Update"
|
||||
lvim.builtin.which_key.mappings.q["1"] = "<cmd>q!<CR>"
|
||||
lvim.builtin.which_key.mappings.q["2"] = "Quit"
|
||||
lvim.builtin.which_key.mappings.s.b["1"] = "<cmd>Telescope git_branches<cr>"
|
||||
lvim.builtin.which_key.mappings.s.b["2"] = "Checkout branch"
|
||||
lvim.builtin.which_key.mappings.s.c["1"] = "<cmd>Telescope colorscheme<cr>"
|
||||
lvim.builtin.which_key.mappings.s.C["1"] = "<cmd>Telescope commands<cr>"
|
||||
lvim.builtin.which_key.mappings.s.c["2"] = "Colorscheme"
|
||||
lvim.builtin.which_key.mappings.s.C["2"] = "Commands"
|
||||
lvim.builtin.which_key.mappings.s.f["1"] = "<cmd>Telescope find_files<cr>"
|
||||
lvim.builtin.which_key.mappings.s.f["2"] = "Find File"
|
||||
lvim.builtin.which_key.mappings.s.h["1"] = "<cmd>Telescope help_tags<cr>"
|
||||
lvim.builtin.which_key.mappings.s.h["2"] = "Find Help"
|
||||
lvim.builtin.which_key.mappings.s.k["1"] = "<cmd>Telescope keymaps<cr>"
|
||||
lvim.builtin.which_key.mappings.s.k["2"] = "Keymaps"
|
||||
lvim.builtin.which_key.mappings.s.M["1"] = "<cmd>Telescope man_pages<cr>"
|
||||
lvim.builtin.which_key.mappings.s.M["2"] = "Man Pages"
|
||||
lvim.builtin.which_key.mappings.s.name = "Search"
|
||||
lvim.builtin.which_key.mappings.s.p["1"] = "<cmd>lua require('telescope.builtin.internal').colorscheme({enable_preview = true})<cr>"
|
||||
lvim.builtin.which_key.mappings.s.p["2"] = "Colorscheme with Preview"
|
||||
lvim.builtin.which_key.mappings.s.r["1"] = "<cmd>Telescope oldfiles<cr>"
|
||||
lvim.builtin.which_key.mappings.s.R["1"] = "<cmd>Telescope registers<cr>"
|
||||
lvim.builtin.which_key.mappings.s.r["2"] = "Open Recent File"
|
||||
lvim.builtin.which_key.mappings.s.R["2"] = "Registers"
|
||||
lvim.builtin.which_key.mappings.s.t["1"] = "<cmd>Telescope live_grep<cr>"
|
||||
lvim.builtin.which_key.mappings.s.t["2"] = "Text"
|
||||
lvim.builtin.which_key.mappings.T.i["1"] = ":TSConfigInfo<cr>"
|
||||
lvim.builtin.which_key.mappings.T.i["2"] = "Info"
|
||||
lvim.builtin.which_key.mappings.T.name = "Treesitter"
|
||||
lvim.builtin.which_key.mappings.w["1"] = "<cmd>w!<CR>"
|
||||
lvim.builtin.which_key.mappings.w["2"] = "Save"
|
||||
lvim.builtin.which_key.opts.mode = "n"
|
||||
lvim.builtin.which_key.opts.noremap = true
|
||||
lvim.builtin.which_key.opts.nowait = true
|
||||
lvim.builtin.which_key.opts.prefix = "<leader>"
|
||||
lvim.builtin.which_key.opts.silent = true
|
||||
lvim.builtin.which_key.setup.hidden["1"] = "<silent>"
|
||||
lvim.builtin.which_key.setup.hidden["2"] = "<cmd>"
|
||||
lvim.builtin.which_key.setup.hidden["3"] = "<Cmd>"
|
||||
lvim.builtin.which_key.setup.hidden["4"] = "<CR>"
|
||||
lvim.builtin.which_key.setup.hidden["5"] = "call"
|
||||
lvim.builtin.which_key.setup.hidden["6"] = "lua"
|
||||
lvim.builtin.which_key.setup.hidden["7"] = "^:"
|
||||
lvim.builtin.which_key.setup.hidden["8"] = "^ "
|
||||
lvim.builtin.which_key.setup.icons.breadcrumb = "»"
|
||||
lvim.builtin.which_key.setup.icons.group = "+"
|
||||
lvim.builtin.which_key.setup.icons.separator = "➜"
|
||||
lvim.builtin.which_key.setup.layout.height.max = 25
|
||||
lvim.builtin.which_key.setup.layout.height.min = 4
|
||||
lvim.builtin.which_key.setup.layout.spacing = 3
|
||||
lvim.builtin.which_key.setup.layout.width.max = 50
|
||||
lvim.builtin.which_key.setup.layout.width.min = 20
|
||||
lvim.builtin.which_key.setup.plugins.marks = true
|
||||
lvim.builtin.which_key.setup.plugins.presets.g = true
|
||||
lvim.builtin.which_key.setup.plugins.presets.motions = false
|
||||
lvim.builtin.which_key.setup.plugins.presets.nav = true
|
||||
lvim.builtin.which_key.setup.plugins.presets.operators = false
|
||||
lvim.builtin.which_key.setup.plugins.presets.text_objects = false
|
||||
lvim.builtin.which_key.setup.plugins.presets.windows = true
|
||||
lvim.builtin.which_key.setup.plugins.presets.z = true
|
||||
lvim.builtin.which_key.setup.plugins.registers = true
|
||||
lvim.builtin.which_key.setup.plugins.spelling.enabled = true
|
||||
lvim.builtin.which_key.setup.plugins.spelling.suggestions = 20
|
||||
lvim.builtin.which_key.setup.show_help = true
|
||||
lvim.builtin.which_key.setup.window.border = "single"
|
||||
lvim.builtin.which_key.setup.window.margin["1"] = 1
|
||||
lvim.builtin.which_key.setup.window.margin["2"] = 0
|
||||
lvim.builtin.which_key.setup.window.margin["3"] = 1
|
||||
lvim.builtin.which_key.setup.window.margin["4"] = 0
|
||||
lvim.builtin.which_key.setup.window.padding["1"] = 2
|
||||
lvim.builtin.which_key.setup.window.padding["2"] = 2
|
||||
lvim.builtin.which_key.setup.window.padding["3"] = 2
|
||||
lvim.builtin.which_key.setup.window.padding["4"] = 2
|
||||
lvim.builtin.which_key.setup.window.position = "bottom"
|
||||
lvim.builtin.which_key.vmappings["/"]["1"] = "<ESC><CMD>lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<CR>"
|
||||
lvim.builtin.which_key.vmappings["/"]["2"] = "Comment"
|
||||
lvim.builtin.which_key.vopts.mode = "v"
|
||||
lvim.builtin.which_key.vopts.noremap = true
|
||||
lvim.builtin.which_key.vopts.nowait = true
|
||||
lvim.builtin.which_key.vopts.prefix = "<leader>"
|
||||
lvim.builtin.which_key.vopts.silent = true
|
||||
lvim.colorscheme = "onedarker"
|
||||
lvim.database.auto_execute = 1
|
||||
lvim.database.save_location = "/home/sudacode/.config/lunarvim_db"
|
||||
lvim.format_on_save = true
|
||||
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
|
||||
lvim.leader = "space"
|
||||
lvim.log.level = "warn"
|
||||
lvim.log.override_notify = false
|
||||
lvim.log.viewer.cmd = "lnav"
|
||||
lvim.log.viewer.layout_config.direction = "horizontal"
|
||||
lvim.log.viewer.layout_config.open_mapping = ""
|
||||
lvim.log.viewer.layout_config.size = 40
|
||||
lvim.lsp.automatic_servers_installation = true
|
||||
lvim.lsp.buffer_mappings.normal_mode.gD["1"] = "<cmd>lua vim.lsp.buf.declaration()<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gd["1"] = "<cmd>lua vim.lsp.buf.definition()<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gD["2"] = "Goto declaration"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gd["2"] = "Goto Definition"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gI["1"] = "<cmd>lua vim.lsp.buf.implementation()<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gI["2"] = "Goto Implementation"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gl["1"] = "<cmd>lua require'lvim.lsp.handlers'.show_line_diagnostics()<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gl["2"] = "Show line diagnostics"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gp["1"] = "<cmd>lua require'lvim.lsp.peek'.Peek('definition')<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gp["2"] = "Peek definition"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gr["1"] = "<cmd>lua vim.lsp.buf.references()<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gr["2"] = "Goto references"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gs["1"] = "<cmd>lua vim.lsp.buf.signature_help()<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.gs["2"] = "show signature help"
|
||||
lvim.lsp.buffer_mappings.normal_mode.K["1"] = "<cmd>lua vim.lsp.buf.hover()<CR>"
|
||||
lvim.lsp.buffer_mappings.normal_mode.K["2"] = "Show hover"
|
||||
lvim.lsp.code_lens_refresh = true
|
||||
lvim.lsp.diagnostics.float.border = "rounded"
|
||||
lvim.lsp.diagnostics.float.focusable = false
|
||||
-- lvim.lsp.diagnostics.float.format = function ()
|
||||
lvim.lsp.diagnostics.float.header = ""
|
||||
lvim.lsp.diagnostics.float.prefix = ""
|
||||
lvim.lsp.diagnostics.float.source = "always"
|
||||
lvim.lsp.diagnostics.float.style = "minimal"
|
||||
lvim.lsp.diagnostics.severity_sort = true
|
||||
lvim.lsp.diagnostics.signs.active = true
|
||||
lvim.lsp.diagnostics.signs.values["1"].name = "DiagnosticSignError"
|
||||
lvim.lsp.diagnostics.signs.values["1"].text = ""
|
||||
lvim.lsp.diagnostics.signs.values["2"].name = "DiagnosticSignWarn"
|
||||
lvim.lsp.diagnostics.signs.values["2"].text = ""
|
||||
lvim.lsp.diagnostics.signs.values["3"].name = "DiagnosticSignHint"
|
||||
lvim.lsp.diagnostics.signs.values["3"].text = ""
|
||||
lvim.lsp.diagnostics.signs.values["4"].name = "DiagnosticSignInfo"
|
||||
lvim.lsp.diagnostics.signs.values["4"].text = ""
|
||||
lvim.lsp.diagnostics.underline = true
|
||||
lvim.lsp.diagnostics.update_in_insert = false
|
||||
lvim.lsp.diagnostics.virtual_text = true
|
||||
lvim.lsp.document_highlight = true
|
||||
lvim.lsp.float.border = "rounded"
|
||||
lvim.lsp.float.focusable = false
|
||||
lvim.lsp.float.style = "minimal"
|
||||
lvim.lsp.override["10"] = "eslintls"
|
||||
lvim.lsp.override["11"] = "grammarly"
|
||||
lvim.lsp.override["12"] = "graphql"
|
||||
lvim.lsp.override["13"] = "jedi_language_server"
|
||||
lvim.lsp.override["14"] = "ltex"
|
||||
lvim.lsp.override["15"] = "phpactor"
|
||||
lvim.lsp.override["16"] = "pylsp"
|
||||
lvim.lsp.override["17"] = "quick_lint_js"
|
||||
lvim.lsp.override["18"] = "rome"
|
||||
lvim.lsp.override["19"] = "solang"
|
||||
lvim.lsp.override["1"] = "angularls"
|
||||
lvim.lsp.override["20"] = "solidity_ls"
|
||||
lvim.lsp.override["21"] = "sorbet"
|
||||
lvim.lsp.override["22"] = "sourcekit"
|
||||
lvim.lsp.override["23"] = "spectral"
|
||||
lvim.lsp.override["24"] = "sqlls"
|
||||
lvim.lsp.override["25"] = "sqls"
|
||||
lvim.lsp.override["26"] = "stylelint_lsp"
|
||||
lvim.lsp.override["27"] = "tailwindcss"
|
||||
lvim.lsp.override["28"] = "tflint"
|
||||
lvim.lsp.override["29"] = "volar"
|
||||
lvim.lsp.override["2"] = "ansiblels"
|
||||
lvim.lsp.override["30"] = "zk"
|
||||
lvim.lsp.override["3"] = "ccls"
|
||||
lvim.lsp.override["4"] = "csharp_ls"
|
||||
lvim.lsp.override["5"] = "cssmodules_ls"
|
||||
lvim.lsp.override["6"] = "denols"
|
||||
lvim.lsp.override["7"] = "ember"
|
||||
lvim.lsp.override["8"] = "emmet_ls"
|
||||
lvim.lsp.override["9"] = "eslint"
|
||||
lvim.lsp.templates_dir = "/home/sudacode/.local/share/lunarvim/after/ftplugin"
|
||||
lvim.plugins["10"] = "tzachar/cmp-tabnine"
|
||||
lvim.plugins["1"]["1"] = "folke/trouble.nvim"
|
||||
lvim.plugins["11"] = "onsails/lspkind-nvim"
|
||||
lvim.plugins["1"].cmd = "TroubleToggle"
|
||||
lvim.plugins["2"]["1"] = "simrat39/symbols-outline.nvim"
|
||||
lvim.plugins["2"].cmd = "SymbolsOutline"
|
||||
lvim.plugins["3"]["1"] = "ray-x/lsp_signature.nvim"
|
||||
-- lvim.plugins["3"].config = function ()
|
||||
lvim.plugins["3"].event = "BufRead"
|
||||
lvim.plugins["4"]["1"] = "rmagatti/goto-preview"
|
||||
-- lvim.plugins["4"].config = function ()
|
||||
lvim.plugins["5"]["1"] = "iamcco/markdown-preview.nvim"
|
||||
-- lvim.plugins["5"].config = function ()
|
||||
lvim.plugins["5"].ft = "markdown"
|
||||
lvim.plugins["5"].run = "cd app && npm install"
|
||||
lvim.plugins["6"]["1"] = "ethanholz/nvim-lastplace"
|
||||
-- lvim.plugins["6"].config = function ()
|
||||
lvim.plugins["6"].event = "BufRead"
|
||||
lvim.plugins["7"] = "wakatime/vim-wakatime"
|
||||
lvim.plugins["8"] = "ap/vim-css-color"
|
||||
lvim.plugins["9"] = "p00f/nvim-ts-rainbow"
|
||||
lvim.transparent_window = false
|
||||
lvim.vsnip_dir = "/home/sudacode/.config/snippets"
|
@ -111,6 +111,11 @@ _G.packer_plugins = {
|
||||
path = "/home/sudacode/.local/share/lunarvim/site/pack/packer/start/cmp-path",
|
||||
url = "https://github.com/hrsh7th/cmp-path"
|
||||
},
|
||||
["cmp-tabnine"] = {
|
||||
loaded = true,
|
||||
path = "/home/sudacode/.local/share/lunarvim/site/pack/packer/start/cmp-tabnine",
|
||||
url = "https://github.com/tzachar/cmp-tabnine"
|
||||
},
|
||||
cmp_luasnip = {
|
||||
loaded = true,
|
||||
path = "/home/sudacode/.local/share/lunarvim/site/pack/packer/start/cmp_luasnip",
|
||||
@ -138,19 +143,24 @@ _G.packer_plugins = {
|
||||
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
["goto-preview"] = {
|
||||
config = { "\27LJ\1\2k\0\0\2\0\4\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\1G\0\1\0\1\0\4\vheight\3\25\ndebug\1\21default_mappings\1\nwidth\3x\nsetup\17goto-preview\frequire\0" },
|
||||
config = { "\27LJ\1\2k\0\0\2\0\4\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\1G\0\1\0\1\0\4\vheight\3\25\ndebug\1\21default_mappings\1\nwidth\3d\nsetup\17goto-preview\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/sudacode/.local/share/lunarvim/site/pack/packer/start/goto-preview",
|
||||
url = "https://github.com/rmagatti/goto-preview"
|
||||
},
|
||||
["lsp_signature.nvim"] = {
|
||||
config = { "\27LJ\1\2A\0\0\2\1\3\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0+\1\0\0>\0\2\1G\0\1\0\4À\nsetup\18lsp_signature\frequire\0" },
|
||||
config = { "\27LJ\1\2A\0\0\2\1\3\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0+\1\0\0>\0\2\1G\0\1\0\3À\nsetup\18lsp_signature\frequire\0" },
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/sudacode/.local/share/lunarvim/site/pack/packer/opt/lsp_signature.nvim",
|
||||
url = "https://github.com/ray-x/lsp_signature.nvim"
|
||||
},
|
||||
["lspkind-nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/sudacode/.local/share/lunarvim/site/pack/packer/start/lspkind-nvim",
|
||||
url = "https://github.com/onsails/lspkind-nvim"
|
||||
},
|
||||
["lua-dev.nvim"] = {
|
||||
loaded = false,
|
||||
needs_bufread = false,
|
||||
@ -318,7 +328,7 @@ _G.packer_plugins = {
|
||||
needs_bufread = false,
|
||||
only_cond = false,
|
||||
path = "/home/sudacode/.local/share/lunarvim/site/pack/packer/opt/which-key.nvim",
|
||||
url = "https://github.com/folke/which-key.nvim"
|
||||
url = "https://github.com/zeertzjq/which-key.nvim"
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,7 +375,7 @@ try_loadstring("\27LJ\1\2@\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G
|
||||
time([[Config for nvim-tree.lua]], false)
|
||||
-- Config for: goto-preview
|
||||
time([[Config for goto-preview]], true)
|
||||
try_loadstring("\27LJ\1\2k\0\0\2\0\4\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\1G\0\1\0\1\0\4\vheight\3\25\ndebug\1\21default_mappings\1\nwidth\3x\nsetup\17goto-preview\frequire\0", "config", "goto-preview")
|
||||
try_loadstring("\27LJ\1\2k\0\0\2\0\4\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\1G\0\1\0\1\0\4\vheight\3\25\ndebug\1\21default_mappings\1\nwidth\3d\nsetup\17goto-preview\frequire\0", "config", "goto-preview")
|
||||
time([[Config for goto-preview]], false)
|
||||
-- Config for: lualine.nvim
|
||||
time([[Config for lualine.nvim]], true)
|
||||
|
@ -13,26 +13,25 @@
|
||||
|
||||
;; main colors
|
||||
; background = #3B4252
|
||||
background = #24282f
|
||||
background = #282c34
|
||||
; background-alt = #4C566A
|
||||
; background-alt = "#464b55"
|
||||
background-alt = "#464b55"
|
||||
; foreground = #ECEFF4
|
||||
foreground = #bbc2cf
|
||||
; foreground-alt = #E5E9F0
|
||||
foreground-alt = "#abb2bf"
|
||||
primary = "#98be65"
|
||||
white = "#bbc2cf"
|
||||
black = "#464b55"
|
||||
red = "#ff6c6b"
|
||||
red = "#e06c75"
|
||||
pink = #EC6798
|
||||
purple = "#c678dd"
|
||||
blue = "#51afef"
|
||||
cyan = "#46d9ff"
|
||||
blue = "#1E90FF"
|
||||
cyan = "#56B6c2"
|
||||
teal = #00B19F
|
||||
green = "#98be65"
|
||||
green = "#98c379"
|
||||
lime = #B9C244
|
||||
yellow = "#ecbe7b"
|
||||
yellow = "#d19a66"
|
||||
amber = #EDB83F
|
||||
orange = #da8548
|
||||
brown = #AC8476
|
||||
|
@ -61,16 +61,18 @@ fixed-center = true
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 95%
|
||||
; width = 95%
|
||||
width = 99.2%
|
||||
; height = 34
|
||||
height = 40
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 2.5%
|
||||
offset-y = 0%
|
||||
; offset-x = 2.5%
|
||||
offset-x = 0.4%
|
||||
offset-y = 0.38%
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${color.background}
|
||||
@ -80,15 +82,16 @@ foreground = ${color.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
;;background-0 =
|
||||
;;background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
; HANDLED BY PICOM
|
||||
; radius-top = 0.0
|
||||
; radius-bottom = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
@ -114,7 +117,7 @@ border-bottom-color = ${color.primary}
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding = 0
|
||||
padding = 1.5
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
@ -145,10 +148,8 @@ font-4 = "Source Han Sans JP:size=8;3"
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
|
||||
modules-left = sep launcher sep i3-workspaces sep chrome flameshot color-picker
|
||||
; modules-left = sep launcher sep bspwm-workspaces sep chrome flameshot color-picker
|
||||
modules-center = title-icon title sep cust-mpd-icon cust-mpd-prev custom-mpd cust-mpd-next
|
||||
; modules-right = color-switch sep alsa sep battery sep network sep date sep sysmenu sep
|
||||
modules-left = sep launcher sep bspwm-workspaces sep chrome flameshot color-picker sep cust-mpd-icon cust-mpd-prev custom-mpd cust-mpd-next
|
||||
; modules-center = title-icon title sep cust-mpd-icon cust-mpd-prev custom-mpd cust-mpd-next
|
||||
modules-right = package-updates-trigger package-updates bluetooth sep pulseaudio sep network-wlan sep date weather sep sysmenu sep
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
@ -163,7 +164,7 @@ dim-value = 1.0
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
wm-name = i3
|
||||
wm-name = bspwm
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
@ -178,7 +179,7 @@ locale = en_US.UTF-8
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = none
|
||||
tray-position = center
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
@ -187,7 +188,7 @@ tray-detached = false
|
||||
; Tray icon max size
|
||||
tray-maxsize = 24
|
||||
|
||||
; Background color for the tray container
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
@ -212,7 +213,7 @@ tray-scale = 1.0
|
||||
; Currently supported WM's:
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
wm-restack = i3
|
||||
wm-restack = bspwm
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
@ -224,8 +225,8 @@ enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
click-left =
|
||||
click-middle =
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
; scroll-up =
|
||||
; scroll-down =
|
||||
@ -239,7 +240,7 @@ double-click-right =
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click = pointer
|
||||
cursor-scroll =
|
||||
cursor-scroll =
|
||||
|
||||
;; WM Workspace Specific
|
||||
|
||||
@ -286,8 +287,8 @@ compositing-underline = over
|
||||
compositing-border = over
|
||||
|
||||
; Define fallback values used by all module formats
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-underline =
|
||||
;format-overline =
|
||||
;format-spacing =
|
||||
|
@ -71,9 +71,9 @@ label-padding = 2
|
||||
[module/launcher]
|
||||
type = custom/text
|
||||
|
||||
content-prefix =
|
||||
content-prefix = ""
|
||||
content-prefix-background = ${color.teal}
|
||||
content-prefix-padding = 1
|
||||
content-prefix-padding = 2
|
||||
|
||||
content = " Menu "
|
||||
content-background = ${color.background-alt}
|
||||
@ -83,7 +83,7 @@ content-underline = ${color.background}
|
||||
|
||||
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
; click-left = ~/.config/polybar/blocks/scripts/launcher.sh &
|
||||
click-left = ~/SudacodeRice/scripts/menu_small &
|
||||
click-left = rofi -show drun
|
||||
;;click-middle = ~/.config/polybar/blocks/scripts/launcher-full
|
||||
click-right = ~/SudacodeRice/scripts/menu_full &
|
||||
; click-right = ~/.config/polybar/blocks/scripts/style-switch.sh &
|
||||
@ -97,9 +97,9 @@ click-right = ~/SudacodeRice/scripts/menu_full &
|
||||
[module/sysmenu]
|
||||
type = custom/text
|
||||
|
||||
content-prefix = ⏻
|
||||
content-prefix = "⏻"
|
||||
content-prefix-background = ${color.red}
|
||||
content-prefix-padding = 1
|
||||
content-prefix-padding = 2
|
||||
|
||||
content = " System "
|
||||
content-background = ${color.background-alt}
|
||||
@ -301,8 +301,9 @@ exec = rofi-bluetooth --status
|
||||
interval = 2
|
||||
click-left = ~/SudacodeRice/scripts/rofi-bluetooth.desktop
|
||||
click-right = blueman-manager
|
||||
format-background = ${color.background-alt}
|
||||
format-padding = 1
|
||||
label-background = ${color.background-alt}
|
||||
label-padding-right = 1
|
||||
format-padding = 0
|
||||
format-prefix-padding = 1
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
@ -114,7 +114,7 @@ set preview_images true
|
||||
# Preview images in full color with the external command "ueberzug".
|
||||
# Images are shown by using a child window.
|
||||
# Only for users who run X11 in GNU/Linux.
|
||||
set preview_images_method w3m
|
||||
set preview_images_method ueberzug
|
||||
|
||||
# Delay in seconds before displaying an image with the w3m method.
|
||||
# Increase it in case of experiencing display corruption.
|
||||
|
@ -22,290 +22,292 @@ goback="Back"
|
||||
|
||||
# Checks if bluetooth controller is powered on
|
||||
power_on() {
|
||||
if bluetoothctl show | grep -q "Powered: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
if bluetoothctl show | grep -q "Powered: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles power state
|
||||
toggle_power() {
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
fi
|
||||
bluetoothctl power on
|
||||
show_menu
|
||||
fi
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
fi
|
||||
bluetoothctl power on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is scanning for new devices
|
||||
scan_on() {
|
||||
if bluetoothctl show | grep -q "Discovering: yes"; then
|
||||
echo "Scan: on"
|
||||
return 0
|
||||
else
|
||||
echo "Scan: off"
|
||||
return 1
|
||||
fi
|
||||
if bluetoothctl show | grep -q "Discovering: yes"; then
|
||||
echo "Scan: on"
|
||||
return 0
|
||||
else
|
||||
echo "Scan: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles scanning state
|
||||
toggle_scan() {
|
||||
if scan_on; then
|
||||
kill $(pgrep -f "bluetoothctl scan on")
|
||||
bluetoothctl scan off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
sleep 5
|
||||
show_menu
|
||||
fi
|
||||
if scan_on; then
|
||||
kill $(pgrep -f "bluetoothctl scan on")
|
||||
bluetoothctl scan off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
sleep 5
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is able to pair to devices
|
||||
pairable_on() {
|
||||
if bluetoothctl show | grep -q "Pairable: yes"; then
|
||||
echo "Pairable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Pairable: off"
|
||||
return 1
|
||||
fi
|
||||
if bluetoothctl show | grep -q "Pairable: yes"; then
|
||||
echo "Pairable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Pairable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles pairable state
|
||||
toggle_pairable() {
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
show_menu
|
||||
fi
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is discoverable by other devices
|
||||
discoverable_on() {
|
||||
if bluetoothctl show | grep -q "Discoverable: yes"; then
|
||||
echo "Discoverable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Discoverable: off"
|
||||
return 1
|
||||
fi
|
||||
if bluetoothctl show | grep -q "Discoverable: yes"; then
|
||||
echo "Discoverable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Discoverable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles discoverable state
|
||||
toggle_discoverable() {
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
show_menu
|
||||
fi
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is connected
|
||||
device_connected() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Connected: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Connected: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_connection() {
|
||||
if device_connected $1; then
|
||||
bluetoothctl disconnect $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
if device_connected $1; then
|
||||
bluetoothctl disconnect $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is paired
|
||||
device_paired() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Paired: yes"; then
|
||||
echo "Paired: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Paired: no"
|
||||
return 1
|
||||
fi
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Paired: yes"; then
|
||||
echo "Paired: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Paired: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device paired state
|
||||
toggle_paired() {
|
||||
if device_paired $1; then
|
||||
bluetoothctl remove $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl pair $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
if device_paired $1; then
|
||||
bluetoothctl remove $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl pair $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is trusted
|
||||
device_trusted() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Trusted: yes"; then
|
||||
echo "Trusted: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Trusted: no"
|
||||
return 1
|
||||
fi
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Trusted: yes"; then
|
||||
echo "Trusted: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Trusted: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_trust() {
|
||||
if device_trusted $1; then
|
||||
bluetoothctl untrust $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl trust $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
if device_trusted $1; then
|
||||
bluetoothctl untrust $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl trust $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints a short string with the current bluetooth status
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
echo -n "%{F#A3BE8C} %{F-}"
|
||||
if power_on; then
|
||||
echo -n "%{B#98be65}%{F#3B4252} %{B-}%{F-}%{B#3B4252}"
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
for device in "${paired_devices[@]}"; do
|
||||
if device_connected $device; then
|
||||
device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-)
|
||||
for device in "${paired_devices[@]}"; do
|
||||
if device_connected $device; then
|
||||
device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-)
|
||||
|
||||
if [ $counter -gt 0 ]; then
|
||||
printf ", %s" "$device_alias"
|
||||
else
|
||||
printf " %s" "$device_alias"
|
||||
fi
|
||||
if [ $counter -gt 0 ]; then
|
||||
printf ", %s" "$device_alias"
|
||||
else
|
||||
printf " %s" "$device_alias"
|
||||
fi
|
||||
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo -n "%{F#EC7875} %{F-}"
|
||||
fi
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo -n "%{B#EC7875}%{F#3B4252} %{B-}%{F-}%{B#3B4252}"
|
||||
fi
|
||||
}
|
||||
|
||||
# A submenu for a specific device that allows connecting, pairing, and trusting
|
||||
device_menu() {
|
||||
device=$1
|
||||
device=$1
|
||||
|
||||
# Get device name and mac address
|
||||
device_name=$(echo $device | cut -d ' ' -f 3-)
|
||||
mac=$(echo $device | cut -d ' ' -f 2)
|
||||
# Get device name and mac address
|
||||
device_name=$(echo $device | cut -d ' ' -f 3-)
|
||||
mac=$(echo $device | cut -d ' ' -f 2)
|
||||
|
||||
# Build options
|
||||
if device_connected $mac; then
|
||||
connected="Connected: yes"
|
||||
else
|
||||
connected="Connected: no"
|
||||
fi
|
||||
paired=$(device_paired $mac)
|
||||
trusted=$(device_trusted $mac)
|
||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||
# Build options
|
||||
if device_connected $mac; then
|
||||
connected="Connected: yes"
|
||||
else
|
||||
connected="Connected: no"
|
||||
fi
|
||||
paired=$(device_paired $mac)
|
||||
trusted=$(device_trusted $mac)
|
||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$connected)
|
||||
toggle_connection $mac
|
||||
;;
|
||||
$paired)
|
||||
toggle_paired $mac
|
||||
;;
|
||||
$trusted)
|
||||
toggle_trust $mac
|
||||
;;
|
||||
$goback)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$connected)
|
||||
toggle_connection $mac
|
||||
;;
|
||||
$paired)
|
||||
toggle_paired $mac
|
||||
;;
|
||||
$trusted)
|
||||
toggle_trust $mac
|
||||
;;
|
||||
$goback)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Opens a rofi menu with current bluetooth status and options to connect
|
||||
show_menu() {
|
||||
# Get menu options
|
||||
if power_on; then
|
||||
power="Power: on"
|
||||
# Get menu options
|
||||
if power_on; then
|
||||
power="Power: on"
|
||||
|
||||
# Human-readable names of devices, one per line
|
||||
# If scan is off, will only list paired devices
|
||||
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
|
||||
# Human-readable names of devices, one per line
|
||||
# If scan is off, will only list paired devices
|
||||
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
|
||||
|
||||
# Get controller flags
|
||||
scan=$(scan_on)
|
||||
pairable=$(pairable_on)
|
||||
discoverable=$(discoverable_on)
|
||||
# Get controller flags
|
||||
scan=$(scan_on)
|
||||
pairable=$(pairable_on)
|
||||
discoverable=$(discoverable_on)
|
||||
|
||||
# Options passed to rofi
|
||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||
else
|
||||
power="Power: off"
|
||||
options="$power\nExit"
|
||||
fi
|
||||
# Options passed to rofi
|
||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||
else
|
||||
power="Power: off"
|
||||
options="$power\nExit"
|
||||
fi
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$power)
|
||||
toggle_power
|
||||
;;
|
||||
$scan)
|
||||
toggle_scan
|
||||
;;
|
||||
$discoverable)
|
||||
toggle_discoverable
|
||||
;;
|
||||
$pairable)
|
||||
toggle_pairable
|
||||
;;
|
||||
*)
|
||||
device=$(bluetoothctl devices | grep "$chosen")
|
||||
# Open a submenu if a device is selected
|
||||
if [[ $device ]]; then device_menu "$device"; fi
|
||||
;;
|
||||
esac
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$power)
|
||||
toggle_power
|
||||
;;
|
||||
$scan)
|
||||
toggle_scan
|
||||
;;
|
||||
$discoverable)
|
||||
toggle_discoverable
|
||||
;;
|
||||
$pairable)
|
||||
toggle_pairable
|
||||
;;
|
||||
*)
|
||||
device=$(bluetoothctl devices | grep "$chosen")
|
||||
# Open a submenu if a device is selected
|
||||
if [[ $device ]]; then device_menu "$device"; fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Rofi command to pipe into, can add any options here
|
||||
rofi_command="rofi -config ~/SudacodeRice/rofi/dracula.rasi -dmenu -p"
|
||||
|
||||
case "$1" in
|
||||
--status)
|
||||
print_status
|
||||
;;
|
||||
*)
|
||||
show_menu
|
||||
;;
|
||||
--status)
|
||||
print_status
|
||||
;;
|
||||
*)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
|
||||
# vim: ft=sh
|
||||
|
@ -4,7 +4,7 @@
|
||||
--embed-subs
|
||||
|
||||
# Always extract audio
|
||||
-x
|
||||
# -x
|
||||
|
||||
# Do not copy the mtime
|
||||
--no-mtime
|
||||
@ -12,4 +12,3 @@
|
||||
|
||||
# Save all videos under YouTube directory in your home directory
|
||||
-o ~/Videos/YouTube/%(title)s.%(ext)s
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user