Compare commits
8 Commits
wip
...
94fc8c036c
| Author | SHA1 | Date | |
|---|---|---|---|
| 94fc8c036c | |||
| 84d26c68a5 | |||
| d03dda4979 | |||
| 5464d111d0 | |||
| bd15a7b443 | |||
| 2024651e33 | |||
| ff66a92104 | |||
| 7fef9a8760 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,11 +4,9 @@ shell/.config/zsh/plugins/zsh-syntax-highlighting
|
|||||||
shell/.config/zsh/plugins/zsh-vi-mode
|
shell/.config/zsh/plugins/zsh-vi-mode
|
||||||
qtile/.config/qtile/theme.txt
|
qtile/.config/qtile/theme.txt
|
||||||
lupan-clock/lupan-clock
|
lupan-clock/lupan-clock
|
||||||
lupan-clock/stdout-clock
|
|
||||||
lupan-wm/target
|
lupan-wm/target
|
||||||
*~
|
*~
|
||||||
__pycache__
|
__pycache__
|
||||||
/dwm
|
/dwm
|
||||||
/st
|
/st
|
||||||
/vis/.config/vis/plugins/
|
/vis/.config/vis/plugins/
|
||||||
/tools/.local/bin/
|
|
||||||
|
|||||||
20
Makefile
20
Makefile
@@ -1,7 +1,7 @@
|
|||||||
all:
|
all:
|
||||||
@echo "run: make clone build install"
|
@echo "run: make clone build install"
|
||||||
|
|
||||||
clone: dwm st
|
clone: ~/.local/share/zap dwm st
|
||||||
|
|
||||||
build: build-dwm build-st build-lupan-clock
|
build: build-dwm build-st build-lupan-clock
|
||||||
|
|
||||||
@@ -14,38 +14,32 @@ install: install-dwm install-st install-lupan-clock install-other
|
|||||||
|
|
||||||
dwm:
|
dwm:
|
||||||
git clone https://git.suckless.org/dwm
|
git clone https://git.suckless.org/dwm
|
||||||
cd dwm && \
|
cp -i patches/dwm/config.h dwm/
|
||||||
git remote add lupan.pl https://gitea.lupan.pl/lupan/dwm.git && \
|
|
||||||
git fetch lupan.pl && \
|
|
||||||
git checkout -b wip --track lupan.pl/wip
|
|
||||||
|
|
||||||
build-dwm:
|
build-dwm:
|
||||||
make -C dwm
|
make -C dwm
|
||||||
|
|
||||||
install-dwm:
|
install-dwm:
|
||||||
make -C dwm install PREFIX="${HOME}/.local/stow/dwm"
|
make -C dwm install PREFIX="${HOME}/.local"
|
||||||
stow -d ~/.local/stow dwm
|
|
||||||
|
|
||||||
st:
|
st:
|
||||||
git clone https://git.suckless.org/st
|
git clone https://git.suckless.org/st
|
||||||
cd st && \
|
cd st && \
|
||||||
git remote add lupan.pl https://gitea.lupan.pl/lupan/st.git && \
|
git remote add lupan.pl https://gitea.lupan.pl/lupan/st.git && \
|
||||||
git fetch lupan.pl && \
|
git fetch lupan.pl && \
|
||||||
git checkout -b patched-5 --track lupan.pl/patched-5
|
git checkout -b patched --track lupan.pl/patched
|
||||||
|
|
||||||
build-st:
|
build-st:
|
||||||
make -C st
|
make -C st
|
||||||
|
|
||||||
install-st:
|
install-st:
|
||||||
make -C st install PREFIX="${HOME}/.local/stow/st"
|
make -C st install PREFIX="${HOME}/.local"
|
||||||
stow -d ~/.local/stow st
|
|
||||||
|
|
||||||
build-lupan-clock:
|
build-lupan-clock:
|
||||||
make -C lupan-clock
|
make -C lupan-clock
|
||||||
|
|
||||||
install-lupan-clock:
|
install-lupan-clock:
|
||||||
make -C lupan-clock install PREFIX="${HOME}/.local/stow/lupan-clock"
|
make -C lupan-clock install PREFIX="${HOME}/.local"
|
||||||
stow -d ~/.local/stow lupan-clock
|
|
||||||
|
|
||||||
install-other:
|
install-other:
|
||||||
stow -Rv lazygit shell tmux nvim vis xsession
|
stow -Rv shell tmux xsession nvim
|
||||||
|
|||||||
@@ -1,266 +0,0 @@
|
|||||||
# Session settings
|
|
||||||
# Name used for the default session
|
|
||||||
session = default
|
|
||||||
# Key press used to detatch from a session. Typically a Control key specified
|
|
||||||
# with prefix C-, for example C-\ for Control-backslash. Single keys are also
|
|
||||||
# allowed but not Meta (M-) keys.
|
|
||||||
detach_key = C-\
|
|
||||||
|
|
||||||
# Application Theming
|
|
||||||
# Colors are specified as -1 for default, 0-7 for standard, 8-15 for bright,
|
|
||||||
# 16-231 for extended, 232-255 for gray scale, 0xRRGGBB for 24-bit RGB colors,
|
|
||||||
# or you can use any of the X11 or Web Color Names. One or more comma separated
|
|
||||||
# font attributes may optionally be specified: bold, italic, reverse, strike,
|
|
||||||
# and blink. The attributes may also optionally include one of three underline
|
|
||||||
# types single, double, or curly.
|
|
||||||
include = theme_blue.ini
|
|
||||||
#statusbar_attr = white 0x5F636A
|
|
||||||
#tag_unoccupied = white 0x5F636A
|
|
||||||
#titlebar_unselected = white 0x004C6C
|
|
||||||
titlebar_unselected = 0x808080 0x000000
|
|
||||||
#tag_occupied = white 0x004C6C
|
|
||||||
#tag_urgent = white 0x004C6C bold,blink
|
|
||||||
#titlebar_selected = white 0x00AEEF
|
|
||||||
titlebar_selected = white 0x004C6C
|
|
||||||
#tag_selected = white 0x00AEEF bold
|
|
||||||
# Read only settings are overlayed onto the three titlebar settings above. Set
|
|
||||||
# either fg or bg to -1 to retain that titlebar setting. Any specified
|
|
||||||
# attributes are combined with those from above. These must be in this order
|
|
||||||
# and must be after all other titlebar definitions!
|
|
||||||
#titlebar_urgent = 0xE7DDB4 -1 blink
|
|
||||||
#titlebar_readonly = 0xA56815 -1 bold,italic
|
|
||||||
|
|
||||||
# Define up to 9 alphanumeric tag names, how they will be displayed on the
|
|
||||||
# status bar, and the types of colors and font attributes.
|
|
||||||
tagnames = 1 2 3 4 5 6 7 8 9
|
|
||||||
#tagnames = play dev test stage prod
|
|
||||||
tag_printf = " %s "
|
|
||||||
# Number of lines saved for each terminal's scroll back history
|
|
||||||
scroll_history = 5000
|
|
||||||
# The size of the layout zoom area is a number from .1 to .9, and the number of
|
|
||||||
# terminals in the zoom area is a number 1 or more.
|
|
||||||
zoomsize = .5
|
|
||||||
zoomnum = 1
|
|
||||||
|
|
||||||
# Specify one or more status bar commands to cycle through at the given number
|
|
||||||
# of interval seconds. Set interval to 0 to have the command run once and not
|
|
||||||
# refresh. Set interval to -1 to not have any status bar text.
|
|
||||||
statusbar_cmd = date; echo " | a4/$A4_SESSION" $A4
|
|
||||||
statusbar_cmd = uptime; echo " | a4/$A4_SESSION" $A4
|
|
||||||
#statusbar_cmd = cat ~/.cache/status/statusbar.txt; echo ' | a4' $A4
|
|
||||||
statusbar_interval = 10
|
|
||||||
statusbar_display = true
|
|
||||||
statusbar_top = true
|
|
||||||
#statusbar_begin = [
|
|
||||||
#statusbar_end = ]
|
|
||||||
|
|
||||||
# The terminal cursor can be set to visible or hidden, blinking or solid, and
|
|
||||||
# the shape can be 1-block, 2-underline, or 3-bar.
|
|
||||||
cursorvis = true
|
|
||||||
cursorblink = true
|
|
||||||
cursorshape = 1
|
|
||||||
|
|
||||||
# Any number of actions assigned to the optional special keyword "startup" are
|
|
||||||
# run when a4 is started, in the order specified.
|
|
||||||
#include = startup.ini
|
|
||||||
startup = create
|
|
||||||
#startup = view 2
|
|
||||||
#startup = create
|
|
||||||
#startup = keysequence ssh example.com\n
|
|
||||||
|
|
||||||
[Layouts]
|
|
||||||
# Layout symbol string in the status bar. First layout is the default. Order
|
|
||||||
# determines layout toggle cycle.
|
|
||||||
zoom_left = " │├┤ "
|
|
||||||
zoom_right = " ├┤│ "
|
|
||||||
fullscreen = " │ │ "
|
|
||||||
grid = " ├┼┤ "
|
|
||||||
columns = " │││ "
|
|
||||||
rows = " ─── "
|
|
||||||
zoom_top = " ├┬┤ "
|
|
||||||
zoom_bottom = " ├┴┤ "
|
|
||||||
|
|
||||||
[KeyboardActions]
|
|
||||||
# Keyboard actions have a key combination of no more than three keys assigned
|
|
||||||
# to them. A key can be raw or can include modifiers Meta or Alt, M-, Control,
|
|
||||||
# C-, Shift, S-, or with combinations of those. Any modifier keys must be put
|
|
||||||
# in the order of M-C-S-. Two special keys that must be fully spelled out are
|
|
||||||
# "Space" and "Hyphen".
|
|
||||||
C-g c = create
|
|
||||||
C-g x x = destroy
|
|
||||||
C-g Enter = zoom
|
|
||||||
C-g . = minimize
|
|
||||||
C-g q q = quit
|
|
||||||
C-g C-l = redraw
|
|
||||||
C-g s = statusbar vis
|
|
||||||
C-g S = statusbar pos
|
|
||||||
|
|
||||||
# The four actions view, tag, viewtoggle, and tagtoggle each take tag name as a
|
|
||||||
# parameter. You can use the special '#' character as a shortcut to assign
|
|
||||||
# mappings for up to 9 digits to the list of tag names. For the key
|
|
||||||
# combination, the last occurrence of '#' is replaced with the digit 'n' and
|
|
||||||
# then the 'nth' tag name is passed as the action parameter. For example,
|
|
||||||
# "C-g # F# = view #" expands to "C-g F1 = view 1", "C-g F2 = view 2", ....
|
|
||||||
C-g v # = view #
|
|
||||||
C-g F# = view #
|
|
||||||
C-g t # = tag #
|
|
||||||
C-g V # = viewtoggle #
|
|
||||||
C-g T # = tagtoggle #
|
|
||||||
|
|
||||||
C-g v 0 = view _all
|
|
||||||
C-g v Tab = view _swap
|
|
||||||
C-g t 0 = tag _all
|
|
||||||
|
|
||||||
# The focus action takes several possible parameters, including window number.
|
|
||||||
# You can use the special '#' character as a shortcut to assign mappings for
|
|
||||||
# all digits 1-9. in the key combination and the action parameter to assign
|
|
||||||
# that combo/action pairing to digits 1-9. For the key combination, the last
|
|
||||||
# occurrence of '#' is replaced with the digit 'n' and the same digit 'n' is
|
|
||||||
# passed as the action parameter. For example, "C-g # = focus #" is expanded
|
|
||||||
# out to "C-g 1 = focus 1", "C-g 2 = focus 2", ....
|
|
||||||
C-g # = focus #
|
|
||||||
|
|
||||||
C-g j = focus next
|
|
||||||
C-g C-j = focus NEXT
|
|
||||||
C-g k = focus prev
|
|
||||||
C-g C-k = focus PREV
|
|
||||||
C-g Tab = focus swap
|
|
||||||
C-g H = focus left
|
|
||||||
C-g J = focus down
|
|
||||||
C-g K = focus up
|
|
||||||
C-g L = focus right
|
|
||||||
C-g ) = focus group
|
|
||||||
C-g 0 = focus groupall
|
|
||||||
C-g * = readonly
|
|
||||||
|
|
||||||
C-a # = view #
|
|
||||||
|
|
||||||
C-a f = layout fullscreen
|
|
||||||
C-a g = layout grid
|
|
||||||
C-a h = layout zoom_left
|
|
||||||
C-a j = layout zoom_bottom
|
|
||||||
C-a k = layout zoom_top
|
|
||||||
C-a l = layout zoom_right
|
|
||||||
C-a c = layout columns
|
|
||||||
C-a r = layout rows
|
|
||||||
# Cycle through all layouts in order listed in the [Layouts] section
|
|
||||||
C-a Space = layout +1
|
|
||||||
C-a C-Space = layout -1
|
|
||||||
C-a Tab = layout swap
|
|
||||||
|
|
||||||
C-a i = zoomnum +1
|
|
||||||
C-a d = zoomnum -1
|
|
||||||
C-a I = zoomsize +.05
|
|
||||||
C-a D = zoomsize -.05
|
|
||||||
|
|
||||||
S-PageUp = scrollback .5
|
|
||||||
S-PageDown = scrollback -.5
|
|
||||||
C-g PageUp = scrollback 1.0
|
|
||||||
C-g PageDown = scrollback -1.0
|
|
||||||
|
|
||||||
# Specify ANSI escape or other key sequence overrides
|
|
||||||
#include = vt220.ini
|
|
||||||
#Home = keysequence \e[1~
|
|
||||||
#End = keysequence \e[4~
|
|
||||||
#C-g Space = keysequence Hello world!
|
|
||||||
|
|
||||||
[MouseTermwinActions]
|
|
||||||
click-1 = focus
|
|
||||||
C-click-1 = zoom
|
|
||||||
click-3 = focus group
|
|
||||||
C-click-3 = focus 0
|
|
||||||
wheel-up = scrollback 3
|
|
||||||
wheel-dn = scrollback -3
|
|
||||||
S-wheel-up = scrollback 0.5
|
|
||||||
S-wheel-dn = scrollback -0.5
|
|
||||||
C-wheel-up = scrollback 1.0
|
|
||||||
C-wheel-dn = scrollback -1.0
|
|
||||||
|
|
||||||
[MouseTitlebarActions]
|
|
||||||
click-1 = minimize
|
|
||||||
click-3 = readonly
|
|
||||||
|
|
||||||
[MouseTagNamesActions]
|
|
||||||
click-1 = view
|
|
||||||
C-click-1 = viewtoggle
|
|
||||||
click-3 = tag
|
|
||||||
C-click-3 = tagtoggle
|
|
||||||
|
|
||||||
[MouseLayoutSymbolActions]
|
|
||||||
click-1 = layout +1
|
|
||||||
click-3 = layout -1
|
|
||||||
C-click-1 = zoomnum +1
|
|
||||||
C-click-3 = zoomnum -1
|
|
||||||
M-C-click-1 = zoomsize +.05
|
|
||||||
M-C-click-3 = zoomsize -.05
|
|
||||||
|
|
||||||
[MouseStatusTextActions]
|
|
||||||
click-1 = statusbar next
|
|
||||||
|
|
||||||
[MouseFrameLinesActions]
|
|
||||||
click-1 = layout fullscreen
|
|
||||||
|
|
||||||
# Terminals typically have a default foreground (fg) color, background (bg)
|
|
||||||
# color, and 16 standard colors that are used by terminal applications. They
|
|
||||||
# can also define color numbers up to 255, but the are used less often. In a4,
|
|
||||||
# you can define ColorSchemes that are then applied to terminal windows
|
|
||||||
# dynamically by comparing the terminal's title text to defined ColorRules (see
|
|
||||||
# below). The first defined ColorScheme is used by default for all windows.
|
|
||||||
# (The cursor color is not yet implemented.)
|
|
||||||
#include = cs_gruvbox.ini
|
|
||||||
#include = cs_solarized.ini
|
|
||||||
#include = cs_redsands.ini
|
|
||||||
#include = cs_fairyfloss.ini
|
|
||||||
#include = cs_kokuban.ini
|
|
||||||
#include = cs_frontend_fun_forrest.ini
|
|
||||||
#include = cs_seafoam_pastel.ini
|
|
||||||
[ColorScheme Basic]
|
|
||||||
fg = 7
|
|
||||||
bg = 0
|
|
||||||
#color123 = DarkOrange1
|
|
||||||
|
|
||||||
[ColorScheme BasicRed]
|
|
||||||
fg = 0
|
|
||||||
bg = 1
|
|
||||||
|
|
||||||
[ColorScheme Red160]
|
|
||||||
fg = 232
|
|
||||||
bg = 160
|
|
||||||
|
|
||||||
[ColorScheme Crimson]
|
|
||||||
fg = MidnightBlue
|
|
||||||
bg = Crimson
|
|
||||||
|
|
||||||
[colorscheme RedSands]
|
|
||||||
color00 = 0x000000
|
|
||||||
color01 = 0xff3f00
|
|
||||||
color02 = 0x00bb00
|
|
||||||
color03 = 0xe7b000
|
|
||||||
color04 = 0x0072ff
|
|
||||||
color05 = 0xbb00bb
|
|
||||||
color06 = 0x00bbbb
|
|
||||||
color07 = 0xbbbbbb
|
|
||||||
color08 = 0x555555
|
|
||||||
color09 = 0xbb0000
|
|
||||||
color10 = 0x00bb00
|
|
||||||
color11 = 0xe7b000
|
|
||||||
color12 = 0x0072ae
|
|
||||||
color13 = 0xff55ff
|
|
||||||
color14 = 0x55ffff
|
|
||||||
color15 = 0xffffff
|
|
||||||
fg = 0xd7c9a7
|
|
||||||
bg = 0x7a251e
|
|
||||||
cursor = 0xd7c9a7
|
|
||||||
|
|
||||||
# Color rules pair text with a colorscheme. A terminal window's title bar text
|
|
||||||
# is compared with each ColorRule text, in the order specified, until one
|
|
||||||
# matches, and then that colorscheme is applied to the terminal. If none of the
|
|
||||||
# rules match, then the first colorscheme defined in a4.ini is used.
|
|
||||||
# <pattern> = <colorscheme name> [<fg color|-1> [<bg color>]]
|
|
||||||
#[ColorRules]
|
|
||||||
#root@appdev.com = FairyFloss red
|
|
||||||
#@appdev.com = FairyFloss
|
|
||||||
#root@appprd = redsands red
|
|
||||||
#appprd = redsands
|
|
||||||
#root@appprddr = redsands red 0x521914
|
|
||||||
#appprddr = redsands -1 0x521914
|
|
||||||
@@ -8,10 +8,10 @@ TERM = "xterm-256color"
|
|||||||
size = 10
|
size = 10
|
||||||
|
|
||||||
[font.bold]
|
[font.bold]
|
||||||
family = "HurmitNerdFont"
|
family = "Fira Code Nerd Font"
|
||||||
|
|
||||||
[font.normal]
|
[font.normal]
|
||||||
family = "HurmitNerdFont"
|
family = "Fira Code Nerd Font"
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
import = ["~/.config/alacritty/dark.toml"]
|
import = ["~/.config/alacritty/dark.toml"]
|
||||||
|
|||||||
@@ -1,158 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
wlr-randr --output DP-1 --mode 3840x2160 --scale 2
|
|
||||||
wlr-randr --output HDMI-A-1 --mode 3840x2160 --scale 2 --left-of DP-1
|
|
||||||
|
|
||||||
foot --server &
|
|
||||||
|
|
||||||
argenctl config set label-mode modifier
|
|
||||||
|
|
||||||
# Terminal
|
|
||||||
#argenctl binding set normal Super Return sh "kitty --single-instance --instance-group default"
|
|
||||||
argenctl binding set normal Super Return sh "
|
|
||||||
if [ -e ~/.lightmode ]; then
|
|
||||||
exec footclient -o initial-color-theme=light
|
|
||||||
else
|
|
||||||
exec footclient -o initial-color-theme=dark
|
|
||||||
fi
|
|
||||||
"
|
|
||||||
|
|
||||||
# Reload config
|
|
||||||
argenctl binding set normal Super+Shift R exec "$0"
|
|
||||||
|
|
||||||
argenctl binding set normal Super P exec fuzzel
|
|
||||||
argenctl binding set normal Super+Shift L exec waylock
|
|
||||||
argenctl binding set normal Super+Shift T sh "lupan-set-theme toggle"
|
|
||||||
|
|
||||||
# Window focus and swap
|
|
||||||
argenctl binding set normal Super J window focus next
|
|
||||||
argenctl binding set normal Super K window focus prev
|
|
||||||
argenctl binding set normal Super+Shift J window swap next
|
|
||||||
argenctl binding set normal Super+Shift K window swap prev
|
|
||||||
|
|
||||||
argenctl binding set normal Super F window fullscreen
|
|
||||||
argenctl binding set normal Super W window float
|
|
||||||
|
|
||||||
argenctl binding set normal Super+Shift C window close
|
|
||||||
argenctl binding set normal Super+Shift X window detach
|
|
||||||
|
|
||||||
# Output focus and send
|
|
||||||
argenctl binding set normal Super Period output focus next
|
|
||||||
argenctl binding set normal Super Comma output focus prev
|
|
||||||
argenctl binding set normal Super+Shift Period window send next
|
|
||||||
argenctl binding set normal Super+Shift Comma window send prev
|
|
||||||
|
|
||||||
# Layout
|
|
||||||
argenctl binding set normal Super M layout switch monocle
|
|
||||||
argenctl binding set normal Super S layout switch stacktile
|
|
||||||
argenctl binding set normal Super H layout set primary-ratio -0.05
|
|
||||||
argenctl binding set normal Super L layout set primary-ratio +0.05
|
|
||||||
argenctl binding set normal Super+Control K layout set secondary-ratio -0.05
|
|
||||||
argenctl binding set normal Super+Control J layout set secondary-ratio +0.05
|
|
||||||
|
|
||||||
# Pointer
|
|
||||||
argenctl pointer-binding set normal Super BTN_LEFT move-window
|
|
||||||
argenctl pointer-binding set normal Super BTN_RIGHT resize-window
|
|
||||||
|
|
||||||
# Context
|
|
||||||
argenctl binding set normal Super+Shift+Control X context close
|
|
||||||
argenctl binding set normal Super Tab context switch --last
|
|
||||||
|
|
||||||
# Switch contexts interactively
|
|
||||||
argenctl binding set normal Super Space sh 'argenctl context switch "$(argenctl context list | fuzzel -d)"'
|
|
||||||
|
|
||||||
# Create new context interactively
|
|
||||||
argenctl binding set normal Super+Shift Space sh '
|
|
||||||
set -eu
|
|
||||||
prompt="$(fuzzel -dl0 -p"new > ")"
|
|
||||||
argenctl context new "$prompt"
|
|
||||||
'
|
|
||||||
|
|
||||||
# Rename current context interactively
|
|
||||||
argenctl binding set normal Super+Control Space sh '
|
|
||||||
set -eu
|
|
||||||
prompt="$(fuzzel -dl0 -p"rename > ")"
|
|
||||||
argenctl context rename "$prompt"
|
|
||||||
'
|
|
||||||
|
|
||||||
# Assign currently focused window to be toggled with Super U
|
|
||||||
argenctl binding set normal Super+Shift U sh '
|
|
||||||
set -eu
|
|
||||||
window_id=$(argenctl window list --json | jq -r ".[] | select(.focused) | .id")
|
|
||||||
argenctl binding set normal Super U window toggle $window_id
|
|
||||||
'
|
|
||||||
|
|
||||||
# Attach window interactively
|
|
||||||
argenctl binding set normal Super+Shift D sh '
|
|
||||||
set -eu
|
|
||||||
id=$(argenctl window list | fuzzel -d --with-nth 2 --accept-nth 1)
|
|
||||||
argenctl window attach "$id"
|
|
||||||
'
|
|
||||||
|
|
||||||
# Adopt all orphans
|
|
||||||
argenctl binding set normal Super+Control D sh '
|
|
||||||
argenctl window list --json | jq -r ".[] | select(.contexts | length == 0) | .id" | while read -r id; do
|
|
||||||
argenctl window attach "$id"
|
|
||||||
done
|
|
||||||
'
|
|
||||||
|
|
||||||
# Quit after confirmed with 'yes'
|
|
||||||
argenctl binding set normal Super+Shift Q sh '
|
|
||||||
set -eu
|
|
||||||
confirm="$(fuzzel -dl0 -p"quit? > ")"
|
|
||||||
if [ "$confirm" = yes ]; then
|
|
||||||
argenctl exit
|
|
||||||
fi
|
|
||||||
'
|
|
||||||
|
|
||||||
# Audio and brightness controls
|
|
||||||
VOL_DEC='wpctl set-volume @DEFAULT_SINK@ --limit 1.5 5%-'
|
|
||||||
VOL_INC='wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ --limit 1.5 5%+'
|
|
||||||
VOL_TOGGLE='wpctl set-mute @DEFAULT_SINK@ toggle'
|
|
||||||
for mode in normal locked; do
|
|
||||||
argenctl binding set $mode Super Bracketleft sh "$VOL_DEC"
|
|
||||||
argenctl binding set $mode Super Bracketright sh "$VOL_INC"
|
|
||||||
argenctl binding set $mode Super+Shift M sh "$VOL_TOGGLE"
|
|
||||||
argenctl binding set $mode None XF86AudioLowerVolume sh "$VOL_DEC"
|
|
||||||
argenctl binding set $mode None XF86AudioRaiseVolume sh "$VOL_INC"
|
|
||||||
argenctl binding set $mode None XF86AudioMute sh "$VOL_TOGGLE"
|
|
||||||
argenctl binding set $mode None XF86MonBrightnessDown sh "brightnessctl s 5%-"
|
|
||||||
argenctl binding set $mode None XF86MonBrightnessUp sh "brightnessctl s +5%"
|
|
||||||
argenctl binding set $mode Super+Shift Bracketleft sh "brightnessctl s 5%-"
|
|
||||||
argenctl binding set $mode Super+Shift Bracketright sh "brightnessctl s +5%"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Passthrough mode
|
|
||||||
argenctl mode declare passthrough
|
|
||||||
argenctl binding set normal Super Grave mode enter passthrough
|
|
||||||
argenctl binding set passthrough Super Grave mode enter normal
|
|
||||||
|
|
||||||
# Select/swap window by index
|
|
||||||
for num in 1 2 3 4 5 6 7 8 9; do
|
|
||||||
idx=$((num - 1))
|
|
||||||
argenctl binding set normal Super $num sh "
|
|
||||||
argenctl window focus \$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
|
|
||||||
"
|
|
||||||
argenctl binding set normal Super+Shift $num sh "
|
|
||||||
context_id=\$(argenctl context list --json | jq -r '.[] | select(.current) | .id')
|
|
||||||
length=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | length')
|
|
||||||
focused_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .focused_window')
|
|
||||||
dest_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
|
|
||||||
focused_output_id=\$(argenctl window list --json | jq -r \".[] | select(.id == \\\"\$focused_window\\\") | .contexts[] | select(.id = \$context_id) | .output_id\")
|
|
||||||
dest_output_id=\$(argenctl window list --json | jq -r \".[] | select(.id == \\\"\$dest_window\\\") | .contexts[] | select(.id = \$context_id) | .output_id\")
|
|
||||||
if [ -n \"\$focused_output_id\" -a \"\$focused_output_id\" = \"\$dest_output_id\" ]; then
|
|
||||||
for i in \$(seq \$length); do
|
|
||||||
if [ \"\$focused_window\" = \"\$dest_window\" ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
argenctl window swap next
|
|
||||||
dest_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
"
|
|
||||||
done
|
|
||||||
|
|
||||||
argenctl binding set normal Super+Shift S exec ~/.config/argen/session.sh
|
|
||||||
|
|
||||||
# Rules
|
|
||||||
argenctl rule add float --app-id "my-app"
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
id=$(for name in $(ls ~/.config/argen/sessions/*.sh); do echo $(basename "${name%.sh}"); done | fuzzel -d -p'session> ')
|
|
||||||
if argenctl context list | grep "^${id}\$"; then
|
|
||||||
argenctl context switch "${id}"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
argenctl context new "$id"
|
|
||||||
|
|
||||||
first=$(argenctl output list --json | jq -r 'min_by(80000 * .y + .x).id')
|
|
||||||
length=$(argenctl output list --json | jq -r 'length')
|
|
||||||
for n in $(seq $length); do
|
|
||||||
current=$(argenctl output list --json | jq -r '.[] | select(.focused).id')
|
|
||||||
if [ "$current" = "$first" ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
argenctl output focus next
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -e ~/.lightmode ]; then
|
|
||||||
THEME=light
|
|
||||||
else
|
|
||||||
THEME=dark
|
|
||||||
fi
|
|
||||||
export TERMINAL="footclient -o initial-color-theme=$THEME"
|
|
||||||
|
|
||||||
exec sh ~/.config/argen/sessions/"${id}.sh"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
argenctl output focus next
|
|
||||||
|
|
||||||
argenctl sh "$TERMINAL -D ~/dotfiles kak -s dotfiles"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
argenctl exec librewolf
|
|
||||||
|
|
||||||
sleep 1
|
|
||||||
argenctl output focus next
|
|
||||||
|
|
||||||
argenctl exec qutebrowser
|
|
||||||
@@ -54,12 +54,14 @@ end
|
|||||||
|
|
||||||
local function read_theme()
|
local function read_theme()
|
||||||
local theme = "theme_dark.lua"
|
local theme = "theme_dark.lua"
|
||||||
local f = io.open(os.getenv('HOME') .. '/.lightmode')
|
local f = io.open(os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
|
||||||
if f then
|
if f then
|
||||||
|
if string.find(f:read('*all'), 'light') then
|
||||||
theme = 'theme_light.lua'
|
theme = 'theme_light.lua'
|
||||||
f:close()
|
|
||||||
end
|
end
|
||||||
|
f:close()
|
||||||
return theme
|
return theme
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local theme = read_theme()
|
local theme = read_theme()
|
||||||
@@ -86,7 +88,7 @@ local function switch_theme()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
local terminal = "kitty --single-instance --instance-group default"
|
local terminal = "alacritty"
|
||||||
|
|
||||||
-- Default modkey.
|
-- Default modkey.
|
||||||
local modkey = "Mod4"
|
local modkey = "Mod4"
|
||||||
@@ -121,7 +123,7 @@ local mykeyboardlayout = awful.widget.keyboardlayout()
|
|||||||
|
|
||||||
-- {{{ Wibar
|
-- {{{ Wibar
|
||||||
-- Create a textclock widget
|
-- Create a textclock widget
|
||||||
local mytextclock = wibox.widget.textclock('%H:%M ')
|
local mytextclock = wibox.widget.textclock()
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
local taglist_buttons = gears.table.join(
|
local taglist_buttons = gears.table.join(
|
||||||
@@ -234,17 +236,6 @@ local function layout_menu()
|
|||||||
awful.menu(layouts):show()
|
awful.menu(layouts):show()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function focus_nth_window(n)
|
|
||||||
local cc = {}
|
|
||||||
for _, c in ipairs(client.get()) do
|
|
||||||
if awful.widget.tasklist.filter.currenttags(c, mouse.screen) then cc[#cc + 1] = c end
|
|
||||||
end
|
|
||||||
local new_focused = cc[n]
|
|
||||||
if new_focused then
|
|
||||||
client.focus = new_focused; new_focused:raise()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
local globalkeys = gears.table.join(
|
local globalkeys = gears.table.join(
|
||||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
@@ -296,7 +287,7 @@ local globalkeys = gears.table.join(
|
|||||||
{ description = "open a terminal", group = "launcher" }),
|
{ description = "open a terminal", group = "launcher" }),
|
||||||
awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
|
awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
|
||||||
{ description = "open a terminal", group = "launcher" }),
|
{ description = "open a terminal", group = "launcher" }),
|
||||||
awful.key({ modkey, "Control", "Shift" }, "t", switch_theme,
|
awful.key({ modkey, "Shift" }, "F6", switch_theme,
|
||||||
{ description = "switch theme", group = "launcher" }),
|
{ description = "switch theme", group = "launcher" }),
|
||||||
awful.key({ modkey, }, "q", awesome.restart,
|
awful.key({ modkey, }, "q", awesome.restart,
|
||||||
{ description = "reload awesome", group = "awesome" }),
|
{ description = "reload awesome", group = "awesome" }),
|
||||||
@@ -347,7 +338,7 @@ local globalkeys = gears.table.join(
|
|||||||
end,
|
end,
|
||||||
{ description = "lua execute prompt", group = "awesome" }),
|
{ description = "lua execute prompt", group = "awesome" }),
|
||||||
-- Menubar
|
-- Menubar
|
||||||
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'HurmitNerdFont:size=16'") end,
|
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'FiraCode Nerd Font Ret:size=10'") end,
|
||||||
{ description = "run command", group = "launcher" })
|
{ description = "run command", group = "launcher" })
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -377,11 +368,8 @@ local clientkeys = gears.table.join(
|
|||||||
{ description = "minimize", group = "client" }),
|
{ description = "minimize", group = "client" }),
|
||||||
awful.key({ modkey, }, "m",
|
awful.key({ modkey, }, "m",
|
||||||
function(c)
|
function(c)
|
||||||
if awful.layout.getname() == "max" then
|
c.maximized = not c.maximized
|
||||||
awful.layout.set(awful.layout.suit.tile)
|
c:raise()
|
||||||
else
|
|
||||||
awful.layout.set(awful.layout.suit.max)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
{ description = "(un)maximize", group = "client" }),
|
{ description = "(un)maximize", group = "client" }),
|
||||||
awful.key({ modkey, }, "v",
|
awful.key({ modkey, }, "v",
|
||||||
@@ -444,11 +432,7 @@ for i = 1, 9 do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{ description = "toggle focused client on tag #" .. i, group = "tag" }),
|
{ description = "toggle focused client on tag #" .. i, group = "tag" })
|
||||||
--- Focus nth window
|
|
||||||
awful.key({ "Control" }, "#" .. i + 9,
|
|
||||||
function() focus_nth_window(i) end,
|
|
||||||
{ description = "focus window index #" .. i, group = "client" })
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -484,8 +468,7 @@ awful.rules.rules = {
|
|||||||
keys = clientkeys,
|
keys = clientkeys,
|
||||||
buttons = clientbuttons,
|
buttons = clientbuttons,
|
||||||
screen = awful.screen.preferred,
|
screen = awful.screen.preferred,
|
||||||
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
|
placement = awful.placement.no_overlap + awful.placement.no_offscreen
|
||||||
size_hints_honor = false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -537,19 +520,6 @@ awful.rules.rules = {
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Signals
|
-- {{{ Signals
|
||||||
|
|
||||||
local function set_border_width(c)
|
|
||||||
local t = awful.screen.focused().selected_tag
|
|
||||||
if #t:clients() == 1 or t.layout.name == 'max' then
|
|
||||||
c = c or client.focus
|
|
||||||
c.border_width = 0
|
|
||||||
else
|
|
||||||
for _, cl in ipairs(t:clients()) do
|
|
||||||
cl.border_width = beautiful.border_width
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Signal function to execute when a new client appears.
|
-- Signal function to execute when a new client appears.
|
||||||
client.connect_signal("manage", function(c)
|
client.connect_signal("manage", function(c)
|
||||||
-- Set the windows at the slave,
|
-- Set the windows at the slave,
|
||||||
@@ -562,7 +532,6 @@ client.connect_signal("manage", function(c)
|
|||||||
-- Prevent clients from being unreachable after screen count changes.
|
-- Prevent clients from being unreachable after screen count changes.
|
||||||
awful.placement.no_offscreen(c)
|
awful.placement.no_offscreen(c)
|
||||||
end
|
end
|
||||||
set_border_width(c)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Enable sloppy focus, so that focus follows mouse.
|
-- Enable sloppy focus, so that focus follows mouse.
|
||||||
@@ -570,23 +539,6 @@ client.connect_signal("mouse::enter", function(c)
|
|||||||
c:emit_signal("request::activate", "mouse_enter", { raise = false })
|
c:emit_signal("request::activate", "mouse_enter", { raise = false })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- local function set_border(c)
|
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
-- local s = awful.screen.focused()
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
-- if c.maximized
|
|
||||||
-- or (#s.tiled_clients == 1 and not c.floating)
|
|
||||||
-- or (s.selected_tag and s.selected_tag.layout.name == 'max')
|
|
||||||
-- then
|
|
||||||
-- c.border_width = 0
|
|
||||||
-- else
|
|
||||||
-- c.border_width = beautiful.border_width
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
client.connect_signal("focus", function(c)
|
|
||||||
c.border_color = beautiful.border_focus
|
|
||||||
set_border_width(c)
|
|
||||||
end)
|
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal; end)
|
|
||||||
tag.connect_signal("property::layout", function() set_border_width(nil) end)
|
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|||||||
@@ -5,31 +5,30 @@ local dpi = xresources.apply_dpi
|
|||||||
|
|
||||||
local theme = {}
|
local theme = {}
|
||||||
|
|
||||||
theme.font = "HurmitNerdFont 10"
|
theme.font = "Fira Code Nerd Font 10"
|
||||||
theme.tasklist_disable_icon = true
|
theme.tasklist_disable_icon = true
|
||||||
theme.wibar_height = 30
|
theme.wibar_height = 30
|
||||||
|
|
||||||
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
|
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
|
||||||
theme.bg_focus = "#316781" -- hsl(200 45% 35%)
|
theme.bg_focus = "#478575" -- hsl(165deg 30% 40%)
|
||||||
theme.bg_urgent = "#814c31" -- hsl(20 45% 35%)
|
theme.bg_urgent = "#5c3d45" -- hsl(345deg 20% 30%)
|
||||||
theme.bg_minimize = "#454f54" -- hsl(200 10% 30%)
|
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
|
||||||
theme.bg_systray = theme.bg_normal
|
theme.bg_systray = theme.bg_normal
|
||||||
theme.tasklist_bg_focus = "#1c3b4a" -- hsl(200 45% 20%)
|
theme.tasklist_bg_focus = "#3d5c54" -- hsl(165deg 20% 30%)
|
||||||
|
|
||||||
theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
|
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
|
||||||
theme.fg_focus = "#abb5ba" -- hsl(200 10% 70%)
|
theme.fg_focus = "#b1babd"
|
||||||
theme.fg_urgent = theme.bg_focus
|
theme.fg_urgent = theme.bg_focus
|
||||||
theme.fg_minimize = theme.fg_normal
|
theme.fg_minimize = "#8a9294"
|
||||||
theme.taglist_fg_empty = "#454f54" -- hsl(200 10% 30%)
|
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
|
||||||
|
|
||||||
theme.gap_single_client = false
|
|
||||||
theme.useless_gap = dpi(1)
|
theme.useless_gap = dpi(1)
|
||||||
theme.border_width = dpi(2)
|
theme.border_width = dpi(2)
|
||||||
theme.border_normal = "#73848c" -- hsl(200 10% 50%)
|
theme.border_normal = "#708090"
|
||||||
theme.border_focus = "#b25e34" -- hsl(20 55% 45%)
|
theme.border_focus = "#a0522d"
|
||||||
theme.border_marked = "#3488b2" -- hsl(200 55% 45%)
|
theme.border_marked = "#91231c"
|
||||||
|
|
||||||
theme.bg_wallpaper = "#454f54" -- hsl(200 10% 30%)
|
theme.bg_wallpaper = "#424a4c"
|
||||||
|
|
||||||
theme.hotkeys_font = theme.font
|
theme.hotkeys_font = theme.font
|
||||||
theme.hotkeys_description_font = theme.font
|
theme.hotkeys_description_font = theme.font
|
||||||
|
|||||||
@@ -5,31 +5,30 @@ local dpi = xresources.apply_dpi
|
|||||||
|
|
||||||
local theme = {}
|
local theme = {}
|
||||||
|
|
||||||
theme.font = "HurmitNerdFont 10"
|
theme.font = "Fira Code Nerd Font 10"
|
||||||
theme.tasklist_disable_icon = true
|
theme.tasklist_disable_icon = true
|
||||||
theme.wibar_height = 30
|
theme.wibar_height = 30
|
||||||
|
|
||||||
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
|
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
|
||||||
theme.bg_focus = "#d0e3fb" -- hsl(214 85% 90%)
|
theme.bg_focus = "#a9d6ca" -- hsl(165deg 35% 75%)
|
||||||
theme.bg_urgent = "#f2d1a6" -- hsl(34 75% 80%)
|
theme.bg_urgent = "#bc8f9b" -- hsl(345deg 25% 65%)
|
||||||
theme.bg_minimize = "#8596ad" -- hsl(214 20% 60%)
|
theme.bg_minimize = "#62847b" -- hsl(165deg 15% 45%)
|
||||||
theme.bg_systray = theme.bg_normal
|
theme.bg_systray = theme.bg_normal
|
||||||
theme.tasklist_bg_focus = "#a6c7f2" -- hsl(214 75% 80%)
|
theme.tasklist_bg_focus = "#8fbcb1" -- hsl(165deg 25% 65%)
|
||||||
|
|
||||||
theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
|
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
|
||||||
theme.fg_focus = "#454b54" -- hsl(214 10% 30%)
|
theme.fg_focus = "#363d3e"
|
||||||
theme.fg_urgent = "#70675c" -- hsl(34 10% 40%)
|
theme.fg_urgent = "#e9f2f5"
|
||||||
theme.fg_minimize = "#70675c" -- hsl(34 10% 40%)
|
theme.fg_minimize = "#4b5456"
|
||||||
theme.taglist_fg_empty = theme.fg_minimize
|
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
|
||||||
|
|
||||||
theme.gap_single_client = false
|
|
||||||
theme.useless_gap = dpi(1)
|
theme.useless_gap = dpi(1)
|
||||||
theme.border_width = dpi(2)
|
theme.border_width = dpi(2)
|
||||||
theme.border_normal = theme.bg_minimize
|
theme.border_normal = "#bebebe"
|
||||||
theme.border_focus = "#df8c20" -- hsl(34 75% 50%)
|
theme.border_focus = "#ff7f50"
|
||||||
theme.border_marked = "#2073df" -- hsl(214 75% 50%)
|
theme.border_marked = "#91231c"
|
||||||
|
|
||||||
theme.bg_wallpaper = theme.fg_normal
|
theme.bg_wallpaper = "#b0bec2"
|
||||||
|
|
||||||
theme.hotkeys_font = theme.font
|
theme.hotkeys_font = theme.font
|
||||||
theme.hotkeys_description_font = theme.font
|
theme.hotkeys_description_font = theme.font
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
mkdir -p tools/.local/bin
|
|
||||||
|
|
||||||
uid=$(id -u):$(id -g)
|
|
||||||
|
|
||||||
go-install() {
|
|
||||||
echo "build $1"
|
|
||||||
docker exec -u "$uid" dotfiles-go go install -ldflags="-s -w" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
cargo-install() {
|
|
||||||
B="$1"
|
|
||||||
shift
|
|
||||||
echo "build $B"
|
|
||||||
docker exec -u "$uid" dotfiles-rust cargo install --quiet "$@"
|
|
||||||
docker exec -u "$uid" dotfiles-rust cp "/usr/local/cargo/bin/$B" /rust/bin
|
|
||||||
strip "tools/.local/bin/$B"
|
|
||||||
}
|
|
||||||
|
|
||||||
docker kill dotfiles-go && sleep 3 || :
|
|
||||||
docker run --rm -d --name dotfiles-go -e HOME=/go -v ./tools/.local/bin:/go/bin golang:1.25.1-alpine3.22 tail -f /dev/null
|
|
||||||
docker exec dotfiles-go chown "$uid" /go
|
|
||||||
|
|
||||||
go-install github.com/junegunn/fzf@latest
|
|
||||||
go-install github.com/gokcehan/lf@latest
|
|
||||||
go-install github.com/rs/curlie@latest
|
|
||||||
|
|
||||||
docker kill dotfiles-go
|
|
||||||
|
|
||||||
docker kill dotfiles-rust && sleep 3 || :
|
|
||||||
docker run --rm -d --name dotfiles-rust -v ./tools/.local/bin:/rust/bin rust:1.90-bullseye tail -f /dev/null
|
|
||||||
|
|
||||||
cargo-install zoxide zoxide --locked
|
|
||||||
cargo-install rg ripgrep
|
|
||||||
cargo-install fd fd-find
|
|
||||||
cargo-install bat bat --locked
|
|
||||||
cargo-install eza eza
|
|
||||||
cargo-install delta git-delta
|
|
||||||
cargo-install jj --bin jj jj-cli --locked
|
|
||||||
cargo-install lazyjj lazyjj --locked
|
|
||||||
|
|
||||||
docker kill dotfiles-rust
|
|
||||||
@@ -1,60 +1,4 @@
|
|||||||
[main]
|
[main]
|
||||||
font = HurmitNerdFont:size=10
|
font = Fira Code Nerd Font:size=11
|
||||||
initial-color-theme = dark
|
|
||||||
|
|
||||||
[colors-dark]
|
include = /usr/share/foot/themes/nord
|
||||||
foreground = a29e98
|
|
||||||
background = 272117
|
|
||||||
cursor = 272117 73d0b1
|
|
||||||
selection-foreground = 272117
|
|
||||||
selection-background = 276c9a
|
|
||||||
|
|
||||||
regular0 = 85919b
|
|
||||||
regular1 = c37583
|
|
||||||
regular2 = 44a386
|
|
||||||
regular3 = af8842
|
|
||||||
regular4 = 5396c7
|
|
||||||
regular5 = a57cba
|
|
||||||
regular6 = 2da0ad
|
|
||||||
regular7 = b0bcc7
|
|
||||||
|
|
||||||
bright0 = 85919b
|
|
||||||
bright1 = f2a0ae
|
|
||||||
bright2 = 73d0b1
|
|
||||||
bright3 = dcb46e
|
|
||||||
bright4 = 7fc3f5
|
|
||||||
bright5 = d2a8e8
|
|
||||||
bright6 = 62cdda
|
|
||||||
bright7 = a29e98
|
|
||||||
|
|
||||||
[colors-light]
|
|
||||||
foreground = 696257
|
|
||||||
background = faf8f5
|
|
||||||
cursor = faf8f5 7ad6b7
|
|
||||||
selection-foreground = faf8f5
|
|
||||||
selection-background = 3a7ead
|
|
||||||
|
|
||||||
regular0 = 272117
|
|
||||||
regular1 = d0818f
|
|
||||||
regular2 = 52af92
|
|
||||||
regular3 = bc944f
|
|
||||||
regular4 = 60a3d4
|
|
||||||
regular5 = b289c7
|
|
||||||
regular6 = 3dadba
|
|
||||||
regular7 = b6c3cd
|
|
||||||
|
|
||||||
bright0 = 919da7
|
|
||||||
bright1 = 85c9fc
|
|
||||||
bright2 = 7ad6b7
|
|
||||||
bright3 = e3ba74
|
|
||||||
bright4 = 60a3d4
|
|
||||||
bright5 = d9aeee
|
|
||||||
bright6 = 85c9fc
|
|
||||||
bright7 = faf8f5
|
|
||||||
|
|
||||||
[key-bindings]
|
|
||||||
color-theme-toggle = Control+Shift+t
|
|
||||||
primary-paste = Shift+Insert Control+Shift+i
|
|
||||||
|
|
||||||
[search-bindings]
|
|
||||||
primary-paste = Shift+Insert Control+Shift+i
|
|
||||||
|
|||||||
@@ -1,164 +0,0 @@
|
|||||||
# name: kakoune_jump_mode
|
|
||||||
# version: 0.1.0
|
|
||||||
# description: Click with your keyboard.
|
|
||||||
# authors: ["Mathieu Ablasou <alexherbo2@gmail.com>"]
|
|
||||||
# kakoune: 2023-12-12
|
|
||||||
# license: MIT
|
|
||||||
# dependencies: []
|
|
||||||
# doc: yes
|
|
||||||
# tests: no
|
|
||||||
declare-option range-specs jump_ranges
|
|
||||||
declare-option str-to-str-map jump_label_selection_map
|
|
||||||
declare-option str-list jump_selections
|
|
||||||
declare-option str-list jump_labels \
|
|
||||||
'aa' 'ab' 'ac' 'ad' 'ae' 'af' 'ag' 'ah' 'ai' 'aj' 'ak' 'al' 'am' 'an' 'ao' 'ap' 'aq' 'ar' 'as' 'at' 'au' 'av' 'aw' 'ax' 'ay' 'az' \
|
|
||||||
'ba' 'bb' 'bc' 'bd' 'be' 'bf' 'bg' 'bh' 'bi' 'bj' 'bk' 'bl' 'bm' 'bn' 'bo' 'bp' 'bq' 'br' 'bs' 'bt' 'bu' 'bv' 'bw' 'bx' 'by' 'bz' \
|
|
||||||
'ca' 'cb' 'cc' 'cd' 'ce' 'cf' 'cg' 'ch' 'ci' 'cj' 'ck' 'cl' 'cm' 'cn' 'co' 'cp' 'cq' 'cr' 'cs' 'ct' 'cu' 'cv' 'cw' 'cx' 'cy' 'cz' \
|
|
||||||
'da' 'db' 'dc' 'dd' 'de' 'df' 'dg' 'dh' 'di' 'dj' 'dk' 'dl' 'dm' 'dn' 'do' 'dp' 'dq' 'dr' 'ds' 'dt' 'du' 'dv' 'dw' 'dx' 'dy' 'dz' \
|
|
||||||
'ea' 'eb' 'ec' 'ed' 'ee' 'ef' 'eg' 'eh' 'ei' 'ej' 'ek' 'el' 'em' 'en' 'eo' 'ep' 'eq' 'er' 'es' 'et' 'eu' 'ev' 'ew' 'ex' 'ey' 'ez' \
|
|
||||||
'fa' 'fb' 'fc' 'fd' 'fe' 'ff' 'fg' 'fh' 'fi' 'fj' 'fk' 'fl' 'fm' 'fn' 'fo' 'fp' 'fq' 'fr' 'fs' 'ft' 'fu' 'fv' 'fw' 'fx' 'fy' 'fz' \
|
|
||||||
'ga' 'gb' 'gc' 'gd' 'ge' 'gf' 'gg' 'gh' 'gi' 'gj' 'gk' 'gl' 'gm' 'gn' 'go' 'gp' 'gq' 'gr' 'gs' 'gt' 'gu' 'gv' 'gw' 'gx' 'gy' 'gz' \
|
|
||||||
'ha' 'hb' 'hc' 'hd' 'he' 'hf' 'hg' 'hh' 'hi' 'hj' 'hk' 'hl' 'hm' 'hn' 'ho' 'hp' 'hq' 'hr' 'hs' 'ht' 'hu' 'hv' 'hw' 'hx' 'hy' 'hz' \
|
|
||||||
'ia' 'ib' 'ic' 'id' 'ie' 'if' 'ig' 'ih' 'ii' 'ij' 'ik' 'il' 'im' 'in' 'io' 'ip' 'iq' 'ir' 'is' 'it' 'iu' 'iv' 'iw' 'ix' 'iy' 'iz' \
|
|
||||||
'ja' 'jb' 'jc' 'jd' 'je' 'jf' 'jg' 'jh' 'ji' 'jj' 'jk' 'jl' 'jm' 'jn' 'jo' 'jp' 'jq' 'jr' 'js' 'jt' 'ju' 'jv' 'jw' 'jx' 'jy' 'jz' \
|
|
||||||
'ka' 'kb' 'kc' 'kd' 'ke' 'kf' 'kg' 'kh' 'ki' 'kj' 'kk' 'kl' 'km' 'kn' 'ko' 'kp' 'kq' 'kr' 'ks' 'kt' 'ku' 'kv' 'kw' 'kx' 'ky' 'kz' \
|
|
||||||
'la' 'lb' 'lc' 'ld' 'le' 'lf' 'lg' 'lh' 'li' 'lj' 'lk' 'll' 'lm' 'ln' 'lo' 'lp' 'lq' 'lr' 'ls' 'lt' 'lu' 'lv' 'lw' 'lx' 'ly' 'lz' \
|
|
||||||
'ma' 'mb' 'mc' 'md' 'me' 'mf' 'mg' 'mh' 'mi' 'mj' 'mk' 'ml' 'mm' 'mn' 'mo' 'mp' 'mq' 'mr' 'ms' 'mt' 'mu' 'mv' 'mw' 'mx' 'my' 'mz' \
|
|
||||||
'na' 'nb' 'nc' 'nd' 'ne' 'nf' 'ng' 'nh' 'ni' 'nj' 'nk' 'nl' 'nm' 'nn' 'no' 'np' 'nq' 'nr' 'ns' 'nt' 'nu' 'nv' 'nw' 'nx' 'ny' 'nz' \
|
|
||||||
'oa' 'ob' 'oc' 'od' 'oe' 'of' 'og' 'oh' 'oi' 'oj' 'ok' 'ol' 'om' 'on' 'oo' 'op' 'oq' 'or' 'os' 'ot' 'ou' 'ov' 'ow' 'ox' 'oy' 'oz' \
|
|
||||||
'pa' 'pb' 'pc' 'pd' 'pe' 'pf' 'pg' 'ph' 'pi' 'pj' 'pk' 'pl' 'pm' 'pn' 'po' 'pp' 'pq' 'pr' 'ps' 'pt' 'pu' 'pv' 'pw' 'px' 'py' 'pz' \
|
|
||||||
'qa' 'qb' 'qc' 'qd' 'qe' 'qf' 'qg' 'qh' 'qi' 'qj' 'qk' 'ql' 'qm' 'qn' 'qo' 'qp' 'qq' 'qr' 'qs' 'qt' 'qu' 'qv' 'qw' 'qx' 'qy' 'qz' \
|
|
||||||
'ra' 'rb' 'rc' 'rd' 're' 'rf' 'rg' 'rh' 'ri' 'rj' 'rk' 'rl' 'rm' 'rn' 'ro' 'rp' 'rq' 'rr' 'rs' 'rt' 'ru' 'rv' 'rw' 'rx' 'ry' 'rz' \
|
|
||||||
'sa' 'sb' 'sc' 'sd' 'se' 'sf' 'sg' 'sh' 'si' 'sj' 'sk' 'sl' 'sm' 'sn' 'so' 'sp' 'sq' 'sr' 'ss' 'st' 'su' 'sv' 'sw' 'sx' 'sy' 'sz' \
|
|
||||||
'ta' 'tb' 'tc' 'td' 'te' 'tf' 'tg' 'th' 'ti' 'tj' 'tk' 'tl' 'tm' 'tn' 'to' 'tp' 'tq' 'tr' 'ts' 'tt' 'tu' 'tv' 'tw' 'tx' 'ty' 'tz' \
|
|
||||||
'ua' 'ub' 'uc' 'ud' 'ue' 'uf' 'ug' 'uh' 'ui' 'uj' 'uk' 'ul' 'um' 'un' 'uo' 'up' 'uq' 'ur' 'us' 'ut' 'uu' 'uv' 'uw' 'ux' 'uy' 'uz' \
|
|
||||||
'va' 'vb' 'vc' 'vd' 've' 'vf' 'vg' 'vh' 'vi' 'vj' 'vk' 'vl' 'vm' 'vn' 'vo' 'vp' 'vq' 'vr' 'vs' 'vt' 'vu' 'vv' 'vw' 'vx' 'vy' 'vz' \
|
|
||||||
'wa' 'wb' 'wc' 'wd' 'we' 'wf' 'wg' 'wh' 'wi' 'wj' 'wk' 'wl' 'wm' 'wn' 'wo' 'wp' 'wq' 'wr' 'ws' 'wt' 'wu' 'wv' 'ww' 'wx' 'wy' 'wz' \
|
|
||||||
'xa' 'xb' 'xc' 'xd' 'xe' 'xf' 'xg' 'xh' 'xi' 'xj' 'xk' 'xl' 'xm' 'xn' 'xo' 'xp' 'xq' 'xr' 'xs' 'xt' 'xu' 'xv' 'xw' 'xx' 'xy' 'xz' \
|
|
||||||
'ya' 'yb' 'yc' 'yd' 'ye' 'yf' 'yg' 'yh' 'yi' 'yj' 'yk' 'yl' 'ym' 'yn' 'yo' 'yp' 'yq' 'yr' 'ys' 'yt' 'yu' 'yv' 'yw' 'yx' 'yy' 'yz' \
|
|
||||||
'za' 'zb' 'zc' 'zd' 'ze' 'zf' 'zg' 'zh' 'zi' 'zj' 'zk' 'zl' 'zm' 'zn' 'zo' 'zp' 'zq' 'zr' 'zs' 'zt' 'zu' 'zv' 'zw' 'zx' 'zy' 'zz'
|
|
||||||
|
|
||||||
set-face global JumpLabel 'black,bright-yellow+F'
|
|
||||||
|
|
||||||
define-command enter_jump_mode_with_replace_select_mode %{
|
|
||||||
enter_jump_mode 'jump (replace):' %{
|
|
||||||
try %{
|
|
||||||
execute-keys -save-regs 's' '<esc><a-,>"sZz"s<a-z>a<esc>'
|
|
||||||
} catch %{
|
|
||||||
execute-keys '<esc>z<esc>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command enter_jump_mode_with_extend_select_mode %{
|
|
||||||
enter_jump_mode 'jump (extend):' %{
|
|
||||||
execute-keys -save-regs 's' '<esc>"sZ,<a-z>u"s<a-z>a<esc>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command enter_jump_mode_with_append_select_mode %{
|
|
||||||
enter_jump_mode 'jump (append):' %{
|
|
||||||
execute-keys -save-regs 's' '<esc>"sZz"s<a-z>a<esc>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command enter_jump_mode -params 2 %{
|
|
||||||
create_jump_state_from_words_in_viewport
|
|
||||||
create_jump_label_selection_map_option_buffer
|
|
||||||
execute-keys 'ga'
|
|
||||||
render_jump_labels
|
|
||||||
open_jump_prompt %arg{1} %arg{2}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command exit_jump_mode %{
|
|
||||||
unrender_jump_labels
|
|
||||||
close_jump_label_selection_map_option_buffer
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command render_jump_labels %{
|
|
||||||
add-highlighter window/jump_ranges replace-ranges jump_ranges
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command unrender_jump_labels %{
|
|
||||||
remove-highlighter window/jump_ranges
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command open_jump_prompt -params 2 %{
|
|
||||||
prompt %arg{1} %{
|
|
||||||
exit_jump_mode
|
|
||||||
} -on-change %{
|
|
||||||
handle_jump_input %val{text} %arg{2}
|
|
||||||
} -on-abort %{
|
|
||||||
exit_jump_mode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command handle_jump_input -params 2 %{
|
|
||||||
evaluate-commands -save-regs '^/' -draft -verbatim try %{
|
|
||||||
open_jump_label_selection_map_option_buffer
|
|
||||||
set-register / "\A\Q%arg{1}\E=(\d+\.\d+,\d+\.\d+)\z"
|
|
||||||
execute-keys 's<ret>'
|
|
||||||
evaluate-commands -draft -client %val{client} %exp{
|
|
||||||
select %reg{1}
|
|
||||||
execute-keys -save-regs '' 'Z'
|
|
||||||
}
|
|
||||||
evaluate-commands -client %val{client} %arg{2}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command create_jump_state_from_words_in_viewport %{
|
|
||||||
create_jump_state_from_selections_in_viewport %{
|
|
||||||
execute-keys 's\w+<ret><a-i>w'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command create_jump_state_from_selections_in_viewport -params 1 %{
|
|
||||||
evaluate-commands -draft %{
|
|
||||||
execute-keys 'gtGbx'
|
|
||||||
evaluate-commands %arg{1}
|
|
||||||
execute-keys '<a-k>\A.{2,}\z<ret>)'
|
|
||||||
evaluate-commands -client %val{client} -verbatim create_jump_state %val{selections_desc}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command create_jump_state -params .. %{
|
|
||||||
evaluate-commands -save-regs '"ab' %{
|
|
||||||
set-register a %arg{@}
|
|
||||||
set-register b %opt{jump_labels}
|
|
||||||
evaluate-commands -draft %{
|
|
||||||
edit -scratch
|
|
||||||
execute-keys '"a<a-P>a<space><c-r>b<esc>'
|
|
||||||
evaluate-commands -itersel %{
|
|
||||||
execute-keys 's\A(\d+)\.(\d+),(\d+)\.(\d+) (.{2})\z<ret>'
|
|
||||||
set-register dquote %exp{
|
|
||||||
set-option -add window jump_ranges "%reg{1}.%reg{2}+2|{JumpLabel}%reg{5}"
|
|
||||||
set-option -add window jump_label_selection_map "%reg{5}=%reg{1}.%reg{2},%reg{3}.%reg{4}"
|
|
||||||
}
|
|
||||||
execute-keys 'R'
|
|
||||||
}
|
|
||||||
execute-keys -save-regs '' '%y'
|
|
||||||
delete-buffer
|
|
||||||
}
|
|
||||||
set-option window jump_ranges %val{timestamp}
|
|
||||||
set-option window jump_label_selection_map
|
|
||||||
evaluate-commands %reg{dquote}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command create_jump_label_selection_map_option_buffer %{
|
|
||||||
evaluate-commands -save-regs '"' %{
|
|
||||||
set-register dquote %opt{jump_label_selection_map}
|
|
||||||
edit -scratch "jump_label_selection_map@%val{client}.option"
|
|
||||||
execute-keys '<a-P>'
|
|
||||||
set-option buffer jump_selections %val{selections_desc}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command open_jump_label_selection_map_option_buffer %{
|
|
||||||
edit -scratch "jump_label_selection_map@%val{client}.option"
|
|
||||||
select %opt{jump_selections}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command close_jump_label_selection_map_option_buffer %{
|
|
||||||
delete-buffer "jump_label_selection_map@%val{client}.option"
|
|
||||||
}
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
# Five colors dark theme
|
|
||||||
|
|
||||||
evaluate-commands %sh{
|
|
||||||
bg="rgb:272117"
|
|
||||||
bgmenu="rgb:282e38"
|
|
||||||
fg="rgb:a29e98"
|
|
||||||
gray="rgb:767778"
|
|
||||||
|
|
||||||
red1="rgb:f2a0ae"
|
|
||||||
red2="rgb:c37583"
|
|
||||||
red3="rgb:954c5b"
|
|
||||||
|
|
||||||
yellow1="rgb:dcb46e"
|
|
||||||
yellow2="rgb:af8842"
|
|
||||||
yellow3="rgb:845f10"
|
|
||||||
|
|
||||||
green1="rgb:73d0b1"
|
|
||||||
green2="rgb:44a386"
|
|
||||||
green3="rgb:04785d"
|
|
||||||
|
|
||||||
blue1="rgb:7fc3f5"
|
|
||||||
blue2="rgb:5396c7"
|
|
||||||
blue3="rgb:276c9a"
|
|
||||||
|
|
||||||
violet1="rgb:d2a8e8"
|
|
||||||
violet2="rgb:a57cba"
|
|
||||||
violet3="rgb:7b548e"
|
|
||||||
|
|
||||||
echo "
|
|
||||||
## CODE
|
|
||||||
|
|
||||||
set-face global value $violet2
|
|
||||||
set-face global type $green2
|
|
||||||
set-face global variable $yellow3
|
|
||||||
set-face global module $red3
|
|
||||||
set-face global function $blue2
|
|
||||||
set-face global string $yellow2
|
|
||||||
set-face global keyword $violet3
|
|
||||||
set-face global operator $red2
|
|
||||||
set-face global attribute $green3
|
|
||||||
set-face global comment $gray
|
|
||||||
set-face global documentation $gray
|
|
||||||
set-face global meta $blue3
|
|
||||||
set-face global builtin $violet1
|
|
||||||
|
|
||||||
## MARKUP
|
|
||||||
|
|
||||||
set-face global title $red3
|
|
||||||
set-face global header $violet3
|
|
||||||
set-face global mono $yellow2
|
|
||||||
set-face global block $blue3
|
|
||||||
set-face global link $blue2
|
|
||||||
set-face global bullet $red2
|
|
||||||
set-face global list $red2
|
|
||||||
|
|
||||||
## BUILTIN
|
|
||||||
|
|
||||||
set-face global Default $fg,$bg
|
|
||||||
set-face global PrimarySelection $bg,$green3
|
|
||||||
set-face global SecondarySelection $bg,$blue3
|
|
||||||
set-face global PrimaryCursor $bg,$green1
|
|
||||||
set-face global SecondaryCursor $bg,$blue1
|
|
||||||
set-face global PrimaryCursorEol $bg,$red1
|
|
||||||
set-face global SecondaryCursorEol $bg,$yellow1
|
|
||||||
set-face global MenuForeground $green1,$green3
|
|
||||||
set-face global MenuBackground $fg,$bgmenu
|
|
||||||
set-face global MenuInfo $green2
|
|
||||||
set-face global Information $fg,$bgmenu
|
|
||||||
set-face global InlineInformation $blue2,$bgmenu
|
|
||||||
set-face global Error $red2
|
|
||||||
set-face global DiagnosticError default,default,$red2+c
|
|
||||||
set-face global DiagnosticWarning default,default,$yellow2+c
|
|
||||||
set-face global DiagnosticInfo default,default,$green2+c
|
|
||||||
set-face global DiagnosticHint default,default,$blue2+c
|
|
||||||
set-face global StatusLine $fg,$bgmenu
|
|
||||||
set-face global StatusLineMode $green2
|
|
||||||
set-face global StatusLineInfo $yellow2
|
|
||||||
set-face global StatusLineValue $blue2
|
|
||||||
set-face global StatusCursor $bg,$green1
|
|
||||||
set-face global Prompt $green2
|
|
||||||
set-face global BufferPadding $bg,$bg
|
|
||||||
|
|
||||||
# Built-in highlighter faces
|
|
||||||
|
|
||||||
set-face global LineNumbers $gray
|
|
||||||
set-face global LineNumberCursor $green3
|
|
||||||
set-face global LineNumbersWrapped $bg,$bg
|
|
||||||
set-face global MatchingChar $red1
|
|
||||||
set-face global Whitespace $gray
|
|
||||||
set-face global WhitespaceIndent $gray
|
|
||||||
set-face global WrapMarker $yellow1
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
|
|
||||||
# kak-lsp
|
|
||||||
|
|
||||||
set-face global InfoDefault default
|
|
||||||
set-face global InfoBlock $green2
|
|
||||||
set-face global InfoBlockQuote $yellow2
|
|
||||||
set-face global InfoBullet $red2
|
|
||||||
set-face global InfoHeader $red3
|
|
||||||
set-face global InfoLink $blue2
|
|
||||||
set-face global InfoLinkMono $blue3
|
|
||||||
|
|
||||||
set-face global InfoMono $blue2
|
|
||||||
set-face global InfoRule $yellow2
|
|
||||||
set-face global InfoDiagnosticError $red2
|
|
||||||
set-face global InfoDiagnosticHint $blue2
|
|
||||||
set-face global InfoDiagnosticInformation $green2
|
|
||||||
set-face global InfoDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global LineFlagError $red2
|
|
||||||
set-face global LineFlagHint $blue2
|
|
||||||
set-face global LineFlagInfo $green2
|
|
||||||
set-face global LineFlagWarning $yellow2
|
|
||||||
|
|
||||||
set-face global InlayDiagnosticError $red2
|
|
||||||
set-face global InlayDiagnosticHint $blue2
|
|
||||||
set-face global InlayDiagnosticInfo $green2
|
|
||||||
set-face global InlayDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global SnippetsNextPlaceholders $bg,$green2
|
|
||||||
set-face global SnippetsOtherPlaceholders $bg,$yellow2
|
|
||||||
"
|
|
||||||
}
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
# Five colors dark theme
|
|
||||||
|
|
||||||
evaluate-commands %sh{
|
|
||||||
bg="rgb:faf8f5"
|
|
||||||
bgmenu="rgb:f6ede0"
|
|
||||||
fg="rgb:696257"
|
|
||||||
gray="rgb:c0c1c2"
|
|
||||||
|
|
||||||
red1="rgb:f9a6b5"
|
|
||||||
red2="rgb:d0818f"
|
|
||||||
red3="rgb:a95d6c"
|
|
||||||
|
|
||||||
yellow1="rgb:e3ba74"
|
|
||||||
yellow2="rgb:bc944f"
|
|
||||||
yellow3="rgb:967028"
|
|
||||||
|
|
||||||
green1="rgb:7ad6b7"
|
|
||||||
green2="rgb:52af92"
|
|
||||||
green3="rgb:278a6e"
|
|
||||||
|
|
||||||
blue1="rgb:85c9fc"
|
|
||||||
blue2="rgb:60a3d4"
|
|
||||||
blue3="rgb:3a7ead"
|
|
||||||
|
|
||||||
violet1="rgb:d9aeee"
|
|
||||||
violet2="rgb:b289c7"
|
|
||||||
violet3="rgb:8d65a1"
|
|
||||||
|
|
||||||
echo "
|
|
||||||
## CODE
|
|
||||||
|
|
||||||
set-face global value $violet2
|
|
||||||
set-face global type $green2
|
|
||||||
set-face global variable $yellow3
|
|
||||||
set-face global module $red3
|
|
||||||
set-face global function $blue2
|
|
||||||
set-face global string $yellow2
|
|
||||||
set-face global keyword $violet3
|
|
||||||
set-face global operator $red2
|
|
||||||
set-face global attribute $green3
|
|
||||||
set-face global comment $gray
|
|
||||||
set-face global documentation $gray
|
|
||||||
set-face global meta $blue3
|
|
||||||
set-face global builtin $violet1
|
|
||||||
|
|
||||||
## MARKUP
|
|
||||||
|
|
||||||
set-face global title $red3
|
|
||||||
set-face global header $violet3
|
|
||||||
set-face global mono $yellow2
|
|
||||||
set-face global block $blue3
|
|
||||||
set-face global link $blue2
|
|
||||||
set-face global bullet $red2
|
|
||||||
set-face global list $red2
|
|
||||||
|
|
||||||
## BUILTIN
|
|
||||||
|
|
||||||
set-face global Default $fg,$bg
|
|
||||||
set-face global PrimarySelection $bg,$green3
|
|
||||||
set-face global SecondarySelection $bg,$blue3
|
|
||||||
set-face global PrimaryCursor $bg,$green1
|
|
||||||
set-face global SecondaryCursor $bg,$blue1
|
|
||||||
set-face global PrimaryCursorEol $bg,$red1
|
|
||||||
set-face global SecondaryCursorEol $bg,$yellow1
|
|
||||||
set-face global MenuForeground $green1,$green3
|
|
||||||
set-face global MenuBackground $fg,$bgmenu
|
|
||||||
set-face global MenuInfo $green2
|
|
||||||
set-face global Information $fg,$bgmenu
|
|
||||||
set-face global InlineInformation $blue2,$bgmenu
|
|
||||||
set-face global Error $red2
|
|
||||||
set-face global DiagnosticError default,default,$red2+c
|
|
||||||
set-face global DiagnosticWarning default,default,$yellow2+c
|
|
||||||
set-face global DiagnosticInfo default,default,$green2+c
|
|
||||||
set-face global DiagnosticHint default,default,$blue2+c
|
|
||||||
set-face global StatusLine $fg,$bgmenu
|
|
||||||
set-face global StatusLineMode $green2
|
|
||||||
set-face global StatusLineInfo $yellow2
|
|
||||||
set-face global StatusLineValue $blue2
|
|
||||||
set-face global StatusCursor $bg,$green1
|
|
||||||
set-face global Prompt $green2
|
|
||||||
set-face global BufferPadding $bg,$bg
|
|
||||||
|
|
||||||
# Built-in highlighter faces
|
|
||||||
|
|
||||||
set-face global LineNumbers $gray
|
|
||||||
set-face global LineNumberCursor $green3
|
|
||||||
set-face global LineNumbersWrapped $bg,$bg
|
|
||||||
set-face global MatchingChar $red1
|
|
||||||
set-face global Whitespace $gray
|
|
||||||
set-face global WhitespaceIndent $gray
|
|
||||||
set-face global WrapMarker $yellow1
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
|
|
||||||
# kak-lsp
|
|
||||||
|
|
||||||
set-face global InfoDefault default
|
|
||||||
set-face global InfoBlock $green2
|
|
||||||
set-face global InfoBlockQuote $yellow2
|
|
||||||
set-face global InfoBullet $red2
|
|
||||||
set-face global InfoHeader $red3
|
|
||||||
set-face global InfoLink $blue2
|
|
||||||
set-face global InfoLinkMono $blue3
|
|
||||||
|
|
||||||
set-face global InfoMono $blue2
|
|
||||||
set-face global InfoRule $yellow2
|
|
||||||
set-face global InfoDiagnosticError $red2
|
|
||||||
set-face global InfoDiagnosticHint $blue2
|
|
||||||
set-face global InfoDiagnosticInformation $green2
|
|
||||||
set-face global InfoDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global LineFlagError $red2
|
|
||||||
set-face global LineFlagHint $blue2
|
|
||||||
set-face global LineFlagInfo $green2
|
|
||||||
set-face global LineFlagWarning $yellow2
|
|
||||||
|
|
||||||
set-face global InlayDiagnosticError $red2
|
|
||||||
set-face global InlayDiagnosticHint $blue2
|
|
||||||
set-face global InlayDiagnosticInfo $green2
|
|
||||||
set-face global InlayDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global SnippetsNextPlaceholders $bg,$green2
|
|
||||||
set-face global SnippetsOtherPlaceholders $bg,$yellow2
|
|
||||||
"
|
|
||||||
}
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
# Four colors dark theme
|
|
||||||
|
|
||||||
evaluate-commands %sh{
|
|
||||||
bg="rgb:272117"
|
|
||||||
bgmenu="rgb:282e38"
|
|
||||||
fg="rgb:a29e98"
|
|
||||||
gray="rgb:58666d"
|
|
||||||
|
|
||||||
yellow1="rgb:dcb46e"
|
|
||||||
yellow2="rgb:af8842"
|
|
||||||
yellow3="rgb:845f10"
|
|
||||||
|
|
||||||
green1="rgb:73d0b1"
|
|
||||||
green2="rgb:44a386"
|
|
||||||
green3="rgb:04785d"
|
|
||||||
|
|
||||||
blue1="rgb:95bcfb"
|
|
||||||
blue2="rgb:6b90cc"
|
|
||||||
blue3="rgb:43669f"
|
|
||||||
|
|
||||||
pink1="rgb:eca0c4"
|
|
||||||
pink2="rgb:bd7598"
|
|
||||||
pink3="rgb:904c6e"
|
|
||||||
|
|
||||||
echo "
|
|
||||||
## CODE
|
|
||||||
|
|
||||||
set-face global value $pink1
|
|
||||||
set-face global type $green2
|
|
||||||
set-face global variable $yellow3
|
|
||||||
set-face global module $pink3
|
|
||||||
set-face global function $blue2
|
|
||||||
set-face global string $yellow2
|
|
||||||
set-face global keyword $blue1
|
|
||||||
set-face global operator $pink2
|
|
||||||
set-face global attribute $green1
|
|
||||||
set-face global comment $green3
|
|
||||||
set-face global documentation $green3
|
|
||||||
set-face global meta $blue3
|
|
||||||
set-face global builtin $green2
|
|
||||||
|
|
||||||
## MARKUP
|
|
||||||
|
|
||||||
set-face global title $pink3
|
|
||||||
set-face global header $pink2
|
|
||||||
set-face global mono $yellow2
|
|
||||||
set-face global block $blue2
|
|
||||||
set-face global link $blue1
|
|
||||||
set-face global bullet $pink1
|
|
||||||
set-face global list $pink1
|
|
||||||
|
|
||||||
## BUILTIN
|
|
||||||
|
|
||||||
set-face global Default $fg,$bg
|
|
||||||
set-face global PrimarySelection $bg,$green3
|
|
||||||
set-face global SecondarySelection $bg,$blue3
|
|
||||||
set-face global PrimaryCursor $bg,$green1
|
|
||||||
set-face global SecondaryCursor $bg,$blue1
|
|
||||||
set-face global PrimaryCursorEol $bg,$pink1
|
|
||||||
set-face global SecondaryCursorEol $bg,$yellow1
|
|
||||||
set-face global MenuForeground $green1,$green3
|
|
||||||
set-face global MenuBackground $fg,$bgmenu
|
|
||||||
set-face global MenuInfo $green2
|
|
||||||
set-face global Information $fg,$bgmenu
|
|
||||||
set-face global InlineInformation $blue2,$bgmenu
|
|
||||||
set-face global Error $pink2
|
|
||||||
set-face global DiagnosticError default,default,$pink2+c
|
|
||||||
set-face global DiagnosticWarning default,default,$yellow2+c
|
|
||||||
set-face global DiagnosticInfo default,default,$green2+c
|
|
||||||
set-face global DiagnosticHint default,default,$blue2+c
|
|
||||||
set-face global StatusLine $fg,$bgmenu
|
|
||||||
set-face global StatusLineMode $green2
|
|
||||||
set-face global StatusLineInfo $yellow2
|
|
||||||
set-face global StatusLineValue $blue2
|
|
||||||
set-face global StatusCursor $bg,$green1
|
|
||||||
set-face global Prompt $green2
|
|
||||||
set-face global BufferPadding $bg,$bg
|
|
||||||
|
|
||||||
# Built-in highlighter faces
|
|
||||||
|
|
||||||
set-face global LineNumbers $blue3
|
|
||||||
set-face global LineNumberCursor $green3
|
|
||||||
set-face global LineNumbersWrapped $bg,$bg
|
|
||||||
set-face global MatchingChar $yellow1
|
|
||||||
set-face global Whitespace $gray
|
|
||||||
set-face global WhitespaceIndent $gray
|
|
||||||
set-face global WrapMarker $yellow1
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
|
|
||||||
# kak-lsp
|
|
||||||
|
|
||||||
set-face global InfoDefault default
|
|
||||||
set-face global InfoBlock $green2
|
|
||||||
set-face global InfoBlockQuote $yellow2
|
|
||||||
set-face global InfoBullet $pink1
|
|
||||||
set-face global InfoHeader $pink3
|
|
||||||
set-face global InfoLink $blue1
|
|
||||||
set-face global InfoLinkMono $blue2
|
|
||||||
|
|
||||||
set-face global InfoMono $blue2
|
|
||||||
set-face global InfoRule $yellow2
|
|
||||||
set-face global InfoDiagnosticError $pink2
|
|
||||||
set-face global InfoDiagnosticHint $blue2
|
|
||||||
set-face global InfoDiagnosticInformation $green2
|
|
||||||
set-face global InfoDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global LineFlagError $pink2
|
|
||||||
set-face global LineFlagHint $blue2
|
|
||||||
set-face global LineFlagInfo $green2
|
|
||||||
set-face global LineFlagWarning $yellow2
|
|
||||||
|
|
||||||
set-face global InlayDiagnosticError $pink2
|
|
||||||
set-face global InlayDiagnosticHint $blue2
|
|
||||||
set-face global InlayDiagnosticInfo $green2
|
|
||||||
set-face global InlayDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global SnippetsNextPlaceholders $bg,$green2
|
|
||||||
set-face global SnippetsOtherPlaceholders $bg,$yellow2
|
|
||||||
"
|
|
||||||
}
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
# Four colors light theme
|
|
||||||
|
|
||||||
evaluate-commands %sh{
|
|
||||||
bg="rgb:faf8f5"
|
|
||||||
bgmenu="rgb:f6ede0"
|
|
||||||
fg="rgb:696257"
|
|
||||||
gray="rgb:58666d"
|
|
||||||
|
|
||||||
yellow1="rgb:dcb46e"
|
|
||||||
yellow2="rgb:af8842"
|
|
||||||
yellow3="rgb:845f10"
|
|
||||||
|
|
||||||
green1="rgb:73d0b1"
|
|
||||||
green2="rgb:44a386"
|
|
||||||
green3="rgb:04785d"
|
|
||||||
|
|
||||||
blue1="rgb:95bcfb"
|
|
||||||
blue2="rgb:6b90cc"
|
|
||||||
blue3="rgb:43669f"
|
|
||||||
|
|
||||||
pink1="rgb:eca0c4"
|
|
||||||
pink2="rgb:bd7598"
|
|
||||||
pink3="rgb:904c6e"
|
|
||||||
|
|
||||||
echo "
|
|
||||||
## CODE
|
|
||||||
|
|
||||||
set-face global value $pink1
|
|
||||||
set-face global type $green2
|
|
||||||
set-face global variable $yellow3
|
|
||||||
set-face global module $pink3
|
|
||||||
set-face global function $blue2
|
|
||||||
set-face global string $yellow2
|
|
||||||
set-face global keyword $blue1
|
|
||||||
set-face global operator $pink2
|
|
||||||
set-face global attribute $green1
|
|
||||||
set-face global comment $green3
|
|
||||||
set-face global documentation $green3
|
|
||||||
set-face global meta $blue3
|
|
||||||
set-face global builtin $green2
|
|
||||||
|
|
||||||
## MARKUP
|
|
||||||
|
|
||||||
set-face global title $pink3
|
|
||||||
set-face global header $pink2
|
|
||||||
set-face global mono $yellow2
|
|
||||||
set-face global block $blue2
|
|
||||||
set-face global link $blue1
|
|
||||||
set-face global bullet $pink1
|
|
||||||
set-face global list $pink1
|
|
||||||
|
|
||||||
## BUILTIN
|
|
||||||
|
|
||||||
set-face global Default $fg,$bg
|
|
||||||
set-face global PrimarySelection $bg,$green3
|
|
||||||
set-face global SecondarySelection $bg,$blue3
|
|
||||||
set-face global PrimaryCursor $bg,$green1
|
|
||||||
set-face global SecondaryCursor $bg,$blue1
|
|
||||||
set-face global PrimaryCursorEol $bg,$pink1
|
|
||||||
set-face global SecondaryCursorEol $bg,$yellow1
|
|
||||||
set-face global MenuForeground $green1,$green3
|
|
||||||
set-face global MenuBackground $fg,$bgmenu
|
|
||||||
set-face global MenuInfo $green2
|
|
||||||
set-face global Information $fg,$bgmenu
|
|
||||||
set-face global InlineInformation $blue2,$bgmenu
|
|
||||||
set-face global Error $pink2
|
|
||||||
set-face global DiagnosticError default,default,$pink2+c
|
|
||||||
set-face global DiagnosticWarning default,default,$yellow2+c
|
|
||||||
set-face global DiagnosticInfo default,default,$green2+c
|
|
||||||
set-face global DiagnosticHint default,default,$blue2+c
|
|
||||||
set-face global StatusLine $fg,$bgmenu
|
|
||||||
set-face global StatusLineMode $green2
|
|
||||||
set-face global StatusLineInfo $yellow2
|
|
||||||
set-face global StatusLineValue $blue2
|
|
||||||
set-face global StatusCursor $bg,$green1
|
|
||||||
set-face global Prompt $green2
|
|
||||||
set-face global BufferPadding $bg,$bg
|
|
||||||
|
|
||||||
# Built-in highlighter faces
|
|
||||||
|
|
||||||
set-face global LineNumbers $blue3
|
|
||||||
set-face global LineNumberCursor $green2
|
|
||||||
set-face global LineNumbersWrapped $bg,$bg
|
|
||||||
set-face global MatchingChar $yellow1
|
|
||||||
set-face global Whitespace $gray
|
|
||||||
set-face global WhitespaceIndent $gray
|
|
||||||
set-face global WrapMarker $yellow1
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
|
|
||||||
# kak-lsp
|
|
||||||
|
|
||||||
set-face global InfoDefault default
|
|
||||||
set-face global InfoBlock $green2
|
|
||||||
set-face global InfoBlockQuote $yellow2
|
|
||||||
set-face global InfoBullet $pink1
|
|
||||||
set-face global InfoHeader $pink3
|
|
||||||
set-face global InfoLink $blue1
|
|
||||||
set-face global InfoLinkMono $blue2
|
|
||||||
|
|
||||||
set-face global InfoMono $blue2
|
|
||||||
set-face global InfoRule $yellow2
|
|
||||||
set-face global InfoDiagnosticError $pink2
|
|
||||||
set-face global InfoDiagnosticHint $blue2
|
|
||||||
set-face global InfoDiagnosticInformation $green2
|
|
||||||
set-face global InfoDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global LineFlagError $pink2
|
|
||||||
set-face global LineFlagHint $blue2
|
|
||||||
set-face global LineFlagInfo $green2
|
|
||||||
set-face global LineFlagWarning $yellow2
|
|
||||||
|
|
||||||
set-face global InlayDiagnosticError $pink2
|
|
||||||
set-face global InlayDiagnosticHint $blue2
|
|
||||||
set-face global InlayDiagnosticInfo $green2
|
|
||||||
set-face global InlayDiagnosticWarning $yellow2
|
|
||||||
|
|
||||||
set-face global SnippetsNextPlaceholders $bg,$green2
|
|
||||||
set-face global SnippetsOtherPlaceholders $bg,$yellow2
|
|
||||||
"
|
|
||||||
}
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
# LP Dark
|
|
||||||
|
|
||||||
declare-option str bg "272117"
|
|
||||||
declare-option str bgmenu "1c222b"
|
|
||||||
declare-option str fg "a29e98"
|
|
||||||
declare-option str comment "696257"
|
|
||||||
declare-option str gray "58666d"
|
|
||||||
|
|
||||||
declare-option str red "d48490"
|
|
||||||
declare-option str orange "d4896e"
|
|
||||||
declare-option str yellow "bf9752"
|
|
||||||
declare-option str yellow_green "96a85e"
|
|
||||||
declare-option str green "62b289"
|
|
||||||
declare-option str cyan "40b1b7"
|
|
||||||
declare-option str blue "54aad1"
|
|
||||||
declare-option str blue_violet "7a9fdd"
|
|
||||||
declare-option str violet "9d94d9"
|
|
||||||
declare-option str pink "ba8ac5"
|
|
||||||
declare-option str pink_red "ce84a7"
|
|
||||||
|
|
||||||
declare-option str selectionalpha "90"
|
|
||||||
|
|
||||||
## CODE
|
|
||||||
|
|
||||||
set-face global value "rgb:%opt{yellow_green}"
|
|
||||||
set-face global type "rgb:%opt{cyan}"
|
|
||||||
set-face global variable "rgb:%opt{blue_violet}"
|
|
||||||
set-face global module "rgb:%opt{red}"
|
|
||||||
set-face global function "rgb:%opt{blue}"
|
|
||||||
set-face global string "rgb:%opt{green}"
|
|
||||||
set-face global keyword "rgb:%opt{pink}"
|
|
||||||
set-face global operator "rgb:%opt{orange}"
|
|
||||||
set-face global attribute "rgb:%opt{blue_violet}"
|
|
||||||
set-face global comment "rgb:%opt{comment}"
|
|
||||||
set-face global documentation "rgb:%opt{comment}"
|
|
||||||
set-face global meta "rgb:%opt{violet}"
|
|
||||||
set-face global bultin "rgb:%opt{pink_red}"
|
|
||||||
|
|
||||||
## MARKUP
|
|
||||||
|
|
||||||
set-face global title "rgb:%opt{pink_red}"
|
|
||||||
set-face global header "rgb:%opt{orange}"
|
|
||||||
set-face global mono "rgb:%opt{yellow_green}"
|
|
||||||
set-face global block "rgb:%opt{cyan}"
|
|
||||||
set-face global link "rgb:%opt{blue}"
|
|
||||||
set-face global bullet "rgb:%opt{orange}"
|
|
||||||
set-face global list "rgb:%opt{orange}"
|
|
||||||
|
|
||||||
## BUILTIN
|
|
||||||
|
|
||||||
set-face global Default "rgb:%opt{fg},rgb:%opt{bg}"
|
|
||||||
set-face global PrimarySelection "rgb:%opt{bg},rgba:%opt{green}%opt{selectionalpha}"
|
|
||||||
set-face global SecondarySelection "rgb:%opt{bg},rgba:%opt{blue}%opt{selectionalpha}"
|
|
||||||
set-face global PrimaryCursor "rgb:%opt{bg},rgb:%opt{green}"
|
|
||||||
set-face global SecondaryCursor "rgb:%opt{bg},rgb:%opt{blue}"
|
|
||||||
set-face global PrimaryCursorEol "rgb:%opt{bg},rgb:%opt{pink_red}"
|
|
||||||
set-face global SecondaryCursorEol "rgb:%opt{bg},rgb:%opt{violet}"
|
|
||||||
set-face global MenuForeground "rgb:%opt{bg},rgb:%opt{fg}"
|
|
||||||
set-face global MenuBackground "rgb:%opt{fg},rgb:%opt{bgmenu}"
|
|
||||||
set-face global MenuInfo "rgb:%opt{comment}"
|
|
||||||
set-face global Information "rgb:%opt{fg},rgb:%opt{bgmenu}"
|
|
||||||
set-face global InlineInformation "rgb:%opt{yellow}"
|
|
||||||
set-face global Error "rgb:%opt{orange}"
|
|
||||||
set-face global DiagnosticError "default,default,rgb:%opt{red}+c"
|
|
||||||
set-face global DiagnosticWarning "default,default,rgb:%opt{yellow}+c"
|
|
||||||
set-face global StatusLine "rgb:%opt{fg},rgb:%opt{bgmenu}"
|
|
||||||
set-face global StatusLineMode "rgb:%opt{green}"
|
|
||||||
set-face global StatusLineInfo "rgb:%opt{yellow_green}"
|
|
||||||
set-face global StatusLineValue "rgb:%opt{green}"
|
|
||||||
set-face global StatusCursor "rgb:%opt{bg},rgb:%opt{green}"
|
|
||||||
set-face global Prompt "rgb:%opt{green}"
|
|
||||||
set-face global BufferPadding "rgb:%opt{bg},rgb:%opt{bg}"
|
|
||||||
|
|
||||||
# Built-in highlighter faces
|
|
||||||
|
|
||||||
set-face global LineNumbers "rgb:%opt{comment}"
|
|
||||||
set-face global LineNumberCursor "rgb:%opt{comment}"
|
|
||||||
set-face global LineNumbersWrapped "rgb:%opt{bg},rgb:%opt{bg}"
|
|
||||||
set-face global MatchingChar "rgb:%opt{yellow_green}"
|
|
||||||
set-face global Whitespace "rgb:%opt{gray}"
|
|
||||||
set-face global WhitespaceIndent "rgb:%opt{gray}"
|
|
||||||
set-face global WrapMarker "rgb:%opt{yellow_green}"
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
|
|
||||||
# kak-lsp
|
|
||||||
|
|
||||||
set-face global InfoDefault "default"
|
|
||||||
set-face global InfoBlock "rgb:%opt{cyan}"
|
|
||||||
set-face global InfoBlockQuote "rgb:%opt{orange}"
|
|
||||||
set-face global InfoBullet "rgb:%opt{orange}"
|
|
||||||
set-face global InfoHeader "rgb:%opt{orange}"
|
|
||||||
set-face global InfoLink "rgb:%opt{blue}"
|
|
||||||
set-face global InfoLinkMono "rgb:%opt{pink}"
|
|
||||||
|
|
||||||
set-face global InfoMono "rgb:%opt{cyan}"
|
|
||||||
set-face global InfoRule "rgb:%opt{orange}"
|
|
||||||
set-face global InfoDiagnosticError "rgb:%opt{red}"
|
|
||||||
set-face global InfoDiagnosticHint "rgb:%opt{blue}"
|
|
||||||
set-face global InfoDiagnosticInformation "rgb:%opt{yellow_green}"
|
|
||||||
set-face global InfoDiagnosticWarning "rgb:%opt{yellow}"
|
|
||||||
|
|
||||||
set-face global LineFlagError "rgb:%opt{red}"
|
|
||||||
set-face global LineFlagHint "rgb:%opt{blue}"
|
|
||||||
set-face global LineFlagInfo "rgb:%opt{yellow_green}"
|
|
||||||
set-face global LineFlagWarning "rgb:%opt{yellow}"
|
|
||||||
|
|
||||||
set-face global InlayDiagnosticError "rgb:%opt{red}"
|
|
||||||
set-face global InlayDiagnosticHint "rgb:%opt{blue}"
|
|
||||||
set-face global InlayDiagnosticInfo "rgb:%opt{yellow_green}"
|
|
||||||
set-face global InlayDiagnosticWarning "rgb:%opt{yellow}"
|
|
||||||
|
|
||||||
set-face global LineFlagError "rgb:%opt{red}"
|
|
||||||
set-face global LineFlagHint "rgb:%opt{blue}"
|
|
||||||
set-face global LineFlagInfo "rgb:%opt{yellow_green}"
|
|
||||||
set-face global LineFlagWarning "rgb:%opt{yellow}"
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
# LP light
|
|
||||||
|
|
||||||
declare-option str bg "faf8f5"
|
|
||||||
declare-option str bgmenu "f6ede0"
|
|
||||||
declare-option str fg "696257"
|
|
||||||
declare-option str light_yellow "e0b771"
|
|
||||||
declare-option str comment "a59d91"
|
|
||||||
declare-option str gray "58666d"
|
|
||||||
|
|
||||||
declare-option str red "d48490"
|
|
||||||
declare-option str orange "d4896e"
|
|
||||||
declare-option str yellow "bf9752"
|
|
||||||
declare-option str yellow_green "96a85e"
|
|
||||||
declare-option str green "62b289"
|
|
||||||
declare-option str cyan "40b1b7"
|
|
||||||
declare-option str blue "54aad1"
|
|
||||||
declare-option str blue_violet "7a9fdd"
|
|
||||||
declare-option str violet "9d94d9"
|
|
||||||
declare-option str pink "ba8ac5"
|
|
||||||
declare-option str pink_red "ce84a7"
|
|
||||||
|
|
||||||
declare-option str selectionalpha "90"
|
|
||||||
|
|
||||||
## CODE
|
|
||||||
|
|
||||||
set-face global value "rgb:%opt{yellow_green}"
|
|
||||||
set-face global type "rgb:%opt{cyan}"
|
|
||||||
set-face global variable "rgb:%opt{blue_violet}"
|
|
||||||
set-face global module "rgb:%opt{red}"
|
|
||||||
set-face global function "rgb:%opt{blue}"
|
|
||||||
set-face global string "rgb:%opt{green}"
|
|
||||||
set-face global keyword "rgb:%opt{pink}"
|
|
||||||
set-face global operator "rgb:%opt{orange}"
|
|
||||||
set-face global attribute "rgb:%opt{blue_violet}"
|
|
||||||
set-face global comment "rgb:%opt{comment}"
|
|
||||||
set-face global documentation "rgb:%opt{comment}"
|
|
||||||
set-face global meta "rgb:%opt{violet}"
|
|
||||||
set-face global bultin "rgb:%opt{pink_red}"
|
|
||||||
|
|
||||||
## MARKUP
|
|
||||||
|
|
||||||
set-face global title "rgb:%opt{pink_red}"
|
|
||||||
set-face global header "rgb:%opt{orange}"
|
|
||||||
set-face global mono "rgb:%opt{yellow_green}"
|
|
||||||
set-face global block "rgb:%opt{cyan}"
|
|
||||||
set-face global link "rgb:%opt{blue}"
|
|
||||||
set-face global bullet "rgb:%opt{orange}"
|
|
||||||
set-face global list "rgb:%opt{orange}"
|
|
||||||
|
|
||||||
## BUILTIN
|
|
||||||
|
|
||||||
set-face global Default "rgb:%opt{fg},rgb:%opt{bg}"
|
|
||||||
set-face global PrimarySelection "rgb:%opt{bg},rgba:%opt{green}%opt{selectionalpha}"
|
|
||||||
set-face global SecondarySelection "rgb:%opt{bg},rgba:%opt{blue}%opt{selectionalpha}"
|
|
||||||
set-face global PrimaryCursor "rgb:%opt{bg},rgb:%opt{green}"
|
|
||||||
set-face global SecondaryCursor "rgb:%opt{bg},rgb:%opt{blue}"
|
|
||||||
set-face global PrimaryCursorEol "rgb:%opt{bg},rgb:%opt{pink_red}"
|
|
||||||
set-face global SecondaryCursorEol "rgb:%opt{bg},rgb:%opt{violet}"
|
|
||||||
set-face global MenuForeground "rgb:%opt{fg},rgb:%opt{light_yellow}"
|
|
||||||
set-face global MenuBackground "rgb:%opt{fg},rgb:%opt{bgmenu}"
|
|
||||||
set-face global MenuInfo "rgb:%opt{comment}"
|
|
||||||
set-face global Information "rgb:%opt{fg},rgb:%opt{bgmenu}"
|
|
||||||
set-face global InlineInformation "rgb:%opt{yellow}"
|
|
||||||
set-face global Error "rgb:%opt{orange}"
|
|
||||||
set-face global DiagnosticError "default,default,rgb:%opt{red}+c"
|
|
||||||
set-face global DiagnosticWarning "default,default,rgb:%opt{yellow}+c"
|
|
||||||
set-face global StatusLine "rgb:%opt{fg},rgb:%opt{bgmenu}"
|
|
||||||
set-face global StatusLineMode "rgb:%opt{green}"
|
|
||||||
set-face global StatusLineInfo "rgb:%opt{yellow}"
|
|
||||||
set-face global StatusLineValue "rgb:%opt{green}"
|
|
||||||
set-face global StatusCursor "rgb:%opt{bg},rgb:%opt{green}"
|
|
||||||
set-face global Prompt "rgb:%opt{comment}"
|
|
||||||
set-face global BufferPadding "rgb:%opt{bg},rgb:%opt{bg}"
|
|
||||||
|
|
||||||
# Built-in highlighter faces
|
|
||||||
|
|
||||||
set-face global LineNumbers "rgb:%opt{comment}"
|
|
||||||
set-face global LineNumberCursor "rgb:%opt{comment}"
|
|
||||||
set-face global LineNumbersWrapped "rgb:%opt{bg},rgb:%opt{bg}"
|
|
||||||
set-face global MatchingChar "rgb:%opt{yellow_green}"
|
|
||||||
set-face global Whitespace "rgb:%opt{gray}"
|
|
||||||
set-face global WhitespaceIndent "rgb:%opt{gray}"
|
|
||||||
set-face global WrapMarker "rgb:%opt{yellow_green}"
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
|
|
||||||
# kak-lsp
|
|
||||||
|
|
||||||
set-face global InfoDefault "default"
|
|
||||||
set-face global InfoBlock "rgb:%opt{cyan}"
|
|
||||||
set-face global InfoBlockQuote "rgb:%opt{orange}"
|
|
||||||
set-face global InfoBullet "rgb:%opt{orange}"
|
|
||||||
set-face global InfoHeader "rgb:%opt{orange}"
|
|
||||||
set-face global InfoLink "rgb:%opt{blue}"
|
|
||||||
set-face global InfoLinkMono "rgb:%opt{pink}"
|
|
||||||
|
|
||||||
set-face global InfoMono "rgb:%opt{cyan}"
|
|
||||||
set-face global InfoRule "rgb:%opt{orange}"
|
|
||||||
set-face global InfoDiagnosticError "rgb:%opt{red}"
|
|
||||||
set-face global InfoDiagnosticHint "rgb:%opt{blue}"
|
|
||||||
set-face global InfoDiagnosticInformation "rgb:%opt{yellow_green}"
|
|
||||||
set-face global InfoDiagnosticWarning "rgb:%opt{yellow}"
|
|
||||||
|
|
||||||
set-face global LineFlagError "rgb:%opt{red}"
|
|
||||||
set-face global LineFlagHint "rgb:%opt{blue}"
|
|
||||||
set-face global LineFlagInfo "rgb:%opt{yellow_green}"
|
|
||||||
set-face global LineFlagWarning "rgb:%opt{yellow}"
|
|
||||||
|
|
||||||
set-face global InlayDiagnosticError "rgb:%opt{red}"
|
|
||||||
set-face global InlayDiagnosticHint "rgb:%opt{blue}"
|
|
||||||
set-face global InlayDiagnosticInfo "rgb:%opt{yellow_green}"
|
|
||||||
set-face global InlayDiagnosticWarning "rgb:%opt{yellow}"
|
|
||||||
|
|
||||||
set-face global LineFlagError "rgb:%opt{red}"
|
|
||||||
set-face global LineFlagHint "rgb:%opt{blue}"
|
|
||||||
set-face global LineFlagInfo "rgb:%opt{yellow_green}"
|
|
||||||
set-face global LineFlagWarning "rgb:%opt{yellow}"
|
|
||||||
@@ -1,299 +0,0 @@
|
|||||||
# OPTIONS
|
|
||||||
|
|
||||||
set-option global startup_info_version 20260412
|
|
||||||
set-option global ui_options terminal_assistant=none
|
|
||||||
|
|
||||||
hook global WinCreate .* %{
|
|
||||||
add-highlighter window/number-lines number-lines -relative -hlcursor
|
|
||||||
}
|
|
||||||
add-highlighter global/ show-matching
|
|
||||||
|
|
||||||
# LOCAL
|
|
||||||
|
|
||||||
nop %sh{
|
|
||||||
mkdir -p "$kak_config/autoload"
|
|
||||||
[ -e "$kak_config/autoload/stdlib" ] || ln -s "$kak_runtime/autoload" "$kak_config/autoload/stdlib"
|
|
||||||
}
|
|
||||||
|
|
||||||
map global -docstring 'Buffer' user ' ' ': buffer '
|
|
||||||
|
|
||||||
declare-user-mode file-mode
|
|
||||||
map global -docstring 'Search/open' user 's' ': enter-user-mode file-mode<ret>'
|
|
||||||
|
|
||||||
map global -docstring 'Open (fd)' file-mode 'a' ': file-open<ret>'
|
|
||||||
map global -docstring 'Open (fd -H)' file-mode 'h' ': file-open-with-hidden<ret>'
|
|
||||||
map global -docstring 'Open (recent)' file-mode 'r' ': file-open-recent<ret>'
|
|
||||||
map global -docstring 'Open (nnn)' file-mode 'd' ': nnn-open %val{buffile}<ret>'
|
|
||||||
map global -docstring 'Open (nnn)' file-mode 'D' ': nnn-open .<ret>'
|
|
||||||
map global -docstring 'Open/create in dir' file-mode 'c' ': open-create-in-dir<ret>'
|
|
||||||
map global -docstring 'ctags file symbols' file-mode 's' ': ctags-file-symbols<ret>'
|
|
||||||
map global -docstring 'ctags project symbols' file-mode 'w' ': ctags-project-symbols<ret>'
|
|
||||||
map global -docstring 'Grep' file-mode 'g' ':grep '
|
|
||||||
map global -docstring 'Grep next match' file-mode 'n' ': grep-next-match<ret>'
|
|
||||||
map global -docstring 'Grep previous match' file-mode 'p' ': grep-prev-match<ret>'
|
|
||||||
map global -docstring 'Grep current file' file-mode 'l' ':grep-file '
|
|
||||||
map global -docstring 'Grep current file' file-mode 'L' ': grep-file %val{selection}<ret>'
|
|
||||||
map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer '
|
|
||||||
|
|
||||||
declare-user-mode git-mode
|
|
||||||
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
|
|
||||||
|
|
||||||
map global -docstring 'Open file' git-mode 'a' ': file-open-git<ret>'
|
|
||||||
map global -docstring 'Blame' git-mode 'b' ': git blame<ret>'
|
|
||||||
map global -docstring 'Blame' git-mode 'B' ': git blame-jump<ret>'
|
|
||||||
map global -docstring 'Diff file' git-mode 'd' ': git diff %val{buffile}<ret>'
|
|
||||||
map global -docstring 'Diff' git-mode 'D' ': git diff<ret>'
|
|
||||||
map global -docstring 'Grep' git-mode 'g' ':git grep '
|
|
||||||
map global -docstring 'Grep' git-mode 'G' ': git grep %val{selection}<ret>'
|
|
||||||
map global -docstring 'Log' git-mode 'l' ': git log -- %val{buffile}<ret>'
|
|
||||||
map global -docstring 'Log' git-mode 'L' ': git log<ret>'
|
|
||||||
map global -docstring 'Show branch' git-mode 'c' ': git show-branch<ret>'
|
|
||||||
map global -docstring 'Status' git-mode 't' ': git status<ret>'
|
|
||||||
map global -docstring 'Show diff' git-mode 's' ': git-show-diff<ret>'
|
|
||||||
map global -docstring 'Show' git-mode 'S' ': git show<ret>'
|
|
||||||
map global -docstring 'Hide diff' git-mode 'h' ': git-hide-diff<ret>'
|
|
||||||
map global -docstring 'Next hunk' git-mode 'n' ': git next-hunk<ret>'
|
|
||||||
map global -docstring 'Prev hunk' git-mode 'p' ': git prev-hunk<ret>'
|
|
||||||
|
|
||||||
declare-user-mode options-mode
|
|
||||||
map global -docstring 'Options' user 'o' ': enter-user-mode options-mode<ret>'
|
|
||||||
|
|
||||||
map global -docstring 'Five Dark mode' options-mode 'd' ': colorscheme five-colors-dark<ret>'
|
|
||||||
map global -docstring 'Five Light mode' options-mode 'l' ': colorscheme five-colors-light<ret>'
|
|
||||||
map global -docstring 'Light mode' options-mode 'L' ': colorscheme one-light<ret>'
|
|
||||||
map global -docstring 'Dark mode' options-mode 'D' ': colorscheme one-darker<ret>'
|
|
||||||
|
|
||||||
declare-user-mode make-mode
|
|
||||||
map global -docstring 'Make' user 'k' ': enter-user-mode make-mode<ret>'
|
|
||||||
|
|
||||||
map global -docstring 'Make' make-mode 'a' ':make '
|
|
||||||
map global -docstring 'Next' make-mode 'n' ': make-next-error<ret>'
|
|
||||||
map global -docstring 'Previous' make-mode 'p' ': make-previous-error<ret>'
|
|
||||||
map global -docstring 'General messages' make-mode 'g' ': set window make_error_pattern "^([^:\n]+):(\d+):(?:(\d+):)? ([^\n]+)?"<ret>'
|
|
||||||
|
|
||||||
evaluate-commands %sh{
|
|
||||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
|
||||||
echo "
|
|
||||||
map global -docstring 'Paste clipboard (append)' user 'p' '<a-!> wl-paste -n<ret>'
|
|
||||||
map global -docstring 'Paste clipboard (insert)' user 'P' '! wl-paste -n<ret>'
|
|
||||||
map global -docstring 'Yank to clipboard' user 'y' '<a-|> wl-copy<ret>'
|
|
||||||
"
|
|
||||||
elif [ -n "$DISPLAY" ]; then
|
|
||||||
echo "
|
|
||||||
map global -docstring 'Paste clipboard (append)' user 'p' '<a-!> xsel -bo<ret>'
|
|
||||||
map global -docstring 'Paste clipboard (insert)' user 'P' '! xsel -bo<ret>'
|
|
||||||
map global -docstring 'Yank to clipboard' user 'y' '<a-|> xsel -bi<ret>'
|
|
||||||
"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
map global -docstring 'Replace jump mode' user 'j' ': enter_jump_mode_with_replace_select_mode<ret>'
|
|
||||||
map global -docstring 'Extend jump mode' user 'e' ': enter_jump_mode_with_extend_select_mode<ret>'
|
|
||||||
map global -docstring 'Append jump mode' user 'a' ': enter_jump_mode_with_append_select_mode<ret>'
|
|
||||||
|
|
||||||
define-command -override file-open %{
|
|
||||||
prompt -menu -shell-script-candidates %{ fd -t f } 'File: ' %{ edit -- %val{text} }
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override file-open-with-hidden %{
|
|
||||||
prompt -menu -shell-script-candidates %{ fd -t f -H } 'File: ' %{ edit -- %val{text} }
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override file-open-git %{
|
|
||||||
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override file-open-recent %{
|
|
||||||
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override grep-file -params 1- %{
|
|
||||||
grep %arg{@} -- %val{buffile}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override -params 1 nnn-open %{
|
|
||||||
terminal nnn-kak-edit %arg{1} %val{session} %val{client}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override open-create-in-dir %{
|
|
||||||
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command git-log-show-current-commit %{
|
|
||||||
execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b'
|
|
||||||
git show %val{selection}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override git-show-diff %{
|
|
||||||
hook buffer -group git-show-diff NormalIdle .* %{ git update-diff }
|
|
||||||
git show-diff
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override git-hide-diff %{
|
|
||||||
remove-hooks buffer git-show-diff
|
|
||||||
git hide-diff
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override ctags-file-symbols %{
|
|
||||||
prompt -menu -shell-script-candidates %{
|
|
||||||
ctags -uo - -x "$kak_buffile" | awk -f "$kak_config/scripts/filesymbols.awk"
|
|
||||||
} 'File symbols: ' %{
|
|
||||||
evaluate-commands %sh{ awk -f "$kak_config/scripts/filesymbolscmd.awk" # "$kak_text" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -override ctags-project-symbols %{
|
|
||||||
prompt -menu -shell-script-candidates %{
|
|
||||||
git ls-files | xargs wc | awk '$1 > 0 && $3/$1 < 1024 { print $4 }' | xargs ctags -uo - -x | awk -f "$kak_config/scripts/projectsymbols.awk"
|
|
||||||
} 'Project symbols: ' %{
|
|
||||||
evaluate-commands %sh{ awk -f "$kak_config/scripts/projectsymbolscmd.awk" # "$kak_text" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
set-face global JumpLabel 'rgb:faf8f5,rgb:af8842+F'
|
|
||||||
|
|
||||||
# CHANGE STATUS BAR COLOR IN INSERT MODE
|
|
||||||
|
|
||||||
hook global ModeChange push:.*:insert %{
|
|
||||||
set-face window StatusLine 'default,rgb:04785d'
|
|
||||||
set-option window idle_timeout 500
|
|
||||||
}
|
|
||||||
|
|
||||||
hook global ModeChange pop:insert:.* %{
|
|
||||||
unset-face window StatusLine
|
|
||||||
unset-option window idle_timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
# ODIN
|
|
||||||
|
|
||||||
hook global BufSetOption filetype=odin %{
|
|
||||||
set-option buffer formatcmd 'odinfmt -stdin'
|
|
||||||
}
|
|
||||||
|
|
||||||
hook global BufSetOption filetype=go %{
|
|
||||||
hook -group buf-write-pre-fmt buffer BufWritePre .* %{
|
|
||||||
lsp-formatting-sync
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# LSP
|
|
||||||
|
|
||||||
eval %sh{kak-lsp}
|
|
||||||
lsp-enable
|
|
||||||
|
|
||||||
set-option global modelinefmt "%opt{lsp_modeline} %opt{modelinefmt}"
|
|
||||||
|
|
||||||
map global user l ': enter-user-mode lsp<ret>' -docstring 'LSP mode'
|
|
||||||
|
|
||||||
map global goto d <esc>:lsp-definition<ret> -docstring 'LSP definition'
|
|
||||||
map global goto r <esc>:lsp-references<ret> -docstring 'LSP references'
|
|
||||||
map global goto y <esc>:lsp-type-definition<ret> -docstring 'LSP type definition'
|
|
||||||
|
|
||||||
map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
|
|
||||||
|
|
||||||
map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
|
||||||
map global object <a-a> '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
|
||||||
map global object f '<a-semicolon>lsp-object Function Method<ret>' -docstring 'LSP function or method'
|
|
||||||
map global object t '<a-semicolon>lsp-object Class Interface Module Namespace Struct<ret>' -docstring 'LSP class or module'
|
|
||||||
map global object d '<a-semicolon>lsp-diagnostic-object error warning<ret>' -docstring 'LSP errors and warnings'
|
|
||||||
map global object D '<a-semicolon>lsp-diagnostic-object error<ret>' -docstring 'LSP errors'
|
|
||||||
|
|
||||||
map global lsp p '<esc>: lsp-find-error --previous error<ret>' -docstring 'find previous error'
|
|
||||||
|
|
||||||
# BUNDLE
|
|
||||||
|
|
||||||
source "%val{config}/bundle/kak-bundle/rc/kak-bundle.kak"
|
|
||||||
bundle-noload kak-bundle https://codeberg.org/jdugan6240/kak-bundle
|
|
||||||
|
|
||||||
# COLORSCHEME
|
|
||||||
|
|
||||||
bundle-theme kak-one 'https://codeberg.org/raiguard/kak-one'
|
|
||||||
|
|
||||||
bundle-theme kakoune-themes 'https://codeberg.org/anhsirk0/kakoune-themes'
|
|
||||||
|
|
||||||
# FZF
|
|
||||||
|
|
||||||
bundle fzf.kak 'https://github.com/andreyorst/fzf.kak' %{
|
|
||||||
map global -docstring 'FZF menu' user 'f' ': fzf-mode<ret>'
|
|
||||||
require-module fzf
|
|
||||||
set-option global fzf_highlight_command "bat"
|
|
||||||
}
|
|
||||||
|
|
||||||
hook global BufCreate [^*].* %{
|
|
||||||
nop %sh{
|
|
||||||
mru=~/.cache/kak-mru
|
|
||||||
echo "$kak_buffile" | awk '!seen[$0]++' - "$mru" | sponge "$mru"
|
|
||||||
}}
|
|
||||||
|
|
||||||
# MATCH
|
|
||||||
|
|
||||||
bundle match 'https://github.com/kmafeni04/match.kak' %{
|
|
||||||
declare-user-mode match
|
|
||||||
map global user m ': enter-user-mode match<ret>' -docstring 'Match'
|
|
||||||
map global match m m -docstring 'Match next matching pair'
|
|
||||||
map global match i ': match-inside<ret>' -docstring 'Match inside object'
|
|
||||||
map global match a ': match-around<ret>' -docstring 'Match around object'
|
|
||||||
map global match n ': match-next<ret>' -docstring 'Match next object'
|
|
||||||
map global match p ': match-prev<ret>' -docstring 'Match previous object'
|
|
||||||
map global match s ': match-surround-add<ret>' -docstring 'Surround selection with character'
|
|
||||||
map global match d ': match-surround-delete<ret>' -docstring "Delete selection's surrounding character"
|
|
||||||
map global match r ': match-surround-replace<ret>' -docstring "Replace selection's surrounding character"
|
|
||||||
map global match u ': match-surround-undo<ret>' -docstring "Undo"
|
|
||||||
map global match U ': match-surround-redo<ret>' -docstring "Redo"
|
|
||||||
}
|
|
||||||
|
|
||||||
# HARPOON
|
|
||||||
|
|
||||||
bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{
|
|
||||||
harpoon-add-bindings
|
|
||||||
}
|
|
||||||
|
|
||||||
# PENEIRA
|
|
||||||
|
|
||||||
bundle 'luar' 'https://github.com/gustavo-hms/luar' %{
|
|
||||||
require-module luar
|
|
||||||
}
|
|
||||||
|
|
||||||
bundle 'peneira' 'https://github.com/gustavo-hms/peneira' %{
|
|
||||||
require-module peneira
|
|
||||||
|
|
||||||
define-command buffers %{
|
|
||||||
peneira 'buffers: ' %{ eval "printf '%s\n' $kak_quoted_buflist" } %{
|
|
||||||
buffer %arg{1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
define-command peneira-git-files %{
|
|
||||||
peneira 'git files: ' %{ git ls-files } %{ edit -- %arg{1} }
|
|
||||||
}
|
|
||||||
define-command peneira-files-with-hidden %{
|
|
||||||
peneira 'git files: ' %{ fd -t f -H } %{ edit -- %arg{1} }
|
|
||||||
}
|
|
||||||
define-command peneira-recent-files %{
|
|
||||||
peneira 'mru files: ' %{ cat ~/.cache/kak-mru } %{ edit -- %arg{1} }
|
|
||||||
}
|
|
||||||
|
|
||||||
map global -docstring 'Buffer' user ' ' ': buffers<ret>'
|
|
||||||
|
|
||||||
map global -docstring 'Git files' file-mode 'a' ': peneira-git-files<ret>'
|
|
||||||
map global -docstring 'Buffers' file-mode 'b' ': buffers<ret>'
|
|
||||||
map global -docstring 'Files' file-mode 'f' ': peneira-files<ret>'
|
|
||||||
map global -docstring 'Files' file-mode 'F' ': peneira-local-files<ret>'
|
|
||||||
map global -docstring 'Files (with hidden)' file-mode 'h' ': peneira-files-with-hidden<ret>'
|
|
||||||
map global -docstring 'Lines' file-mode 'l' ': peneira-lines<ret>'
|
|
||||||
map global -docstring 'Symbols' file-mode 's' ': peneira-symbols<ret>'
|
|
||||||
map global -docstring 'Recent files' file-mode 'r' ': peneira-recent-files<ret>'
|
|
||||||
}
|
|
||||||
|
|
||||||
# LOCAL
|
|
||||||
|
|
||||||
define-command set-dark-or-light-colorscheme %{
|
|
||||||
colorscheme %sh{
|
|
||||||
if [ -e ~/.lightmode ]; then
|
|
||||||
echo five-colors-light
|
|
||||||
else
|
|
||||||
echo five-colors-dark
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
set-dark-or-light-colorscheme
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
for (i = 3; i < NF; ++i) {
|
|
||||||
if ($i ~ /^[0-9]+$/) {
|
|
||||||
j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ")
|
|
||||||
print substr($0, 0, j - 1) "\u00a0" $(i-1) "\u00a0" $i
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
BEGIN {
|
|
||||||
n = split(ENVIRON["kak_text"], a, "\u00a0")
|
|
||||||
line = a[3]
|
|
||||||
if (n == 3 && line ~ /^[0-9]+/) {
|
|
||||||
pat = a[1]
|
|
||||||
gsub(/'/, "''", pat)
|
|
||||||
gsub(/\\/, "\\\\", pat)
|
|
||||||
print "execute-keys " line " g vv x s '/\\b\\Q" pat "\\E\\b|\\Q" pat "<ret>' <a-)>,"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
for (i = 3; i < NF; ++i) {
|
|
||||||
if ($i ~ /^[0-9]+$/) {
|
|
||||||
j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ")
|
|
||||||
print substr($0, 0, j - 1) "\u00a0" $(i-1) "\u00a0" $i "\u00a0" $(i+1)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
BEGIN {
|
|
||||||
n = split(ENVIRON["kak_text"], a, "\u00a0")
|
|
||||||
line = a[3]
|
|
||||||
if (n == 4 && line ~ /^[0-9]+/) {
|
|
||||||
pat = a[1]
|
|
||||||
gsub(/'/, "''", pat)
|
|
||||||
gsub(/\\/, "\\\\", pat)
|
|
||||||
print "edit --", a[4], line
|
|
||||||
print "execute-keys vv x s %{/\\b\\Q" pat "\\E\\b|\\Q" pat "<ret>} <a-)>,"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cd "$(dirname $1)"
|
|
||||||
exec nnn -A -p - | awk "{print \"evaluate-commands -client $3 edit\", \$1 }" | kak -p "$2"
|
|
||||||
@@ -1,27 +1,20 @@
|
|||||||
font_family HurmitNerdFont
|
font_family FiraCode Nerd
|
||||||
font_size 10
|
font_size 11
|
||||||
|
|
||||||
cursor_blink_interval 0
|
cursor_blink_interval 0
|
||||||
enable_audio_bell no
|
|
||||||
visual_bell_duration 1.0
|
|
||||||
|
|
||||||
tab_bar_min_tabs 1
|
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title} {index}"
|
||||||
tab_bar_style powerline
|
|
||||||
tab_bar_edge top
|
|
||||||
tab_bar_filter session:~ or session:^$
|
|
||||||
tab_title_template "{index}:{session_name}:{bell_symbol}{activity_symbol}{title}"
|
|
||||||
tab_powerline_style round
|
|
||||||
|
|
||||||
open_url_with qutebrowser
|
action_alias launch_tab launch --type=tab --cwd=current
|
||||||
|
|
||||||
action_alias launch_tab_home launch --type tab --cwd=~
|
|
||||||
kitten_alias hints hints --hints-background-color red --hints-foreground-color white
|
|
||||||
|
|
||||||
allow_remote_control yes
|
|
||||||
|
|
||||||
|
map ctrl+shift+n launch_tab tmux
|
||||||
|
map ctrl+shift+t launch_tab tmux attach
|
||||||
|
map ctrl+shift+s launch_tab zsh
|
||||||
map ctrl+shift+6 no_op
|
map ctrl+shift+6 no_op
|
||||||
map ctrl+shift+0 nth_window -1
|
|
||||||
|
|
||||||
|
map ctrl+shift+h previous_tab
|
||||||
|
map ctrl+shift+l next_tab
|
||||||
|
map ctrl+shift+p goto_tab -1
|
||||||
map ctrl+alt+1 goto_tab 1
|
map ctrl+alt+1 goto_tab 1
|
||||||
map ctrl+alt+2 goto_tab 2
|
map ctrl+alt+2 goto_tab 2
|
||||||
map ctrl+alt+3 goto_tab 3
|
map ctrl+alt+3 goto_tab 3
|
||||||
@@ -31,43 +24,9 @@ map ctrl+alt+6 goto_tab 6
|
|||||||
map ctrl+alt+7 goto_tab 7
|
map ctrl+alt+7 goto_tab 7
|
||||||
map ctrl+alt+8 goto_tab 8
|
map ctrl+alt+8 goto_tab 8
|
||||||
map ctrl+alt+9 goto_tab 9
|
map ctrl+alt+9 goto_tab 9
|
||||||
map ctrl+alt+0 goto_tab -1
|
map ctrl+alt+0 goto_tab 10
|
||||||
|
|
||||||
map ctrl+alt+h neighboring_window left
|
|
||||||
map ctrl+alt+j neighboring_window down
|
|
||||||
map ctrl+alt+k neighboring_window up
|
|
||||||
map ctrl+alt+l neighboring_window right
|
|
||||||
|
|
||||||
map ctrl+alt+a last_used_layout
|
|
||||||
map ctrl+alt+b goto_layout fat
|
|
||||||
map ctrl+alt+g goto_layout grid
|
|
||||||
map ctrl+alt+r goto_layout tall
|
|
||||||
|
|
||||||
map ctrl+alt+space goto_session -1
|
|
||||||
map ctrl+alt+return new_window_with_cwd
|
|
||||||
map ctrl+alt+d new_tab_with_cwd sh -c 'cd $(kitten choose-file --mode dir) && nvim'
|
|
||||||
map ctrl+alt+e new_tab_with_cwd nvim
|
|
||||||
map ctrl+alt+i new_tab_with_cwd lazygit
|
|
||||||
map ctrl+alt+f new_tab_with_cwd sh -c 'nvim $(kitten choose-file)'
|
|
||||||
map ctrl+alt+m toggle_layout stack
|
|
||||||
map ctrl+alt+o goto_session ~/.config/kitty/sessions
|
|
||||||
map ctrl+alt+/ goto_session --sort-by=alphabetical ~/.config/kitty/sessions
|
|
||||||
map ctrl+alt+p new_tab_with_cwd spf
|
|
||||||
map ctrl+alt+s launch --stdin-source=@screen_scrollback --type=overlay nvim -R -
|
|
||||||
map ctrl+alt+w new_window_with_cwd
|
|
||||||
map ctrl+alt+t new_tab_with_cwd
|
|
||||||
map ctrl+alt+x close_window_with_confirmation
|
|
||||||
map ctrl+alt+u>d launch_tab_home sh -c 'cd $(kitten choose-file --mode dir) && nvim'
|
|
||||||
map ctrl+alt+u>f launch_tab_home sh -c 'nvim $(kitten choose-file)'
|
|
||||||
map ctrl+alt+v focus_visible_window
|
|
||||||
map ctrl+alt+y new_window nvim @selection
|
|
||||||
|
|
||||||
map ctrl+alt+shift+s save_as_session --base-dir ~/.config/kitty/sessions --match=session:.
|
|
||||||
map ctrl+alt+shift+t detach_tab
|
|
||||||
map ctrl+alt+shift+w detach_window
|
|
||||||
map ctrl+alt+shift+x close_session .
|
|
||||||
|
|
||||||
# BEGIN_KITTY_THEME
|
# BEGIN_KITTY_THEME
|
||||||
# Five-Colors-Dark
|
# Afterglow
|
||||||
include current-theme.conf
|
include current-theme.conf
|
||||||
# END_KITTY_THEME
|
# END_KITTY_THEME
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
# vim:ft=kitty
|
|
||||||
|
|
||||||
foreground #a29e98
|
|
||||||
background #272117
|
|
||||||
selection_foreground #272117
|
|
||||||
selection_background #276c9a
|
|
||||||
|
|
||||||
cursor #73d0b1
|
|
||||||
cursor_text_color #272117
|
|
||||||
|
|
||||||
active_border_color #276c9a
|
|
||||||
inactive_border_color #b0bcc7
|
|
||||||
|
|
||||||
active_tab_foreground #9da0af
|
|
||||||
active_tab_background #4d5580
|
|
||||||
inactive_tab_foreground #1f212e
|
|
||||||
inactive_tab_background #808080
|
|
||||||
|
|
||||||
color0 #85919b
|
|
||||||
color1 #c37583
|
|
||||||
color2 #44a386
|
|
||||||
color3 #af8842
|
|
||||||
color4 #5396c7
|
|
||||||
color5 #a57cba
|
|
||||||
color6 #2da0ad
|
|
||||||
color7 #b0bcc7
|
|
||||||
|
|
||||||
color8 #85919b
|
|
||||||
color9 #f2a0ae
|
|
||||||
color10 #73d0b1
|
|
||||||
color11 #dcb46e
|
|
||||||
color12 #7fc3f5
|
|
||||||
color13 #d2a8e8
|
|
||||||
color14 #62cdda
|
|
||||||
color15 #a29e98
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
# vim:ft=kitty
|
|
||||||
|
|
||||||
foreground #696257
|
|
||||||
background #faf8f5
|
|
||||||
selection_foreground #faf8f5
|
|
||||||
selection_background #3a7ead
|
|
||||||
|
|
||||||
cursor #7ad6b7
|
|
||||||
cursor_text_color #faf8f5
|
|
||||||
|
|
||||||
active_border_color #85c9fc
|
|
||||||
inactive_border_color #919da7
|
|
||||||
|
|
||||||
active_tab_foreground #1f212e
|
|
||||||
active_tab_background #a6c7f2
|
|
||||||
inactive_tab_foreground #faf8f5
|
|
||||||
inactive_tab_background #808080
|
|
||||||
|
|
||||||
color0 #272117
|
|
||||||
color1 #d0818f
|
|
||||||
color2 #52af92
|
|
||||||
color3 #bc944f
|
|
||||||
color4 #60a3d4
|
|
||||||
color5 #b289c7
|
|
||||||
color6 #3dadba
|
|
||||||
color7 #b6c3cd
|
|
||||||
|
|
||||||
color8 #919da7
|
|
||||||
color9 #85c9fc
|
|
||||||
color10 #7ad6b7
|
|
||||||
color11 #e3ba74
|
|
||||||
color12 #60a3d4
|
|
||||||
color13 #d9aeee
|
|
||||||
color14 #85c9fc
|
|
||||||
color15 #faf8f5
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# vim:ft=kitty
|
|
||||||
|
|
||||||
foreground #9da0af
|
|
||||||
background #1f212e
|
|
||||||
selection_foreground #808080
|
|
||||||
selection_background #4d5580
|
|
||||||
|
|
||||||
cursor #bf8040
|
|
||||||
cursor_text_color #1f212e
|
|
||||||
|
|
||||||
active_border_color #862d2d
|
|
||||||
inactive_border_color #4d5580
|
|
||||||
|
|
||||||
active_tab_foreground #9da0af
|
|
||||||
active_tab_background #4d5580
|
|
||||||
inactive_tab_foreground #1f212e
|
|
||||||
inactive_tab_background #808080
|
|
||||||
|
|
||||||
color1 #862d2d
|
|
||||||
color2 #3a783a
|
|
||||||
color3 #707010
|
|
||||||
color4 #345eb2
|
|
||||||
color5 #cc66cc
|
|
||||||
color6 #3a7878
|
|
||||||
color7 #a1a3aa
|
|
||||||
color8 #4d4d4d
|
|
||||||
color9 #c27070
|
|
||||||
color10 #40bf40
|
|
||||||
color11 #acac53
|
|
||||||
color12 #6b8ac7
|
|
||||||
color13 #8f248f
|
|
||||||
color14 #509595
|
|
||||||
color15 #dbdff0
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# vim:ft=kitty
|
|
||||||
|
|
||||||
foreground #1f212e
|
|
||||||
background #faf8f5
|
|
||||||
selection_foreground #1f212e
|
|
||||||
selection_background #a6c7f2
|
|
||||||
|
|
||||||
cursor #1f212e
|
|
||||||
cursor_text_color #faf8f5
|
|
||||||
|
|
||||||
active_border_color #862d2d
|
|
||||||
inactive_border_color #a6c7f2
|
|
||||||
|
|
||||||
active_tab_foreground #1f212e
|
|
||||||
active_tab_background #a6c7f2
|
|
||||||
inactive_tab_foreground #faf8f5
|
|
||||||
inactive_tab_background #808080
|
|
||||||
|
|
||||||
color0 #1f212e
|
|
||||||
color1 #862d2d
|
|
||||||
color2 #3a783a
|
|
||||||
color3 #707010
|
|
||||||
color4 #345eb2
|
|
||||||
color5 #cc66cc
|
|
||||||
color6 #3a7878
|
|
||||||
color7 #a1a3aa
|
|
||||||
color8 #73778c
|
|
||||||
color9 #c27070
|
|
||||||
color10 #40bf40
|
|
||||||
color11 #acac53
|
|
||||||
color12 #6b8ac7
|
|
||||||
color13 #8f248f
|
|
||||||
color14 #509595
|
|
||||||
color15 #dae4f1
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
|||||||
os:
|
|
||||||
edit: 'kak {{filename}}'
|
|
||||||
editAtLine: 'kak +{{line}} {{filename}}'
|
|
||||||
editAtLineAndWait: 'kak +{{line}} {{filename}}'
|
|
||||||
editInTerminal: true
|
|
||||||
openDirInEditor: 'kak -e "nnn-open {{dir}}"'
|
|
||||||
|
|
||||||
gui:
|
|
||||||
nerdFontsVersion: "3"
|
|
||||||
|
|
||||||
theme:
|
|
||||||
selectedLineBgColor:
|
|
||||||
- reverse
|
|
||||||
@@ -3,9 +3,6 @@ PREFIX = /usr/local
|
|||||||
lupan-clock: lupan-clock.c
|
lupan-clock: lupan-clock.c
|
||||||
${CC} -o $@ $< -lX11 -Wall
|
${CC} -o $@ $< -lX11 -Wall
|
||||||
|
|
||||||
stdout-clock: stdout-clock.c
|
|
||||||
${CC} -o $@ $< -Wall
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||||
cp -f lupan-clock ${DESTDIR}${PREFIX}/bin
|
cp -f lupan-clock ${DESTDIR}${PREFIX}/bin
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
#include <X11/Xlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
void show(struct tm *tm)
|
|
||||||
{
|
|
||||||
char s[6];
|
|
||||||
strftime(s, sizeof(s), "%H:%M", tm);
|
|
||||||
printf("%s\n", s);
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
int h, m, init = 60;
|
|
||||||
time_t t;
|
|
||||||
struct tm *tm;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
t = time(NULL);
|
|
||||||
tm = localtime(&t);
|
|
||||||
if (tm->tm_hour != h || tm->tm_min != m || init > 0) {
|
|
||||||
show(tm);
|
|
||||||
h = tm->tm_hour;
|
|
||||||
m = tm->tm_min;
|
|
||||||
init = (init > 0) ? init - 1 : 0;
|
|
||||||
}
|
|
||||||
sleep(1);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
@@ -1,325 +0,0 @@
|
|||||||
// This config is in the KDL format: https://kdl.dev
|
|
||||||
// https://niri-wm.github.io/niri/Configuration:-Introduction
|
|
||||||
|
|
||||||
spawn-at-startup "waybar"
|
|
||||||
|
|
||||||
input {
|
|
||||||
keyboard {
|
|
||||||
xkb {
|
|
||||||
layout "pl"
|
|
||||||
}
|
|
||||||
numlock
|
|
||||||
}
|
|
||||||
|
|
||||||
touchpad {
|
|
||||||
tap
|
|
||||||
natural-scroll
|
|
||||||
}
|
|
||||||
|
|
||||||
// mouse { }
|
|
||||||
|
|
||||||
// trackpoint { }
|
|
||||||
|
|
||||||
warp-mouse-to-focus
|
|
||||||
}
|
|
||||||
|
|
||||||
output "HDMI-A-1" {
|
|
||||||
scale 2
|
|
||||||
}
|
|
||||||
output "DP-1" {
|
|
||||||
scale 2
|
|
||||||
}
|
|
||||||
|
|
||||||
layout {
|
|
||||||
gaps 16
|
|
||||||
|
|
||||||
center-focused-column "never"
|
|
||||||
|
|
||||||
preset-column-widths {
|
|
||||||
proportion 0.33333
|
|
||||||
proportion 0.5
|
|
||||||
proportion 0.66667
|
|
||||||
}
|
|
||||||
|
|
||||||
// preset-window-heights { }
|
|
||||||
|
|
||||||
default-column-width { proportion 0.5; }
|
|
||||||
|
|
||||||
focus-ring {
|
|
||||||
width 4
|
|
||||||
active-color "#7fc8ff"
|
|
||||||
inactive-color "#505050"
|
|
||||||
}
|
|
||||||
|
|
||||||
border {
|
|
||||||
off
|
|
||||||
|
|
||||||
width 4
|
|
||||||
active-color "#ffc87f"
|
|
||||||
inactive-color "#505050"
|
|
||||||
urgent-color "#9b0000"
|
|
||||||
}
|
|
||||||
|
|
||||||
struts {
|
|
||||||
// left 64
|
|
||||||
// right 64
|
|
||||||
// top 64
|
|
||||||
// bottom 64
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
overview {
|
|
||||||
zoom 0.25
|
|
||||||
}
|
|
||||||
|
|
||||||
hotkey-overlay {
|
|
||||||
skip-at-startup
|
|
||||||
}
|
|
||||||
|
|
||||||
prefer-no-csd
|
|
||||||
|
|
||||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
|
||||||
// screenshot-path null
|
|
||||||
|
|
||||||
animations {
|
|
||||||
off
|
|
||||||
}
|
|
||||||
|
|
||||||
// Work around WezTerm's initial configure bug
|
|
||||||
// by setting an empty default-column-width.
|
|
||||||
window-rule {
|
|
||||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
|
||||||
default-column-width {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Open the Firefox picture-in-picture player as floating by default.
|
|
||||||
window-rule {
|
|
||||||
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
|
||||||
open-floating true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Example: block out two password managers from screen capture.
|
|
||||||
// (This example rule is commented out with a "/-" in front.)
|
|
||||||
/-window-rule {
|
|
||||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
|
||||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
|
||||||
|
|
||||||
block-out-from "screen-capture"
|
|
||||||
|
|
||||||
// Use this instead if you want them visible on third-party screenshot tools.
|
|
||||||
// block-out-from "screencast"
|
|
||||||
}
|
|
||||||
|
|
||||||
window-rule {
|
|
||||||
geometry-corner-radius 4
|
|
||||||
clip-to-geometry true
|
|
||||||
}
|
|
||||||
|
|
||||||
binds {
|
|
||||||
// Mod-Shift-/, which is usually the same as Mod-?,
|
|
||||||
// shows a list of important hotkeys.
|
|
||||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
|
||||||
|
|
||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
|
||||||
Mod+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "kitty" "--single-instance" "--instance-group" "default"; }
|
|
||||||
Mod+D hotkey-overlay-title="Run an Application: wmenu" { spawn "wmenu-run" "-f" "HurmitNerdFont 10"; }
|
|
||||||
Mod+B hotkey-overlay-title="Toggle waybar" { spawn "killall" "-SIGUSR1" "waybar"; }
|
|
||||||
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
|
||||||
Mod+Shift+T hotkey-overlay-title="Toggle theme" { spawn "lupan-set-theme" "toggle"; }
|
|
||||||
|
|
||||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
|
|
||||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
|
|
||||||
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
|
||||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
|
||||||
|
|
||||||
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
|
|
||||||
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
|
|
||||||
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
|
|
||||||
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
|
|
||||||
|
|
||||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
|
||||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
|
||||||
|
|
||||||
Mod+O repeat=false { toggle-overview; }
|
|
||||||
|
|
||||||
Mod+Shift+C repeat=false { close-window; }
|
|
||||||
|
|
||||||
Mod+Left { focus-column-left; }
|
|
||||||
Mod+Down { focus-window-down; }
|
|
||||||
Mod+Up { focus-window-up; }
|
|
||||||
Mod+Right { focus-column-right; }
|
|
||||||
Mod+H { focus-column-left; }
|
|
||||||
Mod+J { focus-window-down; }
|
|
||||||
Mod+K { focus-window-up; }
|
|
||||||
Mod+L { focus-column-right; }
|
|
||||||
|
|
||||||
Mod+Ctrl+Left { move-column-left; }
|
|
||||||
Mod+Ctrl+Down { move-window-down; }
|
|
||||||
Mod+Ctrl+Up { move-window-up; }
|
|
||||||
Mod+Ctrl+Right { move-column-right; }
|
|
||||||
Mod+Ctrl+H { move-column-left; }
|
|
||||||
Mod+Ctrl+J { move-window-down; }
|
|
||||||
Mod+Ctrl+K { move-window-up; }
|
|
||||||
Mod+Ctrl+L { move-column-right; }
|
|
||||||
|
|
||||||
// Alternative commands that move across workspaces when reaching
|
|
||||||
// the first or last window in a column.
|
|
||||||
// Mod+J { focus-window-or-workspace-down; }
|
|
||||||
// Mod+K { focus-window-or-workspace-up; }
|
|
||||||
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
|
||||||
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
|
||||||
|
|
||||||
Mod+Home { focus-column-first; }
|
|
||||||
Mod+End { focus-column-last; }
|
|
||||||
Mod+Ctrl+Home { move-column-to-first; }
|
|
||||||
Mod+Ctrl+End { move-column-to-last; }
|
|
||||||
|
|
||||||
Mod+Shift+Left { focus-monitor-left; }
|
|
||||||
Mod+Shift+Down { focus-monitor-down; }
|
|
||||||
Mod+Shift+Up { focus-monitor-up; }
|
|
||||||
Mod+Shift+Right { focus-monitor-right; }
|
|
||||||
Mod+Shift+H { focus-monitor-left; }
|
|
||||||
Mod+Shift+J { focus-monitor-down; }
|
|
||||||
Mod+Shift+K { focus-monitor-up; }
|
|
||||||
Mod+Shift+L { focus-monitor-right; }
|
|
||||||
|
|
||||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
|
||||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
|
||||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
|
||||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
|
||||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
|
||||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
|
||||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
|
||||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
|
||||||
|
|
||||||
// Alternatively, there are commands to move just a single window:
|
|
||||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
|
||||||
// ...
|
|
||||||
|
|
||||||
// And you can also move a whole workspace to another monitor:
|
|
||||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
|
||||||
// ...
|
|
||||||
|
|
||||||
Mod+Page_Down { focus-workspace-down; }
|
|
||||||
Mod+Page_Up { focus-workspace-up; }
|
|
||||||
Mod+U { focus-workspace-down; }
|
|
||||||
Mod+I { focus-workspace-up; }
|
|
||||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
|
||||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
|
||||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
|
||||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
|
||||||
|
|
||||||
Mod+Shift+Page_Down { move-workspace-down; }
|
|
||||||
Mod+Shift+Page_Up { move-workspace-up; }
|
|
||||||
Mod+Shift+U { move-workspace-down; }
|
|
||||||
Mod+Shift+I { move-workspace-up; }
|
|
||||||
|
|
||||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
|
||||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
|
||||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
|
||||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
|
||||||
|
|
||||||
Mod+WheelScrollRight { focus-column-right; }
|
|
||||||
Mod+WheelScrollLeft { focus-column-left; }
|
|
||||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
|
||||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
|
||||||
|
|
||||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
|
||||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
|
||||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
|
||||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
|
||||||
|
|
||||||
Mod+1 { focus-workspace 1; }
|
|
||||||
Mod+2 { focus-workspace 2; }
|
|
||||||
Mod+3 { focus-workspace 3; }
|
|
||||||
Mod+4 { focus-workspace 4; }
|
|
||||||
Mod+5 { focus-workspace 5; }
|
|
||||||
Mod+6 { focus-workspace 6; }
|
|
||||||
Mod+7 { focus-workspace 7; }
|
|
||||||
Mod+8 { focus-workspace 8; }
|
|
||||||
Mod+9 { focus-workspace 9; }
|
|
||||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
|
||||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
|
||||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
|
||||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
|
||||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
|
||||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
|
||||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
|
||||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
|
||||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
|
||||||
|
|
||||||
Mod+Ctrl+Shift+1 { move-window-to-workspace 1; }
|
|
||||||
Mod+Ctrl+Shift+2 { move-window-to-workspace 2; }
|
|
||||||
Mod+Ctrl+Shift+3 { move-window-to-workspace 3; }
|
|
||||||
Mod+Ctrl+Shift+4 { move-window-to-workspace 4; }
|
|
||||||
Mod+Ctrl+Shift+5 { move-window-to-workspace 5; }
|
|
||||||
Mod+Ctrl+Shift+6 { move-window-to-workspace 6; }
|
|
||||||
Mod+Ctrl+Shift+7 { move-window-to-workspace 7; }
|
|
||||||
Mod+Ctrl+Shift+8 { move-window-to-workspace 8; }
|
|
||||||
Mod+Ctrl+Shift+9 { move-window-to-workspace 9; }
|
|
||||||
|
|
||||||
// Switches focus between the current and the previous workspace.
|
|
||||||
// Mod+Tab { focus-workspace-previous; }
|
|
||||||
|
|
||||||
Mod+BracketLeft { consume-or-expel-window-left; }
|
|
||||||
Mod+BracketRight { consume-or-expel-window-right; }
|
|
||||||
|
|
||||||
Mod+Comma { consume-window-into-column; }
|
|
||||||
Mod+Period { expel-window-from-column; }
|
|
||||||
|
|
||||||
Mod+R { switch-preset-column-width; }
|
|
||||||
Mod+Shift+R { switch-preset-column-width-back; }
|
|
||||||
|
|
||||||
Mod+Ctrl+Shift+R { switch-preset-window-height; }
|
|
||||||
Mod+Ctrl+R { reset-window-height; }
|
|
||||||
|
|
||||||
Mod+F { maximize-column; }
|
|
||||||
Mod+Shift+F { fullscreen-window; }
|
|
||||||
|
|
||||||
Mod+M { maximize-window-to-edges; }
|
|
||||||
|
|
||||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
|
||||||
|
|
||||||
Mod+C { center-column; }
|
|
||||||
Mod+Ctrl+C { center-visible-columns; }
|
|
||||||
|
|
||||||
Mod+Minus { set-column-width "-10%"; }
|
|
||||||
Mod+Equal { set-column-width "+10%"; }
|
|
||||||
|
|
||||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
|
||||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
|
||||||
|
|
||||||
Mod+V { toggle-window-floating; }
|
|
||||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
|
||||||
|
|
||||||
Mod+W { toggle-column-tabbed-display; }
|
|
||||||
|
|
||||||
// Actions to switch layouts.
|
|
||||||
// Note: if you uncomment these, make sure you do NOT have
|
|
||||||
// a matching layout switch hotkey configured in xkb options above.
|
|
||||||
// Having both at once on the same hotkey will break the switching,
|
|
||||||
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
|
|
||||||
// Mod+Space { switch-layout "next"; }
|
|
||||||
// Mod+Shift+Space { switch-layout "prev"; }
|
|
||||||
|
|
||||||
Print { screenshot; }
|
|
||||||
Ctrl+Print { screenshot-screen; }
|
|
||||||
Alt+Print { screenshot-window; }
|
|
||||||
|
|
||||||
// Applications such as remote-desktop clients and software KVM switches may
|
|
||||||
// request that niri stops processing the keyboard shortcuts defined here
|
|
||||||
// so they may, for example, forward the key presses as-is to a remote machine.
|
|
||||||
// It's a good idea to bind an escape hatch to toggle the inhibitor,
|
|
||||||
// so a buggy application can't hold your session hostage.
|
|
||||||
//
|
|
||||||
// The allow-inhibiting=false property can be applied to other binds as well,
|
|
||||||
// which ensures niri always processes them, even when an inhibitor is active.
|
|
||||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
|
||||||
|
|
||||||
Mod+Shift+E { quit; }
|
|
||||||
Ctrl+Alt+Delete { quit; }
|
|
||||||
|
|
||||||
Mod+Shift+P { power-off-monitors; }
|
|
||||||
}
|
|
||||||
|
|
||||||
include "dark.kdl"
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
layout {
|
|
||||||
background-color "#414853"
|
|
||||||
|
|
||||||
focus-ring {
|
|
||||||
width 4
|
|
||||||
active-color "#5396c7"
|
|
||||||
inactive-color "#505050"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
layout {
|
|
||||||
background-color "#c0c1c2"
|
|
||||||
|
|
||||||
focus-ring {
|
|
||||||
width 4
|
|
||||||
active-color "#85c9fc"
|
|
||||||
inactive-color "#505050"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"layer": "top",
|
|
||||||
"position": "top",
|
|
||||||
"modules-left": [
|
|
||||||
"niri/workspaces",
|
|
||||||
"niri/window"
|
|
||||||
],
|
|
||||||
"modules-right": [
|
|
||||||
"tray",
|
|
||||||
"clock"
|
|
||||||
],
|
|
||||||
"reload_style_on_change": true,
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
* {
|
|
||||||
background-color: #282e38;
|
|
||||||
color: #a29e98;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.active {
|
|
||||||
border-bottom: 3px solid #04785d;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
border-bottom: 3px solid #c37583;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
* {
|
|
||||||
background-color: #f6ede0;
|
|
||||||
color: #696257;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.active {
|
|
||||||
border-bottom: 3px solid #278a6e;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
border-bottom: 3px solid #d0818f;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
@import url("file:///home/lupan/.config/waybar/dark.css");
|
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: HurmitNerdFont;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces {
|
|
||||||
padding: 0 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 0 3px;
|
|
||||||
border-radius: 0;
|
|
||||||
border-bottom: 3px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
border-bottom: 3px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
padding: 0 0.5rem;
|
|
||||||
border-bottom: 3px solid transparent;
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
local colors_name = "lupanbones"
|
|
||||||
vim.g.colors_name = colors_name -- Required when defining a colorscheme
|
|
||||||
|
|
||||||
local lush = require "lush"
|
|
||||||
local hsluv = lush.hsluv -- Human-friendly hsl
|
|
||||||
local util = require "zenbones.util"
|
|
||||||
|
|
||||||
local bg = vim.o.background
|
|
||||||
|
|
||||||
-- Define a palette. Use `palette_extend` to fill unspecified colors
|
|
||||||
local palette
|
|
||||||
if bg == "light" then
|
|
||||||
palette = util.palette_extend({
|
|
||||||
bg = hsluv "#faf8f5",
|
|
||||||
fg = hsluv "#1f212e",
|
|
||||||
rose = hsluv "#bf8040",
|
|
||||||
leaf = hsluv "#3d8f66",
|
|
||||||
wood = hsluv "#acac53",
|
|
||||||
water = hsluv "#6b8ac7",
|
|
||||||
blossom = hsluv "#93806c",
|
|
||||||
sky = hsluv "#7461d1",
|
|
||||||
}, bg)
|
|
||||||
else
|
|
||||||
palette = util.palette_extend({
|
|
||||||
bg = hsluv "#1f212e",
|
|
||||||
fg = hsluv "#9da0af",
|
|
||||||
rose = hsluv "#bf8040",
|
|
||||||
leaf = hsluv "#3d8f66",
|
|
||||||
wood = hsluv "#d1d147",
|
|
||||||
water = hsluv "#6b8ac7",
|
|
||||||
blossom = hsluv "#93806c",
|
|
||||||
sky = hsluv "#7461d1",
|
|
||||||
}, bg)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Generate the lush specs using the generator util
|
|
||||||
local generator = require "zenbones.specs"
|
|
||||||
local base_specs = generator.generate(palette, bg, generator.get_global_config(colors_name, bg))
|
|
||||||
|
|
||||||
-- Optionally extend specs using Lush
|
|
||||||
local specs = lush.extends({ base_specs }).with(function()
|
|
||||||
return {
|
|
||||||
Statement { base_specs.Statement, fg = palette.rose },
|
|
||||||
String { fg = palette.leaf },
|
|
||||||
Special { fg = palette.water },
|
|
||||||
Type { fg = palette.sky, gui = "italic" },
|
|
||||||
Delimiter { fg = palette.blossom },
|
|
||||||
}
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Pass the specs to lush to apply
|
|
||||||
lush(specs)
|
|
||||||
|
|
||||||
-- Optionally set term colors
|
|
||||||
require("zenbones.term").apply_colors(palette)
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
local colors_name = "lupandimbones"
|
|
||||||
vim.g.colors_name = colors_name -- Required when defining a colorscheme
|
|
||||||
|
|
||||||
local lush = require "lush"
|
|
||||||
local hsluv = lush.hsluv -- Human-friendly hsl
|
|
||||||
local util = require "zenbones.util"
|
|
||||||
|
|
||||||
local bg = vim.o.background
|
|
||||||
|
|
||||||
-- Define a palette. Use `palette_extend` to fill unspecified colors
|
|
||||||
local palette
|
|
||||||
if bg == "light" then
|
|
||||||
palette = util.palette_extend({
|
|
||||||
bg = hsluv "#ebeee8",
|
|
||||||
fg = hsluv "#1f212e",
|
|
||||||
rose = hsluv "#9d6948",
|
|
||||||
leaf = hsluv "#66824a",
|
|
||||||
wood = hsluv "#bd720f",
|
|
||||||
water = hsluv "#3a7878",
|
|
||||||
blossom = hsluv "#70675c",
|
|
||||||
sky = hsluv "#463da9",
|
|
||||||
}, bg)
|
|
||||||
else
|
|
||||||
palette = util.palette_extend({
|
|
||||||
bg = hsluv "#0d0d0c",
|
|
||||||
fg = hsluv "#5c6570",
|
|
||||||
rose = hsluv "#814c31",
|
|
||||||
leaf = hsluv "#526241",
|
|
||||||
wood = hsluv "#d78c42",
|
|
||||||
water = hsluv "#3a7878",
|
|
||||||
blossom = hsluv "#70675c",
|
|
||||||
sky = hsluv "#584b9b",
|
|
||||||
}, bg)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Generate the lush specs using the generator util
|
|
||||||
local generator = require "zenbones.specs"
|
|
||||||
local base_specs = generator.generate(palette, bg, generator.get_global_config(colors_name, bg))
|
|
||||||
|
|
||||||
-- Optionally extend specs using Lush
|
|
||||||
local specs = lush.extends({ base_specs }).with(function()
|
|
||||||
return {
|
|
||||||
Statement { base_specs.Statement, fg = palette.rose },
|
|
||||||
String { fg = palette.leaf },
|
|
||||||
Special { fg = palette.water },
|
|
||||||
Type { fg = palette.sky, gui = "italic" },
|
|
||||||
Delimiter { fg = palette.blossom },
|
|
||||||
}
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Pass the specs to lush to apply
|
|
||||||
lush(specs)
|
|
||||||
|
|
||||||
-- Optionally set term colors
|
|
||||||
require("zenbones.term").apply_colors(palette)
|
|
||||||
@@ -1,20 +1 @@
|
|||||||
require("config.options")
|
require("lupan")
|
||||||
require("config.remap")
|
|
||||||
require("config.lsp")
|
|
||||||
|
|
||||||
require("plugins.arrow")
|
|
||||||
require("plugins.auto-session")
|
|
||||||
require("plugins.colorscheme")
|
|
||||||
require("plugins.conform")
|
|
||||||
require("plugins.flash")
|
|
||||||
require("plugins.fzf-lua")
|
|
||||||
require("plugins.guess-indent")
|
|
||||||
require("plugins.luasnip")
|
|
||||||
require("plugins.multicursor")
|
|
||||||
require("plugins.nvim-various-textobjs")
|
|
||||||
require("plugins.oil")
|
|
||||||
require("plugins.slimline")
|
|
||||||
require("plugins.snacks")
|
|
||||||
require("plugins.surround")
|
|
||||||
require("plugins.treesitter")
|
|
||||||
require("plugins.which-key")
|
|
||||||
|
|||||||
@@ -1,12 +1,75 @@
|
|||||||
{
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "faf3c94a44508cec1b961406d36cc65113ff3b98" },
|
||||||
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" },
|
"blame.nvim": { "branch": "main", "commit": "b87b8c820e4cec06fbbd2f946b7b35c45906ee0c" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
"ccc.nvim": { "branch": "main", "commit": "9d1a256e006decc574789dfc7d628ca11644d4c2" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
"multicursor.nvim": { "branch": "1.0", "commit": "a6cf4e7daaf10a6b14bb7838caf779f0de5070cd" },
|
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||||
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "f643d1b51d1d3d14c8641a46ce44f6bce73c2697" },
|
||||||
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
|
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" },
|
||||||
|
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
|
||||||
|
"go.nvim": { "branch": "master", "commit": "a3455f48cff718a86275115523dcc735535a13aa" },
|
||||||
|
"godoc.nvim": { "branch": "main", "commit": "356f79853dbb3b3e200064367603751895153c29" },
|
||||||
|
"guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" },
|
||||||
|
"hererocks": { "branch": "master", "commit": "344c46ed54df9a4dbc2d2bf510dcd9a9d90497bf" },
|
||||||
|
"hlsearch.nvim": { "branch": "main", "commit": "fdeb60b890d15d9194e8600042e5232ef8c29b0e" },
|
||||||
|
"incline.nvim": { "branch": "main", "commit": "27040695b3bbfcd3257669037bd008d1a892831d" },
|
||||||
|
"iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
|
||||||
|
"kanagawa-paper.nvim": { "branch": "master", "commit": "b0df20cca3b7087c06f241983b488190cc8e23af" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lazyjj.nvim": { "branch": "main", "commit": "bba66a1351ff1f1bd078c8a1b00b8d12b3ed0017" },
|
||||||
|
"leap.nvim": { "branch": "main", "commit": "08ca7ec9e859856251d56c22ea107f82f563ff3c" },
|
||||||
|
"lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" },
|
||||||
|
"lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" },
|
||||||
|
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "c2682b0d9732bf52cbc34862056f143e71dc4a6d" },
|
||||||
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||||
|
"namu.nvim": { "branch": "main", "commit": "a3a3d81d12b61a38f131253bcd3ce5e2c6599850" },
|
||||||
|
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||||
|
"neogit": { "branch": "master", "commit": "7fe60f9aa6eacf2eb730c4e9b83d06a36d028161" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
|
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" }
|
"oil.nvim": { "branch": "master", "commit": "5b6068aad7d2057dd399fac73b7fb2cdf23ccd6e" },
|
||||||
|
"orgmode": { "branch": "master", "commit": "32ef9e95f43a6e951fb931b438372546a4f0c524" },
|
||||||
|
"persisted.nvim": { "branch": "main", "commit": "d35a3ed973e17defd8800acd46a0c893498a2671" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"quicker.nvim": { "branch": "master", "commit": "51d3926f183c2d98fbc237cc237ae0926839af3a" },
|
||||||
|
"rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
|
||||||
|
"slimline.nvim": { "branch": "main", "commit": "10dd807685997d1b72b950dfb4ec1a01cb259101" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
|
"snipe.nvim": { "branch": "main", "commit": "2a1b738dfae8502e6162eddfc774da65ed404142" },
|
||||||
|
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||||
|
"tardis.nvim": { "branch": "main", "commit": "a6ee00a217529490e79d349b1f1a9cf5831180d3" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
|
"telescope-git-grep.nvim": { "branch": "main", "commit": "d2e1322934e334ee9eb8e838c30f3afb3e7a730e" },
|
||||||
|
"telescope-tabs": { "branch": "master", "commit": "9ca0800d4e9c2610d5cac4d121cde0d9fbd89a64" },
|
||||||
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
|
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
|
||||||
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
|
"tree-sitter-nu": { "branch": "main", "commit": "100d06e29d13a8ebfc3f29173c07a5c4f2050586" },
|
||||||
|
"tree-sitter-templ": { "branch": "master", "commit": "de35706f89beed5087670a9c4421b7794ef02411" },
|
||||||
|
"treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" },
|
||||||
|
"treewalker.nvim": { "branch": "main", "commit": "86ae3cf9896b43f3cfa35b962428f32fed8b5ee8" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
|
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||||
|
"vim-ReplaceWithRegister": { "branch": "master", "commit": "a487af6efd1be3fc6fac8da47d00efc9d1f6f724" },
|
||||||
|
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||||
|
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||||
|
"vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" },
|
||||||
|
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||||
|
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||||
|
"whaler": { "branch": "main", "commit": "b3a4257f6225a9a6c42f33b56ca316325e395f22" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||||
|
"yankbank-nvim": { "branch": "main", "commit": "ded8f01bd6a7887310e14d463c8aa55eb79ec281" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "clangd" },
|
|
||||||
filetypes = { "c", "cpp" },
|
|
||||||
root_markers = { ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "gopls" },
|
|
||||||
filetypes = { "go", "gomod", "gowork", "gosum", "gotmpl" },
|
|
||||||
root_markers = { "go.mod", "go.work", ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "lua-language-server" },
|
|
||||||
filetypes = { "lua" },
|
|
||||||
root_markers = { ".luarc.json", ".git" },
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
runtime = {
|
|
||||||
version = "LuaJIT",
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "ols" },
|
|
||||||
filetypes = { "odin" },
|
|
||||||
root_markers = { ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "templ", "lsp" },
|
|
||||||
filetypes = { "templ" },
|
|
||||||
root_markers = { "go.mod", "go.work", ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "typescript-language-server", "--stdio" },
|
|
||||||
filetypes = { "javascript", "typescript", "javascriptreact", "typescriptreact" },
|
|
||||||
root_markers = { "package.json", "tsconfig.json", ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
local home = os.getenv("HOME")
|
|
||||||
local filename = home .. "/.lightmode"
|
|
||||||
|
|
||||||
local colorschemes = nil
|
|
||||||
|
|
||||||
function M.set_colorschemes(dark, light)
|
|
||||||
colorschemes = { dark = dark, light = light }
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.terminalbg()
|
|
||||||
if vim.uv.fs_stat(filename) then
|
|
||||||
return "light"
|
|
||||||
else
|
|
||||||
return "dark"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.update_colorscheme(only_if_changed)
|
|
||||||
local next = M.terminalbg()
|
|
||||||
if not only_if_changed or next ~= vim.o.background then
|
|
||||||
vim.o.background = next
|
|
||||||
if colorschemes then
|
|
||||||
vim.cmd.colorscheme(colorschemes[next])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.toggle_colorscheme()
|
|
||||||
if vim.o.background == "dark" then
|
|
||||||
vim.o.background = "light"
|
|
||||||
else
|
|
||||||
vim.o.background = "dark"
|
|
||||||
end
|
|
||||||
if colorschemes then
|
|
||||||
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local w = vim.uv.new_fs_event()
|
|
||||||
|
|
||||||
local function watch(fname)
|
|
||||||
w:start(
|
|
||||||
fname,
|
|
||||||
{},
|
|
||||||
vim.schedule_wrap(function(...)
|
|
||||||
M.update_colorscheme(true)
|
|
||||||
w:stop()
|
|
||||||
watch(fname)
|
|
||||||
end)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
watch(home)
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.api.nvim_echo({
|
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
||||||
{ out, "WarningMsg" },
|
|
||||||
{ "\nPress any key to exit..." },
|
|
||||||
}, true, {})
|
|
||||||
vim.fn.getchar()
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
require("lazy").setup({ { import = "plugins" } })
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
vim.lsp.enable({
|
|
||||||
"clangd",
|
|
||||||
"gopls",
|
|
||||||
"templ-lsp",
|
|
||||||
"lua_ls",
|
|
||||||
"ols",
|
|
||||||
"typescript-language-server",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
group = vim.api.nvim_create_augroup("lsp-keys-complete", { clear = true }),
|
|
||||||
callback = function(event)
|
|
||||||
vim.lsp.completion.enable(true, event.data.client_id, event.data.bufnr, {
|
|
||||||
convert = function(item)
|
|
||||||
return { abbr = item.label:gsub("%b()", "") }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.keymap.set("i", "<C-space>", vim.lsp.completion.get)
|
|
||||||
vim.keymap.set("n", "<leader>k", function()
|
|
||||||
vim.diagnostic.jump({ float = true, count = -1 })
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<leader>j", function()
|
|
||||||
vim.diagnostic.jump({ float = true, count = 1 })
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
vim.opt.shortmess = vim.opt.shortmess + "I"
|
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " \\"
|
|
||||||
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
vim.opt.title = true
|
|
||||||
|
|
||||||
vim.opt.ignorecase = true
|
|
||||||
vim.opt.smartcase = true
|
|
||||||
|
|
||||||
vim.opt.timeout = false
|
|
||||||
|
|
||||||
vim.o.undofile = true
|
|
||||||
|
|
||||||
vim.cmd([[autocmd TermOpen * startinsert]]);
|
|
||||||
|
|
||||||
vim.filetype.add({
|
|
||||||
extension = {
|
|
||||||
["kitty-session"] = 'kitty',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
local set = vim.keymap.set
|
|
||||||
|
|
||||||
set("n", "<M-h>", "<C-w>h")
|
|
||||||
set("n", "<M-k>", "<C-w>k")
|
|
||||||
set("n", "<M-j>", "<C-w>j")
|
|
||||||
set("n", "<M-l>", "<C-w>l")
|
|
||||||
|
|
||||||
set({ "n", 'v' }, "<leader>p", [["+p]])
|
|
||||||
set({ "n", 'v' }, "<leader>P", [["+P]])
|
|
||||||
set({ "n", 'v' }, "<leader>y", [["+y]])
|
|
||||||
set({ "n", 'v' }, "<leader>Y", [["+Y]])
|
|
||||||
|
|
||||||
set("n", "<Esc>", "<cmd>nohlsearch<cr>")
|
|
||||||
set("n", "<leader>K", "<cmd>cp<cr>")
|
|
||||||
set("n", "<leader>J", "<cmd>cn<cr>")
|
|
||||||
set("n", "<leader>x", "<cmd>copen<cr>")
|
|
||||||
set("n", "<leader>X", "<cmd>cclose<cr>")
|
|
||||||
|
|
||||||
set("n", "<leader>ga", "<cmd>tabnew | terminal lazygit<cr>")
|
|
||||||
18
nvim/.config/nvim/lua/lupan/autocmd.lua
Normal file
18
nvim/.config/nvim/lua/lupan/autocmd.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-- [[ Highlight on yank ]]
|
||||||
|
-- See `:help vim.highlight.on_yank()`
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
desc = 'Highlight when yanking (copying) text',
|
||||||
|
group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
|
desc = 'Format on saving buffer',
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
end,
|
||||||
|
group = vim.api.nvim_create_augroup('BufWriteFormat', { clear = true }),
|
||||||
|
pattern = { '*.go', '*.lua', '*.rs' },
|
||||||
|
})
|
||||||
5
nvim/.config/nvim/lua/lupan/init.lua
Normal file
5
nvim/.config/nvim/lua/lupan/init.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
require("lupan.remap")
|
||||||
|
require("lupan.lazy")
|
||||||
|
require("lupan.options")
|
||||||
|
require("lupan.autocmd")
|
||||||
|
require('lazy').setup('plugins')
|
||||||
13
nvim/.config/nvim/lua/lupan/lazy.lua
Normal file
13
nvim/.config/nvim/lua/lupan/lazy.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
-- Install package manager (`:help lazy.nvim.txt`)
|
||||||
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system {
|
||||||
|
'git',
|
||||||
|
'clone',
|
||||||
|
'--filter=blob:none',
|
||||||
|
'https://github.com/folke/lazy.nvim.git',
|
||||||
|
'--branch=stable',
|
||||||
|
lazypath,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
56
nvim/.config/nvim/lua/lupan/options.lua
Normal file
56
nvim/.config/nvim/lua/lupan/options.lua
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
-- Disable intro message
|
||||||
|
vim.opt.shortmess = vim.opt.shortmess + 'I'
|
||||||
|
|
||||||
|
vim.opt.showmode = false
|
||||||
|
|
||||||
|
-- Set highlight on search
|
||||||
|
vim.o.hlsearch = true -- false
|
||||||
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
vim.wo.number = true
|
||||||
|
vim.wo.relativenumber = true
|
||||||
|
|
||||||
|
-- Enable mouse mode
|
||||||
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.o.breakindent = true
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.o.undofile = true
|
||||||
|
|
||||||
|
-- Case-insensitive searching UNLESS \C or capital in search
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
-- Keep signcolumn on by default
|
||||||
|
vim.wo.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.o.timeout = false
|
||||||
|
|
||||||
|
-- Set completeopt to have a better completion experience
|
||||||
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
|
-- NOTE: You should make sure your terminal supports this
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
vim.o.scrolloff = 8
|
||||||
|
|
||||||
|
vim.o.tabstop = 8
|
||||||
|
vim.o.softtabstop = 4
|
||||||
|
vim.o.shiftwidth = 4
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.expandtab = true
|
||||||
|
|
||||||
|
vim.g.lightspeed_no_default_keymaps = true
|
||||||
|
|
||||||
|
vim.o.cursorline = true
|
||||||
|
|
||||||
|
vim.opt.foldcolumn = '1'
|
||||||
|
|
||||||
|
vim.opt.laststatus = 3
|
||||||
117
nvim/.config/nvim/lua/lupan/remap.lua
Normal file
117
nvim/.config/nvim/lua/lupan/remap.lua
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ' \\'
|
||||||
|
|
||||||
|
local key = vim.keymap.set
|
||||||
|
local opts = { silent = true, noremap = true }
|
||||||
|
|
||||||
|
key('v', '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
|
-- Remap for dealing with word wrap
|
||||||
|
key('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
key('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
key("n", "<leader>ut", "<cmd>UndotreeToggle<CR>", { desc = "[U]undotree [t]oggle" })
|
||||||
|
|
||||||
|
-- tabs
|
||||||
|
|
||||||
|
key('n', '<leader>td', function()
|
||||||
|
require('lupan.ui').tab_change_dir()
|
||||||
|
end, { desc = '[T]ab change [d]irectory' })
|
||||||
|
|
||||||
|
key('n', '<leader>tD', function()
|
||||||
|
require('lupan.ui').tab_change_dir_newtab()
|
||||||
|
end, { desc = '[T]ab change [D]irectory (new tab)' })
|
||||||
|
|
||||||
|
key('n', '<leader>tm', function()
|
||||||
|
require('telescope-tabs').list_tabs(require 'telescope.themes'.get_dropdown())
|
||||||
|
end, { desc = '[T]ab change [D]irectory (new tab)' })
|
||||||
|
|
||||||
|
key('n', '<leader>tt', function()
|
||||||
|
require('telescope-tabs').go_to_previous()
|
||||||
|
end, { desc = '[T]ab [t]oggle previous' })
|
||||||
|
|
||||||
|
for i = 1, 9, 1 do
|
||||||
|
key('n', '<leader>t' .. i, '<cmd>' .. i .. 'tabnext<CR>', { desc = '[T]ab nr [' .. i .. ']' })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- translations
|
||||||
|
|
||||||
|
key('n', '<leader>tr', function()
|
||||||
|
require('lupan.ui').find_translation_key()
|
||||||
|
end, { desc = '[T][r]anlation key find' })
|
||||||
|
|
||||||
|
-- Diagnostic keymaps
|
||||||
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||||
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||||
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||||
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||||
|
|
||||||
|
key('n', '<leader>N', '<cmd>bn<CR>', { desc = '[N]ext buffer' })
|
||||||
|
key('n', '<leader>P', '<cmd>bp<CR>', { desc = '[P]revious buffer' })
|
||||||
|
|
||||||
|
key('n', '<leader>tc', '<cmd>tabnew<CR>', { desc = '[T]ab [c]reate' })
|
||||||
|
key('n', '<leader>tx', '<cmd>tabclose<CR>', { desc = '[T]ab close' })
|
||||||
|
key('n', '<leader>tS', '<cmd>tab split<CR>', { desc = '[T]ab [s]plit' })
|
||||||
|
key('n', '<leader>tn', '<cmd>tabnext<CR>', { desc = '[T]ab [n]ext' })
|
||||||
|
key('n', '<leader>tp', '<cmd>tabprevious<CR>', { desc = '[T]ab [p]revious' })
|
||||||
|
key('n', '<leader>tf', '<cmd>tabfirst<CR>', { desc = '[T]ab [f]irst' })
|
||||||
|
key('n', '<leader>tl', '<cmd>tablast<CR>', { desc = '[T]tab [l]ast' })
|
||||||
|
|
||||||
|
key('v', 'J', ":m '>+1<CR>gv=gv", { desc = "Move lines down" })
|
||||||
|
key('v', 'K', ":m '<-2<CR>gv=gv", { desc = "Move lines up" })
|
||||||
|
|
||||||
|
-- Change window
|
||||||
|
key('n', '<C-j>', '<C-w>j', opts)
|
||||||
|
key('n', '<C-k>', '<C-w>k', opts)
|
||||||
|
key('n', '<C-h>', '<C-w>h', opts)
|
||||||
|
key('n', '<C-l>', '<C-w>l', opts)
|
||||||
|
|
||||||
|
-- Stay in key mode
|
||||||
|
key('v', '<', '<gv', opts)
|
||||||
|
key('v', '>', '>gv', opts)
|
||||||
|
|
||||||
|
-- Keep old value of register
|
||||||
|
key('v', 'P', '"_dP', opts)
|
||||||
|
|
||||||
|
-- LightSpeed
|
||||||
|
key('n', 'g/', '<Plug>Lightspeed_s', { desc = "Lightspeed forward search" })
|
||||||
|
key('n', 'g?', '<Plug>Lightspeed_S', { desc = "Lightspeed backward search" })
|
||||||
|
|
||||||
|
-- Clipboard and quickfix
|
||||||
|
key({ 'n', 'v' }, '<leader>y', '"+y', { desc = "Yank to clipboard" })
|
||||||
|
key('n', '<leader>j', '<cmd>cn<CR>', { desc = "Quickfix next" })
|
||||||
|
key('n', '<leader>k', '<cmd>cp<CR>', { desc = "Quickfix previous" })
|
||||||
|
key('n', '<leader>co', '<cmd>copen<CR>', { desc = "Quickfix [O]pen" })
|
||||||
|
key('n', '<leader>cc', '<cmd>cclose<CR>', { desc = "Quickfix [C]lose" })
|
||||||
|
|
||||||
|
key('n', '<leader>s;', '<cmd>SessionSelect<CR>', { desc = '[S]ession Select' })
|
||||||
|
|
||||||
|
-- luasnip
|
||||||
|
|
||||||
|
vim.keymap.set({ 'i', 's' }, "<c-k>", function()
|
||||||
|
local ls = require "luasnip"
|
||||||
|
if ls.expand_or_jumpable() then
|
||||||
|
ls.expand_or_jump()
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set({ 'i', 's' }, "<c-j>", function()
|
||||||
|
local ls = require "luasnip"
|
||||||
|
if ls.jumpable(-1) then
|
||||||
|
ls.jump(-1)
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set({ 'i', 's' }, "<c-l>", function()
|
||||||
|
local ls = require "luasnip"
|
||||||
|
if ls.choice_active() then
|
||||||
|
ls.change_choice(1)
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ss", "<cmd>source ~/.config/nvim/after/plugin/luasnip.lua<CR>",
|
||||||
|
{ desc = "[S]nippets [s]ource" })
|
||||||
|
|
||||||
|
-- colors
|
||||||
|
|
||||||
|
key('n', '<F6>', function() require('lupan.utils').toggle_color_scheme() end, { desc = 'Toggle background' })
|
||||||
69
nvim/.config/nvim/lua/lupan/ui.lua
Normal file
69
nvim/.config/nvim/lua/lupan/ui.lua
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
local actions = require "telescope.actions"
|
||||||
|
local action_state = require "telescope.actions.state"
|
||||||
|
local finders = require "telescope.finders"
|
||||||
|
local pickers = require "telescope.pickers"
|
||||||
|
local sorters = require "telescope.sorters"
|
||||||
|
local themes = require "telescope.themes"
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function enter(prompt_bufnr, action)
|
||||||
|
local selected = action_state.get_selected_entry()
|
||||||
|
actions.close(prompt_bufnr)
|
||||||
|
action(selected[1])
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.tab_change_dir(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
local action = opts.action or vim.cmd.tc
|
||||||
|
local prompt_title = opts.prompt_title or "Tab change directory"
|
||||||
|
local cmd = { 'find', os.getenv('HOME'), '-maxdepth', '5', '-type', 'd', '-not', '-path', '*/.git*' }
|
||||||
|
local dropdown = themes.get_dropdown();
|
||||||
|
local picker_opts = {
|
||||||
|
prompt_title = prompt_title,
|
||||||
|
finder = finders.new_oneshot_job(cmd, {}),
|
||||||
|
sorter = sorters.get_fuzzy_file({}),
|
||||||
|
attach_mappings = function(_, map)
|
||||||
|
map({ "i", "n" }, "<CR>", function(prompt_bufnr) enter(prompt_bufnr, action) end)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
}
|
||||||
|
local change_dir = pickers.new(dropdown, picker_opts)
|
||||||
|
change_dir:find()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function tabnew_tcd(dir)
|
||||||
|
vim.cmd.tabnew(dir)
|
||||||
|
vim.cmd.tc(dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.tab_change_dir_newtab()
|
||||||
|
M.tab_change_dir({ action = tabnew_tcd, prompt_title = "Tab change directory (new tab)" })
|
||||||
|
end
|
||||||
|
|
||||||
|
local function append_text(text)
|
||||||
|
text = string.gsub(text, "^ + %w+%.([%w%p]+) +.*", "%1")
|
||||||
|
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
vim.api.nvim_buf_set_text(0, row - 1, col, row - 1, col, { text })
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.find_translation_key(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
local action = opts.action or append_text
|
||||||
|
local prompt_title = opts.prompt_title or "Get translation key"
|
||||||
|
local cmd = { 'list-translation-keys' }
|
||||||
|
local dropdown = themes.get_dropdown();
|
||||||
|
local picker_opts = {
|
||||||
|
prompt_title = prompt_title,
|
||||||
|
finder = finders.new_oneshot_job(cmd, {}),
|
||||||
|
sorter = sorters.get_fuzzy_file({}),
|
||||||
|
attach_mappings = function(_, map)
|
||||||
|
map({ "i", "n" }, "<CR>", function(prompt_bufnr) enter(prompt_bufnr, action) end)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
}
|
||||||
|
local find_translation_key = pickers.new(dropdown, picker_opts)
|
||||||
|
find_translation_key:find()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
53
nvim/.config/nvim/lua/lupan/utils.lua
Normal file
53
nvim/.config/nvim/lua/lupan/utils.lua
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local filename = os.getenv('HOME') .. '/.config/alacritty/alacritty.toml'
|
||||||
|
|
||||||
|
local colorschemes = nil
|
||||||
|
|
||||||
|
function M.set_color_schemes(dark, light)
|
||||||
|
colorschemes = { dark = dark, light = light }
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.terminalbg()
|
||||||
|
local ok, lines = pcall(io.lines, filename)
|
||||||
|
if ok then
|
||||||
|
for line in lines do
|
||||||
|
if string.find(line, 'light.toml') then
|
||||||
|
return "light"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return "dark"
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.update_color_scheme()
|
||||||
|
vim.o.background = M.terminalbg()
|
||||||
|
if colorschemes then
|
||||||
|
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.toggle_color_scheme()
|
||||||
|
if vim.o.background == "dark" then
|
||||||
|
vim.o.background = "light"
|
||||||
|
else
|
||||||
|
vim.o.background = "dark"
|
||||||
|
end
|
||||||
|
if colorschemes then
|
||||||
|
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local w = vim.uv.new_fs_event()
|
||||||
|
|
||||||
|
local function watch(fname)
|
||||||
|
w:start(filename, {}, vim.schedule_wrap(function(...)
|
||||||
|
M.update_color_scheme()
|
||||||
|
w:stop()
|
||||||
|
watch(fname)
|
||||||
|
end))
|
||||||
|
end
|
||||||
|
|
||||||
|
watch(filename)
|
||||||
|
|
||||||
|
return M
|
||||||
20
nvim/.config/nvim/lua/plugins/appearance.lua
Normal file
20
nvim/.config/nvim/lua/plugins/appearance.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'thesimonho/kanagawa-paper.nvim',
|
||||||
|
config = function()
|
||||||
|
vim.cmd.colorscheme('kanagawa-paper')
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
--- Create Color Code
|
||||||
|
'uga-rosa/ccc.nvim',
|
||||||
|
config = function(_, opts)
|
||||||
|
require('ccc').setup(opts)
|
||||||
|
end,
|
||||||
|
cmd = { 'CccPick', 'CccHighlighterToggle' },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ct", "<cmd>CccHighlighterToggle<cr>", desc = "[C]olorizer [T]oggle" },
|
||||||
|
{ "<leader>cp", "<cmd>CccPick<cr>", desc = "[C]olor [P]ick" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/otavioschwanck/arrow.nvim" })
|
|
||||||
|
|
||||||
local ok, arrow = pcall(require, "arrow")
|
|
||||||
if ok then
|
|
||||||
arrow.setup({
|
|
||||||
show_icons = false,
|
|
||||||
leader_key = "_",
|
|
||||||
buffer_leader_key = " m",
|
|
||||||
})
|
|
||||||
else
|
|
||||||
print("plugin arrow missing")
|
|
||||||
end
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/rmagatti/auto-session" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>wy", "<cmd>AutoSession search<cr>")
|
|
||||||
|
|
||||||
local ok, sess = pcall(require, "auto-session")
|
|
||||||
if ok then
|
|
||||||
sess.setup({
|
|
||||||
suppressed_dirs = { "~/", "~/src", "~/Downloads", "/" },
|
|
||||||
})
|
|
||||||
else
|
|
||||||
print("plugin auto-session missing")
|
|
||||||
end
|
|
||||||
81
nvim/.config/nvim/lua/plugins/autocompletion.lua
Normal file
81
nvim/.config/nvim/lua/plugins/autocompletion.lua
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
return {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
dependencies = {
|
||||||
|
-- Snippet Engine & its associated nvim-cmp source
|
||||||
|
{
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
build = (function()
|
||||||
|
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return 'make install_jsregexp'
|
||||||
|
end)(),
|
||||||
|
},
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
|
||||||
|
-- Adds LSP completion capabilities
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
|
||||||
|
-- Adds a number of user-friendly snippets
|
||||||
|
'rafamadriz/friendly-snippets',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- See `:help cmp`
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
local luasnip = require 'luasnip'
|
||||||
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
require('luasnip.loaders.from_lua').lazy_load({ paths = '~/.config/nvim/snippets' })
|
||||||
|
luasnip.config.setup {}
|
||||||
|
luasnip.filetype_extend('templ', { "html" })
|
||||||
|
|
||||||
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- completion = { autocomplete = false },
|
||||||
|
completion = { completeopt = 'menu,menuone,noinsert' },
|
||||||
|
|
||||||
|
-- See `:help ins-completion`
|
||||||
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
-- ['<C-l>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||||
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
|
||||||
|
-- <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' }),
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'path' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
cmp.setup.filetype('sql', {
|
||||||
|
sources = {
|
||||||
|
{ name = 'vim-dadbod-completion' },
|
||||||
|
{ name = 'buffer' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
cmp.setup.filetype('lisp', {
|
||||||
|
sources = cmp.config.sources({ { name = 'nvlime' } })
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
67
nvim/.config/nvim/lua/plugins/bookmarks.lua
Normal file
67
nvim/.config/nvim/lua/plugins/bookmarks.lua
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"otavioschwanck/arrow.nvim",
|
||||||
|
dependencies = {
|
||||||
|
{ "nvim-tree/nvim-web-devicons" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
show_icons = true,
|
||||||
|
leader_key = '-', -- Recommended to be a single key
|
||||||
|
buffer_leader_key = '+', -- Per Buffer Mappings
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>1", function() require("arrow.persist").go_to(1) end, desc = "Arrow go to 1" },
|
||||||
|
{ "<leader>2", function() require("arrow.persist").go_to(2) end, desc = "Arrow go to 2" },
|
||||||
|
{ "<leader>3", function() require("arrow.persist").go_to(3) end, desc = "Arrow go to 3" },
|
||||||
|
{ "<leader>4", function() require("arrow.persist").go_to(4) end, desc = "Arrow go to 4" },
|
||||||
|
{ "<leader>5", function() require("arrow.persist").go_to(5) end, desc = "Arrow go to 5" },
|
||||||
|
{ "<leader>6", function() require("arrow.persist").go_to(6) end, desc = "Arrow go to 6" },
|
||||||
|
{ "<leader>7", function() require("arrow.persist").go_to(7) end, desc = "Arrow go to 7" },
|
||||||
|
{ "<leader>8", function() require("arrow.persist").go_to(8) end, desc = "Arrow go to 8" },
|
||||||
|
{ "<leader>9", function() require("arrow.persist").go_to(9) end, desc = "Arrow go to 9" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"leath-dub/snipe.nvim",
|
||||||
|
keys = {
|
||||||
|
{ "_", function() require("snipe").open_buffer_menu() end, desc = "Open Snipe buffer menu" }
|
||||||
|
},
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"chentoast/marks.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = true,
|
||||||
|
keys = {
|
||||||
|
{ '<leader>ma', '<cmd>MarksListAll<CR>' },
|
||||||
|
{ '<leader>mb', '<cmd>MarksListBuf<CR>' },
|
||||||
|
{ '<leader>mg', '<cmd>MarksListGlobal<CR>' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"bassamsdata/namu.nvim",
|
||||||
|
config = function()
|
||||||
|
require("namu").setup({
|
||||||
|
-- Enable the modules you want
|
||||||
|
namu_symbols = {
|
||||||
|
enable = true,
|
||||||
|
options = {}, -- here you can configure namu
|
||||||
|
},
|
||||||
|
-- Optional: Enable other modules if needed
|
||||||
|
ui_select = { enable = false }, -- vim.ui.select() wrapper
|
||||||
|
})
|
||||||
|
-- === Suggested Keymaps: ===
|
||||||
|
vim.keymap.set("n", "<leader>;", ":Namu symbols<cr>", {
|
||||||
|
desc = "Jump to LSP symbol",
|
||||||
|
silent = true,
|
||||||
|
})
|
||||||
|
vim.keymap.set("n", "<leader>.", ":Namu workspace<cr>", {
|
||||||
|
desc = "LSP Symbols - Workspace",
|
||||||
|
silent = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
"https://github.com/EdenEast/nightfox.nvim",
|
|
||||||
"https://github.com/rebelot/kanagawa.nvim",
|
|
||||||
"https://github.com/kepano/flexoki-neovim",
|
|
||||||
"https://github.com/rktjmp/lush.nvim",
|
|
||||||
"https://github.com/zenbones-theme/zenbones.nvim",
|
|
||||||
"https://github.com/xero/miasma.nvim",
|
|
||||||
})
|
|
||||||
|
|
||||||
local cs = require("config.colorscheme")
|
|
||||||
cs.set_colorschemes("lupanbones", "lupanbones")
|
|
||||||
cs.update_colorscheme()
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
|
|
||||||
|
|
||||||
local ok, conform = pcall(require, "conform")
|
|
||||||
if ok then
|
|
||||||
conform.setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
},
|
|
||||||
format_on_save = function(bufnr)
|
|
||||||
-- Disable with a global or buffer-local variable
|
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
return { timeout_ms = 500, lsp_format = "fallback" }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
|
||||||
if args.bang then
|
|
||||||
-- FormatDisable! will disable formatting just for this buffer
|
|
||||||
vim.b.disable_autoformat = true
|
|
||||||
else
|
|
||||||
vim.g.disable_autoformat = true
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = "Disable autoformat-on-save",
|
|
||||||
bang = true,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
|
||||||
vim.b.disable_autoformat = false
|
|
||||||
vim.g.disable_autoformat = false
|
|
||||||
end, {
|
|
||||||
desc = "Re-enable autoformat-on-save",
|
|
||||||
})
|
|
||||||
else
|
|
||||||
print("plugin conform missing")
|
|
||||||
end
|
|
||||||
23
nvim/.config/nvim/lua/plugins/convenience.lua
Normal file
23
nvim/.config/nvim/lua/plugins/convenience.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'folke/which-key.nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
opts = {
|
||||||
|
preset = 'helix',
|
||||||
|
delay = 1000,
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require('which-key').setup(opts)
|
||||||
|
|
||||||
|
-- Document existing key chains
|
||||||
|
require('which-key').add {
|
||||||
|
{ "<leader>c", group = "[C]ode/Color" },
|
||||||
|
{ "<leader>d", group = "[D]ocument" },
|
||||||
|
{ "<leader>g", group = "[G]it" },
|
||||||
|
{ "<leader>r", group = "[R]ename" },
|
||||||
|
{ "<leader>s", group = "[S]earch" },
|
||||||
|
{ "<leader>w", group = "[W]orkspace" },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
87
nvim/.config/nvim/lua/plugins/editing.lua
Normal file
87
nvim/.config/nvim/lua/plugins/editing.lua
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
return {
|
||||||
|
-- "gc" to comment visual regions/lines
|
||||||
|
{
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Undo browsing
|
||||||
|
'mbbill/undotree',
|
||||||
|
|
||||||
|
-- Tabstops autodetected
|
||||||
|
'tpope/vim-sleuth',
|
||||||
|
|
||||||
|
{
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
version = "^3.0.0", -- Use for stability; omit to use `main` branch for the latest features
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'inkarkat/vim-ReplaceWithRegister',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>rp', '<Plug>ReplaceWithRegisterOperator' },
|
||||||
|
{ '<leader>rpp', '<Plug>ReplaceWithRegisterLine' },
|
||||||
|
{ '<leader>rp', '<Plug>ReplaceWithRegisterVisual', mode = 'x' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'ggandor/leap.nvim',
|
||||||
|
opts = {
|
||||||
|
safe_labels = {},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"tpope/vim-repeat",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '\\', '<Plug>(leap)', mode = { 'n', 'x', 'o' } },
|
||||||
|
{ 'gs', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' } },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'Wansmer/treesj',
|
||||||
|
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||||
|
opts = {
|
||||||
|
use_default_keymaps = false,
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>tg', function() require('treesj').toggle() end, desc = "[T]ree to[g]gle one-line" },
|
||||||
|
{ '<leader>tj', function() require('treesj').join() end, desc = "[T]ree [J]oin one-line" },
|
||||||
|
{ '<leader>ts', function() require('treesj').split() end, desc = "[T]ree [S]plit one-line" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- rehighlight search on n or N
|
||||||
|
{
|
||||||
|
'nvimdev/hlsearch.nvim',
|
||||||
|
event = 'BufRead',
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'mizlan/iswap.nvim',
|
||||||
|
event = 'VeryLazy',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>cs', '<cmd>ISwapWith<CR>', desc = 'I[S]wap' },
|
||||||
|
{ '<leader>cS', '<cmd>ISwap<CR>', desc = 'I[S]wapWith' },
|
||||||
|
{ '<leader>cn', '<cmd>ISwapNodeWith<CR>', desc = 'ISwap[N]ode' },
|
||||||
|
{ '<leader>cN', '<cmd>ISwapNode<CR>', desc = 'ISwap[N]ode' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'aaronik/treewalker.nvim',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>ch', '<cmd>Treewalker Left<CR>', desc = 'Tree Left' },
|
||||||
|
{ '<leader>cj', '<cmd>Treewalker Down<CR>', desc = 'Tree Down' },
|
||||||
|
{ '<leader>ck', '<cmd>Treewalker Up<CR>', desc = 'Tree Up' },
|
||||||
|
{ '<leader>cl', '<cmd>Treewalker Right<CR>', desc = 'Tree Right' },
|
||||||
|
{ '<leader>cJ', '<cmd>Treewalker SwapDown<CR>', desc = 'Tree Swap Down' },
|
||||||
|
{ '<leader>cK', '<cmd>Treewalker SwapUp<CR>', desc = 'Tree Swap Up' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
13
nvim/.config/nvim/lua/plugins/file-explorer.lua
Normal file
13
nvim/.config/nvim/lua/plugins/file-explorer.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'stevearc/oil.nvim',
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
opts = {
|
||||||
|
default_file_explorer = true,
|
||||||
|
delete_to_trash = true,
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>-", "<cmd>Oil<CR>", desc = "Open parent directory" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/folke/flash.nvim" })
|
|
||||||
|
|
||||||
local ok, flash = pcall(require, "flash")
|
|
||||||
|
|
||||||
if ok then
|
|
||||||
flash.setup({
|
|
||||||
modes = {
|
|
||||||
char = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local set = vim.keymap.set
|
|
||||||
|
|
||||||
set({ "n", "x", "o" }, "\\", function()
|
|
||||||
require("flash").jump()
|
|
||||||
end, { desc = "Flash" })
|
|
||||||
set({ "n", "x", "o" }, "=", function()
|
|
||||||
require("flash").treesitter()
|
|
||||||
end, { desc = "Flash Treesitter" })
|
|
||||||
set({ "o" }, "r", function()
|
|
||||||
require("flash").remote()
|
|
||||||
end, { desc = "Remote Flash" })
|
|
||||||
set({ "n", "x", "o" }, " t", function()
|
|
||||||
require("flash").treesitter_search()
|
|
||||||
end, { desc = "Treesitter Search" })
|
|
||||||
else
|
|
||||||
print("plugin flash missing")
|
|
||||||
end
|
|
||||||
@@ -1,232 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
"https://github.com/ibhagwan/fzf-lua",
|
|
||||||
"https://github.com/elanmed/fzf-lua-frecency.nvim",
|
|
||||||
})
|
|
||||||
|
|
||||||
local ok, fzf = pcall(require, "fzf-lua")
|
|
||||||
local ok2, frecency = pcall(require, "fzf-lua-frecency")
|
|
||||||
if ok then
|
|
||||||
fzf.setup({
|
|
||||||
keymap = {
|
|
||||||
builtin = {
|
|
||||||
true,
|
|
||||||
["<M-m>"] = "toggle-fullscreen",
|
|
||||||
},
|
|
||||||
fzf = {
|
|
||||||
true,
|
|
||||||
-- Use <c-q> to select all items and add them to the quickfix list
|
|
||||||
["ctrl-q"] = "select-all+accept",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
fzf.register_ui_select()
|
|
||||||
local odin_pkg = "~/cloned/Odin"
|
|
||||||
local function go_root()
|
|
||||||
return vim.fn.trim(vim.fn.system("go env GOROOT"))
|
|
||||||
end
|
|
||||||
local go_root_pkg = nil
|
|
||||||
local function go_mod()
|
|
||||||
return vim.fs.joinpath(vim.fn.trim(vim.fn.system("go env GOPATH")), "pkg/mod")
|
|
||||||
end
|
|
||||||
local go_mod_pkg = nil
|
|
||||||
local function go_grep(cwd)
|
|
||||||
local input = vim.fn.input("Go grep declarations> ")
|
|
||||||
if #input == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local search1 = "^(func|type) .*(?<= )(?=[A-Z])[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]*( |\\()"
|
|
||||||
local search2 = "^[\\t]+(?=[A-Z])[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]* +="
|
|
||||||
local search = "(" .. search1 .. "|" .. search2 .. ")"
|
|
||||||
fzf.grep({
|
|
||||||
cwd = cwd,
|
|
||||||
cmd = "rg -P -g '*.go'",
|
|
||||||
search = search,
|
|
||||||
no_esc = true,
|
|
||||||
profile = 'ivy',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local function odin_grep(cwd)
|
|
||||||
local input = vim.fn.input("Odin grep declarations> ")
|
|
||||||
if #input == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local search = "^[ \\t]*[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]* +::"
|
|
||||||
fzf.grep({
|
|
||||||
cwd = cwd,
|
|
||||||
cmd = "rg -g '*.odin'",
|
|
||||||
search = search,
|
|
||||||
no_esc = true,
|
|
||||||
profile = 'ivy',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local set = vim.keymap.set
|
|
||||||
set("n", "<leader>ba", fzf.buffers, { desc = "FzfLua buffers" })
|
|
||||||
set("n", "<leader>bh", fzf.history, { desc = "FzfLua history" })
|
|
||||||
set("n", "<leader>bj", fzf.jumps, { desc = "FzfLua jumps" })
|
|
||||||
set("n", "<leader>ca", fzf.lsp_code_actions, { desc = "FzfLua LSP code actions" })
|
|
||||||
set("n", "<leader>cb", fzf.complete_bline, { desc = "FzfLua complete buffer line" })
|
|
||||||
set("n", "<leader>cc", fzf.commands, { desc = "FzfLua commands" })
|
|
||||||
set("n", "<leader>cf", fzf.complete_file, { desc = "FzfLua complete file" })
|
|
||||||
set("n", "<leader>cF", fzf.complete_path, { desc = "FzfLua complete path" })
|
|
||||||
set("n", "<leader>ch", fzf.command_history, { desc = "FzfLua command history" })
|
|
||||||
set("n", "<leader>cH", fzf.highlights, { desc = "FzfLua color highlights" })
|
|
||||||
set("n", "<leader>cl", fzf.complete_line, { desc = "FzfLua complete line" })
|
|
||||||
set("n", "<leader>co", fzf.nvim_options, { desc = "FzfLua nvim options" })
|
|
||||||
set("n", "<leader>cr", fzf.profiles, { desc = "FzfLua fzf profiles" })
|
|
||||||
set("n", "<leader>cs", fzf.colorschemes, { desc = "FzfLua color schemes" })
|
|
||||||
set("n", "<leader>ct", fzf.tabs, { desc = "FzfLua tabs" })
|
|
||||||
set("n", "<leader>da", fzf.diagnostics_document, { desc = "FzfLua document diagnostics" })
|
|
||||||
set("n", "<leader>dw", fzf.diagnostics_workspace, { desc = "FzfLua workspace diagnostics" })
|
|
||||||
set("n", "<leader>ec", function()
|
|
||||||
fzf.files({ cwd = vim.fn.stdpath("config") })
|
|
||||||
end, { desc = "FzfLua nvim config files" })
|
|
||||||
set("n", "<leader>ep", function()
|
|
||||||
fzf.files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") })
|
|
||||||
end, { desc = "FzfLua find files" })
|
|
||||||
set("n", "<leader>es", function()
|
|
||||||
fzf.files({ cwd = '~/.config/kitty/sessions' })
|
|
||||||
end, { desc = "FzfLua kitty sessions" })
|
|
||||||
set("n", "<leader>eS", "<cmd>Oil ~/.config/kitty/sessions<cr>", { desc = "Kitty sessions (dir)" })
|
|
||||||
set("n", "<leader>fa", fzf.git_files, { desc = "FzfLua git files" })
|
|
||||||
set("n", "<leader>ff", fzf.files, { desc = "FzfLua find files" })
|
|
||||||
set("n", "<leader>fg", fzf.global, { desc = "FzfLua global" })
|
|
||||||
set("n", "<leader>fo", frecency.frecency, { desc = "FzfLua frecency oldfiles" })
|
|
||||||
set("n", "<leader>ft", fzf.filetypes, { desc = "FzfLua file types" })
|
|
||||||
set("n", "<leader>;", function()
|
|
||||||
frecency.frecency({ cwd_only = true })
|
|
||||||
end, { desc = "FzfLua frecency files" })
|
|
||||||
set("n", "<leader>gb", fzf.git_branches, { desc = "FzfLua git branches" })
|
|
||||||
set("n", "<leader>gB", fzf.git_blame, { desc = "FzfLua git blame" })
|
|
||||||
set("n", "<leader>gc", fzf.git_bcommits, { desc = "FzfLua git buffer commits" })
|
|
||||||
set("n", "<leader>gC", fzf.git_commits, { desc = "FzfLua git commits" })
|
|
||||||
set("n", "<leader>gd", fzf.git_diff, { desc = "FzfLua git diff" })
|
|
||||||
set("n", "<leader>gh", fzf.git_hunks, { desc = "FzfLua git hunks" })
|
|
||||||
set("n", "<leader>gC", fzf.git_commits, { desc = "FzfLua git commits" })
|
|
||||||
set("n", "<leader>gs", fzf.git_status, { desc = "FzfLua git status" })
|
|
||||||
set("n", "<leader>gS", fzf.git_stash, { desc = "FzfLua git stash" })
|
|
||||||
set("n", "<leader>gt", fzf.git_tags, { desc = "FzfLua git tags" })
|
|
||||||
set("n", "<leader>gw", fzf.git_worktrees, { desc = "FzfLua git worktrees" })
|
|
||||||
set("n", "<leader>ha", fzf.helptags, { desc = "FzfLua help tags" })
|
|
||||||
set("n", "<leader>hk", fzf.keymaps, { desc = "FzfLua keymaps" })
|
|
||||||
set("n", "<leader>ma", fzf.marks, { desc = "FzfLua marks" })
|
|
||||||
set("n", "<leader>mp", fzf.manpages, { desc = "FzfLua man pages" })
|
|
||||||
set("n", "<leader>qa", fzf.quickfix, { desc = "FzfLua quickfix" })
|
|
||||||
set("n", "<leader>qs", fzf.quickfix_stack, { desc = "FzfLua quickfix stack" })
|
|
||||||
set("n", "<leader>ql", fzf.loclist, { desc = "FzfLua loclist" })
|
|
||||||
set("n", "<leader>qh", fzf.loclist_stack, { desc = "FzfLua loclist stack" })
|
|
||||||
set("n", "<leader>ra", fzf.resume, { desc = "FzfLua resume" })
|
|
||||||
set("n", "<leader>rr", fzf.registers, { desc = "FzfLua registers" })
|
|
||||||
set("n", "<leader>ta", fzf.treesitter, { desc = "FzfLua treesitter symbols" })
|
|
||||||
set("n", "<leader>sa", fzf.live_grep, { desc = "FzfLua live grep" })
|
|
||||||
set("n", "<leader>sb", fzf.blines, { desc = "FzfLua buffer lines" })
|
|
||||||
set("n", "<leader>sB", fzf.grep_curbuf, { desc = "FzfLua grep current buffer" })
|
|
||||||
set("n", "<leader>sg", fzf.grep, { desc = "FzfLua grep" })
|
|
||||||
set("n", "<leader>sh", fzf.search_history, { desc = "FzfLua search history" })
|
|
||||||
set("n", "<leader>sl", fzf.grep_loclist, { desc = "FzfLua grep loclist" })
|
|
||||||
set("n", "<leader>sn", fzf.live_grep_native, { desc = "FzfLua live grep native" })
|
|
||||||
set("n", "<leader>so", fzf.lines, { desc = "FzfLua open buffers lines" })
|
|
||||||
set("n", "<leader>sp", fzf.grep_project, { desc = "FzfLua grep project" })
|
|
||||||
set("n", "<leader>sq", fzf.grep_quickfix, { desc = "FzfLua grep quickfix" })
|
|
||||||
set("n", "<leader>sr", function() fzf.grep({ resume = true }) end, { desc = "FzfLua grep resume" })
|
|
||||||
set("n", "<leader>sc", fzf.spellcheck, { desc = "FzfLua spell check" })
|
|
||||||
set("n", "<leader>ss", fzf.spell_suggest, { desc = "FzfLua spell suggest" })
|
|
||||||
set({ "n", "v" }, "<leader>sv", fzf.grep_visual, { desc = "FzfLua grep visual" })
|
|
||||||
set("n", "<leader>sw", fzf.grep_cword, { desc = "FzfLua grep cword" })
|
|
||||||
set("n", "<leader>sW", fzf.grep_cWORD, { desc = "FzfLua grep cword" })
|
|
||||||
set("n", "<leader>U", fzf.undotree, { desc = "FzfLua undo tree" })
|
|
||||||
set("n", "<leader>wa", fzf.lsp_live_workspace_symbols, { desc = "FzfLua document symbols" })
|
|
||||||
set("n", "<leader>wd", fzf.lsp_document_symbols, { desc = "FzfLua document symbols" })
|
|
||||||
set("n", "<leader>wf", fzf.lsp_finder, { desc = "FzfLua LSP finder" })
|
|
||||||
set("n", "<leader>wp", fzf.lsp_workspace_symbols, { desc = "FzfLua workspace symbols" })
|
|
||||||
set("n", "<leader>wz", fzf.zoxide, { desc = "FzfLua zoxide" })
|
|
||||||
set("n", "gd", fzf.lsp_definitions, { desc = "Goto Definition" })
|
|
||||||
set("n", "gD", fzf.lsp_declarations, { desc = "Goto Declarations" })
|
|
||||||
set("n", "grr", fzf.lsp_references, { desc = "References" })
|
|
||||||
set("n", "gri", fzf.lsp_implementations, { desc = "Goto Implementation" })
|
|
||||||
set("n", "grI", fzf.lsp_incoming_calls, { desc = "Incomming calls" })
|
|
||||||
set("n", "grO", fzf.lsp_outgoing_calls, { desc = "Outgouing calls" })
|
|
||||||
set("n", "grs", fzf.lsp_type_sub, { desc = "Outgouing calls" })
|
|
||||||
set("n", "grp", fzf.lsp_type_super, { desc = "Outgouing calls" })
|
|
||||||
set("n", "grt", fzf.lsp_typedefs, { desc = "Goto Type Definition" })
|
|
||||||
|
|
||||||
set("n", "<leader>Gf", function()
|
|
||||||
fzf.files({ cwd = go_root(), cmd = "fd --type f -e go" })
|
|
||||||
end, { desc = "FzfLua Go files" })
|
|
||||||
set("n", "<leader>GF", function()
|
|
||||||
fzf.files({ cwd = go_mod(), cmd = "fd --type f -e go" })
|
|
||||||
end, { desc = "FzfLua Go mod files" })
|
|
||||||
set("n", "<leader>Gl", function()
|
|
||||||
fzf.files({ cmd = "fd --type f -e go" })
|
|
||||||
end, { desc = "FzfLua Go current dir files" })
|
|
||||||
set("n", "<leader>Gs", function()
|
|
||||||
go_grep(go_root())
|
|
||||||
end, { desc = "FzfLua Go grep declarations" })
|
|
||||||
set("n", "<leader>GS", function()
|
|
||||||
go_grep(go_mod())
|
|
||||||
end, { desc = "FzfLua Go grep mod declarations" })
|
|
||||||
set("n", "<leader>Gd", function()
|
|
||||||
go_grep(nil)
|
|
||||||
end, { desc = "FzfLua Go current dir grep declarations" })
|
|
||||||
set("n", "<leader>Gm", function()
|
|
||||||
go_grep(go_mod_pkg or go_mod())
|
|
||||||
end, { desc = "FzfLua Go grep mod declarations" })
|
|
||||||
set("n", "<leader>GM", function()
|
|
||||||
fzf.zoxide({
|
|
||||||
cmd = "fd '' --type d " .. vim.fn.shellescape(go_mod()) .. [[ | awk '{print "\t"$1}']],
|
|
||||||
actions = {
|
|
||||||
["enter"] = function(a)
|
|
||||||
go_mod_pkg = vim.fn.trim(a[1])
|
|
||||||
go_grep(go_mod_pkg)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end, { desc = "FzfLua Go select package and grep package declarations" })
|
|
||||||
set("n", "<leader>Gp", function()
|
|
||||||
go_grep(go_root_pkg or go_root())
|
|
||||||
end, { desc = "FzfLua Go grep package declarations" })
|
|
||||||
set("n", "<leader>GP", function()
|
|
||||||
fzf.zoxide({
|
|
||||||
cmd = "fd '' --type d " .. vim.fn.shellescape(go_root()) .. [[ | awk '{print "\t"$1}']],
|
|
||||||
actions = {
|
|
||||||
["enter"] = function(a)
|
|
||||||
go_root_pkg = vim.fn.trim(a[1])
|
|
||||||
go_grep(go_root_pkg)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end, { desc = "FzfLua Go select package and grep package declarations" })
|
|
||||||
|
|
||||||
set("n", "<leader>of", function()
|
|
||||||
fzf.files({ cwd = "~/cloned/Odin", cmd = "fd --type f -e odin" })
|
|
||||||
end, { desc = "FzfLua Odin files" })
|
|
||||||
set("n", "<leader>ol", function()
|
|
||||||
fzf.files({ cmd = "fd --type f -e odin" })
|
|
||||||
end, { desc = "FzfLua Odin current dir files" })
|
|
||||||
set("n", "<leader>os", function()
|
|
||||||
odin_grep("~/cloned/Odin")
|
|
||||||
end, { desc = "FzfLua Odin grep declarations" })
|
|
||||||
set("n", "<leader>od", function()
|
|
||||||
odin_grep(nil)
|
|
||||||
end, { desc = "FzfLua Odin grep declarations" })
|
|
||||||
set("n", "<leader>op", function()
|
|
||||||
odin_grep(odin_pkg)
|
|
||||||
end, { desc = "FzfLua Odin grep package declarations" })
|
|
||||||
set("n", "<leader>oP", function()
|
|
||||||
fzf.zoxide({
|
|
||||||
cmd = [[fd '' --type d ~/cloned/Odin | awk '{print "\t"$1}']],
|
|
||||||
actions = {
|
|
||||||
["enter"] = function(a)
|
|
||||||
odin_pkg = vim.fn.trim(a[1])
|
|
||||||
odin_grep(odin_pkg)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end, { desc = "FzfLua Odin select package and grep package declarations" })
|
|
||||||
else
|
|
||||||
print("plugin fzf-lua missing")
|
|
||||||
end
|
|
||||||
if not ok2 then
|
|
||||||
print("plugin fzf-lua-frecency missing")
|
|
||||||
end
|
|
||||||
|
|
||||||
--vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })
|
|
||||||
74
nvim/.config/nvim/lua/plugins/git.lua
Normal file
74
nvim/.config/nvim/lua/plugins/git.lua
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
return {
|
||||||
|
-- Git
|
||||||
|
{
|
||||||
|
'NeogitOrg/neogit',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'sindrets/diffview.nvim',
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
graph_style = 'unicode',
|
||||||
|
use_per_project_settings = false,
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>go',
|
||||||
|
function() require('neogit').open() end,
|
||||||
|
desc = 'Neo[g]it [O]pen'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>g.',
|
||||||
|
function() require('neogit').open({ cwd = '%:p:h' }) end,
|
||||||
|
desc = 'Neo[g]it open in current file repository'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>gh',
|
||||||
|
function() require('diffview').file_history() end,
|
||||||
|
desc = '[G]it [H]istory',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>g%',
|
||||||
|
function() require('diffview').file_history(nil, { '%' }) end,
|
||||||
|
desc = '[G]it history for [%] current file'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'FabijanZulj/blame.nvim',
|
||||||
|
config = true,
|
||||||
|
cmd = 'BlameToggle',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>bt', '<cmd>BlameToggle<cr>', desc = 'Git [B]lame [T]oggle' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
opts = {
|
||||||
|
-- See `:help gitsigns.txt`
|
||||||
|
signs = {
|
||||||
|
add = { text = '+' },
|
||||||
|
change = { text = '~' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
},
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gs = require('gitsigns')
|
||||||
|
vim.keymap.set('n', '<leader>gp', gs.prev_hunk,
|
||||||
|
{ buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
|
||||||
|
vim.keymap.set('n', '<leader>gn', gs.next_hunk,
|
||||||
|
{ buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
|
||||||
|
vim.keymap.set('n', '<leader>ph', gs.preview_hunk,
|
||||||
|
{ buffer = bufnr, desc = '[P]review [H]unk' })
|
||||||
|
vim.keymap.set('n', '<leader>sA', gs.stage_hunk,
|
||||||
|
{ buffer = bufnr, desc = '[S]tage Hunk' })
|
||||||
|
vim.keymap.set('n', '<leader>HD', function() gs.diffthis('~') end,
|
||||||
|
{ buffer = bufnr, desc = '[H]unk [D]iff' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
12
nvim/.config/nvim/lua/plugins/global-note.lua
Normal file
12
nvim/.config/nvim/lua/plugins/global-note.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
'backdround/global-note.nvim',
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>tn",
|
||||||
|
function()
|
||||||
|
require('global-note').toggle_note()
|
||||||
|
end,
|
||||||
|
desc = '[T]oggle global [N]ote',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
13
nvim/.config/nvim/lua/plugins/go.lua
Normal file
13
nvim/.config/nvim/lua/plugins/go.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
"ray-x/go.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"ray-x/guihua.lua",
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("go").setup(opts)
|
||||||
|
end,
|
||||||
|
event = { "CmdlineEnter" },
|
||||||
|
ft = { "go", 'gomod' },
|
||||||
|
}
|
||||||
24
nvim/.config/nvim/lua/plugins/godoc.lua
Normal file
24
nvim/.config/nvim/lua/plugins/godoc.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'fredrikaverpil/godoc.nvim',
|
||||||
|
version = '*',
|
||||||
|
dependencies = {
|
||||||
|
{ 'nvim-telescope/telescope.nvim' },
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
opts = {
|
||||||
|
ensure_installed = { 'go' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
event = 'VeryLazy',
|
||||||
|
cmd = 'GoDoc',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>gd', '<cmd>GoDoc<CR>', desc = '[G]o[D]oc' },
|
||||||
|
},
|
||||||
|
build = 'go install github.com/lotusirous/gostdsym/stdsym@latest',
|
||||||
|
opts = {
|
||||||
|
picker = { type = 'telescope' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/NMAC427/guess-indent.nvim" })
|
|
||||||
|
|
||||||
local ok, guess_indent = pcall(require, "guess-indent")
|
|
||||||
if ok then
|
|
||||||
guess_indent.setup()
|
|
||||||
else
|
|
||||||
print("plugin guess-indent missing")
|
|
||||||
end
|
|
||||||
16
nvim/.config/nvim/lua/plugins/http.lua
Normal file
16
nvim/.config/nvim/lua/plugins/http.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"rest-nvim/rest.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
table.insert(opts.ensure_installed, "http")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
ft = 'http',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>S', '<cmd>Rest run<CR>', ft = 'http' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
9
nvim/.config/nvim/lua/plugins/jj.lua
Normal file
9
nvim/.config/nvim/lua/plugins/jj.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'swaits/lazyjj.nvim',
|
||||||
|
dependencies = 'nvim-lua/plenary.nvim',
|
||||||
|
opts = {
|
||||||
|
mapping = '<leader>gj'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
25
nvim/.config/nvim/lua/plugins/line.lua
Normal file
25
nvim/.config/nvim/lua/plugins/line.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
vim.opt.fillchars = {
|
||||||
|
stl = "─",
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"sschleemilch/slimline.nvim",
|
||||||
|
opts = {
|
||||||
|
spaces = {
|
||||||
|
components = "─",
|
||||||
|
left = "─",
|
||||||
|
right = "─",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'b0o/incline.nvim',
|
||||||
|
config = function()
|
||||||
|
require('incline').setup()
|
||||||
|
end,
|
||||||
|
-- Optional: Lazy load Incline
|
||||||
|
event = 'VeryLazy',
|
||||||
|
},
|
||||||
|
}
|
||||||
167
nvim/.config/nvim/lua/plugins/lsp.lua
Normal file
167
nvim/.config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
version = '*',
|
||||||
|
dependencies = {
|
||||||
|
-- Automatically install LSPs and related tools to stdpath for neovim
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
'folke/neodev.nvim',
|
||||||
|
|
||||||
|
-- Useful status updates for LSP.
|
||||||
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('my-lsp-attach', { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
local map = function(keys, func, desc)
|
||||||
|
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||||
|
end
|
||||||
|
|
||||||
|
map('<leader>rn', '<cmd>Lspsaga rename<CR>', '[R]e[n]ame')
|
||||||
|
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||||
|
map('K', '<cmd>Lspsaga hover_doc<CR>', 'Hover Documentation')
|
||||||
|
map('<leader>K', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||||
|
|
||||||
|
-- Highlight references under cursor (clear highlight when cursor moves).
|
||||||
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
|
if client and client.server_capabilities.documentHighlightProvider then
|
||||||
|
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
callback = function()
|
||||||
|
local clients = vim.lsp.get_clients({ bufnr = event.buf })
|
||||||
|
for _, cl in ipairs(clients) do
|
||||||
|
if cl.name == 'unocss' then
|
||||||
|
return -- skip highlight if unocss is attached (workaround)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.lsp.buf.document_highlight()
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
callback = vim.lsp.buf.clear_references,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||||
|
|
||||||
|
local servers = {
|
||||||
|
clangd = {},
|
||||||
|
gopls = {},
|
||||||
|
-- pyright = {},
|
||||||
|
rust_analyzer = {},
|
||||||
|
ts_ls = {},
|
||||||
|
|
||||||
|
lua_ls = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = { version = 'LuaJIT' },
|
||||||
|
workspace = { checkThirdParty = false },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
completion = {
|
||||||
|
callSnippet = 'Replace',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
html = {},
|
||||||
|
htmx = {},
|
||||||
|
unocss = {},
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'lspconfig'.html.setup {
|
||||||
|
filetypes = { "html", "templ" },
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'lspconfig'.htmx.setup {
|
||||||
|
filetypes = { "html", "templ" },
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'lspconfig'.unocss.setup {
|
||||||
|
filetypes = { "html", "templ" },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Setup neovim lua configuration
|
||||||
|
require('neodev').setup()
|
||||||
|
|
||||||
|
require('mason').setup()
|
||||||
|
|
||||||
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
|
vim.list_extend(ensure_installed, {
|
||||||
|
'stylua', -- Used to format lua code
|
||||||
|
})
|
||||||
|
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
|
||||||
|
-- by the server configuration above. Useful when disabling
|
||||||
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||||
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
|
require('lspconfig')[server_name].setup(server)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'nvimdev/lspsaga.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
lightbulb = { enable = false }
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require('lspsaga').setup(opts)
|
||||||
|
vim.keymap.set('n', '<leader>la', '<cmd>Lspsaga code_action<CR>', { desc = "[L]spsaga code [A]ction" })
|
||||||
|
vim.keymap.set('n', '<leader>lb', '<cmd>Lspsaga show_buf_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [B]uffer diagnostics" })
|
||||||
|
vim.keymap.set('n', '<leader>lc', '<cmd>Lspsaga show_cursor_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [C]ursor diagnostics" })
|
||||||
|
vim.keymap.set('n', '<leader>ld', '<cmd>Lspsaga goto_definition<CR>', { desc = "[L]spsaga goto [D]efinition" })
|
||||||
|
vim.keymap.set('n', '<leader>lD', '<cmd>Lspsaga goto_type_definition<CR>',
|
||||||
|
{ desc = "[L]spsaga goto type [D]efinition" })
|
||||||
|
vim.keymap.set('n', '<leader>lf', '<cmd>Lspsaga finder<CR>', { desc = "[L]spsaga [F]inder" })
|
||||||
|
vim.keymap.set('n', '<leader>lI', '<cmd>Lspsaga finder imp<CR>', { desc = "[L]spsaga finder [I]mplementations" })
|
||||||
|
vim.keymap.set('n', '<leader>li', '<cmd>Lspsaga incoming_calls<CR>', { desc = "[L]spsaga [I]ncomping calls" })
|
||||||
|
vim.keymap.set('n', '<leader>ll', '<cmd>Lspsaga show_line_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [L]ine diagnostics" })
|
||||||
|
vim.keymap.set('n', '<leader>lo', '<cmd>Lspsaga outgoing_calls<CR>', { desc = "[L]spsaga [O]utgoing calls" })
|
||||||
|
vim.keymap.set('n', '<leader>lO', '<cmd>Lspsaga outline<CR>', { desc = "[L]spsaga [O]utline" })
|
||||||
|
vim.keymap.set('n', '<leader>lp', '<cmd>Lspsaga peek_definition<CR>', { desc = "[L]spsaga [P]eek definition" })
|
||||||
|
vim.keymap.set('n', '<leader>lP', '<cmd>Lspsaga peek_type_definition<CR>',
|
||||||
|
{ desc = "[L]spsaga [P]eek type definition" })
|
||||||
|
vim.keymap.set('n', '<leader>lw', '<cmd>Lspsaga show_workspace_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [W]orkspace diagnostics" })
|
||||||
|
vim.keymap.set({ 'n', 't' }, '<C-_>', '<cmd>Lspsaga term_toggle<CR>', { desc = "[L]spsaga [T]erm toggle" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
opts = {},
|
||||||
|
cmd = 'Trouble'
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"ray-x/lsp_signature.nvim",
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {
|
||||||
|
-- cfg options
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
vim.api.nvim_create_autocmd("PackChanged", {
|
|
||||||
group = vim.api.nvim_create_augroup("luasnip-update", { clear = true }),
|
|
||||||
callback = function(ev)
|
|
||||||
local name, kind = ev.data.spec.name, ev.data.kind
|
|
||||||
if name == "luasnip" and (kind == "install" or kind == "update") then
|
|
||||||
vim.system({ "make install_jsregexp" }, { cwd = ev.data.path }):wait()
|
|
||||||
print("luasnip make done.")
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.pack.add({ { src = "https://github.com/L3MON4D3/LuaSnip", version = vim.version.range("^2.0.0") } })
|
|
||||||
local ok, ls = pcall(require, "luasnip")
|
|
||||||
|
|
||||||
if ok then
|
|
||||||
vim.keymap.set({ "i" }, "<C-K>", function()
|
|
||||||
ls.expand()
|
|
||||||
end, { silent = true })
|
|
||||||
vim.keymap.set({ "i", "s" }, "<C-L>", function(fallback)
|
|
||||||
if ls.locally_jumpable() then
|
|
||||||
ls.jump(1)
|
|
||||||
else
|
|
||||||
local key = vim.api.nvim_replace_termcodes("<C-L>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(key, "n", false)
|
|
||||||
end
|
|
||||||
end, { silent = true })
|
|
||||||
vim.keymap.set({ "i", "s" }, "<C-J>", function()
|
|
||||||
if ls.locally_jumpable() then
|
|
||||||
ls.jump(-1)
|
|
||||||
else
|
|
||||||
local key = vim.api.nvim_replace_termcodes("<C-J>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(key, "n", false)
|
|
||||||
end
|
|
||||||
end, { silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
|
||||||
if ls.choice_active() then
|
|
||||||
ls.change_choice(1)
|
|
||||||
else
|
|
||||||
local key = vim.api.nvim_replace_termcodes("<C-E>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(key, "n", false)
|
|
||||||
end
|
|
||||||
end, { silent = true })
|
|
||||||
|
|
||||||
require("luasnip.loaders.from_lua").load({ paths = vim.fs.joinpath(vim.fn.stdpath("config"), "lua", "snippets") })
|
|
||||||
else
|
|
||||||
print("plugin luasnip missing")
|
|
||||||
end
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
vim.pack.add({ { src = "https://github.com/jake-stewart/multicursor.nvim", version = "1.0" } })
|
|
||||||
|
|
||||||
local ok, mc = pcall(require, "multicursor-nvim")
|
|
||||||
if ok then
|
|
||||||
mc.setup()
|
|
||||||
|
|
||||||
local set = vim.keymap.set
|
|
||||||
|
|
||||||
-- Add or skip cursor above/below the main cursor.
|
|
||||||
set({ "n", "x" }, "<c-k>", function()
|
|
||||||
mc.lineAddCursor(-1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<c-j>", function()
|
|
||||||
mc.lineAddCursor(1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-k>", function()
|
|
||||||
mc.lineSkipCursor(-1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-j>", function()
|
|
||||||
mc.lineSkipCursor(1)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Add or skip adding a new cursor by matching word/selection
|
|
||||||
set({ "n", "x" }, "<c-n>", function()
|
|
||||||
mc.matchAddCursor(1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-n>", function()
|
|
||||||
mc.matchSkipCursor(1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<c-p>", function()
|
|
||||||
mc.matchAddCursor(-1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-p>", function()
|
|
||||||
mc.matchSkipCursor(-1)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Add and remove cursors with control + left click.
|
|
||||||
set("n", "<c-leftmouse>", mc.handleMouse)
|
|
||||||
set("n", "<c-leftdrag>", mc.handleMouseDrag)
|
|
||||||
set("n", "<c-leftrelease>", mc.handleMouseRelease)
|
|
||||||
|
|
||||||
-- Disable and enable cursors.
|
|
||||||
set({ "n", "x" }, "<leader><c-q>", mc.toggleCursor)
|
|
||||||
|
|
||||||
-- Mappings defined in a keymap layer only apply when there are
|
|
||||||
-- multiple cursors. This lets you have overlapping mappings.
|
|
||||||
mc.addKeymapLayer(function(layerSet)
|
|
||||||
-- Select a different cursor as the main one.
|
|
||||||
layerSet({ "n", "x" }, "<left>", mc.prevCursor)
|
|
||||||
layerSet({ "n", "x" }, "<right>", mc.nextCursor)
|
|
||||||
|
|
||||||
-- Delete the main cursor.
|
|
||||||
layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor)
|
|
||||||
|
|
||||||
-- Enable and clear cursors using escape.
|
|
||||||
layerSet("n", "<esc>", function()
|
|
||||||
if not mc.cursorsEnabled() then
|
|
||||||
mc.enableCursors()
|
|
||||||
else
|
|
||||||
mc.clearCursors()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Customize how cursors look.
|
|
||||||
local hl = vim.api.nvim_set_hl
|
|
||||||
hl(0, "MultiCursorCursor", { reverse = true })
|
|
||||||
hl(0, "MultiCursorVisual", { link = "Visual" })
|
|
||||||
hl(0, "MultiCursorSign", { link = "SignColumn" })
|
|
||||||
hl(0, "MultiCursorMatchPreview", { link = "Search" })
|
|
||||||
hl(0, "MultiCursorDisabledCursor", { reverse = true })
|
|
||||||
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
|
|
||||||
hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
|
|
||||||
else
|
|
||||||
print("plugin multicursor-nvim missing")
|
|
||||||
end
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/chrisgrieser/nvim-various-textobjs" })
|
|
||||||
|
|
||||||
local ok, vto = pcall(require, "various-textobjs")
|
|
||||||
if ok then
|
|
||||||
vto.setup({ keymaps = { useDefaults = true, diabledDefaults = { 'r' } } })
|
|
||||||
vim.keymap.set({ 'o', 'x' }, ' }', vto.restOfParagraph)
|
|
||||||
else
|
|
||||||
print("plugin nvim-various-textobjs missing")
|
|
||||||
end
|
|
||||||
49
nvim/.config/nvim/lua/plugins/odin.lua
Normal file
49
nvim/.config/nvim/lua/plugins/odin.lua
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
require 'lspconfig'.ols.setup {}
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||||
|
if args.bang then
|
||||||
|
-- FormatDisable! will disable formatting just for this buffer
|
||||||
|
vim.b.disable_autoformat = true
|
||||||
|
else
|
||||||
|
vim.g.disable_autoformat = true
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
desc = "Disable autoformat-on-save",
|
||||||
|
bang = true,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||||
|
vim.b.disable_autoformat = false
|
||||||
|
vim.g.disable_autoformat = false
|
||||||
|
end, {
|
||||||
|
desc = "Re-enable autoformat-on-save",
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
opts = {
|
||||||
|
-- notify_on_error = false,
|
||||||
|
-- Odinfmt gets its configuration from odinfmt.json. It defaults
|
||||||
|
-- writing to stdout but needs to be told to read from stdin.
|
||||||
|
formatters = {
|
||||||
|
odinfmt = {
|
||||||
|
-- Change where to find the command if it isn't in your path.
|
||||||
|
command = "odinfmt",
|
||||||
|
args = { "-stdin" },
|
||||||
|
stdin = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- and instruct conform to use odinfmt.
|
||||||
|
formatters_by_ft = {
|
||||||
|
odin = { "odinfmt" },
|
||||||
|
},
|
||||||
|
format_on_save = function(bufnr)
|
||||||
|
-- Disable with a global or buffer-local variable
|
||||||
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return { timeout_ms = 500, lsp_format = "fallback" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/stevearc/oil.nvim" })
|
|
||||||
|
|
||||||
local ok, oil = pcall(require, "oil")
|
|
||||||
if ok then
|
|
||||||
oil.setup()
|
|
||||||
else
|
|
||||||
print("plugin oil missing")
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })
|
|
||||||
14
nvim/.config/nvim/lua/plugins/persisted.lua
Normal file
14
nvim/.config/nvim/lua/plugins/persisted.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
return {
|
||||||
|
"olimorris/persisted.nvim",
|
||||||
|
lazy = false, -- make sure the plugin is always loaded at startup
|
||||||
|
opts = {
|
||||||
|
autoload = true,
|
||||||
|
ignored_dirs = {
|
||||||
|
"~/.config",
|
||||||
|
"~/tmp",
|
||||||
|
"/tmp",
|
||||||
|
{ "~", exact = true },
|
||||||
|
{ "/", exact = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
7
nvim/.config/nvim/lua/plugins/quicker.lua
Normal file
7
nvim/.config/nvim/lua/plugins/quicker.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'stevearc/quicker.nvim',
|
||||||
|
event = "FileType qf",
|
||||||
|
---@module "quicker"
|
||||||
|
---@type quicker.SetupOptions
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/sschleemilch/slimline.nvim" })
|
|
||||||
|
|
||||||
local ok, slimline = pcall(require, "slimline")
|
|
||||||
if ok then
|
|
||||||
slimline.setup()
|
|
||||||
else
|
|
||||||
print("plugin slimline missing")
|
|
||||||
end
|
|
||||||
@@ -1,67 +1,146 @@
|
|||||||
vim.pack.add({ "https://github.com/folke/snacks.nvim" })
|
return {
|
||||||
|
{
|
||||||
local ok, snacks = pcall(require, "snacks")
|
"folke/snacks.nvim",
|
||||||
if ok then
|
priority = 1000,
|
||||||
snacks.setup({
|
lazy = false,
|
||||||
picker = { enabled = false },
|
---@type snacks.Config
|
||||||
|
opts = {
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
dashboard = { enabled = false },
|
||||||
|
explorer = { enabled = true },
|
||||||
|
indent = { enabled = true },
|
||||||
|
input = { enabled = true },
|
||||||
|
notifier = {
|
||||||
|
enabled = true,
|
||||||
|
timeout = 3000,
|
||||||
|
},
|
||||||
|
picker = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
scope = { enabled = true },
|
||||||
|
scroll = { enabled = false },
|
||||||
|
statuscolumn = { enabled = true },
|
||||||
|
words = { enabled = true },
|
||||||
|
styles = {
|
||||||
|
notification = {
|
||||||
|
-- wo = { wrap = true } -- Wrap notifications
|
||||||
|
}
|
||||||
|
},
|
||||||
|
zen = {
|
||||||
|
win = { width = 180, backdrop = { transparent = false } },
|
||||||
|
on_open = function()
|
||||||
|
vim.opt.laststatus = 1
|
||||||
|
require('incline').disable()
|
||||||
|
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||||
|
vim.system({ 'awesome-client', 'client.focus.fullscreen = true' })
|
||||||
|
end,
|
||||||
|
on_close = function()
|
||||||
|
vim.opt.laststatus = 3
|
||||||
|
require('incline').enable()
|
||||||
|
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||||
|
vim.system({ 'awesome-client', 'client.focus.fullscreen = false' })
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
-- Top Pickr & Explorer
|
||||||
|
{ "<leader><space>", function() Snacks.picker.smart() end, desc = "Smart Find Files" },
|
||||||
|
{ "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||||
|
{ "<leader>/", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||||
|
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||||
|
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||||
|
{ "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
|
||||||
|
-- find
|
||||||
|
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||||
|
{ "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" },
|
||||||
|
{ "<leader>ff", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||||
|
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
|
||||||
|
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
|
||||||
|
{ "<leader>fr", function() Snacks.picker.recent() end, desc = "Recent" },
|
||||||
|
-- git
|
||||||
|
{ "<leader>gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
|
||||||
|
{ "<leader>gl", function() Snacks.picker.git_log() end, desc = "Git Log" },
|
||||||
|
{ "<leader>gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" },
|
||||||
|
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
|
||||||
|
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
|
||||||
|
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" },
|
||||||
|
{ "<leader>gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" },
|
||||||
|
{ "<leader>gg", function() Snacks.picker.git_grep() end, desc = "Git Grep" },
|
||||||
|
-- Grep
|
||||||
|
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
|
||||||
|
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
|
||||||
|
{ "<leader>sg", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||||
|
{ "<leader>sw", function() Snacks.picker.grep_word() end, desc = "Visual selection or word", mode = { "n", "x" } },
|
||||||
|
{ "<leader>so", function() Snacks.picker.grep({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
|
||||||
|
{ "<leader>sO", function() Snacks.picker.files({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
|
||||||
|
{ "<leader>sX", function() Snacks.picker.grep({ cwd = "/usr/include/xcb" }) end, desc = "Grep" },
|
||||||
|
-- search
|
||||||
|
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
|
||||||
|
{ '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
|
||||||
|
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
|
||||||
|
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
|
||||||
|
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||||
|
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
|
||||||
|
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
|
||||||
|
{ "<leader>sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" },
|
||||||
|
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
|
||||||
|
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
|
||||||
|
{ "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
|
||||||
|
{ "<leader>sj", function() Snacks.picker.jumps() end, desc = "Jumps" },
|
||||||
|
{ "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
|
||||||
|
{ "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
|
||||||
|
{ "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
|
||||||
|
{ "<leader>sM", function() Snacks.picker.man() end, desc = "Man Pages" },
|
||||||
|
{ "<leader>sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
|
||||||
|
{ "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
|
||||||
|
{ "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
|
||||||
|
{ "<leader>su", function() Snacks.picker.undo() end, desc = "Undo History" },
|
||||||
|
{ "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
|
||||||
|
-- LSP
|
||||||
|
{ "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" },
|
||||||
|
{ "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" },
|
||||||
|
{ "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
|
||||||
|
{ "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
|
||||||
|
{ "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
|
||||||
|
{ "<leader>ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
|
||||||
|
{ "<leader>sS", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
|
||||||
|
-- Other
|
||||||
|
{ "<leader>z", function() Snacks.zen() end, desc = "Toggle Zen Mode" },
|
||||||
|
{ "<leader>Z", function() Snacks.zen.zoom() end, desc = "Toggle Zoom" },
|
||||||
|
{ "<leader>'", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" },
|
||||||
|
{ "<leader>S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" },
|
||||||
|
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||||
|
{ "<leader>bd", function() Snacks.bufdelete() end, desc = "Delete Buffer" },
|
||||||
|
{ "<leader>cR", function() Snacks.rename.rename_file() end, desc = "Rename File" },
|
||||||
|
{ "<leader>gB", function() Snacks.gitbrowse() end, desc = "Git Browse", mode = { "n", "v" } },
|
||||||
|
{ "<leader>gG", function() Snacks.lazygit() end, desc = "Lazygit" },
|
||||||
|
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
|
||||||
|
{ "<leader>bl", function() Snacks.git.blame_line() end, desc = "Git Blame Line" },
|
||||||
|
{ "<c-/>", function() Snacks.terminal() end, desc = "Toggle Terminal" },
|
||||||
|
{ "<c-_>", function() Snacks.terminal() end, desc = "which_key_ignore" },
|
||||||
|
{ "]]", function() Snacks.words.jump(vim.v.count1) end, desc = "Next Reference", mode = { "n", "t" } },
|
||||||
|
{ "[[", function() Snacks.words.jump(-vim.v.count1) end, desc = "Prev Reference", mode = { "n", "t" } },
|
||||||
|
{
|
||||||
|
"<leader>N",
|
||||||
|
desc = "Neovim News",
|
||||||
|
function()
|
||||||
|
Snacks.win({
|
||||||
|
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
|
||||||
|
width = 0.6,
|
||||||
|
height = 0.6,
|
||||||
|
wo = {
|
||||||
|
spell = false,
|
||||||
|
wrap = false,
|
||||||
|
signcolumn = "yes",
|
||||||
|
statuscolumn = " ",
|
||||||
|
conceallevel = 3,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
else
|
end,
|
||||||
print("plugin snacks missing")
|
}
|
||||||
end
|
},
|
||||||
|
init = function()
|
||||||
local set = vim.keymap.set
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "VeryLazy",
|
||||||
set("n", "<leader>ea", function()
|
|
||||||
Snacks.explorer()
|
|
||||||
end, { desc = "File Explorer" })
|
|
||||||
|
|
||||||
set("n", "<leader>gl", function()
|
|
||||||
Snacks.picker.git_log_line()
|
|
||||||
end, { desc = "Git Log Line" })
|
|
||||||
|
|
||||||
set({ "n", "v" }, "<leader>gx", function()
|
|
||||||
Snacks.gitbrowse()
|
|
||||||
end, { desc = "Git Browse" })
|
|
||||||
|
|
||||||
set("n", "<leader>xR", function()
|
|
||||||
Snacks.picker.resume()
|
|
||||||
end, { desc = "Resume" })
|
|
||||||
|
|
||||||
set("n", "<leader>n", function()
|
|
||||||
Snacks.notifier.show_history()
|
|
||||||
end, { desc = "Notification History" })
|
|
||||||
|
|
||||||
set("n", "<leader>N", function()
|
|
||||||
Snacks.picker.notifications()
|
|
||||||
end, { desc = "Notifications" })
|
|
||||||
|
|
||||||
set("n", "<leader>$", function()
|
|
||||||
Snacks.rename.rename_file()
|
|
||||||
end, { desc = "Rename File" })
|
|
||||||
|
|
||||||
set("n", "<leader>z", function()
|
|
||||||
Snacks.zen.zoom()
|
|
||||||
end, { desc = "Toggle Zoom" })
|
|
||||||
|
|
||||||
set("n", "<leader>.", function()
|
|
||||||
Snacks.scratch()
|
|
||||||
end, { desc = "Toggle Scratch Buffer" })
|
|
||||||
|
|
||||||
set("n", "<leader>x.", function()
|
|
||||||
Snacks.scratch.select()
|
|
||||||
end, { desc = "Select Scratch Buffer" })
|
|
||||||
|
|
||||||
-- Terminal
|
|
||||||
|
|
||||||
set({ "n", "t" }, "<c-/>", function()
|
|
||||||
Snacks.terminal()
|
|
||||||
end, { desc = "Toggle Terminal" })
|
|
||||||
|
|
||||||
set({ "n", "t" }, "<c-_>", function()
|
|
||||||
Snacks.terminal()
|
|
||||||
end, { desc = "which_key_ignore" })
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("VimEnter", {
|
|
||||||
callback = function()
|
callback = function()
|
||||||
-- Setup some globals for debugging (lazy-loaded)
|
-- Setup some globals for debugging (lazy-loaded)
|
||||||
_G.dd = function(...)
|
_G.dd = function(...)
|
||||||
@@ -70,15 +149,7 @@ vim.api.nvim_create_autocmd("VimEnter", {
|
|||||||
_G.bt = function()
|
_G.bt = function()
|
||||||
Snacks.debug.backtrace()
|
Snacks.debug.backtrace()
|
||||||
end
|
end
|
||||||
|
vim.print = _G.dd -- Override print to use snacks for `:=` command
|
||||||
-- Override print to use snacks for `:=` command
|
|
||||||
if vim.fn.has("nvim-0.11") == 1 then
|
|
||||||
vim._print = function(_, ...)
|
|
||||||
dd(...)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
vim.print = _G.dd
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Create some toggle mappings
|
-- Create some toggle mappings
|
||||||
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||||
@@ -86,13 +157,15 @@ vim.api.nvim_create_autocmd("VimEnter", {
|
|||||||
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||||
Snacks.toggle.line_number():map("<leader>ul")
|
Snacks.toggle.line_number():map("<leader>ul")
|
||||||
Snacks.toggle
|
Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map(
|
||||||
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
|
"<leader>uc")
|
||||||
:map("<leader>uc")
|
|
||||||
Snacks.toggle.treesitter():map("<leader>uT")
|
Snacks.toggle.treesitter():map("<leader>uT")
|
||||||
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
|
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
|
||||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||||
Snacks.toggle.indent():map("<leader>ug")
|
Snacks.toggle.indent():map("<leader>ug")
|
||||||
Snacks.toggle.dim():map("<leader>uD")
|
Snacks.toggle.dim():map("<leader>uD")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
17
nvim/.config/nvim/lua/plugins/sql.lua
Normal file
17
nvim/.config/nvim/lua/plugins/sql.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
'kristijanhusak/vim-dadbod-ui',
|
||||||
|
dependencies = {
|
||||||
|
{ 'tpope/vim-dadbod', lazy = true },
|
||||||
|
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
'DBUI',
|
||||||
|
'DBUIToggle',
|
||||||
|
'DBUIAddConnection',
|
||||||
|
'DBUIFindBuffer',
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
-- Your DBUI configuration
|
||||||
|
vim.g.db_ui_use_nerd_fonts = 1
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
{
|
|
||||||
src = "https://github.com/kylechui/nvim-surround",
|
|
||||||
version = vim.version.range("^4.0.0"),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local ok, surround = pcall(require, "nvim-surround")
|
|
||||||
if ok then
|
|
||||||
surround.setup()
|
|
||||||
else
|
|
||||||
print("plugin surround missing")
|
|
||||||
end
|
|
||||||
5
nvim/.config/nvim/lua/plugins/tardis.lua
Normal file
5
nvim/.config/nvim/lua/plugins/tardis.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
'fredeeb/tardis.nvim',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
28
nvim/.config/nvim/lua/plugins/telescope-tabs.lua
Normal file
28
nvim/.config/nvim/lua/plugins/telescope-tabs.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
local function get_tab_idx(tab_id)
|
||||||
|
for i, tabnr in ipairs(vim.api.nvim_list_tabpages()) do
|
||||||
|
if tabnr == tab_id then
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return -1
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
'LukasPietzschmann/telescope-tabs',
|
||||||
|
dependencies = { 'nvim-telescope/telescope.nvim' },
|
||||||
|
lazy = true,
|
||||||
|
config = function()
|
||||||
|
require 'telescope-tabs'.setup {
|
||||||
|
entry_formatter = function(tab_id, buffer_ids, file_names, file_paths, is_current)
|
||||||
|
local cwd = vim.fn.getcwd(-1, get_tab_idx(tab_id))
|
||||||
|
local entry_string = table.concat(file_names, ', ')
|
||||||
|
return string.format('%d: %s %s%s', tab_id, cwd, entry_string, is_current and ' <' or '')
|
||||||
|
end,
|
||||||
|
entry_ordinal = function(tab_id, buffer_ids, file_names, file_paths, is_current)
|
||||||
|
local cwd = vim.fn.getcwd(-1, get_tab_idx(tab_id))
|
||||||
|
local entry_string = table.concat(file_names, ', ')
|
||||||
|
return string.format('%s %s', cwd, entry_string)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
71
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
71
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
return {
|
||||||
|
{ -- Fuzzy Finder (files, lsp, etc)
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
branch = '0.1.x',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
{ -- If encountering errors, see telescope-fzf-native README for install instructions
|
||||||
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
build = 'make',
|
||||||
|
cond = function()
|
||||||
|
return vim.fn.executable 'make' == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
|
||||||
|
|
||||||
|
-- change directory with telescope from a list of directories
|
||||||
|
{
|
||||||
|
"SalOrak/whaler",
|
||||||
|
opts = {
|
||||||
|
directories = { "/home/lupan/src" },
|
||||||
|
oneoff_directories = { "/home/lupan/dotfiles" },
|
||||||
|
auto_file_explorer = false,
|
||||||
|
auto_cwd = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Icons, requires Nerd font.
|
||||||
|
{ 'nvim-tree/nvim-web-devicons' },
|
||||||
|
|
||||||
|
'davvid/telescope-git-grep.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local telescope = require 'telescope'
|
||||||
|
-- To list available key bindings inside given telescope picker:
|
||||||
|
-- - Insert mode: <c-/>
|
||||||
|
-- - Normal mode: ?
|
||||||
|
telescope.setup {
|
||||||
|
extensions = {
|
||||||
|
['ui-select'] = {
|
||||||
|
require('telescope.themes').get_dropdown(),
|
||||||
|
},
|
||||||
|
whaler = {
|
||||||
|
directories = { "/home/lupan/src" },
|
||||||
|
oneoff_directories = { "/home/lupan/dotfiles" },
|
||||||
|
auto_file_explorer = false,
|
||||||
|
auto_cwd = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
pcall(telescope.load_extension, 'fzf')
|
||||||
|
pcall(telescope.load_extension, 'ui-select')
|
||||||
|
pcall(telescope.load_extension, 'whaler')
|
||||||
|
pcall(telescope.load_extension, 'git_grep')
|
||||||
|
|
||||||
|
-- See `:help telescope.builtin`
|
||||||
|
local builtin = require 'telescope.builtin'
|
||||||
|
vim.keymap.set('n', '<leader>sT', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||||
|
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>sL', function() telescope.extensions.whaler.whaler() end,
|
||||||
|
{ desc = '[S]earch with wha[L]er' })
|
||||||
|
vim.keymap.set('n', '<leader>gw', function() telescope.extensions.git_grep.grep() end,
|
||||||
|
{ desc = '[G]it grep current [W]ord' })
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
25
nvim/.config/nvim/lua/plugins/tmux.lua
Normal file
25
nvim/.config/nvim/lua/plugins/tmux.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'aserowy/tmux.nvim',
|
||||||
|
opts = {
|
||||||
|
navigation = {
|
||||||
|
enable_default_keybindings = false,
|
||||||
|
},
|
||||||
|
resize = {
|
||||||
|
enable_default_keybindings = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<M-h>', [[<cmd>lua require("tmux").move_left()<cr>]] },
|
||||||
|
{ '<M-j>', [[<cmd>lua require("tmux").move_bottom()<cr>]] },
|
||||||
|
{ '<M-k>', [[<cmd>lua require("tmux").move_top()<cr>]] },
|
||||||
|
{ '<M-l>', [[<cmd>lua require("tmux").move_right()<cr>]] },
|
||||||
|
{ '<M-n>', [[<cmd>lua require("tmux").next_window()<cr>]] },
|
||||||
|
{ '<M-p>', [[<cmd>lua require("tmux").previous_window()<cr>]] },
|
||||||
|
{ '<M-H>', [[<cmd>lua require("tmux").resize_left()<cr>]] },
|
||||||
|
{ '<M-J>', [[<cmd>lua require("tmux").resize_bottom()<cr>]] },
|
||||||
|
{ '<M-K>', [[<cmd>lua require("tmux").resize_top()<cr>]] },
|
||||||
|
{ '<M-L>', [[<cmd>lua require("tmux").resize_right()<cr>]] },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user