diff --git a/ckb-next/.config/ckb-next/ckb-next.conf b/ckb-next/.config/ckb-next/ckb-next.conf index 9c43949af..733617607 100644 --- a/ckb-next/.config/ckb-next/ckb-next.conf +++ b/ckb-next/.config/ckb-next/ckb-next.conf @@ -196,7 +196,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Lighting\Keys\y=#ffffff 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Lighting\Keys\z=#ffffff 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Lighting\UseRealNames=true -0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Modified=d4b18181 +0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Modified=e8444e5b 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Name=Rainbow 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Performance\AngleSnap=false 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\0\Performance\DPI\0=@Point(400 400) @@ -424,7 +424,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Lighting\Keys\y=#ff0000 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Lighting\Keys\z=#ff0000 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Lighting\UseRealNames=true -0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Modified=8222ffc8 +0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Modified=24bed235 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Name=Breathing 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Performance\AngleSnap=false 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\1\Performance\DPI\0=@Point(400 400) @@ -674,7 +674,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Lighting\Keys\y=#aa00ff 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Lighting\Keys\z=#aa00ff 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Lighting\UseRealNames=true -0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Modified=9724d216 +0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Modified=6ba42e90 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Name=Trippy 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Performance\AngleSnap=false 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\2\Performance\DPI\0=@Point(400 400) @@ -732,7 +732,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\CurrentMode={51EB6E3A-27A0-4AD6-A35C-6B67E0329A3D} 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\HwModified=7ffd 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\ModeCount=3 -0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\Modified=77b8c97c +0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\Modified=aedccb22 0E029022AF4C18835CBDCC7EF5001BC3\%7B5B1E2E81-ED4F-4F79-9EB5-F8ACA67D1BF0%7D\Name=Multi 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Binding\KeyMap=K68 GB 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Binding\UseRealNames=true @@ -928,7 +928,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Lighting\Keys\y=#ffffff 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Lighting\Keys\z=#ffffff 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Lighting\UseRealNames=true -0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Modified=26625075 +0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Modified=c6e8dc6f 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Name=Rainbow 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Performance\AngleSnap=false 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\0\Performance\DPI\0=@Point(400 400) @@ -1156,7 +1156,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Lighting\Keys\y=#ff0000 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Lighting\Keys\z=#ff0000 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Lighting\UseRealNames=true -0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Modified=424f9a00 +0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Modified=8ba8eade 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Name=Breathing 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Performance\AngleSnap=false 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\1\Performance\DPI\0=@Point(400 400) @@ -1406,7 +1406,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Lighting\Keys\y=#aa00ff 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Lighting\Keys\z=#aa00ff 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Lighting\UseRealNames=true -0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Modified=f683cdcc +0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Modified=93e6032f 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Name=Trippy 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Performance\AngleSnap=false 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\2\Performance\DPI\0=@Point(400 400) @@ -1464,7 +1464,7 @@ 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\CurrentMode={57C94A3A-80E6-4182-B067-6D4A14AD497C} 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\HwModified=40b6f054 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\ModeCount=3 -0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\Modified=36e89ae6 +0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\Modified=25b8859b 0E029022AF4C18835CBDCC7EF5001BC3\%7BBA7FC152-2D51-4C26-A7A6-A036CC93D924%7D\Name=Demo [Popups] diff --git a/dconf/.config/dconf/user b/dconf/.config/dconf/user index cdac50a1c..7772a3ed4 100644 Binary files a/dconf/.config/dconf/user and b/dconf/.config/dconf/user differ diff --git a/fish/.config/fish/aliases/pacman.fish b/fish/.config/fish/aliases/pacman.fish index 667a92b4a..3e5d40685 100644 --- a/fish/.config/fish/aliases/pacman.fish +++ b/fish/.config/fish/aliases/pacman.fish @@ -1,5 +1,18 @@ # pacman functions function pacman + set red "\033[0;31m" + set end "\033[0m" + + set num 1 + while test -f /var/lib/pacman/db.lck; + if test $num -eq 1 + printf "$red❯❯ Error$end: %s\n" "pacman is in use, will continue after operation." + set num 2 + end + sleep 2 & + wait $last_pid + end + if [ "$argv" != "-c" ] command sudo pacman --color auto $argv else diff --git a/gimp/.config/GIMP/2.10/action-history b/gimp/.config/GIMP/2.10/action-history index ce60af08a..e36caa62e 100755 --- a/gimp/.config/GIMP/2.10/action-history +++ b/gimp/.config/GIMP/2.10/action-history @@ -31,7 +31,8 @@ (history-item "image-scale" 0) (history-item "select-all" 0) (history-item "tools-bucket-fill" 0) -(history-item "file-save-as" 1) +(history-item "file-save-as" 0) +(history-item "file-web-export" 0) (history-item "filters-curves" 0) (history-item "tools-unified-transform" 0) (history-item "select-border" 0) @@ -99,6 +100,5 @@ (history-item "layers-mask-delete" 0) (history-item "filters-gaussian-blur" 0) (history-item "dialogs-about" 0) -(history-item "tools-smudge" 0) # end of action-history diff --git a/gimp/.config/GIMP/2.10/sessionrc b/gimp/.config/GIMP/2.10/sessionrc index 13d083255..64f8a2f9f 100755 --- a/gimp/.config/GIMP/2.10/sessionrc +++ b/gimp/.config/GIMP/2.10/sessionrc @@ -11,9 +11,8 @@ (size 620 200)) (session-info "toplevel" (factory-entry "gimp-single-image-window") - (position 6 32) - (size 1906 1014) - (monitor 1) + (position 962 32) + (size 950 1014) (open-on-exit) (aux-info (left-docks-width "52") diff --git a/gimp/.config/GIMP/2.10/webxrc b/gimp/.config/GIMP/2.10/webxrc new file mode 100644 index 000000000..177dc7e21 --- /dev/null +++ b/gimp/.config/GIMP/2.10/webxrc @@ -0,0 +1,3 @@ +# Save-for-web plug-in resource file + +(dialog-layout 1 1 825 480 282) diff --git a/gtk-2.0/.config/gtk-2.0/gtkfilechooser.ini b/gtk-2.0/.config/gtk-2.0/gtkfilechooser.ini index 373beab24..c35a2a5f6 100644 --- a/gtk-2.0/.config/gtk-2.0/gtkfilechooser.ini +++ b/gtk-2.0/.config/gtk-2.0/gtkfilechooser.ini @@ -2,7 +2,7 @@ LocationMode=path-bar ShowHidden=true ShowSizeColumn=true -GeometryX=792 +GeometryX=397 GeometryY=149 GeometryWidth=1128 GeometryHeight=782 diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 4e7acc94c..c40b9ee84 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -15,10 +15,11 @@ workspace_auto_back_and_forth yes # variables {{{ set $TerminalEmulator kitty -set $WebBrowser google-chrome-stable +set $WebBrowserB google-chrome-stable +set $WebBrowserF firefox set $FileManager nemo set $MailReader thunderbird -set $TextEditor nvim-qt +set $TextEditor code set $Hypervisor virtualbox set $GitBrowser lazygit # }}} variables @@ -585,46 +586,42 @@ font pango:Noto Mono Regular 13 # Assign application to start on a specific workspace # you can find the class with the program xprop -# sign via instance +# sign via class # Workspace $ws1 Terminal -assign [instance="(?i)Alacritty|Kitty"] → $ws1 +assign [class="(?i)Alacritty|Kitty"] → $ws1 # Workspace $ws2 Text Editor -assign [instance="(?i)NVim|Jetbrains-Idea-CE"] → $ws2 +assign [class="(?i)Code|Jetbrains-Idea-CE"] → $ws2 # Workspace $ws3 Files -assign [instance="(?i)Nemo"] → $ws3 +assign [class="(?i)Nemo"] → $ws3 # Workspace $ws4 Graphics -assign [instance="(?i)Aseprite|Krita"] → $ws4 +assign [class="(?i)Aseprite|Krita"] → $ws4 # Workspace $ws5 Music -assign [instance="(?i)Xephyr"] → $ws5 +assign [class="(?i)Xephyr"] → $ws5 +assign [class="(?i)CmusImage"] → $ws5 # Workspace $ws6 WebBrowser -assign [instance="(?i)Firefox|Google-Chrome"] → $ws6 +assign [class="(?i)Firefox|Google-Chrome"] → $ws6 # Workspace $ws7 Other Stuff -assign [instance="(?i)Mail|Thunderbird"] → $ws7 -assign [instance="(?i)Keybase"] → $ws7 +assign [class="(?i)Mail|Thunderbird"] → $ws7 +assign [class="(?i)Keybase"] → $ws7 # Workspace $ws8 file GitAhead -assign [instance="(?i)Minecraft*|Steam*"] → $ws8 -assign [instance="(?i)0ad*|Minetest"] → $ws8 +assign [class="(?i)Minecraft*|Steam*"] → $ws8 +assign [class="(?i)0ad*|Minetest"] → $ws8 # Workspace $ws9 Chat -assign [instance="(?i)Telegram|Element"] → $ws9 +assign [class="(?i)Telegram|Element"] → $ws9 # Workspace $ws0 Settings -assign [instance="(?i)Virt*|LazyGit"] → $ws0 -assign [instance="(?i)Dconf-editor|Piper*"] → $ws0 -assign [instance="(?i)Actions|Btop"] → $ws0 - -# sign via class -# Workspace $ws5 Music -assign [class="(?i)CmusImage"] → $ws5 -# Workspace $ws0 Settings -assign [class="(?i)PkgBrowser"] → $ws0 +assign [class="(?i)Virt*|LazyGit"] → $ws0 +assign [class="(?i)Dconf-editor|Piper*"] → $ws0 +assign [class="(?i)Actions|Btop"] → $ws0 +assign [class="(?i)PkgBrowser"] → $ws0 # }}} assign applications @@ -712,15 +709,20 @@ $super_b+$control+v \ #workspace 6 related ## Category: Applications; -# Description: Launch $WebBrowser; +# Description: Launch $WebBrowserB; +$super_b+$control+b \ + $exe $WebBrowserB;focus + +## Category: Applications; +# Description: Launch $WebBrowserF; $super_b+$control+f \ - $exe $WebBrowser;focus + $exe $WebBrowserF;focus #workspace 7 related ## Category: Applications; # Description: Launch $MailReader; -$super_b+$control+b \ +$super_b+$control+m \ $exe $MailReader;focus #workspace 8 related @@ -745,7 +747,7 @@ $super_b+$control+g \ set $game_launcher Launch: [0]ad [s]eam [m]inecraft mine[t]est mode "$game_launcher" { -bindsym --release 0 \ + bindsym --release 0 \ $exe prime-run 0ad;focus; mode "default" bindsym --release s \ @@ -1068,15 +1070,15 @@ $super_b+minus \ ################# active scratchpad ################# ####################################################################### -for_window [instance="(?i)dropdown-terminal"] floating enable -for_window [instance="(?i)dropdown-terminal"] resize set 800 600 -for_window [instance="(?i)dropdown-terminal"] move scratchpad +for_window [class="(?i)dropdown-terminal"] floating enable +for_window [class="(?i)dropdown-terminal"] resize set 800 600 +for_window [class="(?i)dropdown-terminal"] move scratchpad $exe $TerminalEmulator --title="Dropdown-Terminal" --class="Dropdown-Terminal" --name="Dropdown-Terminal" ## Category: Scratchpad; # Description: Toggle $TerminalEmulator; $control_b+Return \ - [instance="(?i)dropdown-terminal"] scratchpad show, move position center + [class="(?i)dropdown-terminal"] scratchpad show, move position center # }}} scratchpad diff --git a/inkscape/.config/inkscape/preferences.xml b/inkscape/.config/inkscape/preferences.xml index eef818d90..35110b504 100644 --- a/inkscape/.config/inkscape/preferences.xml +++ b/inkscape/.config/inkscape/preferences.xml @@ -1026,8 +1026,8 @@ /dev/null; then echo "dunst already Running" fi fi + + +# see https://unix.stackexchange.com/a/295652/332452 +source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh + +# see https://wiki.archlinux.org/title/GNOME/Keyring#xinitrc +eval $(/usr/bin/gnome-keyring-daemon --start) +export SSH_AUTH_SOCK + +# see https://github.com/NixOS/nixpkgs/issues/14966#issuecomment-520083836 +mkdir -p "$HOME"/.local/share/keyrings \ No newline at end of file diff --git a/localbin/.local/bin/dayborn b/localbin/.local/bin/dayborn index 9232d8a2e..b61c91b3c 100755 --- a/localbin/.local/bin/dayborn +++ b/localbin/.local/bin/dayborn @@ -36,25 +36,25 @@ my $CurVer = '2021-02-01'; my $Progrm = 'dayborn'; sub Usage{ - print(qq{Usage: $Progrm [OPTS] [FILE] + print(qq{Usage: $Progrm [OPTS] [FILE] - -h, --help - Display this help information. - -v, --version - Output the version datestamp. - } =~ tr/\t//dr) + -h, --help - Display this help information. + -v, --version - Output the version datestamp. + } =~ tr/\t//dr) } while (defined($ARGV[0])){ - if ($ARGV[0] =~ '^(--help|-h|-\?)$'){ - Usage(1); exit(0) - }elsif ($ARGV[0] =~ '^(--version|-v)$'){ - print("$CurVer\n"); exit(0) - }elsif ($ARGV[0] =~ '^-'){ - die("Incorrect option(s) specified") - }else{ - last - } + if ($ARGV[0] =~ '^(--help|-h|-\?)$'){ + Usage(1); exit(0) + }elsif ($ARGV[0] =~ '^(--version|-v)$'){ + print("$CurVer\n"); exit(0) + }elsif ($ARGV[0] =~ '^-'){ + die("Incorrect option(s) specified") + }else{ + last + } - shift() + shift() } scalar(@ARGV) == 1 or die("File name required"); @@ -68,29 +68,29 @@ open(my $FH, '<', $ARGV[0]); my ($Start, $Now); while (<$FH>){ - /^# (Start|Modified) / or next; + /^# (Start|Modified) / or next; - chomp(my @Arr = split(' ')); + chomp(my @Arr = split(' ')); - # The following format (sans quotes) is expected: - # - # '# Started On - Mon 10 Feb 23:49:15 GMT 2020' - # - if ($Arr[1] eq 'Start') { - $Start = Time::Piece->strptime( - join(' ', @Arr[4,6,5,7,9]), '%a %b %d %T %Z %Y' - )->epoch() - } + # The following format (sans quotes) is expected: + # + # '# Started On - Mon 10 Feb 23:49:15 GMT 2020' + # + if ($Arr[1] eq 'Start') { + $Start = Time::Piece->strptime( + join(' ', @Arr[4,6,5,7,9]), '%a %b %d %T %Z %Y' + )->epoch() + } - # The following format (sans quotes) is expected: - # - # '# Modified On - Tue 11 Feb 01:00:34 GMT 2020' - # - if ($Arr[1] eq 'Modified') { - $Now = Time::Piece->strptime( - join(' ', @Arr[4,6,5,7,9]), '%a %b %d %T %Z %Y' - )->epoch() - } + # The following format (sans quotes) is expected: + # + # '# Modified On - Tue 11 Feb 01:00:34 GMT 2020' + # + if ($Arr[1] eq 'Modified') { + $Now = Time::Piece->strptime( + join(' ', @Arr[4,6,5,7,9]), '%a %b %d %T %Z %Y' + )->epoch() + } } close($FH); @@ -99,4 +99,3 @@ my $Project = ($ARGV[0] =~ m{(?:.*/)?([^/].*)})[0]; my $DeltaDay = ($Now - $Start) / 60 / 60 / 24; printf("Project '%s' was born %.2f day's ago.\n", $Project, $DeltaDay) - diff --git a/nvim/.config/nvim/ginit.vim b/nvim/.config/nvim/ginit.vim deleted file mode 100644 index ad4f16920..000000000 --- a/nvim/.config/nvim/ginit.vim +++ /dev/null @@ -1 +0,0 @@ -Guifont SauceCodePro\ Nerd\ Font:size:h10 diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index fc8b3b9de..444ead190 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -12,3 +12,15 @@ vim.cmd("hi! link DashboardHeader Error") if not ok then error("Error loading core" .. "\n\n" .. err) end + +vim.opt.termguicolors = true +vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]] +vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]] +vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]] +vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]] +vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]] +vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]] + +vim.opt.list = true +vim.opt.listchars:append("space:⋅") +vim.opt.listchars:append("eol:↴") diff --git a/nvim/.config/nvim/lua/core/custom.lua b/nvim/.config/nvim/lua/core/custom.lua index c05806175..78c036499 100644 --- a/nvim/.config/nvim/lua/core/custom.lua +++ b/nvim/.config/nvim/lua/core/custom.lua @@ -1,22 +1,22 @@ local function isModuleAvailable(name) - if package.loaded[name] then - return true - else - for _, searcher in ipairs(package.searchers or package.loaders) do - local loader = searcher(name) - if type(loader) == "function" then - package.preload[name] = loader - return true - end - end - return false - end + if package.loaded[name] then + return true + else + for _, searcher in ipairs(package.searchers or package.loaders) do + local loader = searcher(name) + if type(loader) == "function" then + package.preload[name] = loader + return true + end + end + return false + end end local loadIfExists = function(module) - if isModuleAvailable(module) then - require(module) - end + if isModuleAvailable(module) then + require(module) + end end loadIfExists "custom" diff --git a/nvim/.config/nvim/lua/core/default_config.lua b/nvim/.config/nvim/lua/core/default_config.lua index b89824b6a..12815898b 100644 --- a/nvim/.config/nvim/lua/core/default_config.lua +++ b/nvim/.config/nvim/lua/core/default_config.lua @@ -67,24 +67,24 @@ M.plugins = { luasnip = { snippet_path = {}, }, - statusline = { -- statusline related options - -- these are filetypes, not pattern matched - -- shown filetypes will overrule hidden filetypes - hidden = { - "help", - "dashboard", - "NvimTree", - "terminal", - }, - -- show short statusline on small screens - shortline = true, - shown = {}, - -- default, round , slant , block , arrow - style = "default", + statusline = { -- statusline related options + -- these are filetypes, not pattern matched + -- shown filetypes will overrule hidden filetypes + hidden = { + "help", + "dashboard", + "NvimTree", + "terminal", }, - esc_insertmode_timeout = 300, + -- show short statusline on small screens + shortline = true, + shown = {}, + -- default, round , slant , block , arrow + style = "default", }, - default_plugin_config_replace = {}, + esc_insertmode_timeout = 300, +}, +default_plugin_config_replace = {}, } -- mappings -- don't use a single keymap twice -- diff --git a/nvim/.config/nvim/lua/core/functions.lua b/nvim/.config/nvim/lua/core/functions.lua index ae21d40a8..8ac60e6fb 100644 --- a/nvim/.config/nvim/lua/core/functions.lua +++ b/nvim/.config/nvim/lua/core/functions.lua @@ -3,26 +3,26 @@ local system = require "core.system" local M = {} M.edit_config = function() - local selected_config = tonumber(vim.fn.inputlist({ - "Select a configuration file to edit:", - "1. init.lua (default)", - "2. init.lua", - "3. nvimrc.lua", - })) - local config = utils.load_config() - local setting = config.plugins.options + local selected_config = tonumber(vim.fn.inputlist({ + "Select a configuration file to edit:", + "1. init.lua (default)", + "2. init.lua", + "3. nvimrc.lua", + })) + local config = utils.load_config() + local setting = config.plugins.options - local open_command = setting.open_command and "split" or "edit" + local open_command = setting.open_command and "split" or "edit" - if selected_config == 1 then - vim.cmd(string.format("%s %s%sinit.lua", open_command, system.nvim_default_root, system.sep)) - elseif selected_config == 2 then - vim.cmd(string.format("%s %s%sinit.lua", open_command, system.nvim_configs_root, system.sep)) - elseif selected_config == 3 then - vim.cmd(string.format("%s %s%snvimrc.lua", open_command, system.nvim_configs_root, system.sep)) - elseif selected_config ~= 0 then - log.error("Invalid option selected.") - end + if selected_config == 1 then + vim.cmd(string.format("%s %s%sinit.lua", open_command, system.nvim_default_root, system.sep)) + elseif selected_config == 2 then + vim.cmd(string.format("%s %s%sinit.lua", open_command, system.nvim_configs_root, system.sep)) + elseif selected_config == 3 then + vim.cmd(string.format("%s %s%snvimrc.lua", open_command, system.nvim_configs_root, system.sep)) + elseif selected_config ~= 0 then + log.error("Invalid option selected.") + end end return M diff --git a/nvim/.config/nvim/lua/core/hooks.lua b/nvim/.config/nvim/lua/core/hooks.lua index 2602ff78f..f0dfa1fcf 100644 --- a/nvim/.config/nvim/lua/core/hooks.lua +++ b/nvim/.config/nvim/lua/core/hooks.lua @@ -1,68 +1,68 @@ local hooks, overrides, M = {}, {}, {} local allowed_hooks = { - "install_plugins", - "setup_mappings", - "ready", + "install_plugins", + "setup_mappings", + "ready", } local function has_value(tab, val) - for _, value in ipairs(tab) do - if value == val then - return true - end - end + for _, value in ipairs(tab) do + if value == val then + return true + end + end - return false + return false end M.add = function(name, fn) - if not (has_value(allowed_hooks, name)) then - error("Custom lua uses unallowed hook " .. name) - end - if hooks[name] == nil then - hooks[name] = {} - end - table.insert(hooks[name], fn) + if not (has_value(allowed_hooks, name)) then + error("Custom lua uses unallowed hook " .. name) + end + if hooks[name] == nil then + hooks[name] = {} + end + table.insert(hooks[name], fn) end M.run = function(name, args) - if hooks[name] == nil then - return - end + if hooks[name] == nil then + return + end - for _, hook in pairs(hooks[name]) do - hook(args) - end + for _, hook in pairs(hooks[name]) do + hook(args) + end end M.createOverrides = function(module) - local O = {} + local O = {} - O.get = function(name, default) - local current = default - if overrides[module] and overrides[module][name] then - if type(overrides[module][name]) == "function" then - current = overrides[module][name] - elseif type(overrides[module][name]) == "table" then - for _, override in pairs(overrides[module][name]) do - current = override(current) + O.get = function(name, default) + local current = default + if overrides[module] and overrides[module][name] then + if type(overrides[module][name]) == "function" then + current = overrides[module][name] + elseif type(overrides[module][name]) == "table" then + for _, override in pairs(overrides[module][name]) do + current = override(current) + end end - end - end - return current - end + end + return current + end - return O + return O end M.override = function(module, name, overwrite) - if overrides[module] == nil then - overrides[module] = {} - end - if overrides[module][name] == nil then - overrides[module][name] = {} - end - table.insert(overrides[module][name], overwrite) + if overrides[module] == nil then + overrides[module] = {} + end + if overrides[module][name] == nil then + overrides[module][name] = {} + end + table.insert(overrides[module][name], overwrite) end return M diff --git a/nvim/.config/nvim/lua/core/init.lua b/nvim/.config/nvim/lua/core/init.lua index dc1198cd6..9b7912664 100644 --- a/nvim/.config/nvim/lua/core/init.lua +++ b/nvim/.config/nvim/lua/core/init.lua @@ -1,17 +1,17 @@ local core_modules = { - "core.custom", - "core.options", - "core.autocmds", - "core.mappings", + "core.custom", + "core.options", + "core.autocmds", + "core.mappings", } local hooks = require "core.hooks" for _, module in ipairs(core_modules) do - local ok, err = pcall(require, module) - if not ok then - error("Error loading " .. module .. "\n\n" .. err) - end + local ok, err = pcall(require, module) + if not ok then + error("Error loading " .. module .. "\n\n" .. err) + end end -- set all the non plugin mappings diff --git a/nvim/.config/nvim/lua/core/options.lua b/nvim/.config/nvim/lua/core/options.lua index ec00babca..64d86498a 100644 --- a/nvim/.config/nvim/lua/core/options.lua +++ b/nvim/.config/nvim/lua/core/options.lua @@ -52,26 +52,26 @@ g.mapleader = options.mapleader -- disable some builtin vim plugins local disabled_built_ins = { - "2html_plugin", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", + "2html_plugin", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", } for _, plugin in pairs(disabled_built_ins) do - g["loaded_" .. plugin] = 1 + g["loaded_" .. plugin] = 1 end diff --git a/nvim/.config/nvim/lua/core/system.lua b/nvim/.config/nvim/lua/core/system.lua index ab736b12f..627246af6 100644 --- a/nvim/.config/nvim/lua/core/system.lua +++ b/nvim/.config/nvim/lua/core/system.lua @@ -12,22 +12,22 @@ local M = {} -- 'C:\Users\JohnDoe\AppData\Local' for windows and '~/.config' for *nix -- @return string local function get_config_dir() - if string.find(vim.loop.os_uname().sysname, "Windows") then - return os.getenv("USERPROFILE") .. "\\AppData\\Local\\" - end + if string.find(vim.loop.os_uname().sysname, "Windows") then + return os.getenv("USERPROFILE") .. "\\AppData\\Local\\" + end - return (os.getenv("XDG_CONFIG_HOME") and os.getenv("XDG_CONFIG_HOME")) + return (os.getenv("XDG_CONFIG_HOME") and os.getenv("XDG_CONFIG_HOME")) or (os.getenv("HOME") .. "/.config") end -- get_separator will return the system paths separator, e.g. \ for Windows and / for *nix -- @return string local function get_separator() - if vim.loop.os_uname().sysname == "Windows" then - return "\\" - end + if vim.loop.os_uname().sysname == "Windows" then + return "\\" + end - return "/" + return "/" end M.config_dir = get_config_dir() diff --git a/nvim/.config/nvim/lua/core/utils.lua b/nvim/.config/nvim/lua/core/utils.lua index 0a4fbe6b6..17cb566a4 100644 --- a/nvim/.config/nvim/lua/core/utils.lua +++ b/nvim/.config/nvim/lua/core/utils.lua @@ -1,241 +1,241 @@ local M = {} M.close_buffer = function(bufexpr, force) - -- This is a modification of a NeoVim plugin from - -- Author: ojroques - Olivier Roques - -- Src: https://github.com/ojroques/nvim-bufdel - -- (Author has okayed copy-paste) + -- This is a modification of a NeoVim plugin from + -- Author: ojroques - Olivier Roques + -- Src: https://github.com/ojroques/nvim-bufdel + -- (Author has okayed copy-paste) - -- Options - local opts = { - next = "cycle", -- how to retrieve the next buffer - quit = false, -- exit when last buffer is deleted - --TODO make this a nvimrc flag/option - } + -- Options + local opts = { + next = "cycle", -- how to retrieve the next buffer + quit = false, -- exit when last buffer is deleted + --TODO make this a nvimrc flag/option + } - -- ---------------- - -- Helper functions - -- ---------------- + -- ---------------- + -- Helper functions + -- ---------------- - -- Switch to buffer 'buf' on each window from list 'windows' - local function switch_buffer(windows, buf) - local cur_win = vim.fn.winnr() - for _, winid in ipairs(windows) do - vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) - vim.cmd(string.format("buffer %d", buf)) - end - vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window - end + -- Switch to buffer 'buf' on each window from list 'windows' + local function switch_buffer(windows, buf) + local cur_win = vim.fn.winnr() + for _, winid in ipairs(windows) do + vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid))) + vim.cmd(string.format("buffer %d", buf)) + end + vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window + end - -- Select the first buffer with a number greater than given buffer - local function get_next_buf(buf) - local next = vim.fn.bufnr "#" - if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then - return next - end - for i = 0, vim.fn.bufnr "$" - 1 do - next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 - if vim.fn.buflisted(next) == 1 then + -- Select the first buffer with a number greater than given buffer + local function get_next_buf(buf) + local next = vim.fn.bufnr "#" + if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then return next - end - end - end + end + for i = 0, vim.fn.bufnr "$" - 1 do + next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1 + if vim.fn.buflisted(next) == 1 then + return next + end + end + end - -- ---------------- - -- End helper functions - -- ---------------- + -- ---------------- + -- End helper functions + -- ---------------- - local buf = vim.fn.bufnr() - if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid - vim.cmd "close" - return - end + local buf = vim.fn.bufnr() + if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid + vim.cmd "close" + return + end - if #vim.fn.getbufinfo { buflisted = 1 } < 2 then - if opts.quit then - -- exit when there is only one buffer left - if force then - vim.cmd "qall!" - else - vim.cmd "confirm qall" - end - return - end - - local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - - if chad_term then - -- Must be a window type - vim.cmd(string.format("setlocal nobl", buf)) - vim.cmd "enew" - return - end - -- don't exit and create a new empty buffer - vim.cmd "enew" - vim.cmd "bp" - end - - local next_buf = get_next_buf(buf) - local windows = vim.fn.getbufinfo(buf)[1].windows - - -- force deletion of terminal buffers to avoid the prompt - if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then - local chad_term, type = pcall(function() - return vim.api.nvim_buf_get_var(buf, "term_type") - end) - - -- TODO this scope is error prone, make resilient - if chad_term then - if type == "wind" then - -- hide from bufferline - vim.cmd(string.format("%d bufdo setlocal nobl", buf)) - -- swtich to another buff - -- TODO switch to next bufffer, this works too - vim.cmd "BufferLineCycleNext" - else - local cur_win = vim.fn.winnr() - -- we can close this window - vim.cmd(string.format("%d wincmd c", cur_win)) + if #vim.fn.getbufinfo { buflisted = 1 } < 2 then + if opts.quit then + -- exit when there is only one buffer left + if force then + vim.cmd "qall!" + else + vim.cmd "confirm qall" + end return - end - else - switch_buffer(windows, next_buf) - vim.cmd(string.format("bd! %d", buf)) - end - else - switch_buffer(windows, next_buf) - vim.cmd(string.format("silent! confirm bd %d", buf)) - end - -- revert buffer switches if user has canceled deletion - if vim.fn.buflisted(buf) == 1 then - switch_buffer(windows, buf) - end + end + + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + if chad_term then + -- Must be a window type + vim.cmd(string.format("setlocal nobl", buf)) + vim.cmd "enew" + return + end + -- don't exit and create a new empty buffer + vim.cmd "enew" + vim.cmd "bp" + end + + local next_buf = get_next_buf(buf) + local windows = vim.fn.getbufinfo(buf)[1].windows + + -- force deletion of terminal buffers to avoid the prompt + if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then + local chad_term, type = pcall(function() + return vim.api.nvim_buf_get_var(buf, "term_type") + end) + + -- TODO this scope is error prone, make resilient + if chad_term then + if type == "wind" then + -- hide from bufferline + vim.cmd(string.format("%d bufdo setlocal nobl", buf)) + -- swtich to another buff + -- TODO switch to next bufffer, this works too + vim.cmd "BufferLineCycleNext" + else + local cur_win = vim.fn.winnr() + -- we can close this window + vim.cmd(string.format("%d wincmd c", cur_win)) + return + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format("bd! %d", buf)) + end + else + switch_buffer(windows, next_buf) + vim.cmd(string.format("silent! confirm bd %d", buf)) + end + -- revert buffer switches if user has canceled deletion + if vim.fn.buflisted(buf) == 1 then + switch_buffer(windows, buf) + end end -- hide statusline -- tables fetched from load_config function M.hide_statusline = function() - local hidden = require("core.utils").load_config().plugins.options.statusline.hidden - local shown = require("core.utils").load_config().plugins.options.statusline.shown - local api = vim.api - local buftype = api.nvim_buf_get_option("%", "ft") + local hidden = require("core.utils").load_config().plugins.options.statusline.hidden + local shown = require("core.utils").load_config().plugins.options.statusline.shown + local api = vim.api + local buftype = api.nvim_buf_get_option("%", "ft") - -- shown table from config has the highest priority - if vim.tbl_contains(shown, buftype) then - api.nvim_set_option("laststatus", 2) - return - end + -- shown table from config has the highest priority + if vim.tbl_contains(shown, buftype) then + api.nvim_set_option("laststatus", 2) + return + end - if vim.tbl_contains(hidden, buftype) then - api.nvim_set_option("laststatus", 0) - return - else - api.nvim_set_option("laststatus", 2) - end + if vim.tbl_contains(hidden, buftype) then + api.nvim_set_option("laststatus", 0) + return + else + api.nvim_set_option("laststatus", 2) + end end -- load config -- 1st arg = boolean - whether to force reload -- Modifies _G._NEOVIM_CONFIG global variable M.load_config = function(reload) - -- only do the stuff below one time, otherwise just return the set config - if _G._NEOVIM_CONFIG_CONTENTS ~= nil and not (reload or false) then - return _G._NEOVIM_CONFIG_CONTENTS - end + -- only do the stuff below one time, otherwise just return the set config + if _G._NEOVIM_CONFIG_CONTENTS ~= nil and not (reload or false) then + return _G._NEOVIM_CONFIG_CONTENTS + end - -- these are the table value which will be always prioritiezed to take user config value - local to_replace = { - "['mappings']['plugins']['esc_insertmode']", - "['mappings']['terminal']['esc_termmode']", - "['mappings']['terminal']['esc_hide_termmode']", - } + -- these are the table value which will be always prioritiezed to take user config value + local to_replace = { + "['mappings']['plugins']['esc_insertmode']", + "['mappings']['terminal']['esc_termmode']", + "['mappings']['terminal']['esc_hide_termmode']", + } - local default_config = "core.default_config" - local config_name = vim.g.neovim_user_config or "nvimrc" - local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. config_name .. ".lua" + local default_config = "core.default_config" + local config_name = vim.g.neovim_user_config or "nvimrc" + local config_file = vim.fn.stdpath "config" .. "/lua/custom/" .. config_name .. ".lua" - -- unload the modules if force reload - if reload then - package.loaded[default_config or false] = nil - package.loaded[config_name or false] = nil - end + -- unload the modules if force reload + if reload then + package.loaded[default_config or false] = nil + package.loaded[config_name or false] = nil + end - -- don't enclose in pcall, it better break when default config is faulty - _G._NEOVIM_CONFIG_CONTENTS = require(default_config) + -- don't enclose in pcall, it better break when default config is faulty + _G._NEOVIM_CONFIG_CONTENTS = require(default_config) - -- user config is not required to run neovim but a optional - -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table - -- print warning texts if user config file is present - -- check if the user config is present - if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then - local present, config = pcall(require, "custom/" .. config_name) - if present then - -- make sure the returned value is table - if type(config) == "table" then - -- data = require(config_name) - _G._NEOVIM_CONFIG_CONTENTS = require("core.utils").merge_table( - _G._NEOVIM_CONFIG_CONTENTS, - config, - to_replace - ) - else - print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") - end - else - print("Warning: " .. config_file .. " is present but sourcing failed.") - end - end - return _G._NEOVIM_CONFIG_CONTENTS + -- user config is not required to run neovim but a optional + -- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table + -- print warning texts if user config file is present + -- check if the user config is present + if vim.fn.filereadable(vim.fn.glob(config_file)) == 1 then + local present, config = pcall(require, "custom/" .. config_name) + if present then + -- make sure the returned value is table + if type(config) == "table" then + -- data = require(config_name) + _G._NEOVIM_CONFIG_CONTENTS = require("core.utils").merge_table( + _G._NEOVIM_CONFIG_CONTENTS, + config, + to_replace + ) + else + print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.") + end + else + print("Warning: " .. config_file .. " is present but sourcing failed.") + end + end + return _G._NEOVIM_CONFIG_CONTENTS end M.map = function(mode, keys, cmd, opt) - local options = { noremap = true, silent = true } - if opt then - options = vim.tbl_extend("force", options, opt) - end + local options = { noremap = true, silent = true } + if opt then + options = vim.tbl_extend("force", options, opt) + end - -- all valid modes allowed for mappings - -- :h map-modes - local valid_modes = { - [""] = true, - ["n"] = true, - ["v"] = true, - ["s"] = true, - ["x"] = true, - ["o"] = true, - ["!"] = true, - ["i"] = true, - ["l"] = true, - ["c"] = true, - ["t"] = true, - } + -- all valid modes allowed for mappings + -- :h map-modes + local valid_modes = { + [""] = true, + ["n"] = true, + ["v"] = true, + ["s"] = true, + ["x"] = true, + ["o"] = true, + ["!"] = true, + ["i"] = true, + ["l"] = true, + ["c"] = true, + ["t"] = true, + } - -- helper function for M.map - -- can gives multiple modes and keys - local function map_wrapper(mode, lhs, rhs, options) - if type(lhs) == "table" then - for _, key in ipairs(lhs) do - map_wrapper(mode, key, rhs, options) - end - else - if type(mode) == "table" then - for _, m in ipairs(mode) do - map_wrapper(m, lhs, rhs, options) + -- helper function for M.map + -- can gives multiple modes and keys + local function map_wrapper(mode, lhs, rhs, options) + if type(lhs) == "table" then + for _, key in ipairs(lhs) do + map_wrapper(mode, key, rhs, options) end - else - if valid_modes[mode] and lhs and rhs then - vim.api.nvim_set_keymap(mode, lhs, rhs, options) + else + if type(mode) == "table" then + for _, m in ipairs(mode) do + map_wrapper(m, lhs, rhs, options) + end else - mode, lhs, rhs = mode or "", lhs or "", rhs or "" - print("Cannot set mapping [ mode = '" .. mode .. "' | key = '" .. lhs .. "' | cmd = '" .. rhs .. "' ]") + if valid_modes[mode] and lhs and rhs then + vim.api.nvim_set_keymap(mode, lhs, rhs, options) + else + mode, lhs, rhs = mode or "", lhs or "", rhs or "" + print("Cannot set mapping [ mode = '" .. mode .. "' | key = '" .. lhs .. "' | cmd = '" .. rhs .. "' ]") + end end - end - end - end + end + end - map_wrapper(mode, keys, cmd, options) + map_wrapper(mode, keys, cmd, options) end -- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7 @@ -245,89 +245,89 @@ end -- 3rg arg - list of nodes as a table, if the node is found replace the from table2 to result, rather than adding the value -- e.g: merge_table(t1, t2, { ['mappings']['plugins']['bufferline'] }) M.merge_table = function(into, from, nodes_to_replace) - -- make sure both are table - if type(into) ~= "table" or type(from) ~= "table" then - return into - end + -- make sure both are table + if type(into) ~= "table" or type(from) ~= "table" then + return into + end - local stack, seen = {}, {} - local table1, table2 = into, from + local stack, seen = {}, {} + local table1, table2 = into, from - if type(nodes_to_replace) == "table" then - -- function that will be executed with loadstring - local replace_fn = function(node) - local base_fn = [[ -return function(table1, table2) - local t1, t2 = table1_node or false , table2_node or false - if t1 and t2 then - table1_node = table2_node - end - return table1 -end]] + if type(nodes_to_replace) == "table" then + -- function that will be executed with loadstring + local replace_fn = function(node) + local base_fn = [[ + return function(table1, table2) + local t1, t2 = table1_node or false , table2_node or false + if t1 and t2 then + table1_node = table2_node + end + return table1 + end]] - -- replace the _node in base_fn to actual given node value - local fn = base_fn:gsub("_node", node) - -- return the function created from the string base_fn - return loadstring(fn)()(table1, table2) - end + -- replace the _node in base_fn to actual given node value + local fn = base_fn:gsub("_node", node) + -- return the function created from the string base_fn + return loadstring(fn)()(table1, table2) + end - for _, node in ipairs(nodes_to_replace) do - -- pcall() is a poor workaround for if "['mappings']['plugins']['esc_insertmode']" 'plugins' sub-table does not exist - local ok, result = pcall(replace_fn, node) - if ok then - -- if the node is found then replace - table1 = result - end - end - end - - while true do - for k, v in pairs(table2) do - if type(v) == "table" and type(table1[k]) == "table" then - table.insert(stack, { table1[k], table2[k] }) - else - local present = seen[v] or false - if not present then - if type(k) == "number" then - -- add the value to seen table until value is found - -- only do when key is number we just want to append to subtables - -- todo: maybe improve this - - for _, value in pairs(table1) do - if value == v then - present = true - break - end - end - seen[v] = true - if not present then - table1[#table1 + 1] = v - end - else - table1[k] = v - end + for _, node in ipairs(nodes_to_replace) do + -- pcall() is a poor workaround for if "['mappings']['plugins']['esc_insertmode']" 'plugins' sub-table does not exist + local ok, result = pcall(replace_fn, node) + if ok then + -- if the node is found then replace + table1 = result end - end - end - if #stack > 0 then - local t = stack[#stack] - table1, table2 = t[1], t[2] - stack[#stack] = nil - else - break - end - end - return into + end + end + + while true do + for k, v in pairs(table2) do + if type(v) == "table" and type(table1[k]) == "table" then + table.insert(stack, { table1[k], table2[k] }) + else + local present = seen[v] or false + if not present then + if type(k) == "number" then + -- add the value to seen table until value is found + -- only do when key is number we just want to append to subtables + -- todo: maybe improve this + + for _, value in pairs(table1) do + if value == v then + present = true + break + end + end + seen[v] = true + if not present then + table1[#table1 + 1] = v + end + else + table1[k] = v + end + end + end + end + if #stack > 0 then + local t = stack[#stack] + table1, table2 = t[1], t[2] + stack[#stack] = nil + else + break + end + end + return into end -- load plugin after entering vim ui M.packer_lazy_load = function(plugin, timer) - if plugin then - timer = timer or 0 - vim.defer_fn(function() - require("packer").loader(plugin) - end, timer) - end + if plugin then + timer = timer or 0 + vim.defer_fn(function() + require("packer").loader(plugin) + end, timer) + end end return M diff --git a/nvim/.config/nvim/lua/custom/configs/lualine.lua b/nvim/.config/nvim/lua/custom/configs/lualine.lua index f65728e51..28ee8a1af 100644 --- a/nvim/.config/nvim/lua/custom/configs/lualine.lua +++ b/nvim/.config/nvim/lua/custom/configs/lualine.lua @@ -5,102 +5,102 @@ local lualine = require 'lualine' -- Color table for highlights local colors = { - bg = '#282a36', - fg = '#f8f8f2', - yellow = '#f1fa8c', - cyan = '#8be9fd', - darkblue = '#081633', - green = '#50fa7b', - orange = '#ffb86c', - violet = '#bd93f9', - magenta = '#ff79c6', - blue = '#51afef', - red = '#ff5555' + bg = '#282a36', + fg = '#f8f8f2', + yellow = '#f1fa8c', + cyan = '#8be9fd', + darkblue = '#081633', + green = '#50fa7b', + orange = '#ffb86c', + violet = '#bd93f9', + magenta = '#ff79c6', + blue = '#51afef', + red = '#ff5555' } local conditions = { - buffer_not_empty = function() return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 end, - hide_in_width = function() return vim.fn.winwidth(0) > 80 end, - check_git_workspace = function() - local filepath = vim.fn.expand('%:p:h') - local gitdir = vim.fn.finddir('.git', filepath .. ';') - return gitdir and #gitdir > 0 and #gitdir < #filepath - end + buffer_not_empty = function() return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 end, + hide_in_width = function() return vim.fn.winwidth(0) > 80 end, + check_git_workspace = function() + local filepath = vim.fn.expand('%:p:h') + local gitdir = vim.fn.finddir('.git', filepath .. ';') + return gitdir and #gitdir > 0 and #gitdir < #filepath + end } -- Config local config = { - options = { - -- Disable sections and component separators - icons_enabled = true, - theme = 'dracula', - section_separators = {'', ''}, - component_separators = {'', ''}, - disabled_filetypes = {} - }, - sections = { - -- these are to remove the defaults - lualine_a = {'mode'}, - lualine_b = {'bo:filetype'}, - lualine_y = {}, - lualine_z = {}, - -- These will be filled later - lualine_c = {}, - lualine_x = {} - }, - inactive_sections = { - -- these are to remove the defaults - lualine_a = {}, - lualine_v = {}, - lualine_y = {}, - lualine_z = {}, - lualine_c = {}, - lualine_x = {} - }, - tabline = {}, + options = { + -- Disable sections and component separators + icons_enabled = true, + theme = 'dracula', + section_separators = {'', ''}, + component_separators = {'', ''}, + disabled_filetypes = {} + }, + sections = { + -- these are to remove the defaults + lualine_a = {'mode'}, + lualine_b = {'bo:filetype'}, + lualine_y = {}, + lualine_z = {}, + -- These will be filled later + lualine_c = {}, + lualine_x = {} + }, + inactive_sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_v = {}, + lualine_y = {}, + lualine_z = {}, + lualine_c = {}, + lualine_x = {} + }, + tabline = {}, } -- Inserts a component in lualine_c at left section local function ins_left(component) - table.insert(config.sections.lualine_c, component) + table.insert(config.sections.lualine_c, component) end -- Inserts a component in lualine_x ot right section local function ins_right(component) - table.insert(config.sections.lualine_x, component) + table.insert(config.sections.lualine_x, component) end ins_left { - function() return '▊' end, - color = {fg = colors.blue}, -- Sets highlighting of component - left_padding = 0 -- We don't need space before this + function() return '▊' end, + color = {fg = colors.blue}, -- Sets highlighting of component + left_padding = 0 -- We don't need space before this } ins_left { - -- filesize component - function() - local function format_file_size(file) - local size = vim.fn.getfsize(file) - if size <= 0 then return '' end - local sufixes = {'b', 'k', 'm', 'g'} - local i = 1 - while size > 1024 do - size = size / 1024 - i = i + 1 - end - return string.format('%.1f%s', size, sufixes[i]) - end - local file = vim.fn.expand('%:p') - if string.len(file) == 0 then return '' end - return format_file_size(file) - end, - condition = conditions.buffer_not_empty + -- filesize component + function() + local function format_file_size(file) + local size = vim.fn.getfsize(file) + if size <= 0 then return '' end + local sufixes = {'b', 'k', 'm', 'g'} + local i = 1 + while size > 1024 do + size = size / 1024 + i = i + 1 + end + return string.format('%.1f%s', size, sufixes[i]) + end + local file = vim.fn.expand('%:p') + if string.len(file) == 0 then return '' end + return format_file_size(file) + end, + condition = conditions.buffer_not_empty } ins_left { - 'filename', - condition = conditions.buffer_not_empty, - color = {fg = colors.magenta, gui = 'bold'} + 'filename', + condition = conditions.buffer_not_empty, + color = {fg = colors.magenta, gui = 'bold'} } ins_left {'location'} @@ -108,12 +108,12 @@ ins_left {'location'} ins_left {'progress', color = {fg = colors.fg, gui = 'bold'}} ins_left { - 'diagnostics', - sources = {'nvim_diagnostic'}, - symbols = {error = ' ', warn = ' ', info = ' '}, - color_error = colors.red, - color_warn = colors.yellow, - color_info = colors.cyan + 'diagnostics', + sources = {'nvim_diagnostic'}, + symbols = {error = ' ', warn = ' ', info = ' '}, + color_error = colors.red, + color_warn = colors.yellow, + color_info = colors.cyan } -- Insert mid section. You can make any number of sections in neovim :) @@ -122,40 +122,40 @@ ins_left {function() return '%=' end} -- Add components to right sections ins_right { - 'o:encoding', -- option component same as &encoding in viml - upper = true, -- I'm not sure why it's upper case either ;) - condition = conditions.hide_in_width, - color = {fg = colors.green, gui = 'bold'} + 'o:encoding', -- option component same as &encoding in viml + upper = true, -- I'm not sure why it's upper case either ;) + condition = conditions.hide_in_width, + color = {fg = colors.green, gui = 'bold'} } ins_right { - 'fileformat', - upper = true, - icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh - color = {fg = colors.green, gui = 'bold'} + 'fileformat', + upper = true, + icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh + color = {fg = colors.green, gui = 'bold'} } ins_right { - 'branch', - icon = '', - condition = conditions.check_git_workspace, - color = {fg = colors.violet, gui = 'bold'} + 'branch', + icon = '', + condition = conditions.check_git_workspace, + color = {fg = colors.violet, gui = 'bold'} } ins_right { - 'diff', - -- Is it me or the symbol for modified us really weird - symbols = {added = ' ', modified = ' ', removed = ' '}, - color_added = colors.green, - color_modified = colors.orange, - color_removed = colors.red, - condition = conditions.hide_in_width + 'diff', + -- Is it me or the symbol for modified us really weird + symbols = {added = ' ', modified = ' ', removed = ' '}, + color_added = colors.green, + color_modified = colors.orange, + color_removed = colors.red, + condition = conditions.hide_in_width } ins_right { - function() return '▊' end, - color = {fg = colors.blue}, - right_padding = 0 + function() return '▊' end, + color = {fg = colors.blue}, + right_padding = 0 } -- Now don't forget to initialize lualine diff --git a/nvim/.config/nvim/lua/custom/configs/startify.lua b/nvim/.config/nvim/lua/custom/configs/startify.lua index d76a6175d..c48b852a8 100644 --- a/nvim/.config/nvim/lua/custom/configs/startify.lua +++ b/nvim/.config/nvim/lua/custom/configs/startify.lua @@ -44,7 +44,7 @@ local function lsCustomPluginSettingsDir() for key, file in pairs(files) do lst[key] = { line = file, path = (settings_dir..""..file) } end - return lst + return lst end local function lsDefaultPluginSettingsDir() @@ -54,7 +54,7 @@ local function lsDefaultPluginSettingsDir() for key, file in pairs(files) do lst[key] = { line = file, path = (settings_dir..""..file) } end - return lst + return lst end local function lsCustomSettingsDir() @@ -64,7 +64,7 @@ local function lsCustomSettingsDir() for key, file in pairs(files) do lst[key] = { line = file, path = (settings_dir..""..file) } end - return lst + return lst end local function lsDefaultSettingsDir() @@ -74,7 +74,7 @@ local function lsDefaultSettingsDir() for key, file in pairs(files) do lst[key] = { line = file, path = (settings_dir..""..file) } end - return lst + return lst end local function lsGitDir() diff --git a/nvim/.config/nvim/lua/custom/init.lua b/nvim/.config/nvim/lua/custom/init.lua index 9461d942c..b3ab635a9 100644 --- a/nvim/.config/nvim/lua/custom/init.lua +++ b/nvim/.config/nvim/lua/custom/init.lua @@ -16,6 +16,10 @@ hooks.add("install_plugins", function(use) "wakatime/vim-wakatime" } + use { + "gko/vim-coloresque" + } + use { "liuchengxu/vim-clap" } @@ -31,7 +35,6 @@ hooks.add("install_plugins", function(use) config = function() require("custom.configs.trim") end - } use { diff --git a/nvim/.config/nvim/lua/plugins/configs/cmp.lua b/nvim/.config/nvim/lua/plugins/configs/cmp.lua index 208eb3d4a..48245e5e2 100644 --- a/nvim/.config/nvim/lua/plugins/configs/cmp.lua +++ b/nvim/.config/nvim/lua/plugins/configs/cmp.lua @@ -1,72 +1,72 @@ local present, cmp = pcall(require, "cmp") if not present then - return + return end vim.opt.completeopt = "menuone,noselect" -- nvim-cmp setup cmp.setup { - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - formatting = { - format = function(entry, vim_item) - -- load lspkind icons - vim_item.kind = string.format( + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + formatting = { + format = function(entry, vim_item) + -- load lspkind icons + vim_item.kind = string.format( "%s %s", require("plugins.configs.lspkind_icons").icons[vim_item.kind], vim_item.kind - ) + ) - vim_item.menu = ({ - nvim_lsp = "[LSP]", - nvim_lua = "[Lua]", - buffer = "[BUF]", - })[entry.source.name] + vim_item.menu = ({ + nvim_lsp = "[LSP]", + nvim_lua = "[Lua]", + buffer = "[BUF]", + })[entry.source.name] - return vim_item - end, - }, - mapping = { - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.close(), - [""] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, - [""] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") - else - fallback() - end - end, - [""] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end, - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = 'orgmode' }, - { name = "buffer" }, - { name = "nvim_lua" }, - { name = "path" }, - }, + return vim_item + end, + }, + mapping = { + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [""] = function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + else + fallback() + end + end, + [""] = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end, + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = 'orgmode' }, + { name = "buffer" }, + { name = "nvim_lua" }, + { name = "path" }, + }, } diff --git a/nvim/.config/nvim/lua/plugins/configs/gitsigns.lua b/nvim/.config/nvim/lua/plugins/configs/gitsigns.lua index f2b58f616..6e8e6dc18 100644 --- a/nvim/.config/nvim/lua/plugins/configs/gitsigns.lua +++ b/nvim/.config/nvim/lua/plugins/configs/gitsigns.lua @@ -1,34 +1,34 @@ local present, gitsigns = pcall(require, "gitsigns") if not present then - return + return end gitsigns.setup { - keymaps = { - -- Default keymap options - buffer = true, - noremap = true, - ["n ]c"] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'" }, - ["n [c"] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'" }, - ["n hs"] = 'lua require"gitsigns".stage_hunk()', - ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', - ["n hr"] = 'lua require"gitsigns".reset_hunk()', - ["n hp"] = 'lua require"gitsigns".preview_hunk()', - ["n hb"] = 'lua require"gitsigns".blame_line()', - }, - numhl = false, + keymaps = { + -- Default keymap options + buffer = true, + noremap = true, + ["n ]c"] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'" }, + ["n [c"] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'" }, + ["n hs"] = 'lua require"gitsigns".stage_hunk()', + ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', + ["n hr"] = 'lua require"gitsigns".reset_hunk()', + ["n hp"] = 'lua require"gitsigns".preview_hunk()', + ["n hb"] = 'lua require"gitsigns".blame_line()', + }, + numhl = false, - sign_priority = 5, - signs = { - add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, - change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, - changedelete = { hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr" }, - delete = { hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr" }, - topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, - }, + sign_priority = 5, + signs = { + add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" }, + change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" }, + changedelete = { hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr" }, + delete = { hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr" }, + topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" }, + }, - status_formatter = nil, -- Use default - watch_gitdir = { - interval = 100, - }, + status_formatter = nil, -- Use default + watch_gitdir = { + interval = 100, + }, } diff --git a/nvim/.config/nvim/lua/plugins/configs/icons.lua b/nvim/.config/nvim/lua/plugins/configs/icons.lua index 0c37dea9b..fc4e64851 100644 --- a/nvim/.config/nvim/lua/plugins/configs/icons.lua +++ b/nvim/.config/nvim/lua/plugins/configs/icons.lua @@ -1,146 +1,146 @@ local present, icons = pcall(require, "nvim-web-devicons") if not present then - return + return end local colors = require('dracula').colors() icons.setup { - override = { - c = { - icon = "", - color = colors.blue, - name = "c", - }, - css = { - icon = "", - color = colors.blue, - name = "css", - }, - deb = { - icon = "", - color = colors.cyan, - name = "deb", - }, - Dockerfile = { - icon = "", - color = colors.cyan, - name = "Dockerfile", - }, - html = { - icon = "", - color = colors.baby_pink, - name = "html", - }, - jpeg = { - icon = "", - color = colors.dark_purple, - name = "jpeg", - }, - jpg = { - icon = "", - color = colors.dark_purple, - name = "jpg", - }, - js = { - icon = "", - color = colors.sun, - name = "js", - }, - kt = { - icon = "󱈙", - color = colors.orange, - name = "kt", - }, - lock = { - icon = "", - color = colors.red, - name = "lock", - }, - lua = { - icon = "", - color = colors.blue, - name = "lua", - }, - mp3 = { - icon = "", - color = colors.white, - name = "mp3", - }, - mp4 = { - icon = "", - color = colors.white, - name = "mp4", - }, - out = { - icon = "", - color = colors.white, - name = "out", - }, - png = { - icon = "", - color = colors.dark_purple, - name = "png", - }, - py = { - icon = "", - color = colors.cyan, - name = "py", - }, - ["robots.txt"] = { - icon = "ﮧ", - color = colors.red, - name = "robots", - }, - toml = { - icon = "", - color = colors.blue, - name = "toml", - }, - ts = { - icon = "ﯤ", - color = colors.teal, - name = "ts", - }, - ttf = { - icon = "", - color = colors.white, - name = "TrueTypeFont", - }, - rb = { - icon = "", - color = colors.pink, - name = "rb", - }, - rpm = { - icon = "", - color = colors.orange, - name = "rpm", - }, - vue = { - icon = "﵂", - color = colors.vibrant_green, - name = "vue", - }, - woff = { - icon = "", - color = colors.white, - name = "WebOpenFontFormat", - }, - woff2 = { - icon = "", - color = colors.white, - name = "WebOpenFontFormat2", - }, - xz = { - icon = "", - color = colors.sun, - name = "xz", - }, - zip = { - icon = "", - color = colors.sun, - name = "zip", - }, - }, + override = { + c = { + icon = "", + color = colors.blue, + name = "c", + }, + css = { + icon = "", + color = colors.blue, + name = "css", + }, + deb = { + icon = "", + color = colors.cyan, + name = "deb", + }, + Dockerfile = { + icon = "", + color = colors.cyan, + name = "Dockerfile", + }, + html = { + icon = "", + color = colors.baby_pink, + name = "html", + }, + jpeg = { + icon = "", + color = colors.dark_purple, + name = "jpeg", + }, + jpg = { + icon = "", + color = colors.dark_purple, + name = "jpg", + }, + js = { + icon = "", + color = colors.sun, + name = "js", + }, + kt = { + icon = "󱈙", + color = colors.orange, + name = "kt", + }, + lock = { + icon = "", + color = colors.red, + name = "lock", + }, + lua = { + icon = "", + color = colors.blue, + name = "lua", + }, + mp3 = { + icon = "", + color = colors.white, + name = "mp3", + }, + mp4 = { + icon = "", + color = colors.white, + name = "mp4", + }, + out = { + icon = "", + color = colors.white, + name = "out", + }, + png = { + icon = "", + color = colors.dark_purple, + name = "png", + }, + py = { + icon = "", + color = colors.cyan, + name = "py", + }, + ["robots.txt"] = { + icon = "ﮧ", + color = colors.red, + name = "robots", + }, + toml = { + icon = "", + color = colors.blue, + name = "toml", + }, + ts = { + icon = "ﯤ", + color = colors.teal, + name = "ts", + }, + ttf = { + icon = "", + color = colors.white, + name = "TrueTypeFont", + }, + rb = { + icon = "", + color = colors.pink, + name = "rb", + }, + rpm = { + icon = "", + color = colors.orange, + name = "rpm", + }, + vue = { + icon = "﵂", + color = colors.vibrant_green, + name = "vue", + }, + woff = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat", + }, + woff2 = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat2", + }, + xz = { + icon = "", + color = colors.sun, + name = "xz", + }, + zip = { + icon = "", + color = colors.sun, + name = "zip", + }, + }, } diff --git a/nvim/.config/nvim/lua/plugins/configs/lspconfig.lua b/nvim/.config/nvim/lua/plugins/configs/lspconfig.lua index 36446d180..4bef15db0 100644 --- a/nvim/.config/nvim/lua/plugins/configs/lspconfig.lua +++ b/nvim/.config/nvim/lua/plugins/configs/lspconfig.lua @@ -1,38 +1,38 @@ local overrides = require("core.hooks").createOverrides "lsp" local function on_attach(_, bufnr) - local function buf_set_keymap(...) - vim.api.nvim_buf_set_keymap(bufnr, ...) - end - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end - -- Enable completion triggered by - buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") + -- Enable completion triggered by + buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") - -- Mappings. - local opts = { noremap = true, silent = true } + -- Mappings. + local opts = { noremap = true, silent = true } - -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) - buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) - buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) - buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) - buf_set_keymap("n", "gk", "lua vim.lsp.buf.signature_help()", opts) - buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) - buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) - buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) - buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) - buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "ca", "lua vim.lsp.buf.code_action()", opts) - buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) - buf_set_keymap("n", "ge", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) - buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) - buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) - buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) - buf_set_keymap("n", "fm", "lua vim.lsp.buf.formatting()", opts) - buf_set_keymap("v", "ca", "lua vim.lsp.buf.range_code_action()", opts) + -- See `:help vim.lsp.*` for documentation on any of the below functions + buf_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", opts) + buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", opts) + buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()", opts) + buf_set_keymap("n", "gi", "lua vim.lsp.buf.implementation()", opts) + buf_set_keymap("n", "gk", "lua vim.lsp.buf.signature_help()", opts) + buf_set_keymap("n", "wa", "lua vim.lsp.buf.add_workspace_folder()", opts) + buf_set_keymap("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()", opts) + buf_set_keymap("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", opts) + buf_set_keymap("n", "D", "lua vim.lsp.buf.type_definition()", opts) + buf_set_keymap("n", "rn", "lua vim.lsp.buf.rename()", opts) + buf_set_keymap("n", "ca", "lua vim.lsp.buf.code_action()", opts) + buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()", opts) + buf_set_keymap("n", "ge", "lua vim.lsp.diagnostic.show_line_diagnostics()", opts) + buf_set_keymap("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", opts) + buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) + buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) + buf_set_keymap("n", "fm", "lua vim.lsp.buf.formatting()", opts) + buf_set_keymap("v", "ca", "lua vim.lsp.buf.range_code_action()", opts) end local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -45,16 +45,16 @@ capabilities.textDocument.completion.completionItem.deprecatedSupport = true capabilities.textDocument.completion.completionItem.commitCharactersSupport = true capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - "documentation", - "detail", - "additionalTextEdits", - }, + properties = { + "documentation", + "detail", + "additionalTextEdits", + }, } -- replace the default lsp diagnostic symbols local function lspSymbol(name, icon) - vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) + vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefault" .. name }) end lspSymbol("Error", "") @@ -63,35 +63,35 @@ lspSymbol("Hint", "") lspSymbol("Warning", "") local lsp_publish_diagnostics_options = overrides.get("publish_diagnostics", { - virtual_text = { - prefix = "", - spacing = 0, - }, - signs = true, - underline = true, - update_in_insert = false, -- update diagnostics insert mode + virtual_text = { + prefix = "", + spacing = 0, + }, + signs = true, + underline = true, + update_in_insert = false, -- update diagnostics insert mode }) vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, - lsp_publish_diagnostics_options +vim.lsp.diagnostic.on_publish_diagnostics, +lsp_publish_diagnostics_options ) vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", + border = "single", }) vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", + border = "single", }) -- suppress error messages from lang servers vim.notify = function(msg, log_level, _opts) - if msg:match "exit code" then - return - end - if log_level == vim.log.levels.ERROR then - vim.api.nvim_err_writeln(msg) - else - vim.api.nvim_echo({ { msg } }, true, {}) - end + if msg:match "exit code" then + return + end + if log_level == vim.log.levels.ERROR then + vim.api.nvim_err_writeln(msg) + else + vim.api.nvim_echo({ { msg } }, true, {}) + end end -- requires a file containing user's lspconfigs @@ -99,5 +99,5 @@ end local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf if string.len(addlsp_confs) ~= 0 then - require(addlsp_confs).setup_lsp(on_attach, capabilities) + require(addlsp_confs).setup_lsp(on_attach, capabilities) end diff --git a/nvim/.config/nvim/lua/plugins/configs/lspkind_icons.lua b/nvim/.config/nvim/lua/plugins/configs/lspkind_icons.lua index dd775b7d5..b0b4be1a4 100644 --- a/nvim/.config/nvim/lua/plugins/configs/lspkind_icons.lua +++ b/nvim/.config/nvim/lua/plugins/configs/lspkind_icons.lua @@ -1,31 +1,31 @@ local M = {} M.icons = { - Text = "", - Method = "", - Function = "", - Constructor = "", - Field = "ﰠ", - Variable = "", - Class = "ﴯ", - Interface = "", - Module = "", - Property = "ﰠ", - Unit = "塞", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "פּ", - Event = "", - Operator = "", - TypeParameter = "", + Text = "", + Method = "", + Function = "", + Constructor = "", + Field = "ﰠ", + Variable = "", + Class = "ﴯ", + Interface = "", + Module = "", + Property = "ﰠ", + Unit = "塞", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "פּ", + Event = "", + Operator = "", + TypeParameter = "", } return M diff --git a/nvim/.config/nvim/lua/plugins/configs/nvimtree.lua b/nvim/.config/nvim/lua/plugins/configs/nvimtree.lua index 95b031939..c58f2707a 100644 --- a/nvim/.config/nvim/lua/plugins/configs/nvimtree.lua +++ b/nvim/.config/nvim/lua/plugins/configs/nvimtree.lua @@ -2,7 +2,7 @@ local present, nvimtree = pcall(require, "nvim-tree") local git_status = require("core.utils").load_config().plugins.options.nvimtree.enable_git if not present then - return + return end local g = vim.g @@ -19,64 +19,64 @@ g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" } -- g.nvim_tree_show_icons = { - folders = 1, - -- folder_arrows= 1 - files = 1, - git = git_status, + folders = 1, + -- folder_arrows= 1 + files = 1, + git = git_status, } g.nvim_tree_icons = { - default = "", - symlink = "", - git = { - deleted = "", - ignored = "◌", - renamed = "➜", - staged = "✓", - unmerged = "", - unstaged = "✗", - untracked = "★", - }, - folder = { - -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! - -- arrow_open = "", - -- arrow_closed = "", - default = "", - empty = "", --  - empty_open = "", - open = "", - symlink = "", - symlink_open = "", - }, + default = "", + symlink = "", + git = { + deleted = "", + ignored = "◌", + renamed = "➜", + staged = "✓", + unmerged = "", + unstaged = "✗", + untracked = "★", + }, + folder = { + -- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below! + -- arrow_open = "", + -- arrow_closed = "", + default = "", + empty = "", --  + empty_open = "", + open = "", + symlink = "", + symlink_open = "", + }, } nvimtree.setup { - diagnostics = { - enable = false, - icons = { - hint = "", - info = "", - warning = "", - error = "", - }, - }, - filters = { - dotfiles = false, - }, - disable_netrw = true, - hijack_netrw = true, - ignore_ft_on_setup = { "dashboard" }, - auto_close = false, - open_on_tab = false, - hijack_cursor = true, - update_cwd = true, - update_focused_file = { - enable = true, - update_cwd = false, - }, - view = { - allow_resize = true, - side = "left", - width = 25, - }, + diagnostics = { + enable = false, + icons = { + hint = "", + info = "", + warning = "", + error = "", + }, + }, + filters = { + dotfiles = false, + }, + disable_netrw = true, + hijack_netrw = true, + ignore_ft_on_setup = { "dashboard" }, + auto_close = false, + open_on_tab = false, + hijack_cursor = true, + update_cwd = true, + update_focused_file = { + enable = true, + update_cwd = false, + }, + view = { + allow_resize = true, + side = "left", + width = 25, + }, } diff --git a/nvim/.config/nvim/lua/plugins/configs/others.lua b/nvim/.config/nvim/lua/plugins/configs/others.lua index 6fba92fcf..f292ddb4a 100644 --- a/nvim/.config/nvim/lua/plugins/configs/others.lua +++ b/nvim/.config/nvim/lua/plugins/configs/others.lua @@ -2,109 +2,118 @@ local M = {} local nvimrc_config = require("core.utils").load_config() M.autopairs = function() - local present1, autopairs = pcall(require, "nvim-autopairs") - local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") + local present1, autopairs = pcall(require, "nvim-autopairs") + local present2, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp") - if not (present1 or present2) then - return - end + if not (present1 or present2) then + return + end - autopairs.setup() + autopairs.setup() - -- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs - local cmp = require "cmp" - cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) + -- not needed if you disable cmp, the above var related to cmp tooo! override default config for autopairs + local cmp = require "cmp" + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) end M.better_escape = function() - require("better_escape").setup { - mapping = nvimrc_config.mappings.plugins.better_escape.esc_insertmode, - timeout = nvimrc_config.plugins.options.esc_insertmode_timeout, - } + require("better_escape").setup { + mapping = nvimrc_config.mappings.plugins.better_escape.esc_insertmode, + timeout = nvimrc_config.plugins.options.esc_insertmode_timeout, + } end M.blankline = function() - require("indent_blankline").setup { - indentLine_enabled = 1, - char = "▏", - filetype_exclude = { - "help", - "terminal", - "dashboard", - "packer", - "lspinfo", - "TelescopePrompt", - "TelescopeResults", - }, - buftype_exclude = { "terminal" }, - show_trailing_blankline_indent = false, - show_first_indent_level = false, - } + require("indent_blankline").setup { + indentLine_enabled = 1, + char = "|", + filetype_exclude = { + "help", + "terminal", + "dashboard", + "packer", + "lspinfo", + "TelescopePrompt", + "TelescopeResults", + }, + buftype_exclude = { "terminal" }, + show_trailing_blankline_indent = true, + show_first_indent_level = true, + space_char_blankline = " ", + char_highlight_list = { + "IndentBlanklineIndent1", + "IndentBlanklineIndent2", + "IndentBlanklineIndent3", + "IndentBlanklineIndent4", + "IndentBlanklineIndent5", + "IndentBlanklineIndent6", + }, + } end M.colorizer = function() - local present, colorizer = pcall(require, "colorizer") - if present then - colorizer.setup({ "*" }, { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue - RRGGBBAA = false, -- #RRGGBBAA hex codes - rgb_fn = false, -- CSS rgb() and rgba() functions - hsl_fn = false, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + local present, colorizer = pcall(require, "colorizer") + if present then + colorizer.setup({ "*" }, { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = false, -- "Name" codes like Blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes: foreground, background - mode = "background", -- Set the display mode. - }) - vim.cmd "ColorizerReloadAllBuffers" - end + -- Available modes: foreground, background + mode = "background", -- Set the display mode. + }) + vim.cmd "ColorizerReloadAllBuffers" + end end M.comment = function() - local present, nvim_comment = pcall(require, "nvim_comment") - if present then - nvim_comment.setup() - end + local present, nvim_comment = pcall(require, "nvim_comment") + if present then + nvim_comment.setup() + end end M.luasnip = function() - local present, luasnip = pcall(require, "luasnip") - if not present then - return - end + local present, luasnip = pcall(require, "luasnip") + if not present then + return + end - luasnip.config.set_config { - history = true, - updateevents = "TextChanged,TextChangedI", - } + luasnip.config.set_config { + history = true, + updateevents = "TextChanged,TextChangedI", + } - require("luasnip/loaders/from_vscode").load { paths = nvimrc_config.plugins.options.luasnip.snippet_path } - require("luasnip/loaders/from_vscode").load() + require("luasnip/loaders/from_vscode").load { paths = nvimrc_config.plugins.options.luasnip.snippet_path } + require("luasnip/loaders/from_vscode").load() end M.signature = function() - local present, lspsignature = pcall(require, "lsp_signature") - if present then - lspsignature.setup { - bind = true, - doc_lines = 0, - floating_window = true, - fix_pos = true, - hint_enable = true, - hint_prefix = " ", - hint_scheme = "String", - hi_parameter = "Search", - max_height = 22, - max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width - handler_opts = { - border = "single", -- double, single, shadow, none - }, - zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom - padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc - } - end + local present, lspsignature = pcall(require, "lsp_signature") + if present then + lspsignature.setup { + bind = true, + doc_lines = 0, + floating_window = true, + fix_pos = true, + hint_enable = true, + hint_prefix = " ", + hint_scheme = "String", + hi_parameter = "Search", + max_height = 22, + max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width + handler_opts = { + border = "single", -- double, single, shadow, none + }, + zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom + padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc + } + end end return M diff --git a/nvim/.config/nvim/lua/plugins/configs/telescope.lua b/nvim/.config/nvim/lua/plugins/configs/telescope.lua index 6db93dbfc..ed1c3d4d3 100644 --- a/nvim/.config/nvim/lua/plugins/configs/telescope.lua +++ b/nvim/.config/nvim/lua/plugins/configs/telescope.lua @@ -1,80 +1,80 @@ local present, telescope = pcall(require, "telescope") if not present then - return + return end telescope.setup { - defaults = { - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - }, - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "ascending", - layout_strategy = "horizontal", - layout_config = { - horizontal = { - prompt_position = "top", - preview_width = 0.55, - results_width = 0.8, - }, - vertical = { - mirror = false, - }, - width = 0.87, - height = 0.80, - preview_cutoff = 120, - }, - file_sorter = require("telescope.sorters").get_fuzzy_file, - file_ignore_patterns = { "node_modules" }, - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, - path_display = { "absolute" }, - winblend = 0, - border = {}, - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, - color_devicons = true, - use_less = true, - set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, - }, - extensions = { - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = false, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case", -- or "ignore_case" or "respect_case" - -- the default case_mode is "smart_case" - }, - media_files = { - filetypes = { "png", "webp", "jpg", "jpeg" }, - find_cmd = "rg", -- find command (defaults to `fd`) - }, - }, + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = { "node_modules" }, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "absolute" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + use_less = true, + set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = false, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, + media_files = { + filetypes = { "png", "webp", "jpg", "jpeg" }, + find_cmd = "rg", -- find command (defaults to `fd`) + }, + }, } local extensions = { "themes", "terms", "fzf" } local packer_repos = [["extensions", "telescope-fzf-native.nvim"]] if vim.fn.executable "ueberzug" == 1 then - table.insert(extensions, "media_files") - packer_repos = packer_repos .. ', "telescope-media-files.nvim"' + table.insert(extensions, "media_files") + packer_repos = packer_repos .. ', "telescope-media-files.nvim"' end pcall(function() - for _, ext in ipairs(extensions) do - telescope.load_extension(ext) - end + for _, ext in ipairs(extensions) do + telescope.load_extension(ext) + end end) diff --git a/nvim/.config/nvim/lua/plugins/configs/treesitter.lua b/nvim/.config/nvim/lua/plugins/configs/treesitter.lua index 466f8430c..5b8b2d9af 100644 --- a/nvim/.config/nvim/lua/plugins/configs/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/configs/treesitter.lua @@ -1,15 +1,15 @@ local present, ts_config = pcall(require, "nvim-treesitter.configs") if not present then - return + return end ts_config.setup { - ensure_installed = { - "lua", - "org", - }, - highlight = { - enable = true, - use_languagetree = true, - }, + ensure_installed = { + "lua", + "org", + }, + highlight = { + enable = true, + use_languagetree = true, + }, } diff --git a/nvim/.config/nvim/lua/plugins/packerInit.lua b/nvim/.config/nvim/lua/plugins/packerInit.lua index 964ff59d6..d0ca3ead1 100644 --- a/nvim/.config/nvim/lua/plugins/packerInit.lua +++ b/nvim/.config/nvim/lua/plugins/packerInit.lua @@ -5,43 +5,43 @@ cmd "packadd packer.nvim" local present, packer = pcall(require, "packer") if not present then - local packer_path = vim.fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" + local packer_path = vim.fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim" - print "Cloning packer.." - -- remove the dir before cloning - vim.fn.delete(packer_path, "rf") - vim.fn.system { - "git", - "clone", - "https://github.com/wbthomason/packer.nvim", - "--depth", - "20", - packer_path, - } + print "Cloning packer.." + -- remove the dir before cloning + vim.fn.delete(packer_path, "rf") + vim.fn.system { + "git", + "clone", + "https://github.com/wbthomason/packer.nvim", + "--depth", + "20", + packer_path, + } - cmd "packadd packer.nvim" - present, packer = pcall(require, "packer") + cmd "packadd packer.nvim" + present, packer = pcall(require, "packer") - if present then - print "Packer cloned successfully." - else - error("Couldn't clone packer !\nPacker path: " .. packer_path .. "\n" .. packer) - end + if present then + print "Packer cloned successfully." + else + error("Couldn't clone packer !\nPacker path: " .. packer_path .. "\n" .. packer) + end end packer.init { - display = { - open_fn = function() - return require("packer.util").float { border = "single" } - end, - prompt_border = "single", - }, - git = { - clone_timeout = 600, -- Timeout, in seconds, for git clones - }, - auto_clean = true, - compile_on_sync = true, - -- auto_reload_compiled = true + display = { + open_fn = function() + return require("packer.util").float { border = "single" } + end, + prompt_border = "single", + }, + git = { + clone_timeout = 600, -- Timeout, in seconds, for git clones + }, + auto_clean = true, + compile_on_sync = true, + -- auto_reload_compiled = true } return packer diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua index cf01a7013..165f9de61 100644 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -343,6 +343,11 @@ _G.packer_plugins = { path = "/home/repo/.local/share/nvim/site/pack/packer/start/vim-clap", url = "https://github.com/liuchengxu/vim-clap" }, + ["vim-coloresque"] = { + loaded = true, + path = "/home/repo/.local/share/nvim/site/pack/packer/start/vim-coloresque", + url = "https://github.com/gko/vim-coloresque" + }, ["vim-css-color"] = { loaded = true, path = "/home/repo/.local/share/nvim/site/pack/packer/start/vim-css-color", @@ -486,11 +491,11 @@ vim.cmd [[ packadd nvim-autopairs ]] require('plugins.configs.others').autopairs() vim.cmd [[ packadd cmp-buffer ]] vim.cmd [[ packadd cmp_luasnip ]] -vim.cmd [[ packadd cmp-nvim-lua ]] vim.cmd [[ packadd cmp-path ]] vim.cmd [[ packadd LuaSnip ]] -- Config for: LuaSnip require('plugins.configs.others').luasnip() +vim.cmd [[ packadd cmp-nvim-lua ]] time([[Sequenced loading]], false) -- Command lazy-loads diff --git a/oomox/.config/oomox/colors/TheRepoClub/Nordik b/oomox/.config/oomox/colors/TheRepoClub/Monokai similarity index 60% rename from oomox/.config/oomox/colors/TheRepoClub/Nordik rename to oomox/.config/oomox/colors/TheRepoClub/Monokai index 608f32c1f..71b74fb9a 100644 --- a/oomox/.config/oomox/colors/TheRepoClub/Nordik +++ b/oomox/.config/oomox/colors/TheRepoClub/Monokai @@ -1,9 +1,9 @@ -ACCENT_BG=BF616A +ACCENT_BG=F92672 BASE16_GENERATE_DARK=False BASE16_INVERT_TERMINAL=False BASE16_MILD_TERMINAL=False -BG=2E3440 -BTN_BG=2E3440 +BG=2D2A2E +BTN_BG=2D2A2E BTN_FG=f8f8f2 BTN_OUTLINE_OFFSET=-3 BTN_OUTLINE_WIDTH=1 @@ -14,14 +14,14 @@ CINNAMON_OPACITY=1.0 FG=f8f8f2 GRADIENT=0.0 GTK3_GENERATE_DARK=False -HDR_BG=2E3440 -HDR_BTN_BG=4C566A +HDR_BG=2D2A2E +HDR_BTN_BG=272822 HDR_BTN_FG=f8f8f2 HDR_FG=f8f8f2 -ICONS_DARK=2E3440 -ICONS_LIGHT=2E3440 -ICONS_LIGHT_FOLDER=2E3440 -ICONS_MEDIUM=2E3440 +ICONS_DARK=2D2A2E +ICONS_LIGHT=2D2A2E +ICONS_LIGHT_FOLDER=2D2A2E +ICONS_MEDIUM=2D2A2E ICONS_NUMIX_STYLE=0 ICONS_STYLE=gnome_colors ICONS_SYMBOLIC_ACTION=e8e8e8 @@ -31,34 +31,34 @@ MATERIA_SELECTION_OPACITY=0.32 MATERIA_STYLE_COMPACT=True MENU_BG=212121 MENU_FG=e0e0e0 -NAME="TheRepoClub/Nordik" +NAME="TheRepoClub/Monokai" OUTLINE_WIDTH=1 ROUNDNESS=4 -SEL_BG=BF616A -SEL_FG=2E3440 +SEL_BG=F92672 +SEL_FG=2D2A2E SPACING=3 SURUPLUS_GRADIENT1=e8e8e8 SURUPLUS_GRADIENT2=f8f8f2 SURUPLUS_GRADIENT_ENABLED=False TERMINAL_ACCENT_COLOR=44475a -TERMINAL_BACKGROUND=2e3440 +TERMINAL_BACKGROUND=2D2A2E TERMINAL_BASE_TEMPLATE=tempus_winter -TERMINAL_COLOR0=21222c -TERMINAL_COLOR1=ff5555 -TERMINAL_COLOR10=69ff94 -TERMINAL_COLOR11=ffffa5 -TERMINAL_COLOR12=acb6ff -TERMINAL_COLOR13=ff92df -TERMINAL_COLOR14=a4ffff +TERMINAL_COLOR0=2D2A2E +TERMINAL_COLOR1=FC9867 +TERMINAL_COLOR10=A6E22E +TERMINAL_COLOR11=E6DB74 +TERMINAL_COLOR12=66D9EF +TERMINAL_COLOR13=AE81FF +TERMINAL_COLOR14=F92672 TERMINAL_COLOR15=ffffff -TERMINAL_COLOR2=50fa7b -TERMINAL_COLOR3=f1fa8c -TERMINAL_COLOR4=93adf9 -TERMINAL_COLOR5=ff79c6 -TERMINAL_COLOR6=8be9fd +TERMINAL_COLOR2=A9DC76 +TERMINAL_COLOR3=FFD866 +TERMINAL_COLOR4=78DCE8 +TERMINAL_COLOR5=AB9DF2 +TERMINAL_COLOR6=FF6188 TERMINAL_COLOR7=f8f8f2 -TERMINAL_COLOR8=4d4d4d -TERMINAL_COLOR9=ff6e6e +TERMINAL_COLOR8=272822 +TERMINAL_COLOR9=FD971F TERMINAL_CURSOR=f8f8f2 TERMINAL_FOREGROUND=f8f8f2 TERMINAL_THEME_ACCURACY=122 @@ -66,8 +66,8 @@ TERMINAL_THEME_AUTO_BGFG=True TERMINAL_THEME_EXTEND_PALETTE=True TERMINAL_THEME_MODE=manual THEME_STYLE=oomox -TXT_BG=2E3440 +TXT_BG=2D2A2E TXT_FG=f8f8f2 UNITY_DEFAULT_LAUNCHER_STYLE=False -WM_BORDER_FOCUS=2e3440 -WM_BORDER_UNFOCUS=4C566A +WM_BORDER_FOCUS=2d2a2e +WM_BORDER_UNFOCUS=272822 diff --git a/oomox/.config/oomox/export_config/colorscheme.json b/oomox/.config/oomox/export_config/colorscheme.json index 34315bb12..c4e7db3d4 100644 --- a/oomox/.config/oomox/export_config/colorscheme.json +++ b/oomox/.config/oomox/export_config/colorscheme.json @@ -1 +1 @@ -{"last_variant": "default", "last_app": "kitty"} \ No newline at end of file +{"last_variant": "default", "last_app": "vim"} \ No newline at end of file diff --git a/oomox/.config/oomox/recent_palette.json b/oomox/.config/oomox/recent_palette.json index b59d84e56..77b3cbb3b 100644 --- a/oomox/.config/oomox/recent_palette.json +++ b/oomox/.config/oomox/recent_palette.json @@ -1 +1 @@ -["#43434c4c5e5e", "#2e2e34344040", "#bdde091eb9ca", "#acacb788ffff", "#9393ae26f9f9", "#ffff7979c6c6", "#bdbd9393f9f9", "#e6e6e6e6fafa", "#000080800000", "#62627272a4a4", "#444447475a5a", "#00000000ffff", "#f8f8f8f8f2f2", "#ffffffffffff", "#28282a2a3636"] \ No newline at end of file +["#2d2d2a2a2e2e", "#43434c4c5e5e", "#2e2e34344040", "#bdde091eb9ca", "#acacb788ffff", "#9393ae26f9f9", "#ffff7979c6c6", "#bdbd9393f9f9", "#e6e6e6e6fafa", "#000080800000", "#62627272a4a4", "#444447475a5a", "#00000000ffff", "#f8f8f8f8f2f2", "#ffffffffffff", "#28282a2a3636"] \ No newline at end of file diff --git a/oomox/.config/oomox/ui_config.json b/oomox/.config/oomox/ui_config.json index b61d0012d..cca78ba56 100644 --- a/oomox/.config/oomox/ui_config.json +++ b/oomox/.config/oomox/ui_config.json @@ -1 +1 @@ -{"window_width": 1906, "window_height": 971, "preset_list_minimal_width": 150, "preset_list_width": 162, "preset_list_sections_expanded": {"presets": false, "plugins": true, "Xresources": false, "Random": false, "Base16": true, "Image colors": true, "user": true, "Base16 User-Imported": true}} \ No newline at end of file +{"window_width": 1902, "window_height": 970, "preset_list_minimal_width": 150, "preset_list_width": 198, "preset_list_sections_expanded": {"presets": false, "plugins": true, "Xresources": false, "Random": false, "Base16": true, "Image colors": true, "user": true, "Base16 User-Imported": true}} \ No newline at end of file diff --git a/package-list/.config/package-list b/package-list/.config/package-list index 559a2ec77..a4e4775d7 100644 --- a/package-list/.config/package-list +++ b/package-list/.config/package-list @@ -63,6 +63,7 @@ repomenu-schemas repowm repowm-schemas runescape-launcher +sdbus-cpp sddm-endeavour siji stacer diff --git a/pkgbrowser/.config/pkgbrowser/pkgbrowser.conf b/pkgbrowser/.config/pkgbrowser/pkgbrowser.conf index cdba1ae6b..a4ac8f3ac 100644 --- a/pkgbrowser/.config/pkgbrowser/pkgbrowser.conf +++ b/pkgbrowser/.config/pkgbrowser/pkgbrowser.conf @@ -12,6 +12,6 @@ strings=zap, i3-gaps, microsoft edge, python3, python, pamac, onivim, nushell, o [window] central-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\0\0\0\x1>\0\xff\xff\xff\xff\x1\0\0\0\x1\0) -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\a\x86\0\0\0 \0\0\xe\xf9\0\0\x4\x17\0\0\a\x87\0\0\0!\0\0\xe\xf8\0\0\x4\x16\0\0\0\x1\0\0\0\0\a\x80\0\0\a\x87\0\0\0!\0\0\xe\xf8\0\0\x4\x16) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\vB\0\0\0 \0\0\xe\xf9\0\0\x4\x17\0\0\vC\0\0\0!\0\0\xe\xf8\0\0\x4\x16\0\0\0\x1\0\0\0\0\a\x80\0\0\vC\0\0\0!\0\0\xe\xf8\0\0\x4\x16) left-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\xc0\0\0\x1\f\0\xff\xff\xff\xff\x1\0\0\0\x2\0) right-splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\xc0\0\0\0\xee\0\xff\xff\xff\xff\x1\0\0\0\x2\0) diff --git a/qt5ct/.config/qt5ct/qt5ct.conf b/qt5ct/.config/qt5ct/qt5ct.conf index 713c9411e..8543ebc79 100644 --- a/qt5ct/.config/qt5ct/qt5ct.conf +++ b/qt5ct/.config/qt5ct/qt5ct.conf @@ -28,7 +28,7 @@ wheel_scroll_lines=3 geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\v\x84\0\0\0\xf4\0\0\xe\xa9\0\0\x3\xa8\0\0\v\x85\0\0\0\xf5\0\0\xe\xa8\0\0\x3\xa7\0\0\0\x1\0\0\0\0\a\x80\0\0\v\x85\0\0\0\xf5\0\0\xe\xa8\0\0\x3\xa7) [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\vB\0\0\0 \0\0\xe\xf9\0\0\x4\x17\0\0\vC\0\0\0!\0\0\xe\xf8\0\0\x4\x16\0\0\0\x1\0\0\0\0\a\x80\0\0\vC\0\0\0!\0\0\xe\xf8\0\0\x4\x16) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\"\0\0\0 \0\0\f\xbd\0\0\x4\x17\0\0\n#\0\0\0!\0\0\f\xbc\0\0\x4\x16\0\0\0\x1\0\0\0\0\a\x80\0\0\n#\0\0\0!\0\0\f\xbc\0\0\x4\x16) [Troubleshooting] force_raster_widgets=1 diff --git a/qt6ct/.config/qt6ct/qt6ct.conf b/qt6ct/.config/qt6ct/qt6ct.conf index 5ed6decff..136918f0f 100644 --- a/qt6ct/.config/qt6ct/qt6ct.conf +++ b/qt6ct/.config/qt6ct/qt6ct.conf @@ -28,7 +28,7 @@ wheel_scroll_lines=3 geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\xcd\0\0\x1\x1e\0\0\rE\0\0\x3\x30\0\0\n\xce\0\0\x1\x1f\0\0\rD\0\0\x3/\0\0\0\x1\0\0\0\0\a\x80\0\0\n\xce\0\0\x1\x1f\0\0\rD\0\0\x3/) [SettingsWindow] -geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\a\x86\0\0\x2\x1e\0\0\v=\0\0\x4\x17\0\0\a\x87\0\0\x2\x1f\0\0\v<\0\0\x4\x16\0\0\0\x1\0\0\0\0\a\x80\0\0\a\x87\0\0\x2\x1f\0\0\v<\0\0\x4\x16)" +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\"\0\0\0 \0\0\f\xbd\0\0\x4\x17\0\0\n#\0\0\0!\0\0\f\xbc\0\0\x4\x16\0\0\0\x1\0\0\0\0\a\x80\0\0\n#\0\0\0!\0\0\f\xbc\0\0\x4\x16) [Troubleshooting] force_raster_widgets=1 diff --git a/repomenu/.config/repomenu/repomenu-desktop.db b/repomenu/.config/repomenu/repomenu-desktop.db index 0d4373625..9ee7da509 100644 Binary files a/repomenu/.config/repomenu/repomenu-desktop.db and b/repomenu/.config/repomenu/repomenu-desktop.db differ diff --git a/xed/.config/xed/accels b/xed/.config/xed/accels index 31e379012..1a166b9c6 100644 --- a/xed/.config/xed/accels +++ b/xed/.config/xed/accels @@ -35,8 +35,9 @@ ; (gtk_accel_path "/XedWindowAlwaysSensitiveActions/Help" "") ; (gtk_accel_path "/XedWindowActions/EditDelete" "") ; (gtk_accel_path "/XedSpellPluginActions/CheckSpell" "F7") -; (gtk_accel_path "/XedWindowActions/DocumentsNextDocument" "Page_Down") ; (gtk_accel_path "/XedWindowAlwaysSensitiveActions/Documents" "") +; (gtk_accel_path "/XedWindowActions/DocumentsNextDocument" "Page_Down") +; (gtk_accel_path "/XedWindowAlwaysSensitiveActions/ViewMenubar" "") ; (gtk_accel_path "/FileBrowserWidgetSingleMostSelectionActionGroup/DirectoryNew" "") ; (gtk_accel_path "/FileBrowserWidgetSensitiveActionGroup/DirectoryRefresh" "") ; (gtk_accel_path "/XedWindowActions/FilePrint" "p") @@ -59,13 +60,13 @@ ; (gtk_accel_path "/FileBrowserWidgetActionGroup/FilterBinary" "") ; (gtk_accel_path "/XedWindowActions/FileCloseAll" "w") ; (gtk_accel_path "/XedWindowAlwaysSensitiveActions/Search" "") +; (gtk_accel_path "/FileBrowserWidgetActionGroupToplevel/FilterMenuAction" "") ; (gtk_accel_path "/XedSpellPluginActions/InlineSpellChecker" "") ; (gtk_accel_path "/XedWindowActions/DocumentsPreviousDocument" "Page_Up") ; (gtk_accel_path "/XedWindowActions/EditToggleCommentBlock" "question") -; (gtk_accel_path "/XedTextSizePluginActions/SmallerTextAction" "minus") -; (gtk_accel_path "/FileBrowserWidgetActionGroupToplevel/FilterMenuAction" "") ; (gtk_accel_path "/XedWindowAlwaysSensitiveActions/XAppFavoritesMenu" "") ; (gtk_accel_path "/XedWindowAlwaysSensitiveActions/Edit" "") +; (gtk_accel_path "/XedTextSizePluginActions/SmallerTextAction" "minus") ; (gtk_accel_path "/XedWindowActions/FileSaveAs" "s") ; (gtk_accel_path "/FileBrowserWidgetBookmarkActionGroup/BookmarkOpen" "") ; (gtk_accel_path "/XedWindowActions/EditCopy" "c")