Compare commits
41 Commits
e1fb7488f7
...
9632aa7865
Author | SHA1 | Date | |
---|---|---|---|
9632aa7865 | |||
70227e249f | |||
844c9efcd5 | |||
42d62c037f | |||
d15f254996 | |||
3cbb349122 | |||
3f54bf9334 | |||
1f9ac7347b | |||
38c7db18cf | |||
5cf11e3a2c | |||
d9616dfa17 | |||
c71ad1126a | |||
6c7a10d390 | |||
161e082bf2 | |||
10f3344df9 | |||
1df9335ae7 | |||
800f589128 | |||
f8616da653 | |||
d9dc52133c | |||
a3595e1634 | |||
62543c93de | |||
fd4ae0720b | |||
b2caa79224 | |||
878e339cf6 | |||
d91ed1f180 | |||
ed141d8473 | |||
34117b2981 | |||
f8bb26c8e7 | |||
587deea264 | |||
4e7f8921ad | |||
ffdb586a39 | |||
46d3e1c853 | |||
bfaaec94ed | |||
57f264b9fb | |||
1df6f64c40 | |||
df051039bf | |||
65056c504b | |||
fff72d3679 | |||
0b6cc5a694 | |||
db31903835 | |||
391bbd939c |
38
.aliases.sh
Normal file
38
.aliases.sh
Normal file
@ -0,0 +1,38 @@
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ aliases │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
# ───────────────────────────────── pnpm ─────────────────────────────────
|
||||
alias n="pnpm"
|
||||
alias ni="n i"
|
||||
alias ns="n start"
|
||||
alias nsd="n start:dev"
|
||||
alias nt="n test"
|
||||
alias ntd="n test:dev"
|
||||
|
||||
# ─────────────────────────────── vim/nvim ───────────────────────────────
|
||||
alias nv="nvim"
|
||||
alias lv="lvim"
|
||||
alias vim="nvim"
|
||||
alias v="vim"
|
||||
if command -v zoxide > /dev/null && command -v nvim-zoxide > /dev/null; then
|
||||
alias nv="nvim-zoxide"
|
||||
fi
|
||||
|
||||
# ───────────────────────────── drag n drop ───────────────────────────
|
||||
alias dnd="dragon-drop"
|
||||
alias cpdnd='cp $(dragon-drop -p -x -t .) .'
|
||||
|
||||
# ───────────────────────────────── eza ───────────────────────────────
|
||||
if command -v eza > /dev/null; then
|
||||
alias ls="eza"
|
||||
alias ll="eza --long --git --icons=always --no-user --no-permissions"
|
||||
alias tree="eza --tree"
|
||||
fi
|
||||
|
||||
# ────────────────────────────── cat -> bat ──────────────────────────────
|
||||
if command -v bat > /dev/null; then
|
||||
alias cat="bat"
|
||||
fi
|
||||
|
||||
# ──────────────────────── zoxide (cd -> zoxide) ──────────────────────
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
@ -15,8 +15,8 @@ bold_italic.family = "Source Code Pro"
|
||||
|
||||
size = 11.0
|
||||
|
||||
[cursor]
|
||||
|
||||
style.shape = "Beam"
|
||||
vi_mode_style.shape = "Block"
|
||||
thickness = 0.2
|
||||
# [cursor]
|
||||
#
|
||||
# style.shape = "Beam"
|
||||
# vi_mode_style.shape = "Block"
|
||||
# thickness = 0.2
|
||||
|
@ -483,4 +483,28 @@
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
|
||||
[notification_sound]
|
||||
summary = "*"
|
||||
script = ~/.config/dunst/play-notif-sound.sh
|
||||
|
||||
[pomodoro]
|
||||
appname = "notify-send"
|
||||
summary = "Timer *"
|
||||
new_icon = "~/.config/dunst/icons/pomodoro.png"
|
||||
urgency = normal
|
||||
script = ~/.config/dunst/play-pomodoro.sh
|
||||
|
||||
[low-battery]
|
||||
appname = "poweralertd"
|
||||
# summary = "Timer *"
|
||||
category = "power.low"
|
||||
script = ~/.config/dunst/play-low-battery-sound.sh
|
||||
|
||||
[critical-battery]
|
||||
appname = "poweralertd"
|
||||
# summary = "Timer *"
|
||||
category = "power.critical"
|
||||
script = ~/.config/dunst/play-low-battery-sound.sh
|
||||
|
||||
# vim: ft=cfg
|
||||
|
BIN
.config/dunst/icons/pomodoro.png
Normal file
BIN
.config/dunst/icons/pomodoro.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
1
.config/dunst/play-low-battery-sound.sh
Executable file
1
.config/dunst/play-low-battery-sound.sh
Executable file
@ -0,0 +1 @@
|
||||
paplay ~/.config/dunst/sounds/low-battery.mp3
|
1
.config/dunst/play-notif-sound.sh
Executable file
1
.config/dunst/play-notif-sound.sh
Executable file
@ -0,0 +1 @@
|
||||
paplay ~/.config/dunst/sounds/pop.mp3
|
1
.config/dunst/play-pomodoro.sh
Executable file
1
.config/dunst/play-pomodoro.sh
Executable file
@ -0,0 +1 @@
|
||||
paplay ~/.config/dunst/sounds/positive.wav
|
BIN
.config/dunst/sounds/happy-bells.wav
Normal file
BIN
.config/dunst/sounds/happy-bells.wav
Normal file
Binary file not shown.
BIN
.config/dunst/sounds/low-battery.mp3
Normal file
BIN
.config/dunst/sounds/low-battery.mp3
Normal file
Binary file not shown.
BIN
.config/dunst/sounds/pop.mp3
Normal file
BIN
.config/dunst/sounds/pop.mp3
Normal file
Binary file not shown.
BIN
.config/dunst/sounds/positive.wav
Normal file
BIN
.config/dunst/sounds/positive.wav
Normal file
Binary file not shown.
@ -2,7 +2,7 @@
|
||||
animations {
|
||||
enabled = true
|
||||
|
||||
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
# see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
bezier = easeOutQuint, 0.22, 1, 0.36, 1
|
||||
|
@ -3,9 +3,11 @@
|
||||
# │ by goodhumored 2024 │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
exec-once = copyq --start-server
|
||||
exec-once = waybar & hyprpaper
|
||||
exec-once = /usr/lib/pam_kwallet_init & blueman-applet & hypridle & hyprpaper & nm-applet & waybar
|
||||
exec-once = dunst
|
||||
exec-once = hypridle
|
||||
exec-once = nm-applet
|
||||
exec-once = blueman-applet
|
||||
exec-once = ~/.config/hypr/scripts/start-wob.sh
|
||||
exec-once = poweralertd
|
||||
exec-once = [ -x "$(command -v wlsunset)" ] && /home/goodhumored/dotfiles/.config/scripts/sunset.sh "on"
|
||||
exec-once = crow
|
||||
|
||||
|
@ -3,7 +3,7 @@ input {
|
||||
kb_layout = us, ru
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = grp:win_space_toggle
|
||||
kb_options = grp:win_space_toggle, caps:swapescape
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
@ -13,8 +13,8 @@ input {
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
}
|
||||
repeat_delay = 200
|
||||
repeat_rate = 50
|
||||
repeat_delay = 150
|
||||
repeat_rate = 45
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
|
@ -9,21 +9,36 @@
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
# apps
|
||||
bind = $mainMod, T, exec, $terminal # terminal
|
||||
bind = $mainMod, Q, killactive, # kill window
|
||||
bind = $mainMod SHIFT, T, exec, ~/.config/hypr/scripts/show-crow.sh
|
||||
bind = $mainMod CTRL SHIFT, T, exec, ~/.config/hypr/scripts/translate-selection.sh
|
||||
bind = $mainMod, E, exec, $fileManager # file manager
|
||||
bind = $mainMod, V, togglefloating, # toggle float
|
||||
bind = $mainMod, A, exec, $toggle_menu_cmd # wofi
|
||||
bind = $mainMod CTRL ALT, V, exec, ~/.config/hypr/scripts/dnd-clipboard.sh
|
||||
|
||||
# ──────────────────────────────── copyq ──────────────────────────────
|
||||
bind = CTRL_ALT, V, exec, copyq toggle
|
||||
|
||||
bind = $mainMod, F, fullscreen # fullscreen
|
||||
bind = $mainMod, Q, killactive, # kill window
|
||||
bind = $mainMod, V, togglefloating, # toggle float
|
||||
bind = $mainMod, P, pseudo, # pseudo
|
||||
bind = $mainMod, DELETE, exit, # pseudo
|
||||
bind = $mainMod, R, togglesplit, # toggle split
|
||||
bind = $mainMod SHIFT, L, exec, hyprlock # lock screen
|
||||
bind = $mainMod CTRL, L, exec, hyprlock # lock screen
|
||||
|
||||
# ─────────────────────────── move workspaces ─────────────────────────
|
||||
bind = CTRL ALT $mainMod SHIFT CTRL ALT, H, movecurrentworkspacetomonitor, l
|
||||
bind = CTRL ALT $mainMod SHIFT CTRL ALT, L, movecurrentworkspacetomonitor, r
|
||||
bind = CTRL ALT $mainMod SHIFT CTRL ALT, J, movecurrentworkspacetomonitor, d
|
||||
bind = CTRL ALT $mainMod SHIFT CTRL ALT, K, movecurrentworkspacetomonitor, u
|
||||
|
||||
# ────────────────────────── window move focus ────────────────────────
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
binde = $mainMod, right, resizeactive, 20 0
|
||||
binde = $mainMod, left, resizeactive, -20 0
|
||||
binde = $mainMod, up, resizeactive, 0 -20
|
||||
binde = $mainMod, down, resizeactive, 0 20
|
||||
bind = $mainMod, H, movefocus, l
|
||||
bind = $mainMod, L, movefocus, r
|
||||
bind = $mainMod, K, movefocus, u
|
||||
@ -40,9 +55,9 @@ bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
binde = $mainMod CTRL, H, workspace, -1
|
||||
binde = $mainMod CTRL, L, workspace, +1
|
||||
binde = $mainMod CTRL, J, workspace, previous
|
||||
binde = $mainMod SHIFT, H, workspace, -1
|
||||
binde = $mainMod SHIFT, L, workspace, +1
|
||||
binde = $mainMod SHIFT, J, workspace, previous
|
||||
|
||||
# ─────────────────────── move window to workspace ───────────────────────
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
@ -62,13 +77,12 @@ bind = $mainMod CTRL SHIFT, J, movetoworkspace, previous
|
||||
# ───────────────────────── workspace/scratchpad ─────────────────────────
|
||||
bind = , F12, togglespecialworkspace, magic
|
||||
bind = SHIFT, F12, movetoworkspace, special:magic
|
||||
bind = $mainMod, M, togglespecialworkspace, music
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# ──────────────────────────────── copyq ──────────────────────────────
|
||||
bind = CTRL_ALT, V, exec, copyq toggle
|
||||
|
||||
# ───────────────────────────── screenshots ───────────────────────────
|
||||
bind = $mainMod SHIFT, S, exec, grimblast copy area --freeze --notify --cursor
|
||||
@ -81,19 +95,25 @@ bind = SHIFT, Print, exec, grimblast copy screen --freeze --notify --cursor
|
||||
|
||||
# l -> do stuff even when locked
|
||||
# e -> repeats when key is held
|
||||
bindle=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindle=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindle=, XF86MonBrightnessUp, exec, brightnessctl set +10%
|
||||
bindle=, XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||
bindle=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% & echo $(pactl get-sink-volume @DEFAULT_SINK@ | grep -oP "\d{1,3}(?=%)" | head -1) >> /tmp/wobpipe
|
||||
bindle=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% & echo $(pactl get-sink-volume @DEFAULT_SINK@ | grep -oP "\d{1,3}(?=%)" | head -1) >> /tmp/wobpipe
|
||||
bindle=, XF86MonBrightnessUp, exec, ~/.config/scripts/set_brightness.sh +10%
|
||||
bindle=, XF86MonBrightnessDown, exec, ~/.config/scripts/set_brightness.sh 10%-
|
||||
bindl=, XF86AudioMute, exec, amixer set Master toggle
|
||||
bindl=, XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl=, XF86AudioPause, exec, playerctl play-pause
|
||||
bindl=, XF86AudioStop, exec, playerctl play-pause
|
||||
bindl=, XF86AudioNext, exec, playerctl next
|
||||
bindl=, XF86AudioPrev, exec, playerctl previous
|
||||
bindl= CTRL ALT SHIFT, H, exec, playerctl previous
|
||||
bindl= CTRL ALT SHIFT, L, exec, playerctl next
|
||||
bindl= CTRL ALT SHIFT, SPACE, exec, playerctl play-pause
|
||||
bindl=, XF86AudioPlay, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
|
||||
bindl=, XF86AudioPause, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
|
||||
bindl=, XF86AudioStop, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
|
||||
bindl=, XF86AudioNext, exec, playerctl --player=$(cat ~/.config/chosen_player) next
|
||||
bindl=, XF86AudioPrev, exec, playerctl --player=$(cat ~/.config/chosen_player) previous
|
||||
bindl= CTRL ALT SHIFT, H, exec, playerctl --player=$(cat ~/.config/chosen_player) previous
|
||||
bindl= CTRL ALT SHIFT, L, exec, playerctl --player=$(cat ~/.config/chosen_player) next
|
||||
bindl= CTRL ALT SHIFT, SPACE, exec, playerctl --player=$(cat ~/.config/chosen_player) play-pause
|
||||
|
||||
# ─────────────────────── select pulseaudio output ───────────────────────
|
||||
bind= CTRL ALT SHIFT, O, exec, ~/.config/hypr/scripts/wofi-pulse-output.sh
|
||||
|
||||
# ─────────────────────── select playerctl player ─────────────────────
|
||||
bind= CTRL ALT SHIFT, P, exec, ~/.config/hypr/scripts/wofi-player.sh
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
|
@ -11,7 +11,6 @@ listener {
|
||||
# HYPRLOCK ONTIMEOUT
|
||||
on-timeout = loginctl lock-session
|
||||
}
|
||||
|
||||
# dpms
|
||||
listener {
|
||||
# DPMS TIMEOUT
|
||||
|
@ -7,9 +7,8 @@
|
||||
### MONITORS ###
|
||||
################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
source = ./monitors.conf
|
||||
source = ./workspaces.conf
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
@ -18,8 +17,8 @@ monitor=,preferred,auto,auto
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = alacritty
|
||||
$fileManager = dolphin
|
||||
$terminal = kitty
|
||||
$fileManager = $terminal tmux new-session -s tmp-file-manager 'yazi'
|
||||
$toggle_menu_cmd = pgrep wofi >/dev/null 2>&1 && killall wofi || wofi --show drun
|
||||
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
@ -73,10 +72,10 @@ decoration {
|
||||
inactive_opacity = 0.9
|
||||
fullscreen_opacity = 1.0
|
||||
|
||||
drop_shadow = true
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
# drop_shadow = true
|
||||
# shadow_range = 4
|
||||
# shadow_render_power = 3
|
||||
# col.shadow = rgba(1a1a1aee)
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur {
|
||||
@ -166,14 +165,49 @@ source = ./conf/keybindings.conf
|
||||
# windowrule = float, ^(kitty)$
|
||||
windowrule = size 300 400,(copyq)
|
||||
|
||||
windowrule = maxsize 400 300, (blueman)
|
||||
windowrule = float, (copyq|pavucontrol|blueman-manager|wofi|rofi)
|
||||
|
||||
# Browser Picture in Picture
|
||||
windowrulev2 = float, title:^(Picture-in-Picture)$
|
||||
windowrulev2 = pin, title:^(Picture-in-Picture)$
|
||||
windowrulev2 = move 69.5% 4%, title:^(Picture-in-Picture)$
|
||||
|
||||
|
||||
# different floating modals
|
||||
windowrule = maxsize 400 300, (blueman|io.crow_translate.CrowTranslate)
|
||||
windowrule = float, (copyq|pavucontrol|blueman-manager|wofi|rofi|imv|io.crow_translate.CrowTranslate)
|
||||
windowrule = pin, (copyq|pavucontrol|blueman-manager|wofi|rofi|io.crow_translate.CrowTranslate)
|
||||
windowrule = stayfocused, (copyq|pavucontrol|blueman-manager|wofi|rofi|io.crow_translate.CrowTranslate)
|
||||
windowrule = move onscreen cursor,(copyq|pavucontrol|blueman-manager|imv|io.crow_translate.CrowTranslate)
|
||||
|
||||
windowrule = center, (wofi)
|
||||
windowrule = workspace 3, title:^(.*)(Telegram)(.*)$
|
||||
windowrule = workspace 2, title:^(.*)(Firefox)(.*)$
|
||||
windowrule = move onscreen cursor,(copyq|pavucontrol|blueman-manager)
|
||||
windowrule = workspace 1, title:^(.*)(Firefox)(.*)$
|
||||
windowrule = workspace special:music, title:(.*)((M|m)usic|(М|м)узыка)(.*)
|
||||
windowrule = float, title:(.*)((M|m)usic|(М|м)узыка)(.*)
|
||||
windowrule = size 1500 900, title:(.*)((M|m)usic|(М|м)узыка)(.*)
|
||||
# Example windowrule v2
|
||||
windowrulev2 = float,class:^(cursor-float)$
|
||||
windowrulev2 = move onscreen cursor,class:^(cursor-float)$
|
||||
|
||||
windowrulev2 = float,class:^(dmenu)$
|
||||
windowrulev2 = pin,class:^(dmenu)$
|
||||
windowrulev2 = stayfocused,class:^(dmenu)$
|
||||
# windowrulev2 = move onscreen cursor,class:^(dmenu)$
|
||||
#
|
||||
|
||||
# matlab
|
||||
windowrule = tile, class:(.*)(MATLAB)(.*)
|
||||
windowrule = workspace 6, class:(.*)(MATLAB)(.*)
|
||||
windowrule = size 400 400, class:(.*)(MATLAB)(.*)
|
||||
|
||||
windowrule = tile, (.*)(Figure)(.*)
|
||||
windowrule = workspace 6, (.*)(Figure)(.*)
|
||||
windowrule = size 400 400, (.*)(Figure)(.*)
|
||||
|
||||
|
||||
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
||||
|
||||
|
||||
workspace = special:music, opacity:0.5
|
||||
workspace = opacity 0.5, onworkspace:name:special:music
|
||||
workspace = special:music, gapsout:100
|
||||
|
@ -82,3 +82,17 @@ label {
|
||||
# halign = center
|
||||
# valign = center
|
||||
# }
|
||||
# selected layout
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] ~/.config/scripts/get_layout.sh
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 20
|
||||
font_family = Fira Semibold
|
||||
position = -20, 20
|
||||
halign = right
|
||||
valign = bottom
|
||||
shadow_passes = 5
|
||||
shadow_size = 10
|
||||
}
|
||||
|
||||
|
7
.config/hypr/monitors.conf
Normal file
7
.config/hypr/monitors.conf
Normal file
@ -0,0 +1,7 @@
|
||||
# Generated by nwg-displays on 2024-10-09 at 13:19:03. Do not edit manually.
|
||||
|
||||
monitor=eDP-1,1920x1080@60.01,0x0,1.0
|
||||
monitor=DP-2,1920x1080@60.0,1920x-1440,1.0
|
||||
monitor=DP-2,transform,3
|
||||
monitor=desc:Iiyama North America PL3270Q 1155103721286,2560x1440@59.95,-640x-1440,1.0
|
||||
monitor=desc:BNQ BenQ G925HDA 29A01966019,prefered,auto,1.0
|
6
.config/hypr/monitors1.conf
Normal file
6
.config/hypr/monitors1.conf
Normal file
@ -0,0 +1,6 @@
|
||||
# Generated by nwg-displays on 2024-08-14 at 13:35:50. Do not edit manually.
|
||||
|
||||
monitor=eDP-1,1920x1080@60.01,0x0,1.0
|
||||
monitor=DP-2,1920x1080@60.0,1920x-953,1.0
|
||||
# monitor=HDMI-A-1,2560x1440@59.95,-640x-1440,1.0
|
||||
monitor=desc:BNQ BenQ G925HDA 29A01966019,prefered,auto,1.0
|
1
.config/hypr/scripts/dnd-clipboard.sh
Executable file
1
.config/hypr/scripts/dnd-clipboard.sh
Executable file
@ -0,0 +1 @@
|
||||
wl-paste > /tmp/clipboard_image.jpg && dragon-drop /tmp/clipboard_image.jpg
|
1
.config/hypr/scripts/show-crow.sh
Executable file
1
.config/hypr/scripts/show-crow.sh
Executable file
@ -0,0 +1 @@
|
||||
dbus-send --type=method_call --dest=io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow io.crow_translate.CrowTranslate.MainWindow.open
|
1
.config/hypr/scripts/start-wob.sh
Executable file
1
.config/hypr/scripts/start-wob.sh
Executable file
@ -0,0 +1 @@
|
||||
tail -f /tmp/wobpipe | wob
|
1
.config/hypr/scripts/translate-selection.sh
Executable file
1
.config/hypr/scripts/translate-selection.sh
Executable file
@ -0,0 +1 @@
|
||||
qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateSelection
|
37
.config/hypr/scripts/wofi-player.sh
Executable file
37
.config/hypr/scripts/wofi-player.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Function to get info for a player
|
||||
get_player_info() {
|
||||
playerctl -p "$1" metadata --format "{{ artist }} - {{ title }}" 2>/dev/null
|
||||
}
|
||||
|
||||
# Get the currently selected player from the file, if it exists
|
||||
current_player=$(cat ~/.config/chosen_player 2>/dev/null)
|
||||
|
||||
# Get list of players
|
||||
players=$(playerctl -l)
|
||||
|
||||
# Prepare the list for rofi by appending info about each player
|
||||
menu=""
|
||||
for player in $players; do
|
||||
info=$(get_player_info "$player")
|
||||
if [ -z "$info" ]; then
|
||||
info="(No track info)"
|
||||
fi
|
||||
# Highlight the current player with ✅
|
||||
if [ "$player" = "$current_player" ]; then
|
||||
menu+="✅ $player: $info\n"
|
||||
else
|
||||
menu+="$player: $info\n"
|
||||
fi
|
||||
done
|
||||
|
||||
# Use rofi to choose the player
|
||||
chosen=$(echo -e "$menu" | wofi -dmenu -p "Choose player" | awk -F: '{print $1}')
|
||||
|
||||
# If a player was chosen, save it to a file
|
||||
if [ -n "$chosen" ]; then
|
||||
echo "$chosen" > ~/.config/chosen_player
|
||||
notify-send "Audio output switched" "Switched to $(echo "$chosen")"
|
||||
fi
|
||||
|
28
.config/hypr/scripts/wofi-pulse-output.sh
Executable file
28
.config/hypr/scripts/wofi-pulse-output.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the current default sink
|
||||
default_sink=$(pactl info | grep "Default Sink" | awk '{print $3}')
|
||||
default_sink_number=$(pactl list sinks short | grep "$default_sink" | awk '{print $1}')
|
||||
|
||||
# Get a list of available sinks with their descriptions
|
||||
sinks=$(pactl list sinks | grep -E 'Sink|Description' | sed -E 's/Sink #([0-9]+)/\1/' | sed -E 's/Description: (.+)/\1/')
|
||||
|
||||
# Format the sink list to show the index and description
|
||||
formatted_sinks=$(echo "$sinks" | awk 'NR%2{printf "%s ", $0; next;}1')
|
||||
|
||||
# Add ✅ to the current default sink
|
||||
formatted_sinks=$(echo "$formatted_sinks" | awk -v default_sink_number="$default_sink_number" '{if ($1 == default_sink_number) {print "✅ " $0} else {print $0}}')
|
||||
|
||||
# Use wofi to select a sink based on the description
|
||||
selected_sink=$(echo "$formatted_sinks" | wofi --dmenu --prompt "Select audio output:")
|
||||
|
||||
# Extract the sink index
|
||||
sink_index=$(echo "$selected_sink" | awk '{print $1}')
|
||||
|
||||
# Set the selected sink as the default
|
||||
if [ -n "$sink_index" ]; then
|
||||
pactl set-default-sink "$sink_index"
|
||||
notify-send "Audio output switched" "Switched to $(echo "$selected_sink" | cut -d' ' -f2-)"
|
||||
else
|
||||
notify-send "No sink selected"
|
||||
fi
|
5
.config/hypr/workspaces.conf
Normal file
5
.config/hypr/workspaces.conf
Normal file
@ -0,0 +1,5 @@
|
||||
# Generated by nwg-displays on 2024-08-14 at 13:35:48. Do not edit manually.
|
||||
|
||||
workspace=1,monitor:eDP-1,default:true
|
||||
workspace=2,monitor:HDMI-A-1,default:true
|
||||
workspace=3,monitor:DP-2,default:true
|
19
.config/kitty/diff.conf
Normal file
19
.config/kitty/diff.conf
Normal file
@ -0,0 +1,19 @@
|
||||
foreground #f8f8f2
|
||||
background #282a36
|
||||
title_fg #f8f8f2
|
||||
title_bg #282a36
|
||||
margin_bg #6272a4
|
||||
margin_fg #44475a
|
||||
removed_bg #ff5555
|
||||
highlight_removed_bg #ff5555
|
||||
removed_margin_bg #ff5555
|
||||
added_bg #50fa7b
|
||||
highlight_added_bg #50fa7b
|
||||
added_margin_bg #50fa7b
|
||||
filler_bg #44475a
|
||||
hunk_margin_bg #44475a
|
||||
hunk_bg #bd93f9
|
||||
search_bg #8be9fd
|
||||
search_fg #282a36
|
||||
select_bg #f1fa8c
|
||||
select_fg #282a36
|
66
.config/kitty/dracula.conf
Normal file
66
.config/kitty/dracula.conf
Normal file
@ -0,0 +1,66 @@
|
||||
# https://draculatheme.com/kitty
|
||||
#
|
||||
# Installation instructions:
|
||||
#
|
||||
# cp dracula.conf ~/.config/kitty/
|
||||
# echo "include dracula.conf" >> ~/.config/kitty/kitty.conf
|
||||
#
|
||||
# Then reload kitty for the config to take affect.
|
||||
# Alternatively copy paste below directly into kitty.conf
|
||||
|
||||
foreground #f8f8f2
|
||||
background #282a36
|
||||
selection_foreground #ffffff
|
||||
selection_background #44475a
|
||||
|
||||
url_color #8be9fd
|
||||
|
||||
# black
|
||||
color0 #21222c
|
||||
color8 #6272a4
|
||||
|
||||
# red
|
||||
color1 #ff5555
|
||||
color9 #ff6e6e
|
||||
|
||||
# green
|
||||
color2 #50fa7b
|
||||
color10 #69ff94
|
||||
|
||||
# yellow
|
||||
color3 #f1fa8c
|
||||
color11 #ffffa5
|
||||
|
||||
# blue
|
||||
color4 #bd93f9
|
||||
color12 #d6acff
|
||||
|
||||
# magenta
|
||||
color5 #ff79c6
|
||||
color13 #ff92df
|
||||
|
||||
# cyan
|
||||
color6 #8be9fd
|
||||
color14 #a4ffff
|
||||
|
||||
# white
|
||||
color7 #f8f8f2
|
||||
color15 #ffffff
|
||||
|
||||
# Cursor colors
|
||||
cursor #f8f8f2
|
||||
cursor_text_color background
|
||||
|
||||
# Tab bar colors
|
||||
active_tab_foreground #282a36
|
||||
active_tab_background #f8f8f2
|
||||
inactive_tab_foreground #282a36
|
||||
inactive_tab_background #6272a4
|
||||
|
||||
# Marks
|
||||
mark1_foreground #282a36
|
||||
mark1_background #ff5555
|
||||
|
||||
# Splits/Windows
|
||||
active_border_color #f8f8f2
|
||||
inactive_border_color #6272a4
|
14
.config/kitty/kitty-master/INSTALL.md
Normal file
14
.config/kitty/kitty-master/INSTALL.md
Normal file
@ -0,0 +1,14 @@
|
||||
### [kitty](https://sw.kovidgoyal.net/kitty/)
|
||||
|
||||
#### Install
|
||||
|
||||
Download using the [GitHub .zip download](https://github.com/dracula/kitty/archive/master.zip) option
|
||||
|
||||
```
|
||||
cp dracula.conf diff.conf ~/.config/kitty/
|
||||
echo "include dracula.conf" >> ~/.config/kitty/kitty.conf
|
||||
```
|
||||
|
||||
Then reload kitty for the config to take affect.
|
||||
|
||||
Alternatively copy paste `dracula.conf` directly into `kitty.conf`.
|
21
.config/kitty/kitty-master/LICENSE
Normal file
21
.config/kitty/kitty-master/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Dracula Theme
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
27
.config/kitty/kitty-master/README.md
Normal file
27
.config/kitty/kitty-master/README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Dracula for [kitty](https://sw.kovidgoyal.net/kitty/)
|
||||
|
||||
> A dark theme for [kitty](https://sw.kovidgoyal.net/kitty/).
|
||||
|
||||

|
||||
|
||||
## Install
|
||||
|
||||
All instructions can be found at [draculatheme.com/kitty](https://draculatheme.com/kitty).
|
||||
|
||||
## Team
|
||||
|
||||
<!-- This theme is maintained by the following person and a bunch of [awesome contributors](https://github.com/dracula/kitty/graphs/contributors). -->
|
||||
|
||||
| [](https://github.com/keegancsmith) | [](https://github.com/mienaikage) | [](https://github.com/screendriver) |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
||||
| [Keegan Carruthers-Smith](https://github.com/keegancsmith) | [Daniel Mita](https://github.com/mienaikage) | [Christian Rackerseder](https://github.com/screendriver) |
|
||||
|
||||
## Community
|
||||
|
||||
- [Twitter](https://twitter.com/draculatheme) - Best for getting updates about themes and new stuff.
|
||||
- [GitHub](https://github.com/dracula/dracula-theme/discussions) - Best for asking questions and discussing issues.
|
||||
- [Discord](https://draculatheme.com/discord-invite) - Best for hanging out with the community.
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](./LICENSE)
|
BIN
.config/kitty/kitty-master/screenshot.png
Normal file
BIN
.config/kitty/kitty-master/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 228 KiB |
73
.config/kitty/kitty.conf
Normal file
73
.config/kitty/kitty.conf
Normal file
@ -0,0 +1,73 @@
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ general settings │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
|
||||
window_padding_width 0
|
||||
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ Dracula theme │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
foreground #f8f8f2
|
||||
background #282a36
|
||||
selection_foreground #ffffff
|
||||
selection_background #44475a
|
||||
|
||||
url_color #8be9fd
|
||||
|
||||
# black
|
||||
color0 #21222c
|
||||
color8 #6272a4
|
||||
|
||||
# red
|
||||
color1 #ff5555
|
||||
color9 #ff6e6e
|
||||
|
||||
# green
|
||||
color2 #50fa7b
|
||||
color10 #69ff94
|
||||
|
||||
# yellow
|
||||
color3 #f1fa8c
|
||||
color11 #ffffa5
|
||||
|
||||
# blue
|
||||
color4 #bd93f9
|
||||
color12 #d6acff
|
||||
|
||||
# magenta
|
||||
color5 #ff79c6
|
||||
color13 #ff92df
|
||||
|
||||
# cyan
|
||||
color6 #8be9fd
|
||||
color14 #a4ffff
|
||||
|
||||
# white
|
||||
color7 #f8f8f2
|
||||
color15 #ffffff
|
||||
|
||||
# Cursor colors
|
||||
cursor #f8f8f2
|
||||
cursor_text_color background
|
||||
|
||||
# Tab bar colors
|
||||
active_tab_foreground #282a36
|
||||
active_tab_background #f8f8f2
|
||||
inactive_tab_foreground #282a36
|
||||
inactive_tab_background #6272a4
|
||||
|
||||
# Marks
|
||||
mark1_foreground #282a36
|
||||
mark1_background #ff5555
|
||||
|
||||
# Splits/Windows
|
||||
active_border_color #f8f8f2
|
||||
inactive_border_color #6272a4
|
||||
|
||||
|
||||
# BEGIN_KITTY_FONTS
|
||||
font_family family="VictorMono Nerd Font Mono"
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
# END_KITTY_FONTS
|
@ -0,0 +1,4 @@
|
||||
git:
|
||||
paging:
|
||||
colorArg: always
|
||||
pager: delta --dark --paging=never
|
@ -1,10 +1,16 @@
|
||||
lastupdatecheck: 0
|
||||
recentrepos:
|
||||
- /home/goodhumored/lazygit/lazygit
|
||||
- /home/goodhumored/side-hustle/lambo/er_lamborgini
|
||||
- /home/goodhumored/side-hustle/alexflora/frontend
|
||||
- /home/goodhumored/lazygit/lazygit
|
||||
startuppopupversion: 5
|
||||
lastversion: 0.43.1
|
||||
customcommandshistory: []
|
||||
hidecommandlog: false
|
||||
ignorewhitespaceindiffview: false
|
||||
diffcontextsize: 3
|
||||
renamesimilaritythreshold: 50
|
||||
localbranchsortorder: recency
|
||||
remotebranchsortorder: alphabetical
|
||||
gitlogorder: topo-order
|
||||
gitlogshowgraph: always
|
||||
|
@ -88,7 +88,7 @@ shell_directory_timeout=900
|
||||
|
||||
[Layout]
|
||||
output_lines=0
|
||||
left_panel_size=118
|
||||
left_panel_size=59
|
||||
top_panel_size=0
|
||||
message_visible=true
|
||||
keybar_visible=true
|
||||
@ -117,6 +117,7 @@ base_color=
|
||||
xterm-256color=
|
||||
color_terminals=
|
||||
screen-256color=
|
||||
tmux-256color=
|
||||
|
||||
[Panels]
|
||||
show_mini_info=true
|
||||
@ -140,7 +141,7 @@ quick_search_mode=2
|
||||
select_flags=6
|
||||
|
||||
[Panelize]
|
||||
Modified git files=git ls-files --modified
|
||||
Find *.orig after patching=find . -name \\*.orig -print
|
||||
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
|
||||
Find rejects after patching=find . -name \\*.rej -print
|
||||
Find *.orig after patching=find . -name \\*.orig -print
|
||||
Modified git files=git ls-files --modified
|
||||
|
File diff suppressed because it is too large
Load Diff
12
.config/nvim/lua/goodhumored/appearance/code/barbecue.lua
Normal file
12
.config/nvim/lua/goodhumored/appearance/code/barbecue.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
"utilyre/barbecue.nvim",
|
||||
name = "barbecue",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"SmiteshP/nvim-navic",
|
||||
"nvim-tree/nvim-web-devicons", -- optional dependency
|
||||
},
|
||||
opts = {
|
||||
-- configurations go here
|
||||
},
|
||||
}
|
78
.config/nvim/lua/goodhumored/appearance/code/fzf.lua
Normal file
78
.config/nvim/lua/goodhumored/appearance/code/fzf.lua
Normal file
@ -0,0 +1,78 @@
|
||||
return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
|
||||
-- `build` is used to run some command when the plugin is installed/updated.
|
||||
-- This is only run then, not every time Neovim starts up.
|
||||
build = "make",
|
||||
|
||||
-- `cond` is a condition used to determine whether this plugin should be
|
||||
-- installed and loaded.
|
||||
cond = function()
|
||||
return vim.fn.executable("make") == 1
|
||||
end,
|
||||
},
|
||||
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
|
||||
{ -- Fuzzy Finder (files, lsp, etc)
|
||||
"nvim-telescope/telescope.nvim",
|
||||
event = "VimEnter",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown(),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable Telescope extensions if they are installed
|
||||
pcall(require("telescope").load_extension, "fzf")
|
||||
pcall(require("telescope").load_extension, "ui-select")
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
|
||||
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
|
||||
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" })
|
||||
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
|
||||
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
|
||||
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
|
||||
vim.keymap.set("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" })
|
||||
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||
|
||||
-- Slightly advanced example of overriding default behavior and theme
|
||||
vim.keymap.set("n", "<leader>/", function()
|
||||
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
}))
|
||||
end, { desc = "[/] Fuzzily search in current buffer" })
|
||||
|
||||
-- It's also possible to pass additional configuration options.
|
||||
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
||||
vim.keymap.set("n", "<leader>s/", function()
|
||||
builtin.live_grep({
|
||||
grep_open_files = true,
|
||||
prompt_title = "Live Grep in Open Files",
|
||||
})
|
||||
end, { desc = "[S]earch [/] in Open Files" })
|
||||
|
||||
-- Shortcut for searching your Neovim configuration files
|
||||
vim.keymap.set("n", "<leader>sn", function()
|
||||
builtin.find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end, { desc = "[S]earch [N]eovim files" })
|
||||
end,
|
||||
},
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ git-conflict │
|
||||
-- │ A plugin to visualise and resolve conflicts in neovim │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return { "akinsho/git-conflict.nvim", version = "*", config = true }
|
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VimEnter",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = { signs = false },
|
||||
}
|
53
.config/nvim/lua/goodhumored/appearance/code/image.lua
Normal file
53
.config/nvim/lua/goodhumored/appearance/code/image.lua
Normal file
@ -0,0 +1,53 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ 3rd/image.nvim │
|
||||
-- │ images view inside vim │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return {
|
||||
"3rd/image.nvim",
|
||||
config = function()
|
||||
local image = require("image")
|
||||
-- default config
|
||||
image.setup({
|
||||
backend = "kitty",
|
||||
kitty_method = "normal",
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
||||
},
|
||||
neorg = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
filetypes = { "norg" },
|
||||
},
|
||||
html = {
|
||||
enabled = false,
|
||||
},
|
||||
css = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
max_width = nil,
|
||||
max_height = nil,
|
||||
max_width_window_percentage = nil,
|
||||
max_height_window_percentage = 50,
|
||||
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
|
||||
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
|
||||
tmux_show_only_in_active_window = true, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
||||
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
|
||||
})
|
||||
vim.keymap.set("n", "<leader>ti", function()
|
||||
if image.is_enabled() then
|
||||
image.disable()
|
||||
else
|
||||
image.enable()
|
||||
end
|
||||
end, {})
|
||||
end,
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"MysticalDevil/inlay-hints.nvim",
|
||||
event = "LspAttach",
|
||||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
config = function()
|
||||
require("inlay-hints").setup()
|
||||
end,
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ ray-x/lsp_signature.nvim │
|
||||
-- │ shows method signature in insert mode │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
|
||||
return {
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require("lsp_signature").setup(opts)
|
||||
end,
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
return { -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
"folke/tokyonight.nvim",
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
init = function()
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme("tokyonight-night")
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi("Comment gui=none")
|
||||
end,
|
||||
}
|
32
.config/nvim/lua/goodhumored/appearance/theme/gruvbox.lua
Normal file
32
.config/nvim/lua/goodhumored/appearance/theme/gruvbox.lua
Normal file
@ -0,0 +1,32 @@
|
||||
return {
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
vim.o.background = "dark"
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
end,
|
||||
}
|
1
.config/nvim/lua/goodhumored/appearance/theme/init.lua
Normal file
1
.config/nvim/lua/goodhumored/appearance/theme/init.lua
Normal file
@ -0,0 +1 @@
|
||||
return require("goodhumored.appearance.theme.gruvbox")
|
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"rebelot/kanagawa.nvim",
|
||||
}
|
23
.config/nvim/lua/goodhumored/appearance/tint-unfocused.lua
Normal file
23
.config/nvim/lua/goodhumored/appearance/tint-unfocused.lua
Normal file
@ -0,0 +1,23 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Vimade │
|
||||
-- │ Fades unfocused windows │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return {
|
||||
"levouh/tint.nvim",
|
||||
config = function()
|
||||
require("tint").setup({
|
||||
tint = -40, -- Darken colors, use a positive value to brighten
|
||||
saturation = 1, -- Saturation to preserve
|
||||
transforms = require("tint").transforms.SATURATE_TINT, -- Showing default behavior, but value here can be predefined set of transforms
|
||||
highlight_ignore_patterns = { "WinSeparator", "Status.*" }, -- Highlight group patterns to ignore, see `string.find`
|
||||
window_ignore_function = function(winid)
|
||||
local bufid = vim.api.nvim_win_get_buf(winid)
|
||||
local buftype = vim.api.nvim_buf_get_option(bufid, "buftype")
|
||||
local floating = vim.api.nvim_win_get_config(winid).relative ~= ""
|
||||
|
||||
-- Do not tint `terminal` or floating windows, tint everything else
|
||||
return buftype == "terminal" or floating
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
47
.config/nvim/lua/goodhumored/appearance/ui/barbar.lua
Normal file
47
.config/nvim/lua/goodhumored/appearance/ui/barbar.lua
Normal file
@ -0,0 +1,47 @@
|
||||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
|
||||
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
|
||||
},
|
||||
init = function()
|
||||
vim.g.barbar_auto_setup = false
|
||||
vim.keymap.set("n", "<A-,>", "<Cmd>BufferPrevious<CR>", { desc = "Go tab left" })
|
||||
vim.keymap.set("n", "<A-.>", "<Cmd>BufferNext<CR>", { desc = "Go tab right" })
|
||||
-- Re-order to previous/next
|
||||
vim.keymap.set("n", "<A-<>", "<Cmd>BufferMovePrevious<CR>", { desc = "Move tab left" })
|
||||
vim.keymap.set("n", "<A->>", "<Cmd>BufferMoveNext<CR>", { desc = "Move tab right" })
|
||||
-- Goto buffer in position...
|
||||
vim.keymap.set("n", "<A-1>", "<Cmd>BufferGoto 1<CR>", { desc = "Go to tab 1" })
|
||||
vim.keymap.set("n", "<A-2>", "<Cmd>BufferGoto 2<CR>", { desc = "Go to tab 2" })
|
||||
vim.keymap.set("n", "<A-3>", "<Cmd>BufferGoto 3<CR>", { desc = "Go to tab 3" })
|
||||
vim.keymap.set("n", "<A-4>", "<Cmd>BufferGoto 4<CR>", { desc = "Go to tab 4" })
|
||||
vim.keymap.set("n", "<A-5>", "<Cmd>BufferGoto 5<CR>", { desc = "Go to tab 5" })
|
||||
vim.keymap.set("n", "<A-6>", "<Cmd>BufferGoto 6<CR>", { desc = "Go to tab 6" })
|
||||
vim.keymap.set("n", "<A-7>", "<Cmd>BufferGoto 7<CR>", { desc = "Go to tab 7" })
|
||||
vim.keymap.set("n", "<A-8>", "<Cmd>BufferGoto 8<CR>", { desc = "Go to tab 8" })
|
||||
vim.keymap.set("n", "<A-9>", "<Cmd>BufferGoto 9<CR>", { desc = "Go to tab 9" })
|
||||
vim.keymap.set("n", "<A-0>", "<Cmd>BufferLast<CR>", { desc = "Go to tab 0" })
|
||||
-- Pin/unpin buffer
|
||||
vim.keymap.set("n", "<A-p>", "<Cmd>BufferPin<CR>", { desc = "Pin tab" })
|
||||
-- Close buffer
|
||||
vim.keymap.set("n", "<A-c>", "<Cmd>BufferClose<CR>", { desc = "Close tab" })
|
||||
vim.keymap.set("n", "<A-/>", "<Cmd>BufferPick<CR>", { desc = "Pick tab" })
|
||||
end,
|
||||
opts = {
|
||||
sidebar_filetypes = {
|
||||
-- Use the default values: {event = 'BufWinLeave', text = '', align = 'left'}
|
||||
NvimTree = true,
|
||||
-- Or, specify the text used for the offset:
|
||||
undotree = {
|
||||
text = "undotree",
|
||||
align = "center", -- *optionally* specify an alignment (either 'left', 'center', or 'right')
|
||||
},
|
||||
-- Or, specify the event which the sidebar executes when leaving:
|
||||
["neo-tree"] = { event = "BufWipeout" },
|
||||
-- Or, specify all three
|
||||
Outline = { event = "BufWinLeave", text = "symbols-outline", align = "right" },
|
||||
},
|
||||
},
|
||||
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
||||
}
|
19
.config/nvim/lua/goodhumored/appearance/ui/dapui.lua
Normal file
19
.config/nvim/lua/goodhumored/appearance/ui/dapui.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
event = "VeryLazy",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
require("dapui").setup()
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
end,
|
||||
}
|
8
.config/nvim/lua/goodhumored/appearance/ui/dressing.lua
Normal file
8
.config/nvim/lua/goodhumored/appearance/ui/dressing.lua
Normal file
@ -0,0 +1,8 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ stevearc/dressing.nvim │
|
||||
-- │ beautiful inputs │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return {
|
||||
"stevearc/dressing.nvim",
|
||||
opts = {},
|
||||
}
|
12
.config/nvim/lua/goodhumored/appearance/ui/gitsigns.lua
Normal file
12
.config/nvim/lua/goodhumored/appearance/ui/gitsigns.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return { -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
},
|
||||
}
|
35
.config/nvim/lua/goodhumored/appearance/ui/lualine.lua
Normal file
35
.config/nvim/lua/goodhumored/appearance/ui/lualine.lua
Normal file
@ -0,0 +1,35 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "iceberg_dark",
|
||||
component_separators = "",
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { { "mode", separator = { left = "" }, right_padding = 2 } },
|
||||
lualine_b = { "filename", "branch" },
|
||||
lualine_c = {
|
||||
"%=", --[[ add your center compoentnts here in place of this comment ]]
|
||||
},
|
||||
lualine_x = {},
|
||||
lualine_y = { "filetype", "progress" },
|
||||
lualine_z = {
|
||||
{ "location", separator = { right = "" }, left_padding = 2 },
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = { "filename" },
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
||||
end,
|
||||
}
|
15
.config/nvim/lua/goodhumored/appearance/ui/noice.nvim.lua
Normal file
15
.config/nvim/lua/goodhumored/appearance/ui/noice.nvim.lua
Normal file
@ -0,0 +1,15 @@
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- add any options here
|
||||
},
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- OPTIONAL:
|
||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||
-- If not available, we use `mini` as the fallback
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
}
|
64
.config/nvim/lua/goodhumored/appearance/ui/nvim-tree.lua
Normal file
64
.config/nvim/lua/goodhumored/appearance/ui/nvim-tree.lua
Normal file
@ -0,0 +1,64 @@
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
local function edit_or_open()
|
||||
local node = api.tree.get_node_under_cursor()
|
||||
|
||||
if node.nodes ~= nil then
|
||||
-- expand or collapse folder
|
||||
api.node.open.edit()
|
||||
else
|
||||
-- open file
|
||||
api.node.open.edit()
|
||||
-- Close the tree if file was opened
|
||||
api.tree.close()
|
||||
end
|
||||
end
|
||||
|
||||
-- open as vsplit on current node
|
||||
local function vsplit_preview()
|
||||
local node = api.tree.get_node_under_cursor()
|
||||
|
||||
if node.nodes ~= nil then
|
||||
-- expand or collapse folder
|
||||
api.node.open.edit()
|
||||
else
|
||||
-- open file as vsplit
|
||||
api.node.open.vertical()
|
||||
end
|
||||
|
||||
-- Finally refocus on tree if it was lost
|
||||
api.tree.focus()
|
||||
end
|
||||
local function collapse_folder()
|
||||
local node = api.tree.get_node_under_cursor()
|
||||
api.node.navigate.parent(node)
|
||||
api.node.open.edit(node.parent)
|
||||
end
|
||||
require("nvim-tree").setup({
|
||||
on_attach = function(bufnr)
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
-- default mappings
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
vim.keymap.set("n", "l", edit_or_open, opts("Edit Or Open"))
|
||||
vim.keymap.set("n", "L", vsplit_preview, opts("Vsplit Preview"))
|
||||
vim.keymap.set("n", "h", collapse_folder, opts("Close"))
|
||||
vim.keymap.set("n", "H", api.tree.collapse_all, opts("Collapse All"))
|
||||
end,
|
||||
})
|
||||
local api = require("nvim-tree.api")
|
||||
vim.keymap.set("n", "<leader>e", api.tree.toggle, { desc = "[E]xplorer" })
|
||||
vim.keymap.set("n", "<leader>E", function()
|
||||
api.tree.find_file({ open = true, focus = true })
|
||||
end, { desc = "Focus file in [E]xplorer" })
|
||||
end,
|
||||
}
|
6
.config/nvim/lua/goodhumored/autocommands.lua
Normal file
6
.config/nvim/lua/goodhumored/autocommands.lua
Normal file
@ -0,0 +1,6 @@
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.ts",
|
||||
callback = function()
|
||||
vim.cmd("OrganizeImports")
|
||||
end,
|
||||
})
|
49
.config/nvim/lua/goodhumored/comfort-features/neozoom.lua
Normal file
49
.config/nvim/lua/goodhumored/comfort-features/neozoom.lua
Normal file
@ -0,0 +1,49 @@
|
||||
return {
|
||||
"nyngwang/NeoZoom.lua",
|
||||
config = function()
|
||||
require("neo-zoom").setup({
|
||||
popup = { enabled = true }, -- this is the default.
|
||||
-- NOTE: Add popup-effect (replace the window on-zoom with a `[No Name]`).
|
||||
-- EXPLAIN: This improves the performance, and you won't see two
|
||||
-- identical buffers got updated at the same time.
|
||||
-- popup = {
|
||||
-- enabled = true,
|
||||
-- exclude_filetypes = {},
|
||||
-- exclude_buftypes = {},
|
||||
-- },
|
||||
exclude_buftypes = { "terminal" },
|
||||
-- exclude_filetypes = { 'lspinfo', 'mason', 'lazy', 'fzf', 'qf' },
|
||||
winopts = {
|
||||
offset = {
|
||||
-- NOTE: omit `top`/`left` to center the floating window vertically/horizontally.
|
||||
-- top = 0,
|
||||
-- left = 0.17,
|
||||
width = 150,
|
||||
height = 0.85,
|
||||
},
|
||||
-- NOTE: check :help nvim_open_win() for possible border values.
|
||||
border = "thicc", -- this is a preset, try it :)
|
||||
},
|
||||
presets = {
|
||||
{
|
||||
-- NOTE: regex pattern can be used here!
|
||||
filetypes = { "dapui_.*", "dap-repl" },
|
||||
winopts = {
|
||||
offset = { top = 0.02, left = 0.26, width = 0.74, height = 0.25 },
|
||||
},
|
||||
},
|
||||
{
|
||||
filetypes = { "markdown" },
|
||||
callbacks = {
|
||||
function()
|
||||
vim.wo.wrap = true
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<CR>", function()
|
||||
vim.cmd("NeoZoomToggle")
|
||||
end, { silent = true, nowait = true })
|
||||
end,
|
||||
}
|
@ -0,0 +1 @@
|
||||
return { "akinsho/toggleterm.nvim", version = "*", config = true }
|
19
.config/nvim/lua/goodhumored/comfort-features/which-key.lua
Normal file
19
.config/nvim/lua/goodhumored/comfort-features/which-key.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return { -- Useful plugin to show you pending keybinds.
|
||||
"folke/which-key.nvim",
|
||||
event = "VimEnter", -- Sets the loading event to 'VimEnter'
|
||||
config = function() -- This is the function that runs, AFTER loading
|
||||
require("which-key").setup()
|
||||
|
||||
-- Document existing key chains
|
||||
require("which-key").add({
|
||||
{ "<leader>c", group = "[C]ode" },
|
||||
{ "<leader>d", group = "[D]ocument" },
|
||||
{ "<leader>r", group = "[R]ename" },
|
||||
{ "<leader>s", group = "[S]earch" },
|
||||
{ "<leader>w", group = "[W]orkspace" },
|
||||
{ "<leader>t", group = "[T]oggle" },
|
||||
-- { "<leader>e", group = "[E]xplorer" },
|
||||
{ "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
|
||||
})
|
||||
end,
|
||||
}
|
87
.config/nvim/lua/goodhumored/comfort-features/zen-mode.lua
Normal file
87
.config/nvim/lua/goodhumored/comfort-features/zen-mode.lua
Normal file
@ -0,0 +1,87 @@
|
||||
return -- Lua
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
opts = {
|
||||
window = {
|
||||
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
||||
-- height and width can be:
|
||||
-- * an absolute number of cells when > 1
|
||||
-- * a percentage of the width / height of the editor when <= 1
|
||||
-- * a function that returns the width or the height
|
||||
width = 120, -- width of the Zen window
|
||||
height = 1, -- height of the Zen window
|
||||
-- by default, no options are changed for the Zen window
|
||||
-- uncomment any of the options below, or add other vim.wo options you want to apply
|
||||
options = {
|
||||
-- signcolumn = "no", -- disable signcolumn
|
||||
-- number = false, -- disable number column
|
||||
-- relativenumber = false, -- disable relative numbers
|
||||
-- cursorline = false, -- disable cursorline
|
||||
-- cursorcolumn = false, -- disable cursor column
|
||||
-- foldcolumn = "0", -- disable fold column
|
||||
-- list = false, -- disable whitespace characters
|
||||
},
|
||||
},
|
||||
plugins = {
|
||||
-- disable some global vim options (vim.o...)
|
||||
-- comment the lines to not apply the options
|
||||
options = {
|
||||
enabled = true,
|
||||
ruler = false, -- disables the ruler text in the cmd line area
|
||||
showcmd = false, -- disables the command in the last line of the screen
|
||||
-- you may turn on/off statusline in zen mode by setting 'laststatus'
|
||||
-- statusline will be shown only if 'laststatus' == 3
|
||||
laststatus = 0, -- turn off the statusline in zen mode
|
||||
},
|
||||
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
|
||||
gitsigns = { enabled = false }, -- disables git signs
|
||||
tmux = { enabled = true }, -- disables the tmux statusline
|
||||
todo = { enabled = false }, -- if set to "true", todo-comments.nvim highlights will be disabled
|
||||
-- this will change the font size on kitty when in zen mode
|
||||
-- to make this work, you need to set the following kitty options:
|
||||
-- - allow_remote_control socket-only
|
||||
-- - listen_on unix:/tmp/kitty
|
||||
kitty = {
|
||||
enabled = false,
|
||||
font = "+8", -- font size increment
|
||||
},
|
||||
-- this will change the font size on alacritty when in zen mode
|
||||
-- requires Alacritty Version 0.10.0 or higher
|
||||
-- uses `alacritty msg` subcommand to change font size
|
||||
alacritty = {
|
||||
enabled = false,
|
||||
font = "18", -- font size
|
||||
},
|
||||
-- this will change the font size on wezterm when in zen mode
|
||||
-- See alse also the Plugins/Wezterm section in this projects README
|
||||
wezterm = {
|
||||
enabled = false,
|
||||
-- can be either an absolute font size or the number of incremental steps
|
||||
font = "+4", -- (10% increase per step)
|
||||
},
|
||||
-- this will change the scale factor in Neovide when in zen mode
|
||||
-- See alse also the Plugins/Wezterm section in this projects README
|
||||
neovide = {
|
||||
enabled = false,
|
||||
-- Will multiply the current scale factor by this number
|
||||
scale = 1.2,
|
||||
-- disable the Neovide animations while in Zen mode
|
||||
disable_animations = {
|
||||
neovide_animation_length = 0,
|
||||
neovide_cursor_animate_command_line = false,
|
||||
neovide_scroll_animation_length = 0,
|
||||
neovide_position_animation_length = 0,
|
||||
neovide_cursor_animation_length = 0,
|
||||
neovide_cursor_vfx_mode = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- callback where you can add custom code when the Zen window opens
|
||||
on_open = function(win) end,
|
||||
-- callback where you can add custom code when the Zen window closes
|
||||
on_close = function() end,
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>tz", ":ZenMode<CR>", desc = "[T]oggle [Z]en" },
|
||||
},
|
||||
}
|
70
.config/nvim/lua/goodhumored/common-bindings.lua
Normal file
70
.config/nvim/lua/goodhumored/common-bindings.lua
Normal file
@ -0,0 +1,70 @@
|
||||
-- ───────────────────── disable highlight on search ─────────────────────
|
||||
vim.keymap.set({ "n", "i" }, "<C-H>", "<C-W>", { noremap = true, desc = "Delete word" })
|
||||
|
||||
-- ───────────────────── disable highlight on search ─────────────────────
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- ────────────────────────── insert timestamp ───────────────────────
|
||||
vim.api.nvim_set_keymap("i", "<F3>", '<C-R>=strftime("%Y-%m-%dT%H:%M:%S.000Z")<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- ─────────────────────────── ctrl+left/right ───────────────────────────
|
||||
vim.api.nvim_set_keymap("i", "<C-Left>", "<C-o>b", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("i", "<C-Right>", "<C-o>w", { noremap = true, silent = true })
|
||||
|
||||
-- ───────────────────────── Diagnostic keymaps ──────────────────────
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||
|
||||
-- ─────────────────────── pasting in insert mode ────────────────────
|
||||
vim.keymap.set("i", "<C-V>", "<C-r>+", { desc = "" })
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ terminal │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
-- ────────── easy leave terminal (shortcut to ctrl+\, ctrl+n) ───────
|
||||
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||
vim.keymap.set("n", "tt", ":ToggleTerm<CR>", { desc = "Toggle terminal" })
|
||||
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Windows │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
|
||||
-- ────────────────────────────── splitting ──────────────────────────────
|
||||
vim.keymap.set("n", "<leader>-", "<C-w>s", { desc = "Horizontal split" })
|
||||
vim.keymap.set("n", "<leader>|", "<C-w>v", { desc = "Vertical split" })
|
||||
|
||||
-- ──────────────────────────── resize panes ─────────────────────────
|
||||
vim.keymap.set("n", "<left>", "<C-w><")
|
||||
vim.keymap.set("n", "<right>", "<C-w>>")
|
||||
vim.keymap.set("n", "<up>", "<C-w>+")
|
||||
vim.keymap.set("n", "<down>", "<C-w>-")
|
||||
|
||||
vim.keymap.set("n", "<S-left>", "<C-w>H")
|
||||
vim.keymap.set("n", "<S-right>", "<C-w>L")
|
||||
vim.keymap.set("n", "<S-up>", "<C-w>K")
|
||||
vim.keymap.set("n", "<S-down>", "<C-w>J")
|
||||
|
||||
-- ─────────────────────── CTRL+<hjkl> navigation ────────────────────
|
||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||
|
||||
-- ─────────────────────────── tabs navigation ───────────────────────────
|
||||
vim.keymap.set("n", "<Tab>", ":tabnext<CR>", { desc = "Switch to next tab", noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<S-Tab>", ":tabprev<CR>", { desc = "Switch to previous tab", noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<C-PageUp>", ":tabnext<CR>", { desc = "Switch to next tab", noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<C-PageDown>", ":tabprev<CR>", { desc = "Switch to previous tab", noremap = true, silent = true })
|
||||
vim.keymap.set("n", "tl", ":tabnext<CR>", { desc = "[T]ab right", noremap = true, silent = true })
|
||||
vim.keymap.set("n", "th", ":tabprev<CR>", { desc = "[T]ab left", noremap = true, silent = true })
|
||||
vim.keymap.set("n", "tj", ":tabfirst<CR>", { desc = "[T]ab home", noremap = true, silent = true })
|
||||
vim.keymap.set("n", "tk", ":tablast<CR>", { desc = "[T]ab end", noremap = true, silent = true })
|
||||
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Moving lines │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
-- ────────────────────── Move selected line(s) up ───────────────────
|
||||
vim.api.nvim_set_keymap("n", "<A-k>", ":m .-2<CR>==", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("v", "<A-k>", ":m '<-2<CR>gv=gv", { noremap = true, silent = true })
|
||||
|
||||
-- ───────────────────── Move selected line(s) down ──────────────────
|
||||
vim.api.nvim_set_keymap("n", "<A-j>", ":m .+1<CR>==", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("v", "<A-j>", ":m '>+1<CR>gv=gv", { noremap = true, silent = true })
|
146
.config/nvim/lua/goodhumored/common-vim-settings.lua
Normal file
146
.config/nvim/lua/goodhumored/common-vim-settings.lua
Normal file
@ -0,0 +1,146 @@
|
||||
-- Set <space> as the leader key
|
||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- Set the number of spaces to use for each step of (auto)indent
|
||||
vim.opt.tabstop = 2 -- Number of spaces that a <Tab> counts for
|
||||
vim.opt.shiftwidth = 2 -- Number of spaces to use for each step of (auto)indent
|
||||
vim.opt.expandtab = true -- Use spaces instead of tabs
|
||||
|
||||
-- word wrap options
|
||||
vim.opt.wrap = false -- disable wrap
|
||||
|
||||
-- true if have nerd font installed
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Make line numbers default
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = "a"
|
||||
|
||||
-- Don't show the mode, since it's already in the status line
|
||||
vim.opt.showmode = false
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Enable break indent
|
||||
vim.opt.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.opt.undofile = true
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
-- Decrease update time
|
||||
vim.opt.updatetime = 250
|
||||
|
||||
-- Decrease mapped sequence wait time
|
||||
-- Displays which-key popup sooner
|
||||
vim.opt.timeoutlen = 300
|
||||
|
||||
-- Configure how new splits should be opened
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = " ", trail = "·", nbsp = "␣" }
|
||||
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.opt.inccommand = "split"
|
||||
|
||||
-- Show which line your cursor is on
|
||||
vim.opt.cursorline = true
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
||||
vim.opt.hlsearch = true
|
||||
-- vim.filetype.add({
|
||||
-- pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||
--
|
||||
-- })
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
desc = "Highlight when yanking (copying) text",
|
||||
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Hyprlang LSP
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.hl", "hypr*.conf" },
|
||||
callback = function(event)
|
||||
print(string.format("starting hyprls for %s", vim.inspect(event)))
|
||||
vim.lsp.start({
|
||||
name = "hyprlang",
|
||||
cmd = { "hyprls" },
|
||||
root_dir = vim.fn.getcwd(),
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Langmap │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
|
||||
local function escape(str)
|
||||
-- Эти символы должны быть экранированы, если встречаются в langmap
|
||||
local escape_chars = [[;,."|\]]
|
||||
return vim.fn.escape(str, escape_chars)
|
||||
end
|
||||
|
||||
-- Наборы символов, введенных с зажатым шифтом
|
||||
local en_shift = [[~QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>]]
|
||||
local ru_shift = [[ËЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ]]
|
||||
-- Наборы символов, введенных как есть
|
||||
-- Здесь я не добавляю ',.' и 'бю', чтобы впоследствии не было рекурсивного вызова комманды
|
||||
local en = [[`qwertyuiop[]asdfghjkl;'zxcvbnm,.]]
|
||||
local ru = [[ёйцукенгшщзхъфывапролджэячсмитьбю]]
|
||||
vim.opt.langmap = vim.fn.join({
|
||||
-- ; - разделитель, который не нужно экранировать
|
||||
-- |
|
||||
escape(ru_shift)
|
||||
.. ";"
|
||||
.. escape(en_shift),
|
||||
escape(ru) .. ";" .. escape(en),
|
||||
}, ",")
|
||||
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ enable word wrap and linebreak for norg and markdown │
|
||||
-- │ files │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "norg", "markdown" },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.linebreak = true
|
||||
end,
|
||||
})
|
58
.config/nvim/lua/goodhumored/core/dap/dap-go.lua
Normal file
58
.config/nvim/lua/goodhumored/core/dap/dap-go.lua
Normal file
@ -0,0 +1,58 @@
|
||||
return {
|
||||
"leoluz/nvim-dap-go",
|
||||
config = function()
|
||||
require("dap-go").setup({
|
||||
-- Additional dap configurations can be added.
|
||||
-- dap_configurations accepts a list of tables where each entry
|
||||
-- represents a dap configuration. For more details do:
|
||||
-- :help dap-configuration
|
||||
dap_configurations = {
|
||||
{
|
||||
-- Must be "go" or it will be ignored by the plugin
|
||||
type = "go",
|
||||
name = "Attach remote",
|
||||
mode = "remote",
|
||||
request = "attach",
|
||||
},
|
||||
},
|
||||
-- delve configurations
|
||||
delve = {
|
||||
-- the path to the executable dlv which will be used for debugging.
|
||||
-- by default, this is the "dlv" executable on your PATH.
|
||||
path = "dlv",
|
||||
-- time to wait for delve to initialize the debug session.
|
||||
-- default to 20 seconds
|
||||
initialize_timeout_sec = 20,
|
||||
-- a string that defines the port to start delve debugger.
|
||||
-- default to string "${port}" which instructs nvim-dap
|
||||
-- to start the process in a random available port.
|
||||
-- if you set a port in your debug configuration, its value will be
|
||||
-- assigned dynamically.
|
||||
port = "${port}",
|
||||
-- additional args to pass to dlv
|
||||
args = {},
|
||||
-- the build flags that are passed to delve.
|
||||
-- defaults to empty string, but can be used to provide flags
|
||||
-- such as "-tags=unit" to make sure the test suite is
|
||||
-- compiled during debugging, for example.
|
||||
-- passing build flags using args is ineffective, as those are
|
||||
-- ignored by delve in dap mode.
|
||||
-- avaliable ui interactive function to prompt for arguments get_arguments
|
||||
build_flags = {},
|
||||
-- whether the dlv process to be created detached or not. there is
|
||||
-- an issue on Windows where this needs to be set to false
|
||||
-- otherwise the dlv server creation will fail.
|
||||
-- avaliable ui interactive function to prompt for build flags: get_build_flags
|
||||
detached = vim.fn.has("win32") == 0,
|
||||
-- the current working directory to run dlv from, if other than
|
||||
-- the current working directory.
|
||||
cwd = nil,
|
||||
},
|
||||
-- options related to running closest test
|
||||
tests = {
|
||||
-- enables verbosity when running the test.
|
||||
verbose = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
254
.config/nvim/lua/goodhumored/core/dap/dap.lua
Normal file
254
.config/nvim/lua/goodhumored/core/dap/dap.lua
Normal file
@ -0,0 +1,254 @@
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
recommended = true,
|
||||
desc = "Debugging support. Requires language specific adapters to be configured. (see lang extras)",
|
||||
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"mxsdev/nvim-dap-vscode-js",
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
dap.adapters["pwa-node"] = {
|
||||
type = "server",
|
||||
host = "localhost",
|
||||
port = "${port}", -- Replace with your chosen port number
|
||||
executable = {
|
||||
command = "node",
|
||||
-- 💀 Make sure to update this path to point to your installation
|
||||
args = { "/usr/bin/dapDebugServer.js", "${port}" },
|
||||
},
|
||||
}
|
||||
dap.adapters.node2 = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
args = { "/usr/lib/vscode-node-debug2/out/src/nodeDebug.js" },
|
||||
}
|
||||
|
||||
if not dap.adapters["node"] then
|
||||
dap.adapters["node"] = function(cb, config)
|
||||
if config.type == "node" then
|
||||
config.type = "pwa-node"
|
||||
end
|
||||
local nativeAdapter = dap.adapters["pwa-node"]
|
||||
if type(nativeAdapter) == "function" then
|
||||
nativeAdapter(cb, config)
|
||||
else
|
||||
cb(nativeAdapter)
|
||||
end
|
||||
end
|
||||
end
|
||||
for _, lang in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do
|
||||
dap.configurations[lang] = {
|
||||
{
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
runtimeExecutable = "node",
|
||||
},
|
||||
-- Debug nodejs processes (make sure to add --inspect when you run the process)
|
||||
{
|
||||
name = "Attach",
|
||||
type = "pwa-node",
|
||||
request = "attach",
|
||||
processId = require("dap.utils").pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
sourceMaps = true,
|
||||
},
|
||||
{
|
||||
-- For this to work you need to make sure the node process is started with the `--inspect` flag.
|
||||
name = "Attach to process",
|
||||
type = "node2",
|
||||
request = "attach",
|
||||
processId = require("dap.utils").pick_process,
|
||||
|
||||
-- From https://github.com/lukas-reineke/dotfiles/blob/master/vim/lua/plugins/dap.lua
|
||||
-- To test how it behaves
|
||||
rootPath = "${workspaceFolder}",
|
||||
cwd = "${workspaceFolder}",
|
||||
console = "integratedTerminal",
|
||||
internalConsoleOptions = "neverOpen",
|
||||
sourceMapPathOverrides = {
|
||||
["./*"] = "${workspaceFolder}/src/*",
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
dap.configurations.go = {
|
||||
{
|
||||
type = "go",
|
||||
name = "Debug",
|
||||
request = "launch",
|
||||
program = "${file}",
|
||||
},
|
||||
}
|
||||
|
||||
-- setup dap config by VsCode launch.json file
|
||||
local vscode = require("dap.ext.vscode")
|
||||
local json = require("plenary.json")
|
||||
vscode.json_decode = function(str)
|
||||
return vim.json.decode(json.json_strip_comments(str))
|
||||
end
|
||||
|
||||
-- Extends dap.configurations with entries read from .vscode/launch.json
|
||||
if vim.fn.filereadable(".vscode/launch.json") then
|
||||
vscode.load_launchjs()
|
||||
end
|
||||
end,
|
||||
|
||||
keys = {
|
||||
{ "<leader>d", "", desc = "+debug", mode = { "n", "v" } },
|
||||
{
|
||||
"<leader>dB",
|
||||
function()
|
||||
require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))
|
||||
end,
|
||||
desc = "Breakpoint Condition",
|
||||
},
|
||||
{
|
||||
"<leader>db",
|
||||
function()
|
||||
require("dap").toggle_breakpoint()
|
||||
end,
|
||||
desc = "Toggle Breakpoint",
|
||||
},
|
||||
{
|
||||
"<leader>dc",
|
||||
function()
|
||||
require("dap").continue()
|
||||
end,
|
||||
desc = "Continue",
|
||||
},
|
||||
{
|
||||
"<leader>da",
|
||||
function()
|
||||
require("dap").continue({ before = get_args })
|
||||
end,
|
||||
desc = "Run with Args",
|
||||
},
|
||||
{
|
||||
"<leader>dC",
|
||||
function()
|
||||
require("dap").run_to_cursor()
|
||||
end,
|
||||
desc = "Run to Cursor",
|
||||
},
|
||||
{
|
||||
"<leader>dg",
|
||||
function()
|
||||
require("dap").goto_()
|
||||
end,
|
||||
desc = "Go to Line (No Execute)",
|
||||
},
|
||||
{
|
||||
"<leader>di",
|
||||
function()
|
||||
require("dap").step_into()
|
||||
end,
|
||||
desc = "Step Into",
|
||||
},
|
||||
{
|
||||
"<leader>dj",
|
||||
function()
|
||||
require("dap").down()
|
||||
end,
|
||||
desc = "Down",
|
||||
},
|
||||
{
|
||||
"<leader>dk",
|
||||
function()
|
||||
require("dap").up()
|
||||
end,
|
||||
desc = "Up",
|
||||
},
|
||||
{
|
||||
"<leader>dl",
|
||||
function()
|
||||
require("dap").run_last()
|
||||
end,
|
||||
desc = "Run Last",
|
||||
},
|
||||
{
|
||||
"<leader>do",
|
||||
function()
|
||||
require("dap").step_out()
|
||||
end,
|
||||
desc = "Step Out",
|
||||
},
|
||||
{
|
||||
"<leader>dO",
|
||||
function()
|
||||
require("dap").step_over()
|
||||
end,
|
||||
desc = "Step Over",
|
||||
},
|
||||
{
|
||||
"<leader>dp",
|
||||
function()
|
||||
require("dap").pause()
|
||||
end,
|
||||
desc = "Pause",
|
||||
},
|
||||
{
|
||||
"<leader>dr",
|
||||
function()
|
||||
require("dap").repl.toggle()
|
||||
end,
|
||||
desc = "Toggle REPL",
|
||||
},
|
||||
{
|
||||
"<leader>ds",
|
||||
function()
|
||||
require("dap").session()
|
||||
end,
|
||||
desc = "Session",
|
||||
},
|
||||
{
|
||||
"<leader>dt",
|
||||
function()
|
||||
require("dap").terminate()
|
||||
end,
|
||||
desc = "Terminate",
|
||||
},
|
||||
{
|
||||
"<leader>dw",
|
||||
function()
|
||||
require("dap.ui.widgets").hover()
|
||||
end,
|
||||
desc = "Widgets",
|
||||
},
|
||||
{
|
||||
"<F5>",
|
||||
function()
|
||||
require("dap").continue()
|
||||
end,
|
||||
desc = "Contine debug",
|
||||
},
|
||||
{
|
||||
"<F10>",
|
||||
function()
|
||||
require("dap").step_over()
|
||||
end,
|
||||
desc = "Step over",
|
||||
},
|
||||
{
|
||||
"<F11>",
|
||||
function()
|
||||
require("dap").step_into()
|
||||
end,
|
||||
desc = "Step into",
|
||||
},
|
||||
{
|
||||
"<F12>",
|
||||
function()
|
||||
require("dap").step_out()
|
||||
end,
|
||||
desc = "Step out",
|
||||
},
|
||||
},
|
||||
}
|
13
.config/nvim/lua/goodhumored/core/dap/vscode-js.lua
Normal file
13
.config/nvim/lua/goodhumored/core/dap/vscode-js.lua
Normal file
@ -0,0 +1,13 @@
|
||||
return {
|
||||
{
|
||||
"mxsdev/nvim-dap-vscode-js",
|
||||
opts = {
|
||||
debugger_path = vim.fn.resolve(vim.fn.stdpath("data") .. "/lazy/vscode-js-debug"),
|
||||
adapters = { "pwa-node", "pwa-chrome", "pwa-msedge", "node-terminal", "pwa-extensionHost" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"microsoft/vscode-js-debug",
|
||||
build = "npm i && npm run compile vsDebugServerBundle && rm -rf out && mv -f dist out",
|
||||
},
|
||||
}
|
268
.config/nvim/lua/goodhumored/core/lsp.lua
Normal file
268
.config/nvim/lua/goodhumored/core/lsp.lua
Normal file
@ -0,0 +1,268 @@
|
||||
return { -- LSP Configuration & Plugins
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||
{ "williamboman/mason.nvim", config = true }, -- NOTE: Must be loaded before dependants
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
|
||||
-- Useful status updates for LSP.
|
||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{ "j-hui/fidget.nvim", opts = {} },
|
||||
|
||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- used for completion, annotations and signatures of Neovim apis
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
opts = {
|
||||
library = {
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "luvit-meta/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{ "Bilal2453/luvit-meta", lazy = true },
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
||||
callback = function(event)
|
||||
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
|
||||
-- to define small helper and utility functions so you don't have to repeat yourself.
|
||||
--
|
||||
-- In this case, we create a function that lets us more easily define mappings specific
|
||||
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||
local map = function(keys, func, desc)
|
||||
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
||||
end
|
||||
|
||||
-- Jump to the definition of the word under your cursor.
|
||||
-- This is where a variable was first declared, or where a function is defined, etc.
|
||||
-- To jump back, press <C-t>.
|
||||
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
||||
|
||||
-- Find references for the word under your cursor.
|
||||
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
|
||||
-- Jump to the implementation of the word under your cursor.
|
||||
-- Useful when your language has ways of declaring types without an actual implementation.
|
||||
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||
|
||||
-- Jump to the type of the word under your cursor.
|
||||
-- Useful when you're not sure what type a variable is and you want to see
|
||||
-- the definition of its *type*, not where it was *defined*.
|
||||
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
||||
|
||||
-- Fuzzy find all the symbols in your current document.
|
||||
-- Symbols are things like variables, functions, types, etc.
|
||||
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||
|
||||
-- Fuzzy find all the symbols in your current workspace.
|
||||
-- Similar to document symbols, except searches over your entire project.
|
||||
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||
|
||||
-- Rename the variable under your cursor.
|
||||
-- Most Language Servers support renaming across files, etc.
|
||||
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||
|
||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||
-- or a suggestion from your LSP for this to activate.
|
||||
map("<space><space>", vim.lsp.buf.code_action, "Code Action")
|
||||
|
||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||
-- For example, in C this would take you to the header.
|
||||
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
|
||||
-- The following two autocommands are used to highlight references of the
|
||||
-- word under your cursor when your cursor rests there for a little while.
|
||||
-- See `:help CursorHold` for information about when this is executed
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspDetach", {
|
||||
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
|
||||
callback = function(event2)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf })
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- The following code creates a keymap to toggle inlay hints in your
|
||||
-- code, if the language server you are using supports them
|
||||
--
|
||||
-- This may be unwanted, since they displace some of your code
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
||||
map("<leader>th", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
|
||||
end, "[T]oggle Inlay [H]ints")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||
|
||||
-- Enable the following language servers
|
||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
--
|
||||
-- Add any additional override configuration in the following tables. Available keys are:
|
||||
-- - cmd (table): Override the default command used to start the server
|
||||
-- - filetypes (table): Override the default list of associated filetypes for the server
|
||||
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
||||
-- - settings (table): Override the default settings passed when initializing the server.
|
||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||
-- https://github.com/pmizio/typescript-tools.nvim
|
||||
--
|
||||
-- But for many setups, the LSP (`tsserver`) will work just fine
|
||||
ts_ls = {
|
||||
init_options = {
|
||||
preferences = {
|
||||
importModuleSpecifierPreference = "relative",
|
||||
},
|
||||
},
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
commands = {
|
||||
OrganizeImports = {
|
||||
function()
|
||||
vim.lsp.buf.execute_command({
|
||||
command = "_typescript.organizeImports",
|
||||
arguments = { vim.api.nvim_buf_get_name(0) },
|
||||
})
|
||||
end,
|
||||
description = "Organize imports",
|
||||
},
|
||||
},
|
||||
},
|
||||
--
|
||||
|
||||
lua_ls = {
|
||||
-- cmd = {...},
|
||||
-- filetypes = { ...},
|
||||
-- capabilities = {},
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
||||
-- diagnostics = { disable = { 'missing-fields' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
eslint = {
|
||||
validate = "onSave",
|
||||
autoFixOnSave = true,
|
||||
autoFix = true,
|
||||
},
|
||||
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
-- To check the current status of installed tools and/or manually install
|
||||
-- other tools, you can run
|
||||
-- :Mason
|
||||
--
|
||||
-- You can press `g?` for help in this menu.
|
||||
require("mason").setup()
|
||||
|
||||
-- You can add other tools here that you want Mason to install
|
||||
-- for you, so that they are available from within Neovim.
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
"stylua", -- Used to format Lua code
|
||||
"eslint_d",
|
||||
})
|
||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- ol gur freire pbasvthengvba nobir. Hfrshy jura qvfnoyvat
|
||||
-- pregnva srngherf bs na YFC (sbe rknzcyr, gheavat bss sbeznggvat sbe gffreire)
|
||||
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
||||
local lspConfig = require("lspconfig")
|
||||
lspConfig[server_name].setup(server)
|
||||
lspConfig.gopls.setup({
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
-- https://microsoft.github.io/pyright/#/settings
|
||||
lspConfig.pyright.setup({
|
||||
capabilities = capabilities,
|
||||
python = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
diagnosticMode = "workspace",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
95
.config/nvim/lua/goodhumored/core/neotest.lua
Normal file
95
.config/nvim/lua/goodhumored/core/neotest.lua
Normal file
@ -0,0 +1,95 @@
|
||||
return {
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"marilari88/neotest-vitest",
|
||||
"nvim-neotest/nvim-nio",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>tr",
|
||||
function()
|
||||
require("neotest").run.run()
|
||||
end,
|
||||
desc = "[T]ests [R]un",
|
||||
},
|
||||
{
|
||||
"<leader>tf",
|
||||
function()
|
||||
require("neotest").run.run(vim.fn.expand("%"))
|
||||
end,
|
||||
desc = "[T]ests run [F]ile",
|
||||
},
|
||||
{
|
||||
"<leader>tdr",
|
||||
function()
|
||||
require("neotest").run.run({ strategy = "dap" })
|
||||
end,
|
||||
desc = "[T]est [D]ebug [R]elated",
|
||||
},
|
||||
{
|
||||
"<leader>tdf",
|
||||
function()
|
||||
require("neotest").run.run({ vim.fn.expand("%"), strategy = "dap" })
|
||||
end,
|
||||
desc = "[T]ests [D]ebug [F]ile",
|
||||
},
|
||||
{
|
||||
"<leader>twr",
|
||||
function()
|
||||
require("neotest").run.run({ vitestCommand = "vitest --watch" })
|
||||
end,
|
||||
desc = "[T]est [W]atch [R]elated",
|
||||
},
|
||||
{
|
||||
"<leader>twf",
|
||||
function()
|
||||
require("neotest").run.run({ vim.fn.expand("%"), vitestCommand = "vitest --watch" })
|
||||
end,
|
||||
desc = "[T]ests [W]atch [F]ile",
|
||||
},
|
||||
{
|
||||
"<leader>ts",
|
||||
function()
|
||||
require("neotest").summary.toggle()
|
||||
end,
|
||||
desc = "[T]ests [S]ummary",
|
||||
},
|
||||
{
|
||||
"<leader>tx",
|
||||
function()
|
||||
require("neotest").run.stop()
|
||||
end,
|
||||
desc = "[T]est stop",
|
||||
},
|
||||
{
|
||||
"<leader>to",
|
||||
function()
|
||||
require("neotest").output.open()
|
||||
end,
|
||||
desc = "[T]est [O]utput",
|
||||
},
|
||||
{
|
||||
"<leader>tO",
|
||||
function()
|
||||
require("neotest").output_panel.toggle()
|
||||
end,
|
||||
desc = "[T]est [O]utput",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local neotest = require("neotest")
|
||||
neotest.setup({
|
||||
adapters = {
|
||||
require("neotest-vitest")({
|
||||
-- Filter directories when searching for test files. Useful in large projects (see Filter directories notes).
|
||||
filter_dir = function(name, rel_path, root)
|
||||
return name ~= "node_modules" or name ~= "dist"
|
||||
end,
|
||||
is_test_file = function(file_path)
|
||||
return file_path:match(".*%.spec%.ts") ~= nil
|
||||
end,
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
17
.config/nvim/lua/goodhumored/core/treesitter-context.lua
Normal file
17
.config/nvim/lua/goodhumored/core/treesitter-context.lua
Normal file
@ -0,0 +1,17 @@
|
||||
return {
|
||||
"https://github.com/nvim-treesitter/nvim-treesitter-context.git",
|
||||
opts = {
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = true,
|
||||
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
||||
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
-- Separator between context and content. Should be a single character string, like '-'.
|
||||
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||
separator = nil,
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
|
||||
},
|
||||
}
|
75
.config/nvim/lua/goodhumored/core/treesitter.lua
Normal file
75
.config/nvim/lua/goodhumored/core/treesitter.lua
Normal file
@ -0,0 +1,75 @@
|
||||
return { -- Highlight, edit, and navigate code
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"diff",
|
||||
"html",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"query",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
},
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
||||
-- If you are experiencing weird indenting issues, add the language to
|
||||
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
||||
additional_vim_regex_highlighting = { "ruby" },
|
||||
},
|
||||
indent = { enable = true, disable = { "ruby" } },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<M-space>",
|
||||
node_incremental = "<M-space>",
|
||||
node_decremental = "<M-backspace>",
|
||||
scope_incremental = "<c-s>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.install").prefer_git = true
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
}
|
3
.config/nvim/lua/goodhumored/editing/auto-pairs.lua
Normal file
3
.config/nvim/lua/goodhumored/editing/auto-pairs.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"jiangmiao/auto-pairs",
|
||||
}
|
24
.config/nvim/lua/goodhumored/editing/auto-tags.lua
Normal file
24
.config/nvim/lua/goodhumored/editing/auto-tags.lua
Normal file
@ -0,0 +1,24 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ nvim-ts-autotag │
|
||||
-- │ Use treesitter to autoclose and autorename html tag │
|
||||
-- │ https://github.com/windwp/nvim-ts-autotag │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return {
|
||||
"windwp/nvim-ts-autotag",
|
||||
opts = {
|
||||
opts = {
|
||||
-- Defaults
|
||||
enable_close = true, -- Auto close tags
|
||||
enable_rename = true, -- Auto rename pairs of tags
|
||||
enable_close_on_slash = false, -- Auto close on trailing </
|
||||
},
|
||||
-- Also override individual filetype configs, these take priority.
|
||||
-- Empty by default, useful if one of the "opts" global settings
|
||||
-- doesn't work well in a specific filetype
|
||||
per_filetype = {
|
||||
["html"] = {
|
||||
enable_close = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
115
.config/nvim/lua/goodhumored/editing/autocomplete.lua
Normal file
115
.config/nvim/lua/goodhumored/editing/autocomplete.lua
Normal file
@ -0,0 +1,115 @@
|
||||
return { -- Autocompletion
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
-- Snippet Engine & its associated nvim-cmp source
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = (function()
|
||||
-- Build Step is needed for regex support in snippets.
|
||||
-- This step is not supported in many windows environments.
|
||||
-- Remove the below condition to re-enable on windows.
|
||||
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
|
||||
return
|
||||
end
|
||||
return "make install_jsregexp"
|
||||
end)(),
|
||||
dependencies = {
|
||||
-- `friendly-snippets` contains a variety of premade snippets.
|
||||
-- See the README about individual language/framework/plugin snippets:
|
||||
-- https://github.com/rafamadriz/friendly-snippets
|
||||
-- {
|
||||
-- 'rafamadriz/friendly-snippets',
|
||||
-- config = function()
|
||||
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||
-- end,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
|
||||
-- Adds other completion capabilities.
|
||||
-- nvim-cmp does not ship with all sources by default. They are split
|
||||
-- into multiple repos for maintenance purposes.
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-path",
|
||||
},
|
||||
config = function()
|
||||
-- See `:help cmp`
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
luasnip.config.setup({})
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
completion = { completeopt = "menu,menuone,noinsert" },
|
||||
|
||||
-- For an understanding of why these mappings were
|
||||
-- chosen, you will need to read `:help ins-completion`
|
||||
--
|
||||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Select the [n]ext item
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
-- Select the [p]revious item
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
|
||||
-- Scroll the documentation window [b]ack / [f]orward
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
|
||||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
||||
|
||||
-- If you prefer more traditional completion keymaps,
|
||||
-- you can uncomment the following lines
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
||||
["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
-- completions whenever it has completion options available.
|
||||
["<C-;>"] = cmp.mapping.complete(),
|
||||
|
||||
-- Think of <c-l> as moving to the right of your snippet expansion.
|
||||
-- So if you have a snippet that's like:
|
||||
-- function $name($args)
|
||||
-- $body
|
||||
-- end
|
||||
--
|
||||
-- <c-l> will move you to the right of each of the expansion locations.
|
||||
-- <c-h> is similar, except moving you backwards.
|
||||
["<C-l>"] = cmp.mapping(function()
|
||||
if luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-h>"] = cmp.mapping(function()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||
}),
|
||||
sources = {
|
||||
{
|
||||
name = "lazydev",
|
||||
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
||||
group_index = 0,
|
||||
},
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
39
.config/nvim/lua/goodhumored/editing/autoformat.lua
Normal file
39
.config/nvim/lua/goodhumored/editing/autoformat.lua
Normal file
@ -0,0 +1,39 @@
|
||||
return { -- Autoformat
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>f",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end,
|
||||
mode = "",
|
||||
desc = "[F]ormat buffer",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||
}
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
-- python = { "isort", "black" },
|
||||
--
|
||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||
-- is found.
|
||||
typescript = { "prettier" },
|
||||
javascript = { "prettier" },
|
||||
},
|
||||
},
|
||||
}
|
29
.config/nvim/lua/goodhumored/editing/clipboard-image.lua
Normal file
29
.config/nvim/lua/goodhumored/editing/clipboard-image.lua
Normal file
@ -0,0 +1,29 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ ekickx/clipboard-image.nvim │
|
||||
-- │ paste images into markdown │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return {
|
||||
"postfen/clipboard-image.nvim",
|
||||
config = function()
|
||||
require("clipboard-image").setup({
|
||||
default = {
|
||||
img_name = function()
|
||||
vim.fn.inputsave()
|
||||
local name = vim.fn.input("Name: ")
|
||||
vim.fn.inputrestore()
|
||||
if name == nil or name == "" then
|
||||
name = os.date("%d-%m-%y-%H:%M:%S")
|
||||
end
|
||||
return name
|
||||
end,
|
||||
img_handler = function(img)
|
||||
vim.cmd("normal! f[") -- go to [
|
||||
vim.cmd("normal! a" .. img.name) -- append text with image name
|
||||
end,
|
||||
|
||||
img_dir = { "%:p:h", "img" },
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<leader>pi", "<cmd>PasteImg<CR>", { desc = "[P]aste [I]mage" })
|
||||
end,
|
||||
}
|
17
.config/nvim/lua/goodhumored/editing/color-picker.lua
Normal file
17
.config/nvim/lua/goodhumored/editing/color-picker.lua
Normal file
@ -0,0 +1,17 @@
|
||||
return {
|
||||
"uga-rosa/ccc.nvim",
|
||||
config = function()
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
local ccc = require("ccc")
|
||||
|
||||
ccc.setup({
|
||||
-- Your preferred settings
|
||||
-- Example: enable highlighter
|
||||
highlighter = {
|
||||
auto_enable = true,
|
||||
lsp = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
8
.config/nvim/lua/goodhumored/editing/comment-blocks.lua
Normal file
8
.config/nvim/lua/goodhumored/editing/comment-blocks.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"LudoPinelli/comment-box.nvim",
|
||||
config = function()
|
||||
vim.keymap.set({ "n", "v" }, "gcb", "<cmd>CBccbox<CR>", { desc = "[C]omment [B]lock" })
|
||||
vim.keymap.set({ "n", "v" }, "gcl", "<cmd>CBccline<CR>", { desc = "[C]omment [L]ine" })
|
||||
vim.keymap.set({ "n", "v" }, "gc-", "<cmd>CBline<CR>", { desc = "[C]omment Simple [L]ine" })
|
||||
end,
|
||||
}
|
3
.config/nvim/lua/goodhumored/editing/conflict-marker.lua
Normal file
3
.config/nvim/lua/goodhumored/editing/conflict-marker.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"rhysd/conflict-marker.vim",
|
||||
}
|
27
.config/nvim/lua/goodhumored/editing/easytables.lua
Normal file
27
.config/nvim/lua/goodhumored/editing/easytables.lua
Normal file
@ -0,0 +1,27 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Myzel394/easytables.nvim │
|
||||
-- │ plugin for easy work with markdown tables │
|
||||
-- │ https://github.com/Myzel394/easytables.nvim │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
-- #### Inserting a new table
|
||||
--
|
||||
-- Go to the place where you want to insert your table and either call:
|
||||
--
|
||||
-- * `:EasyTablesCreateNew <width>x<height>` - Creates a new table with `<width>` columns and `<height>` rows
|
||||
-- * `:EasyTablesCreateNew <width>` - Creates a square table with the size of `<width>` (eg. `:EasyTablesCreateNew 5` -> Creates a `5x5` table)
|
||||
-- * `:EasyTablesCreateNew <width>x` - Creates a table with `<width>` columns and **one** row
|
||||
-- * `:EasyTablesCreateNew x<height>` - Creates a table with **one** column and `<height>` rows
|
||||
--
|
||||
-- #### Editing an existing table
|
||||
--
|
||||
-- Go to your table (doesn't matter where, can be at a border or inside a cell) and type:
|
||||
--
|
||||
-- `:EasyTablesImportThisTable`
|
||||
return {
|
||||
"Myzel394/easytables.nvim",
|
||||
config = function()
|
||||
require("easytables").setup({
|
||||
-- Your configuration comes here
|
||||
})
|
||||
end,
|
||||
}
|
12
.config/nvim/lua/goodhumored/editing/mini-nvim.lua
Normal file
12
.config/nvim/lua/goodhumored/editing/mini-nvim.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return { -- Collection of various small independent plugins/modules
|
||||
"echasnovski/mini.nvim",
|
||||
config = function()
|
||||
-- Better Around/Inside textobjects
|
||||
--
|
||||
-- Examples:
|
||||
-- - va) - [V]isually select [A]round [)]paren
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require("mini.ai").setup({ n_lines = 500 })
|
||||
end,
|
||||
}
|
18
.config/nvim/lua/goodhumored/editing/nvim-surround.lua
Normal file
18
.config/nvim/lua/goodhumored/editing/nvim-surround.lua
Normal file
@ -0,0 +1,18 @@
|
||||
return {
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local surround = require("nvim-surround")
|
||||
surround.setup({
|
||||
aliases = {
|
||||
["a"] = ">",
|
||||
["b"] = ")",
|
||||
["B"] = "}",
|
||||
["r"] = "]",
|
||||
["q"] = { '"', "'", "`" },
|
||||
["s"] = { "}", "]", ")", ">", '"', "'", "`" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
53
.config/nvim/lua/goodhumored/editing/snippets/code-snippets
Normal file
53
.config/nvim/lua/goodhumored/editing/snippets/code-snippets
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"private readonly ...": {
|
||||
"scope": "typescript",
|
||||
"prefix": "prr",
|
||||
"body": [
|
||||
"private readonly _${1:name}: ${2:Type}"
|
||||
]
|
||||
},
|
||||
"props": {
|
||||
"scope": "typescriptreact",
|
||||
"prefix": "props",
|
||||
"body": [
|
||||
"{ className }: { className?: string }"
|
||||
]
|
||||
},
|
||||
"prop": {
|
||||
"scope": "typescript",
|
||||
"prefix": "prop",
|
||||
"body": [
|
||||
"private _${1:name}: ${3:Type}",
|
||||
"get${2:Name}(): ${3:Type} {",
|
||||
" return this._${1:name}",
|
||||
"}",
|
||||
"set${2:Name}(${1:name}: ${3:Type}) {",
|
||||
" this._${1:name} = ${1:name}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"roprop": {
|
||||
"scope": "typescript",
|
||||
"prefix": "ro",
|
||||
"body": [
|
||||
"private readonly _${1:name}: ${3:Type};",
|
||||
"get${2:Name}(): ${3:Type} {",
|
||||
" return this._${1:name}",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"vs": {
|
||||
"scope": "typescript",
|
||||
"prefix": "vs",
|
||||
"body": [
|
||||
"vi.spyOn(${1:class}, \"${2:method}\")${3:.mock$4};"
|
||||
]
|
||||
},
|
||||
"faker lorem word": {
|
||||
"scope": "typescript",
|
||||
"prefix": "flw",
|
||||
"body": [
|
||||
"faker.lorem.word();"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
return { "rafamadriz/friendly-snippets" }
|
12
.config/nvim/lua/goodhumored/editing/snippets/luasnip.lua
Normal file
12
.config/nvim/lua/goodhumored/editing/snippets/luasnip.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "v2.*",
|
||||
build = "make install_jsregexp",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").load({
|
||||
paths = {
|
||||
"~/.config/nvim/luasnippets",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
26
.config/nvim/lua/goodhumored/editing/spider.lua
Normal file
26
.config/nvim/lua/goodhumored/editing/spider.lua
Normal file
@ -0,0 +1,26 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ chrisgrieser/nvim-spider │
|
||||
-- │ ------------ │
|
||||
-- │ Replaces word jump mappings to improve horizontal │
|
||||
-- │ navigation │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return {
|
||||
"chrisgrieser/nvim-spider",
|
||||
keys = {
|
||||
{
|
||||
"<M-e>",
|
||||
"<cmd>lua require('spider').motion('e')<CR>",
|
||||
mode = { "n", "o", "x" },
|
||||
},
|
||||
{
|
||||
"<M-w>",
|
||||
"<cmd>lua require('spider').motion('w')<CR>",
|
||||
mode = { "n", "o", "x" },
|
||||
},
|
||||
{
|
||||
"<M-b>",
|
||||
"<cmd>lua require('spider').motion('b')<CR>",
|
||||
mode = { "n", "o", "x" },
|
||||
},
|
||||
},
|
||||
}
|
3
.config/nvim/lua/goodhumored/editing/vim-sleuth.lua
Normal file
3
.config/nvim/lua/goodhumored/editing/vim-sleuth.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically
|
||||
}
|
32
.config/nvim/lua/goodhumored/editing/visual-multi.lua
Normal file
32
.config/nvim/lua/goodhumored/editing/visual-multi.lua
Normal file
@ -0,0 +1,32 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Vvim visual multi │
|
||||
-- │ multi cursor vscode like │
|
||||
-- │ https://github.com/mg979/vim-visual-multi │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
-- Basic usage:
|
||||
--
|
||||
-- select words with Ctrl-N (like Ctrl-d in Sublime Text/VS Code)
|
||||
-- create cursors vertically with Ctrl-Down/Ctrl-Up
|
||||
-- select one character at a time with Shift-Arrows
|
||||
-- press n/N to get next/previous occurrence
|
||||
-- press [/] to select next/previous cursor
|
||||
-- press q to skip current and get next occurrence
|
||||
-- press Q to remove current cursor/selection
|
||||
-- start insert mode with i,a,I,A
|
||||
--
|
||||
-- Two main modes:
|
||||
--
|
||||
-- in cursor mode commands work as they would in normal mode
|
||||
-- in extend mode commands work as they would in visual mode
|
||||
-- press Tab to switch between «cursor» and «extend» mode
|
||||
--
|
||||
-- Most vim commands work as expected (motions, r to replace characters, ~ to change case, etc). Additionally you can:
|
||||
--
|
||||
-- run macros/ex/normal commands at cursors
|
||||
-- align cursors
|
||||
-- transpose selections
|
||||
-- add patterns with regex, or from visual mode
|
||||
--
|
||||
return {
|
||||
"mg979/vim-visual-multi",
|
||||
}
|
6
.config/nvim/lua/goodhumored/init.lua
Normal file
6
.config/nvim/lua/goodhumored/init.lua
Normal file
@ -0,0 +1,6 @@
|
||||
require("goodhumored.common-vim-settings")
|
||||
require("goodhumored.common-bindings")
|
||||
require("goodhumored.autocommands")
|
||||
require("goodhumored.lazy")
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
19
.config/nvim/lua/goodhumored/integrations/firevim.lua
Normal file
19
.config/nvim/lua/goodhumored/integrations/firevim.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return -- firenvim (firefox neovim extension)
|
||||
{
|
||||
"glacambre/firenvim",
|
||||
build = ":call firenvim#install(0)",
|
||||
config = function()
|
||||
vim.g.firenvim_config = {
|
||||
globalSettings = { alt = "all" },
|
||||
localSettings = {
|
||||
[".*"] = {
|
||||
cmdline = "neovim",
|
||||
content = "text",
|
||||
priority = 0,
|
||||
selector = "textarea",
|
||||
takeover = "never",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
107
.config/nvim/lua/goodhumored/integrations/leetcode.lua
Normal file
107
.config/nvim/lua/goodhumored/integrations/leetcode.lua
Normal file
@ -0,0 +1,107 @@
|
||||
local leet_arg = "leetcode.nvim"
|
||||
|
||||
return {
|
||||
"kawre/leetcode.nvim",
|
||||
build = ":TSUpdate html",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim", -- required by telescope
|
||||
"MunifTanjim/nui.nvim",
|
||||
|
||||
-- optional
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"rcarriga/nvim-notify",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
cmd = "Leet",
|
||||
lazy = leet_arg ~= vim.fn.argv()[1],
|
||||
opts = {
|
||||
---@type string
|
||||
arg = leet_arg,
|
||||
|
||||
---@type lc.lang
|
||||
lang = "golang",
|
||||
|
||||
cn = { -- leetcode.cn
|
||||
enabled = false, ---@type boolean
|
||||
translator = true, ---@type boolean
|
||||
translate_problems = true, ---@type boolean
|
||||
},
|
||||
|
||||
---@type lc.storage
|
||||
storage = {
|
||||
home = vim.fn.stdpath("data") .. "/leetcode",
|
||||
cache = vim.fn.stdpath("cache") .. "/leetcode",
|
||||
},
|
||||
|
||||
---@type table<string, boolean>
|
||||
plugins = {
|
||||
non_standalone = false,
|
||||
},
|
||||
|
||||
---@type boolean
|
||||
logging = true,
|
||||
|
||||
injector = {}, ---@type table<lc.lang, lc.inject>
|
||||
|
||||
cache = {
|
||||
update_interval = 60 * 60 * 24 * 7, ---@type integer 7 days
|
||||
},
|
||||
|
||||
console = {
|
||||
open_on_runcode = true, ---@type boolean
|
||||
|
||||
dir = "row", ---@type lc.direction
|
||||
|
||||
size = { ---@type lc.size
|
||||
width = "90%",
|
||||
height = "75%",
|
||||
},
|
||||
|
||||
result = {
|
||||
size = "60%", ---@type lc.size
|
||||
},
|
||||
|
||||
testcase = {
|
||||
virt_text = true, ---@type boolean
|
||||
|
||||
size = "40%", ---@type lc.size
|
||||
},
|
||||
},
|
||||
|
||||
description = {
|
||||
position = "left", ---@type lc.position
|
||||
|
||||
width = "40%", ---@type lc.size
|
||||
|
||||
show_stats = true, ---@type boolean
|
||||
},
|
||||
|
||||
hooks = {
|
||||
---@type fun()[]
|
||||
["enter"] = {},
|
||||
|
||||
---@type fun(question: lc.ui.Question)[]
|
||||
["question_enter"] = {},
|
||||
|
||||
---@type fun()[]
|
||||
["leave"] = {},
|
||||
},
|
||||
|
||||
keys = {
|
||||
toggle = { "q" }, ---@type string|string[]
|
||||
confirm = { "<CR>" }, ---@type string|string[]
|
||||
|
||||
reset_testcases = "r", ---@type string
|
||||
use_testcase = "U", ---@type string
|
||||
focus_testcases = "H", ---@type string
|
||||
focus_result = "L", ---@type string
|
||||
},
|
||||
|
||||
---@type lc.highlights
|
||||
theme = {},
|
||||
|
||||
---@type boolean
|
||||
image_support = false,
|
||||
},
|
||||
}
|
17
.config/nvim/lua/goodhumored/integrations/tmux.lua
Normal file
17
.config/nvim/lua/goodhumored/integrations/tmux.lua
Normal file
@ -0,0 +1,17 @@
|
||||
return {
|
||||
"https://github.com/christoomey/vim-tmux-navigator.git",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
}
|
12
.config/nvim/lua/goodhumored/languages/init.lua
Normal file
12
.config/nvim/lua/goodhumored/languages/init.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
plugins = {
|
||||
require("goodhumored.languages.latex.ltex"),
|
||||
require("goodhumored.languages.neorg.neorg"),
|
||||
-- require("goodhumored.languages.rust.rust.vim"),
|
||||
require("goodhumored.languages.rust.rust-tools"),
|
||||
require("goodhumored.languages.markdown.otter"),
|
||||
require("goodhumored.languages.markdown.markview"),
|
||||
require("goodhumored.languages.markdown.markdown-preview"),
|
||||
require("goodhumored.languages.plantuml.plantuml"),
|
||||
},
|
||||
}
|
45
.config/nvim/lua/goodhumored/languages/latex/ltex.lua
Normal file
45
.config/nvim/lua/goodhumored/languages/latex/ltex.lua
Normal file
@ -0,0 +1,45 @@
|
||||
return {
|
||||
"vigoux/ltex-ls.nvim",
|
||||
-- config = function()
|
||||
-- require("ltex-ls").setup({
|
||||
-- use_spellfile = false,
|
||||
-- filetypes = { "latex", "tex", "bib", "markdown", "gitcommit", "text" },
|
||||
-- settings = {
|
||||
-- ltex = {
|
||||
-- enabled = { "latex", "tex", "bib", "markdown" },
|
||||
-- language = "auto",
|
||||
-- diagnosticSeverity = "information",
|
||||
-- sentenceCacheSize = 2000,
|
||||
-- additionalRules = {
|
||||
-- enablePickyRules = true,
|
||||
-- motherTongue = "ru",
|
||||
-- },
|
||||
-- disabledRules = {},
|
||||
-- dictionary = (function()
|
||||
-- -- For dictionary, search for files in the runtime to have
|
||||
-- -- and include them as externals the format for them is
|
||||
-- -- dict/{LANG}.txt
|
||||
-- --
|
||||
-- -- Also add dict/default.txt to all of them
|
||||
-- local files = {}
|
||||
-- for _, file in ipairs(vim.api.nvim_get_runtime_file("dict/*", true)) do
|
||||
-- local lang = vim.fn.fnamemodify(file, ":t:r")
|
||||
-- local fullpath = vim.fs.normalize(file, ":p")
|
||||
-- files[lang] = { ":" .. fullpath }
|
||||
-- end
|
||||
--
|
||||
-- if files.default then
|
||||
-- for lang, _ in pairs(files) do
|
||||
-- if lang ~= "default" then
|
||||
-- vim.list_extend(files[lang], files.default)
|
||||
-- end
|
||||
-- end
|
||||
-- files.default = nil
|
||||
-- end
|
||||
-- return files
|
||||
-- end)(),
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
-- install with yarn or npm
|
||||
return
|
||||
-- install with yarn or npm
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
}
|
17
.config/nvim/lua/goodhumored/languages/markdown/markview.lua
Normal file
17
.config/nvim/lua/goodhumored/languages/markdown/markview.lua
Normal file
@ -0,0 +1,17 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ markview │
|
||||
-- │ markdown beautifier │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
return {
|
||||
"OXY2DEV/markview.nvim",
|
||||
lazy = false, -- Recommended
|
||||
-- ft = "markdown" -- If you decide to lazy-load anyway
|
||||
|
||||
dependencies = {
|
||||
-- You will not need this if you installed the
|
||||
-- parsers manually
|
||||
-- Or if the parsers are in your $RUNTIMEPATH
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
}
|
14
.config/nvim/lua/goodhumored/languages/markdown/otter.lua
Normal file
14
.config/nvim/lua/goodhumored/languages/markdown/otter.lua
Normal file
@ -0,0 +1,14 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ jmbuhr/otter.nvim │
|
||||
-- │ adds completions, treesitter and lsp featurs to │
|
||||
-- │ markdown codeblocks │
|
||||
-- │ https://github.com/jmbuhr/otter.nvim │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
|
||||
return {
|
||||
"jmbuhr/otter.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {},
|
||||
}
|
79
.config/nvim/lua/goodhumored/languages/neorg/neorg.lua
Normal file
79
.config/nvim/lua/goodhumored/languages/neorg/neorg.lua
Normal file
@ -0,0 +1,79 @@
|
||||
return {
|
||||
"nvim-neorg/neorg",
|
||||
lazy = false,
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-neorg/lua-utils.nvim",
|
||||
"pysan3/pathlib.nvim",
|
||||
},
|
||||
config = function()
|
||||
local neorg = require("neorg")
|
||||
neorg.setup({
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.concealer"] = {},
|
||||
["core.integrations.image"] = {},
|
||||
["core.latex.renderer"] = {},
|
||||
["core.export"] = {
|
||||
config = { -- Note that this table is optional and doesn't need to be provided
|
||||
-- Configuration here
|
||||
},
|
||||
},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
notes = "~/notes",
|
||||
uni = "~/Uni",
|
||||
dipal = "~/Job/dipal/notes",
|
||||
side = "~/side-hustle/notes",
|
||||
},
|
||||
default_workspace = "notes",
|
||||
open_last_workspace = true,
|
||||
},
|
||||
},
|
||||
["core.qol.toc"] = {
|
||||
config = {
|
||||
close_split_on_jump = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
neorg.modules.get_module("core.dirman").set_closest_workspace_match()
|
||||
|
||||
vim.wo.foldlevel = 99
|
||||
vim.wo.conceallevel = 2
|
||||
end,
|
||||
|
||||
keys = {
|
||||
{
|
||||
"<leader>nw",
|
||||
":Neorg workspace ",
|
||||
desc = "[N]eorg [W]orkspaces",
|
||||
},
|
||||
{
|
||||
"<leader>nj",
|
||||
":Neorg journal<CR>",
|
||||
desc = "[N]eorg [J]ournal",
|
||||
},
|
||||
{
|
||||
"<leader>ni",
|
||||
":Neorg index<CR>",
|
||||
desc = "[N]eorg [I]ndex",
|
||||
},
|
||||
{
|
||||
"<leader>nT",
|
||||
":Neorg toc qflist<CR>",
|
||||
desc = "[N]eorg [T]able of contents",
|
||||
},
|
||||
{
|
||||
"<leader>nr",
|
||||
":Neorg return<CR>",
|
||||
desc = "[N]eorg [R]eturn",
|
||||
},
|
||||
{
|
||||
"<leader>tl",
|
||||
":Neorg render-latex<CR>",
|
||||
desc = "[N]eorg [L]atex",
|
||||
},
|
||||
},
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
return {
|
||||
"3rd/diagram.nvim",
|
||||
dependencies = {
|
||||
"3rd/image.nvim",
|
||||
},
|
||||
opts = { -- you can just pass {}, defaults below
|
||||
renderer_options = {
|
||||
plantuml = {
|
||||
charset = "utf-8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
return {
|
||||
"https://gitlab.com/itaranto/plantuml.nvim",
|
||||
version = "*",
|
||||
config = function()
|
||||
require("plantuml").setup()
|
||||
end,
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user