migrate to dotter
This commit is contained in:
parent
c5618f2f2c
commit
23b6c0a596
265 changed files with 62 additions and 3125 deletions
7
.dotter/aleidk-work-laptop.toml
Normal file
7
.dotter/aleidk-work-laptop.toml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
includes = []
|
||||||
|
packages = ["default"]
|
||||||
|
|
||||||
|
[files]
|
||||||
|
"configs/hypr/work-laptop/hyprland.conf" = "~/.config/hypr/include/work-laptop.conf"
|
||||||
|
|
||||||
|
[variables]
|
||||||
37
.dotter/global.toml
Normal file
37
.dotter/global.toml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
[settings]
|
||||||
|
default_target_type = "symbolic"
|
||||||
|
|
||||||
|
[helpers]
|
||||||
|
|
||||||
|
[default]
|
||||||
|
depends = []
|
||||||
|
|
||||||
|
[default.files]
|
||||||
|
"configs/fish" = "~/.config/fish"
|
||||||
|
"configs/alacritty" = "~/.config/alacritty"
|
||||||
|
"configs/atuin" = "~/.config/atuin"
|
||||||
|
"configs/bat" = "~/.config/bat"
|
||||||
|
"configs/containers" = "~/.config/containers"
|
||||||
|
"configs/fzf" = "~/.config/fzf"
|
||||||
|
"configs/ghostty" = "~/.config/ghostty"
|
||||||
|
"configs/git" = "~/.config/git"
|
||||||
|
"configs/hypr/base" = "~/.config/hypr"
|
||||||
|
"configs/kitty" = "~/.config/kitty"
|
||||||
|
"configs/lazygit" = "~/.config/lazygit"
|
||||||
|
"configs/mako" = "~/.config/mako"
|
||||||
|
"configs/mise" = "~/.config/mise"
|
||||||
|
"configs/mpv" = "~/.config/mpv"
|
||||||
|
"configs/nvim" = "~/.config/nvim"
|
||||||
|
"configs/rofi" = "~/.config/rofi"
|
||||||
|
"configs/swappy" = "~/.config/swappy"
|
||||||
|
"configs/swaync" = "~/.config/swaync"
|
||||||
|
"configs/uwsm" = "~/.config/uwsm"
|
||||||
|
"configs/vimiv" = "~/.config/vimiv"
|
||||||
|
"configs/waybar" = "~/.config/waybar"
|
||||||
|
"configs/wlogout" = "~/.config/wlogout"
|
||||||
|
"configs/wpaperd" = "~/.config/wpaperd"
|
||||||
|
"configs/yazi" = "~/.config/yazi"
|
||||||
|
|
||||||
|
|
||||||
|
[default.variables]
|
||||||
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
#!/bin/env bash
|
|
||||||
|
|
||||||
package=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
if [[ -z $package ]]; then
|
|
||||||
echo "Please specify an installation method"
|
|
||||||
echo "Available methods: Flatpak, RPM"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
DOWNLOAD_DIR="$HOME/.local/share/youtube-music-updater"
|
|
||||||
mkdir -p "$DOWNLOAD_DIR"
|
|
||||||
|
|
||||||
latest=$(wget 'https://github.com/th-ch/youtube-music/releases/latest/download/latest-linux.yml' -q -O -)
|
|
||||||
version=$(echo "$latest" | grep 'version' | awk '{ print $2 }')
|
|
||||||
base_url="https://github.com/th-ch/youtube-music/releases/latest/download"
|
|
||||||
|
|
||||||
echo "Downloading YouTube Music version $version"
|
|
||||||
|
|
||||||
case "${package,,}" in
|
|
||||||
"flatpak")
|
|
||||||
wget "$base_url/YouTube-Music-$version-x86_64.flatpak" \
|
|
||||||
-q --show-progress \
|
|
||||||
-O "$DOWNLOAD_DIR/YouTube-Music-$version-x86_64.flatpak"
|
|
||||||
|
|
||||||
flatpak remove --user --assumeyes --noninteractive com.github.th_ch.youtube_music
|
|
||||||
flatpak install --user --assumeyes --noninteractive "$DOWNLOAD_DIR/YouTube-Music-$version-x86_64.flatpak"
|
|
||||||
;;
|
|
||||||
"rpm")
|
|
||||||
wget "$base_url/youtube-music-$version.x86_64.rpm" \
|
|
||||||
-q --show-progress \
|
|
||||||
-O "$DOWNLOAD_DIR/youtube-music-$version.x86_64.rpm"
|
|
||||||
|
|
||||||
sudo dnf install --assumeyes "$DOWNLOAD_DIR/youtube-music-$version.x86_64.rpm"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
|
|
||||||
source "$HOME/.local/share/../bin/env.fish"
|
|
||||||
|
|
@ -1,197 +0,0 @@
|
||||||
# -*- conf -*-
|
|
||||||
|
|
||||||
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
|
|
||||||
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
|
|
||||||
# login-shell=no
|
|
||||||
|
|
||||||
include=~/.config/foot/themes/catppuccin/catppuccin-macchiato.conf
|
|
||||||
|
|
||||||
# app-id=foot
|
|
||||||
# title=foot
|
|
||||||
# locked-title=no
|
|
||||||
|
|
||||||
font=JetBrainsMono NF:style=Regular:size=11
|
|
||||||
font-bold=JetBrainsMono NF:style=Bold:size=11
|
|
||||||
font-italic=JetBrainsMono NF:style=Italic:size=11
|
|
||||||
font-bold-italic=JetBrainsMono NF:style=Bold Italic:size=11
|
|
||||||
# line-height=<font metrics>
|
|
||||||
# letter-spacing=0
|
|
||||||
# horizontal-letter-offset=0
|
|
||||||
# vertical-letter-offset=0
|
|
||||||
# underline-offset=<font metrics>
|
|
||||||
# box-drawings-uses-font-glyphs=no
|
|
||||||
# dpi-aware=auto
|
|
||||||
|
|
||||||
# initial-window-size-pixels=700x500 # Or,
|
|
||||||
# initial-window-size-chars=<COLSxROWS>
|
|
||||||
# initial-window-mode=windowed
|
|
||||||
pad=10x10
|
|
||||||
# resize-delay-ms=100
|
|
||||||
|
|
||||||
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
|
|
||||||
|
|
||||||
# bold-text-in-bright=no
|
|
||||||
# word-delimiters=,│`|:"'()[]{}<>
|
|
||||||
# selection-target=primary
|
|
||||||
# workers=<number of logical CPUs>
|
|
||||||
|
|
||||||
[environment]
|
|
||||||
# name=value
|
|
||||||
|
|
||||||
[bell]
|
|
||||||
# urgent=no
|
|
||||||
# notify=no
|
|
||||||
# command=
|
|
||||||
# command-focused=no
|
|
||||||
|
|
||||||
[scrollback]
|
|
||||||
# lines=1000
|
|
||||||
# multiplier=3.0
|
|
||||||
# indicator-position=relative
|
|
||||||
# indicator-format=
|
|
||||||
|
|
||||||
[url]
|
|
||||||
# launch=xdg-open ${url}
|
|
||||||
# label-letters=sadfjklewcmpgh
|
|
||||||
# osc8-underline=url-mode
|
|
||||||
# protocols=http, https, ftp, ftps, file, gemini, gopher
|
|
||||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
|
||||||
|
|
||||||
[cursor]
|
|
||||||
# style=block
|
|
||||||
# color=<inverse foreground/background>
|
|
||||||
# blink=no
|
|
||||||
# beam-thickness=1.5
|
|
||||||
# underline-thickness=<font underline thickness>
|
|
||||||
|
|
||||||
[mouse]
|
|
||||||
# hide-when-typing=no
|
|
||||||
# alternate-scroll-mode=yes
|
|
||||||
|
|
||||||
[colors]
|
|
||||||
alpha=0.9
|
|
||||||
# foreground=dcdccc
|
|
||||||
# background=111111
|
|
||||||
|
|
||||||
## Normal/regular colors (color palette 0-7)
|
|
||||||
# regular0=222222 # black
|
|
||||||
# regular1=cc9393 # red
|
|
||||||
# regular2=7f9f7f # green
|
|
||||||
# regular3=d0bf8f # yellow
|
|
||||||
# regular4=6ca0a3 # blue
|
|
||||||
# regular5=dc8cc3 # magenta
|
|
||||||
# regular6=93e0e3 # cyan
|
|
||||||
# regular7=dcdccc # white
|
|
||||||
|
|
||||||
## Bright colors (color palette 8-15)
|
|
||||||
# bright0=666666 # bright black
|
|
||||||
# bright1=dca3a3 # bright red
|
|
||||||
# bright2=bfebbf # bright green
|
|
||||||
# bright3=f0dfaf # bright yellow
|
|
||||||
# bright4=8cd0d3 # bright blue
|
|
||||||
# bright5=fcace3 # bright magenta
|
|
||||||
# bright6=b3ffff # bright cyan
|
|
||||||
# bright7=ffffff # bright white
|
|
||||||
|
|
||||||
## dimmed colors (see foot.ini(5) man page)
|
|
||||||
# dim0=<not set>
|
|
||||||
# ...
|
|
||||||
# dim7=<not-set>
|
|
||||||
|
|
||||||
## The remaining 256-color palette
|
|
||||||
# 16 = <256-color palette #16>
|
|
||||||
# ...
|
|
||||||
# 255 = <256-color palette #255>
|
|
||||||
|
|
||||||
## Misc colors
|
|
||||||
# selection-foreground=<inverse foreground/background>
|
|
||||||
# selection-background=<inverse foreground/background>
|
|
||||||
# jump-labels=<regular0> <regular3> # black-on-yellow
|
|
||||||
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
|
|
||||||
# search-box-no-match=<regular0> <regular1> # black-on-red
|
|
||||||
# search-box-match=<regular0> <regular3> # black-on-yellow
|
|
||||||
# urls=<regular3>
|
|
||||||
|
|
||||||
[csd]
|
|
||||||
preferred=none
|
|
||||||
# size=26
|
|
||||||
# font=<primary font>
|
|
||||||
# color=<foreground color>
|
|
||||||
# hide-when-typing=no
|
|
||||||
# border-width=0
|
|
||||||
# border-color=<csd.color>
|
|
||||||
# button-width=26
|
|
||||||
# button-color=<background color>
|
|
||||||
# button-minimize-color=<regular4>
|
|
||||||
# button-maximize-color=<regular2>
|
|
||||||
# button-close-color=<regular1>
|
|
||||||
|
|
||||||
[key-bindings]
|
|
||||||
# scrollback-up-page=Shift+Page_Up
|
|
||||||
# scrollback-up-half-page=none
|
|
||||||
# scrollback-up-line=none
|
|
||||||
# scrollback-down-page=Shift+Page_Down
|
|
||||||
# scrollback-down-half-page=none
|
|
||||||
# scrollback-down-line=none
|
|
||||||
# clipboard-copy=Control+Shift+c XF86Copy
|
|
||||||
# clipboard-paste=Control+Shift+v XF86Paste
|
|
||||||
# primary-paste=Shift+Insert
|
|
||||||
# search-start=Control+Shift+r
|
|
||||||
# font-increase=Control+plus Control+equal Control+KP_Add
|
|
||||||
# font-decrease=Control+minus Control+KP_Subtract
|
|
||||||
# font-reset=Control+0 Control+KP_0
|
|
||||||
# spawn-terminal=Control+Shift+n
|
|
||||||
# minimize=none
|
|
||||||
# maximize=none
|
|
||||||
# fullscreen=none
|
|
||||||
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
|
||||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
|
||||||
# pipe-selected=[xargs -r firefox] none
|
|
||||||
# show-urls-launch=Control+Shift+u
|
|
||||||
# show-urls-copy=none
|
|
||||||
# show-urls-persistent=none
|
|
||||||
# prompt-prev=Control+Shift+z
|
|
||||||
# prompt-next=Control+Shift+x
|
|
||||||
# unicode-input=none
|
|
||||||
# noop=none
|
|
||||||
|
|
||||||
[search-bindings]
|
|
||||||
# cancel=Control+g Control+c Escape
|
|
||||||
# commit=Return
|
|
||||||
# find-prev=Control+r
|
|
||||||
# find-next=Control+s
|
|
||||||
# cursor-left=Left Control+b
|
|
||||||
# cursor-left-word=Control+Left Mod1+b
|
|
||||||
# cursor-right=Right Control+f
|
|
||||||
# cursor-right-word=Control+Right Mod1+f
|
|
||||||
# cursor-home=Home Control+a
|
|
||||||
# cursor-end=End Control+e
|
|
||||||
# delete-prev=BackSpace
|
|
||||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
|
||||||
# delete-next=Delete
|
|
||||||
# delete-next-word=Mod1+d Control+Delete
|
|
||||||
# extend-to-word-boundary=Control+w
|
|
||||||
# extend-to-next-whitespace=Control+Shift+w
|
|
||||||
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
|
|
||||||
# primary-paste=Shift+Insert
|
|
||||||
# unicode-input=none
|
|
||||||
|
|
||||||
[url-bindings]
|
|
||||||
# cancel=Control+g Control+c Control+d Escape
|
|
||||||
# toggle-url-visible=t
|
|
||||||
|
|
||||||
[text-bindings]
|
|
||||||
# \x03=Mod4+c # Map Super+c -> Ctrl+c
|
|
||||||
|
|
||||||
[mouse-bindings]
|
|
||||||
# selection-override-modifiers=Shift
|
|
||||||
# primary-paste=BTN_MIDDLE
|
|
||||||
# select-begin=BTN_LEFT
|
|
||||||
# select-begin-block=Control+BTN_LEFT
|
|
||||||
# select-extend=BTN_RIGHT
|
|
||||||
# select-extend-character-wise=Control+BTN_RIGHT
|
|
||||||
# select-word=BTN_LEFT-2
|
|
||||||
# select-word-whitespace=Control+BTN_LEFT-2
|
|
||||||
# select-row=BTN_LEFT-3
|
|
||||||
|
|
||||||
# vim: ft=dosini
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 Catppuccin
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
<h3 align="center">
|
|
||||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
|
|
||||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
|
||||||
Catppuccin for <a href="https://codeberg.org/dnkl/foot">Foot</a>
|
|
||||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/catppuccin/foot/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/foot?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
|
|
||||||
<a href="https://github.com/catppuccin/foot/issues"><img src="https://img.shields.io/github/issues/catppuccin/foot?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
|
|
||||||
<a href="https://github.com/catppuccin/foot/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/foot?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="https://raw.githubusercontent.com/catppuccin/foot-catppuccin/main/assets/foot.png"/>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
1. Copy the contents of `catppuccin.conf` colorscheme you want into your Foot config file (usually stored at `~/.config/foot/foot.ini`)
|
|
||||||
|
|
||||||
## 💝 Thanks to
|
|
||||||
|
|
||||||
- [Pocco81](https://github.com/Pocco81)
|
|
||||||
- [crdpa](https://github.com/crdpa)
|
|
||||||
- [Thibault Andreis](https://github.com/ThibaultAndreis)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p align="center"><img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" /></p>
|
|
||||||
<p align="center">Copyright © 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
|
|
||||||
<p align="center"><a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a></p>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 313 KiB |
|
|
@ -1,19 +0,0 @@
|
||||||
[colors]
|
|
||||||
foreground=c6d0f5 # Text
|
|
||||||
background=303446 # Base
|
|
||||||
regular0=51576d # Surface 1
|
|
||||||
regular1=e78284 # red
|
|
||||||
regular2=a6d189 # green
|
|
||||||
regular3=e5c890 # yellow
|
|
||||||
regular4=8caaee # blue
|
|
||||||
regular5=f4b8e4 # pink
|
|
||||||
regular6=81c8be # teal
|
|
||||||
regular7=b5bfe2 # Subtext 1
|
|
||||||
bright0=626880 # Surface 2
|
|
||||||
bright1=e78284 # red
|
|
||||||
bright2=a6d189 # green
|
|
||||||
bright3=e5c890 # yellow
|
|
||||||
bright4=8caaee # blue
|
|
||||||
bright5=f4b8e4 # pink
|
|
||||||
bright6=81c8be # teal
|
|
||||||
bright7=a5adce # Subtext 0
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
[colors]
|
|
||||||
foreground=4c4f69 # Text
|
|
||||||
background=eff1f5 # Base
|
|
||||||
regular0=5c5f77 # Subtext 1
|
|
||||||
regular1=d20f39 # red
|
|
||||||
regular2=40a02b # green
|
|
||||||
regular3=df8e1d # yellow
|
|
||||||
regular4=1e66f5 # blue
|
|
||||||
regular5=ea76cb # pink
|
|
||||||
regular6=179299 # teal
|
|
||||||
regular7=acb0be # Surface 2
|
|
||||||
bright0=6c6f85 # Subtext 0
|
|
||||||
bright1=d20f39 # red
|
|
||||||
bright2=40a02b # green
|
|
||||||
bright3=df8e1d # yellow
|
|
||||||
bright4=1e66f5 # blue
|
|
||||||
bright5=ea76cb # pink
|
|
||||||
bright6=179299 # teal
|
|
||||||
bright7=bcc0cc # Surface 1
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
[colors]
|
|
||||||
foreground=cad3f5 # Text
|
|
||||||
background=24273a # Base
|
|
||||||
regular0=494d64 # Surface 1
|
|
||||||
regular1=ed8796 # red
|
|
||||||
regular2=a6da95 # green
|
|
||||||
regular3=eed49f # yellow
|
|
||||||
regular4=8aadf4 # blue
|
|
||||||
regular5=f5bde6 # pink
|
|
||||||
regular6=8bd5ca # teal
|
|
||||||
regular7=b8c0e0 # Subtext 1
|
|
||||||
bright0=5b6078 # Surface 2
|
|
||||||
bright1=ed8796 # red
|
|
||||||
bright2=a6da95 # green
|
|
||||||
bright3=eed49f # yellow
|
|
||||||
bright4=8aadf4 # blue
|
|
||||||
bright5=f5bde6 # pink
|
|
||||||
bright6=8bd5ca # teal
|
|
||||||
bright7=a5adcb # Subtext 0
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
[colors]
|
|
||||||
foreground=cdd6f4 # Text
|
|
||||||
background=1e1e2e # Base
|
|
||||||
regular0=45475a # Surface 1
|
|
||||||
regular1=f38ba8 # red
|
|
||||||
regular2=a6e3a1 # green
|
|
||||||
regular3=f9e2af # yellow
|
|
||||||
regular4=89b4fa # blue
|
|
||||||
regular5=f5c2e7 # pink
|
|
||||||
regular6=94e2d5 # teal
|
|
||||||
regular7=bac2de # Subtext 1
|
|
||||||
bright0=585b70 # Surface 2
|
|
||||||
bright1=f38ba8 # red
|
|
||||||
bright2=a6e3a1 # green
|
|
||||||
bright3=f9e2af # yellow
|
|
||||||
bright4=89b4fa # blue
|
|
||||||
bright5=f5c2e7 # pink
|
|
||||||
bright6=94e2d5 # teal
|
|
||||||
bright7=a6adc8 # Subtext 0
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# EditorConfig is awesome: https://EditorConfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
indent_size = 2
|
|
||||||
indent_style = space
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
# go
|
|
||||||
[*.go]
|
|
||||||
indent_style = tab
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# python
|
|
||||||
[*.{ini,py,py.tpl,rst}]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# rust
|
|
||||||
[*.rs]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# documentation, utils
|
|
||||||
[*.{md,mdx,diff}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
# windows shell scripts
|
|
||||||
[*.{cmd,bat,ps1}]
|
|
||||||
end_of_line = crlf
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
gitdir: ../../../../.git/modules/config/foot/themes/catppuccin
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
theme = "catppuccin_macchiato"
|
|
||||||
|
|
||||||
[keys.normal]
|
|
||||||
H = ":buffer-previous"
|
|
||||||
L = ":buffer-next"
|
|
||||||
|
|
||||||
[keys.normal.g]
|
|
||||||
u = "switch_to_lowercase"
|
|
||||||
U = "switch_to_uppercase"
|
|
||||||
|
|
||||||
# LSP actions
|
|
||||||
[keys.normal.space.l]
|
|
||||||
j = "goto_next_diag"
|
|
||||||
k = "goto_prev_diag"
|
|
||||||
|
|
||||||
# Git
|
|
||||||
[keys.normal.space.g]
|
|
||||||
g = [
|
|
||||||
":new",
|
|
||||||
":insert-output lazygit",
|
|
||||||
":buffer-close!",
|
|
||||||
":redraw",
|
|
||||||
":reload-all"
|
|
||||||
]
|
|
||||||
|
|
||||||
[keys.normal.space]
|
|
||||||
e = [
|
|
||||||
':sh rm -f /tmp/unique-file',
|
|
||||||
':insert-output yazi %{buffer_name} --chooser-file=/tmp/unique-file',
|
|
||||||
':insert-output echo "\x1b[?1049h\x1b[?2004h" > /dev/tty',
|
|
||||||
':open %sh{/bin/cat /tmp/unique-file}',
|
|
||||||
':redraw',
|
|
||||||
]
|
|
||||||
|
|
||||||
[editor]
|
|
||||||
line-number = "relative"
|
|
||||||
cursorline = true
|
|
||||||
color-modes = true
|
|
||||||
scrolloff = 15
|
|
||||||
default-yank-register = "*"
|
|
||||||
bufferline = "multiple"
|
|
||||||
popup-border = "all"
|
|
||||||
|
|
||||||
|
|
||||||
[editor.cursor-shape]
|
|
||||||
insert = "bar"
|
|
||||||
normal = "block"
|
|
||||||
select = "underline"
|
|
||||||
|
|
||||||
[editor.indent-guides]
|
|
||||||
render = true
|
|
||||||
|
|
||||||
[editor.statusline]
|
|
||||||
left = ["mode", "spacer", "version-control", "file-type", "file-name","file-modification-indicator", "read-only-indicator", "spinner"]
|
|
||||||
center = []
|
|
||||||
right = ["diagnostics", "position-percentage"]
|
|
||||||
mode.normal = ""
|
|
||||||
mode.insert = ""
|
|
||||||
mode.select = ""
|
|
||||||
|
|
||||||
[editor.file-picker]
|
|
||||||
hidden = false
|
|
||||||
|
|
||||||
[editor.lsp]
|
|
||||||
display-inlay-hints = true
|
|
||||||
|
|
||||||
[editor.inline-diagnostics]
|
|
||||||
cursor-line = "hint"
|
|
||||||
other-lines = "error"
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
|
|
||||||
[[language]]
|
|
||||||
name = "rust"
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
source = base.conf
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
(directive) @function
|
|
||||||
(directive_start) @function
|
|
||||||
(directive_end) @function
|
|
||||||
(comment) @comment
|
|
||||||
((parameter) @include (#set! "priority" 110))
|
|
||||||
((php_only) @include (#set! "priority" 110))
|
|
||||||
((bracket_start) @function (#set! "priority" 120))
|
|
||||||
((bracket_end) @function (#set! "priority" 120))
|
|
||||||
(keyword) @function
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
((php) @injection.content
|
|
||||||
(#set! injection.combined)
|
|
||||||
(#set! injection.language php))
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
-- Loadnoptions before anything
|
|
||||||
require("aleidk.options")
|
|
||||||
|
|
||||||
require("aleidk.lazy")
|
|
||||||
|
|
||||||
require("aleidk.keymaps")
|
|
||||||
require("aleidk.autocmds")
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
{
|
|
||||||
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
|
|
||||||
"blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" },
|
|
||||||
"blink.compat": { "branch": "main", "commit": "08943fdf2eb00432d6205db6d0239434135416bd" },
|
|
||||||
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
|
|
||||||
"ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" },
|
|
||||||
"comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" },
|
|
||||||
"conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" },
|
|
||||||
"copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" },
|
|
||||||
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
|
||||||
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
|
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
|
||||||
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
|
||||||
"mini.clue": { "branch": "main", "commit": "8e329f586a7cfd06085859066a4b60965fc4ecce" },
|
|
||||||
"mini.comment": { "branch": "main", "commit": "03c13e37318bdb18481311c0ac1adc9ed731caf1" },
|
|
||||||
"mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" },
|
|
||||||
"neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" },
|
|
||||||
"noice.nvim": { "branch": "main", "commit": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
|
|
||||||
"nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "4ae9796c4e95ca84ec77946a9f9089b8f1a3eec9" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "8d4fdc5e47e2a4e00179e43f56221250ce365973" },
|
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" },
|
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
|
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" },
|
|
||||||
"overseer.nvim": { "branch": "master", "commit": "10ee48ff96c8d1049efb278ea4c8cf9f3b0e4326" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
|
||||||
"remote-nvim.nvim": { "branch": "main", "commit": "66fc20fd259401c7bb6ac5189ecb6283c2eb65d2" },
|
|
||||||
"remote-sshfs.nvim": { "branch": "main", "commit": "03f6c40c4032eeb1ab91368e06db9c3f3a97a75d" },
|
|
||||||
"render-markdown": { "branch": "main", "commit": "6096cf3608b576a38fd1396227dbc0473091714d" },
|
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "fc7bb00fe67ab504356bed4310d23c2e4cb4b06b" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
|
||||||
"treesj": { "branch": "main", "commit": "03415ac60791d48e120a80d37e080744faf3ac15" },
|
|
||||||
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
|
||||||
"ts-node-action": { "branch": "master", "commit": "6d3b60754fd87963d70eadaa2f77873b447eac26" },
|
|
||||||
"typescript-tools.nvim": { "branch": "master", "commit": "346062e8cd06e82776b60785a040dfbbdcb6de77" },
|
|
||||||
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
|
||||||
"vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" },
|
|
||||||
"vim-dadbod-completion": { "branch": "master", "commit": "da0e75c09c27a82aad078d993bb1b2f4afd43427" },
|
|
||||||
"vim-dadbod-ui": { "branch": "master", "commit": "28a16902cb2134c934b85da5250033ee43b0dee5" },
|
|
||||||
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
|
|
||||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
|
||||||
"yazi.nvim": { "branch": "main", "commit": "053867916a9be3cb46f84b6f095ee731bbddd213" }
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
-- Highlight on yank
|
|
||||||
-- See `:help vim.highlight.on_yank()`
|
|
||||||
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
|
||||||
callback = function()
|
|
||||||
vim.highlight.on_yank()
|
|
||||||
end,
|
|
||||||
group = highlight_group,
|
|
||||||
pattern = "*",
|
|
||||||
})
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
return {
|
|
||||||
icons = {
|
|
||||||
misc = {
|
|
||||||
pint = " ",
|
|
||||||
},
|
|
||||||
dap = {
|
|
||||||
Stopped = { " ", "DiagnosticWarn", "DapStoppedLine" },
|
|
||||||
Breakpoint = " ",
|
|
||||||
BreakpointCondition = " ",
|
|
||||||
BreakpointRejected = { " ", "DiagnosticError" },
|
|
||||||
LogPoint = ".>",
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
Error = " ",
|
|
||||||
Warn = " ",
|
|
||||||
Hint = " ",
|
|
||||||
Info = " ",
|
|
||||||
},
|
|
||||||
git = {
|
|
||||||
added = " ",
|
|
||||||
modified = " ",
|
|
||||||
removed = " ",
|
|
||||||
branch = "",
|
|
||||||
},
|
|
||||||
kinds = {
|
|
||||||
Array = " ",
|
|
||||||
Boolean = " ",
|
|
||||||
Class = " ",
|
|
||||||
Color = " ",
|
|
||||||
Constant = " ",
|
|
||||||
Constructor = " ",
|
|
||||||
Copilot = " ",
|
|
||||||
Enum = " ",
|
|
||||||
EnumMember = " ",
|
|
||||||
Event = " ",
|
|
||||||
Field = " ",
|
|
||||||
File = " ",
|
|
||||||
Folder = " ",
|
|
||||||
Function = " ",
|
|
||||||
Interface = " ",
|
|
||||||
Key = " ",
|
|
||||||
Keyword = " ",
|
|
||||||
Method = " ",
|
|
||||||
Module = " ",
|
|
||||||
Namespace = " ",
|
|
||||||
Null = " ",
|
|
||||||
Number = " ",
|
|
||||||
Object = " ",
|
|
||||||
Operator = " ",
|
|
||||||
Package = " ",
|
|
||||||
Property = " ",
|
|
||||||
Reference = " ",
|
|
||||||
Snippet = " ",
|
|
||||||
String = " ",
|
|
||||||
Struct = " ",
|
|
||||||
Text = " ",
|
|
||||||
TypeParameter = " ",
|
|
||||||
Unit = " ",
|
|
||||||
Value = " ",
|
|
||||||
Variable = " ",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
-- [[ Basic Keymaps ]]
|
|
||||||
|
|
||||||
function MAP(mode, l, r, desc)
|
|
||||||
vim.keymap.set(mode, l, r, { desc = desc, silent = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
function ReloadModule(module)
|
|
||||||
package.loaded[module] = nil
|
|
||||||
require(module)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function default(desc)
|
|
||||||
return {
|
|
||||||
silent = true,
|
|
||||||
desc = desc,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
local function fixIndentation()
|
|
||||||
local indent = 2
|
|
||||||
vim.opt.tabstop = indent
|
|
||||||
vim.opt.shiftwidth = indent
|
|
||||||
vim.opt.softtabstop = indent
|
|
||||||
|
|
||||||
vim.cmd("retab")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Keymaps for better default experience
|
|
||||||
-- See `:help vim.keymap.set()`
|
|
||||||
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
|
|
||||||
|
|
||||||
-- vim.keymap.set("n", "<C-s>", "<CMD>w<CR>", default("Keep cursor centered while junping"))
|
|
||||||
|
|
||||||
-- Remap for dealing with word wrap
|
|
||||||
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
|
||||||
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "J", "mzJ`z", default("Keep cursor in column while joining lines"))
|
|
||||||
|
|
||||||
vim.keymap.set("n", "|", ":vs<CR>", default("Open vsplit"))
|
|
||||||
vim.keymap.set("n", "°", ":sp<CR>", default("Open split"))
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", default("Keep cursor centered while junping"))
|
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", default("Keep cursor centered while junping"))
|
|
||||||
|
|
||||||
vim.keymap.set("n", "n", "nzzzv", default("Keep cursor centered while searching"))
|
|
||||||
vim.keymap.set("n", "N", "Nzzzv", default("Keep cursor centered while searching"))
|
|
||||||
|
|
||||||
vim.keymap.set("n", "Q", "<nop>", {})
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
"n",
|
|
||||||
"<leader>rw",
|
|
||||||
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
|
|
||||||
default("Search and replace current word")
|
|
||||||
)
|
|
||||||
|
|
||||||
-- vim.keymap.set("n", "<leader>rR", ":s/", default("Search and replace inline"))
|
|
||||||
-- vim.keymap.set("n", "<leader>rr", ":%s/", default("Search and replace globally"))
|
|
||||||
-- vim.keymap.set("v", "<leader>r", ":s/", default("Search and replace in selection"))
|
|
||||||
|
|
||||||
vim.keymap.set("v", "p", [["_dP]], default("Paste without lossing yanked text"))
|
|
||||||
|
|
||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", default("Move selection down"))
|
|
||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", default("Move selection up"))
|
|
||||||
vim.keymap.set("n", "<Leader>uI", fixIndentation, default("Fix indentation"))
|
|
||||||
vim.keymap.set("n", "<Leader>uO", function() ReloadModule('aleidk.options') end,
|
|
||||||
default("Reload the options configuration"))
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>uh", ":nohl<CR>", default("Remove search highlight"))
|
|
||||||
|
|
||||||
vim.keymap.set("t", "<ESC>", "<C-\\><C-n>", default("Exit insert mode on terminal"))
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>bc", "<Cmd>bd<CR>", default("Close buffer"))
|
|
||||||
vim.keymap.set("n", "<leader>bh", "<Cmd>bp<CR>", default("Prev buffer"))
|
|
||||||
vim.keymap.set("n", "<leader>bl", "<Cmd>bn<CR>", default("Next buffer"))
|
|
||||||
vim.keymap.set("n", "<leader>bA", "<Cmd>bufdo bd<CR>", default("Close all buffers"))
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
-- Bootstrap lazy.nvim
|
|
||||||
-- Load this file after options has been set
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
-- enabled_plugins is injected as a local variable in the top of the file by the dotfile manager
|
|
||||||
-- See: .dotter/global.toml inside [nvim.files] & [nvim.variables] table
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
{ import = "aleidk.plugins-core" },
|
|
||||||
{ import = "aleidk.plugins-base" },
|
|
||||||
{ import = "aleidk.plugins-ide" },
|
|
||||||
},
|
|
||||||
|
|
||||||
install = { colorscheme = { "catppuccin" } },
|
|
||||||
-- checker = { enabled = true },
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
enabled_plugins
|
|
||||||
}
|
|
||||||
|
|
@ -1,144 +0,0 @@
|
||||||
-- [[ Setting options ]]
|
|
||||||
-- See `:help vim.o`
|
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " "
|
|
||||||
|
|
||||||
vim.o.diffopt = "vertical,closeoff,filler"
|
|
||||||
|
|
||||||
local opt = vim.opt
|
|
||||||
|
|
||||||
-- stylua: ignore
|
|
||||||
opt.autowrite = true -- Enable auto write
|
|
||||||
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
|
||||||
opt.completeopt = "menu,menuone,noselect"
|
|
||||||
opt.conceallevel = 2 -- Hide * markup for bold and italic
|
|
||||||
opt.confirm = true -- Confirm to save changes before exiting modified buffer
|
|
||||||
opt.cursorline = true -- Enable highlighting of the current line
|
|
||||||
opt.expandtab = true -- Use spaces instead of tabs
|
|
||||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
|
||||||
opt.grepformat = "%f:%l:%c:%m"
|
|
||||||
opt.grepprg = "rg --vimgrep"
|
|
||||||
opt.ignorecase = true -- Ignore case
|
|
||||||
opt.inccommand = "nosplit" -- preview incremental substitute
|
|
||||||
opt.laststatus = 0
|
|
||||||
opt.list = true -- Show some invisible characters (tabs...
|
|
||||||
opt.mouse = "a" -- Enable mouse mode
|
|
||||||
opt.number = true -- Print line number
|
|
||||||
opt.pumblend = 10 -- Popup blend
|
|
||||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
|
||||||
opt.relativenumber = true -- Relative line numbers
|
|
||||||
opt.scrolloff = 15 -- Lines of context
|
|
||||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
|
||||||
opt.shiftround = true -- Round indent
|
|
||||||
opt.shiftwidth = 2 -- Size of an indent
|
|
||||||
-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages
|
|
||||||
opt.showmode = false -- Dont show mode since we have a statusline
|
|
||||||
opt.sidescrolloff = 8 -- Columns of context
|
|
||||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
|
||||||
opt.smartindent = true -- Insert indents automatically
|
|
||||||
opt.spelllang = { "en" }
|
|
||||||
opt.splitbelow = true -- Put new windows below current
|
|
||||||
opt.splitright = true -- Put new windows right of current
|
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
|
||||||
opt.termguicolors = true -- True color support
|
|
||||||
opt.timeoutlen = 300
|
|
||||||
opt.undofile = true
|
|
||||||
opt.undolevels = 10000
|
|
||||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
|
||||||
opt.wildmode = "longest,list:full" -- Command-line completion mode
|
|
||||||
opt.winminwidth = 5 -- Minimum window width
|
|
||||||
opt.wrap = false -- Disable line wrap
|
|
||||||
|
|
||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
|
||||||
|
|
||||||
local fn = vim.fn
|
|
||||||
|
|
||||||
-- Quickfix customization
|
|
||||||
function _G.qftf(info)
|
|
||||||
local items
|
|
||||||
local ret = {}
|
|
||||||
-- The name of item in list is based on the directory of quickfix window.
|
|
||||||
-- Change the directory for quickfix window make the name of item shorter.
|
|
||||||
-- It's a good opportunity to change current directory in quickfixtextfunc :)
|
|
||||||
--
|
|
||||||
-- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window
|
|
||||||
-- local root = getRootByAlterBufnr(alterBufnr)
|
|
||||||
-- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root)))
|
|
||||||
--
|
|
||||||
if info.quickfix == 1 then
|
|
||||||
items = fn.getqflist({ id = info.id, items = 0 }).items
|
|
||||||
else
|
|
||||||
items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items
|
|
||||||
end
|
|
||||||
local limit = 31
|
|
||||||
local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s"
|
|
||||||
local validFmt = "%s │%5d:%-3d│%s %s"
|
|
||||||
for i = info.start_idx, info.end_idx do
|
|
||||||
local e = items[i]
|
|
||||||
local fname = ""
|
|
||||||
local str
|
|
||||||
if e.valid == 1 then
|
|
||||||
if e.bufnr > 0 then
|
|
||||||
fname = fn.bufname(e.bufnr)
|
|
||||||
if fname == "" then
|
|
||||||
fname = "[No Name]"
|
|
||||||
else
|
|
||||||
fname = fname:gsub("^" .. vim.env.HOME, "~")
|
|
||||||
end
|
|
||||||
-- char in fname may occur more than 1 width, ignore this issue in order to keep performance
|
|
||||||
if #fname <= limit then
|
|
||||||
fname = fnameFmt1:format(fname)
|
|
||||||
else
|
|
||||||
fname = fnameFmt2:format(fname:sub(1 - limit))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local lnum = e.lnum > 99999 and -1 or e.lnum
|
|
||||||
local col = e.col > 999 and -1 or e.col
|
|
||||||
local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper()
|
|
||||||
str = validFmt:format(fname, lnum, col, qtype, e.text)
|
|
||||||
else
|
|
||||||
str = e.text
|
|
||||||
end
|
|
||||||
table.insert(ret, str)
|
|
||||||
end
|
|
||||||
return ret
|
|
||||||
end
|
|
||||||
|
|
||||||
-- TODO: how to customize?
|
|
||||||
vim.o.qftf = "{info -> v:lua._G.qftf(info)}"
|
|
||||||
|
|
||||||
vim.filetype.add({
|
|
||||||
-- Detect and assign filetype based on the extension of the filename
|
|
||||||
extension = {
|
|
||||||
mdx = "mdx",
|
|
||||||
log = "log",
|
|
||||||
conf = "conf",
|
|
||||||
env = "dotenv"
|
|
||||||
},
|
|
||||||
-- Detect and apply filetypes based on the entire filename
|
|
||||||
filename = {
|
|
||||||
[".env"] = "dotenv",
|
|
||||||
["env"] = "dotenv",
|
|
||||||
["tsconfig.json"] = "jsonc",
|
|
||||||
},
|
|
||||||
-- Detect and apply filetypes based on certain patterns of the filenames
|
|
||||||
pattern = {
|
|
||||||
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
|
|
||||||
["%.env%.[%w_.-]+"] = "dotenv",
|
|
||||||
[".*%.blade%.php"] = "blade",
|
|
||||||
[".*%.hurl.*"] = "hurl",
|
|
||||||
[".*/hypr/.*%.conf"] = "hyprlang",
|
|
||||||
['.*/systemd/.*%.(%a+)'] = function(path, bufnr, ext)
|
|
||||||
vim.print(ext)
|
|
||||||
local allowed = { "container", "volume", "network", "build", "pod", "kube" }
|
|
||||||
for _, v in ipairs(allowed) do
|
|
||||||
if v == ext then
|
|
||||||
return "ini"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
return {
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = true,
|
|
||||||
opts = {}, -- this is equalent to setup({}) function
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
local function select_or_create(search)
|
|
||||||
local grapple = require("grapple")
|
|
||||||
|
|
||||||
if grapple.exists(search) then
|
|
||||||
grapple.select(search)
|
|
||||||
else
|
|
||||||
grapple.tag()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
"cbochs/grapple.nvim",
|
|
||||||
dependencies = {
|
|
||||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
|
||||||
},
|
|
||||||
lazy = false,
|
|
||||||
cmd = "Grapple",
|
|
||||||
config = function()
|
|
||||||
local telescope = require("telescope")
|
|
||||||
telescope.load_extension("grapple")
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "<leader><leader>a", "<cmd>Grapple toggle<cr>", desc = "Toggle bookmark for current file" },
|
|
||||||
{ "<leader><leader>D", "<cmd>Grapple reset<cr>", desc = "Delete all bookmarks" },
|
|
||||||
{ "<leader><leader>t", "<cmd>Grapple toggle_tags<cr>", desc = "Toggle bookmarks window" },
|
|
||||||
{ "<leader><leader>T", "<cmd>Grapple toggle_scopes<cr>", desc = "Toggle scopes window" },
|
|
||||||
{ "<leader><leader>n", "<cmd>Grapple cycle forward<cr>", desc = "Next bookmark" },
|
|
||||||
{ "<leader><leader>N", "<cmd>Grapple cycle backward<cr>", desc = "Prev bookmark" },
|
|
||||||
{ "<leader><leader>j", function() select_or_create({ index = 1 }) end, desc = "Go or create bookmark 1" },
|
|
||||||
{ "<leader><leader>k", function() select_or_create({ index = 2 }) end, desc = "Go or create bookmark 2" },
|
|
||||||
{ "<leader><leader>l", function() select_or_create({ index = 3 }) end, desc = "Go or create bookmark 3" },
|
|
||||||
{ "<leader><leader>ñ", function() select_or_create({ index = 4 }) end, desc = "Go or create bookmark 4" },
|
|
||||||
{ "<leader><leader>J", "<cmd>Grapple tag index=1<cr>", desc = "Override bookmark 1" },
|
|
||||||
{ "<leader><leader>K", "<cmd>Grapple tag index=2<cr>", desc = "Override bookmark 2" },
|
|
||||||
{ "<leader><leader>L", "<cmd>Grapple tag index=3<cr>", desc = "Override bookmark 3" },
|
|
||||||
{ "<leader><leader>Ñ", "<cmd>Grapple tag index=4<cr>", desc = "Override bookmark 4" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"echasnovski/mini.comment",
|
|
||||||
version = "*",
|
|
||||||
event = "VeryLazy",
|
|
||||||
dependencies = {
|
|
||||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
custom_commentstring = function()
|
|
||||||
return require("ts_context_commentstring.internal").calculate_commentstring()
|
|
||||||
or vim.bo.commentstring
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"LudoPinelli/comment-box.nvim",
|
|
||||||
opts = {
|
|
||||||
outer_blank_lines = true,
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "gcb", function() require("comment-box").lcbox() end, { desc = "Create a comment box", mode = { "n", "v" }, } },
|
|
||||||
{ "gcl", function() require("comment-box").llline() end, { desc = "Create a comment line", mode = { "n", "v" }, } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
return {
|
|
||||||
"mikavilpas/yazi.nvim",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>e",
|
|
||||||
"<cmd>Yazi<cr>",
|
|
||||||
desc = "Open yazi at the current file",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
-- Open in the current working directory
|
|
||||||
"<leader>E",
|
|
||||||
"<cmd>Yazi cwd<cr>",
|
|
||||||
desc = "Open the file manager in nvim's working directory",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
-- if you want to open yazi instead of netrw, see below for more info
|
|
||||||
open_for_directories = true,
|
|
||||||
open_multiple_tabs = true,
|
|
||||||
floating_window_scaling_factor = 1,
|
|
||||||
keymaps = {
|
|
||||||
show_help = '<f1>',
|
|
||||||
open_file_in_vertical_split = '<c-v>',
|
|
||||||
open_file_in_horizontal_split = '<c-s>',
|
|
||||||
open_file_in_tab = '<c-t>',
|
|
||||||
grep_in_directory = '<c-w>',
|
|
||||||
cycle_open_buffers = '<tab>',
|
|
||||||
copy_relative_path_to_selected_files = '<c-y>',
|
|
||||||
send_to_quickfix_list = '<c-q>',
|
|
||||||
change_working_directory = "<c-\\>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
return {
|
|
||||||
-- Add indentation guides even on blank lines
|
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
|
||||||
main = "ibl",
|
|
||||||
opts = {
|
|
||||||
-- char = "▏",
|
|
||||||
indent = {
|
|
||||||
char = "│",
|
|
||||||
tab_char = "│",
|
|
||||||
},
|
|
||||||
scope = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
exclude = {
|
|
||||||
filetypes = {
|
|
||||||
"help",
|
|
||||||
"alpha",
|
|
||||||
"dashboard",
|
|
||||||
"neo-tree",
|
|
||||||
"Trouble",
|
|
||||||
"lazy",
|
|
||||||
"mason",
|
|
||||||
"notify",
|
|
||||||
"toggleterm",
|
|
||||||
"lazyterm",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
return {
|
|
||||||
-- Highlight, edit, and navigate code
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
event = { "BufReadPost", "BufNewFile", "BufWritePre", "VeryLazy" },
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
|
||||||
{ "windwp/nvim-ts-autotag", opts = {} },
|
|
||||||
},
|
|
||||||
build = ":TSUpdate",
|
|
||||||
config = function()
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
|
||||||
auto_install = true,
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
|
||||||
keymaps = {
|
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
|
||||||
["aa"] = "@parameter.outer",
|
|
||||||
["ia"] = "@parameter.inner",
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
|
||||||
goto_previous = { -- current or last start of object
|
|
||||||
["[["] = { query = "@local.scope", query_group = "locals", desc = "Next scope" },
|
|
||||||
["[f"] = "@function.outer",
|
|
||||||
["[c"] = "@class.outer",
|
|
||||||
},
|
|
||||||
goto_next = { -- next object end
|
|
||||||
["]]"] = { query = "@local.scope", query_group = "locals", desc = "Next scope" },
|
|
||||||
["]f"] = "@function.outer", -- current function end
|
|
||||||
["]c"] = "@class.outer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
swap = {
|
|
||||||
enable = true,
|
|
||||||
swap_next = {
|
|
||||||
["<leader>ln"] = "@parameter.inner",
|
|
||||||
},
|
|
||||||
swap_previous = {
|
|
||||||
["<leader>lN"] = "@parameter.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- autotag = { enable = true },
|
|
||||||
})
|
|
||||||
|
|
||||||
require('ts_context_commentstring').setup {
|
|
||||||
enable_autocmd = false,
|
|
||||||
}
|
|
||||||
|
|
||||||
local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move"
|
|
||||||
|
|
||||||
-- Repeat movement with ; and ,
|
|
||||||
-- ensure , goes forward and ; goes backward regardless of the last direction
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_next)
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move_previous)
|
|
||||||
|
|
||||||
-- Optionally, make builtin f, F, t, T also repeatable with ; and ,
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f_expr, { expr = true })
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F_expr, { expr = true })
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t_expr, { expr = true })
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = true })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "[u", function()
|
|
||||||
require("treesitter-context").go_to_context()
|
|
||||||
end, { silent = true, noremap = true, desc = "Go up when context is out of view" })
|
|
||||||
|
|
||||||
vim.opt.foldmethod = "expr"
|
|
||||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
|
||||||
|
|
||||||
-- Uncoment this line to disable auto folding on file open
|
|
||||||
vim.cmd("set nofoldenable")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,217 +0,0 @@
|
||||||
local icons = require("aleidk.constants").icons
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
opts = {
|
|
||||||
render = "compact",
|
|
||||||
fps = "60",
|
|
||||||
timeout = 2000,
|
|
||||||
stages = "slide",
|
|
||||||
icons = {
|
|
||||||
DEBUG = "",
|
|
||||||
TRACE = "✎",
|
|
||||||
ERROR = icons.diagnostics.Error,
|
|
||||||
INFO = icons.diagnostics.Info,
|
|
||||||
WARN = icons.diagnostics.Warn,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
-- better imputs
|
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
opts = {
|
|
||||||
input = {
|
|
||||||
-- handle by noice
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
},
|
|
||||||
---@type NoiceConfig
|
|
||||||
opts = {
|
|
||||||
presets = {
|
|
||||||
bottom_search = true,
|
|
||||||
long_message_to_split = true,
|
|
||||||
inc_rename = true,
|
|
||||||
lsp_doc_border = true,
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
override = {
|
|
||||||
-- override the default lsp markdown formatter with Noice
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
-- override the lsp markdown formatter with Noice
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
-- override cmp documentation with Noice (needs the other options to work)
|
|
||||||
["cmp.entry.get_documentation"] = true,
|
|
||||||
},
|
|
||||||
message = {
|
|
||||||
view = "mini",
|
|
||||||
view_search = false,
|
|
||||||
},
|
|
||||||
progress = {
|
|
||||||
view = "mini_left"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
---@type NoiceRouteConfig[]
|
|
||||||
routes = {
|
|
||||||
{
|
|
||||||
-- Don't show these messages
|
|
||||||
opts = { skip = true },
|
|
||||||
filter = {
|
|
||||||
any = {
|
|
||||||
{
|
|
||||||
event = "msg_show",
|
|
||||||
kind = "search_count",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
event = "msg_show",
|
|
||||||
kind = "",
|
|
||||||
find = "written", -- file saved msg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
event = "msg_show",
|
|
||||||
kind = "",
|
|
||||||
find = "yazi.nvim",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
event = "msg_show",
|
|
||||||
kind = "",
|
|
||||||
find = "%d+ (more|fewer) lines", -- undo/redo msg
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
filter = {
|
|
||||||
event = "notify",
|
|
||||||
min_height = 15
|
|
||||||
},
|
|
||||||
view = 'popup',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
filter = {
|
|
||||||
event = "notify",
|
|
||||||
kind = "info"
|
|
||||||
},
|
|
||||||
view = 'mini'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
---@type NoiceConfigViews
|
|
||||||
views = {
|
|
||||||
notify = {
|
|
||||||
merge = true
|
|
||||||
},
|
|
||||||
cmdline_popup = {
|
|
||||||
position = {
|
|
||||||
row = 5,
|
|
||||||
col = "50%",
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
width = 60,
|
|
||||||
height = "auto",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
popupmenu = {
|
|
||||||
relative = "editor",
|
|
||||||
position = {
|
|
||||||
row = 8,
|
|
||||||
col = "50%",
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
width = 60,
|
|
||||||
height = 10,
|
|
||||||
},
|
|
||||||
border = {
|
|
||||||
style = "rounded",
|
|
||||||
padding = { 0, 1 },
|
|
||||||
},
|
|
||||||
win_options = {
|
|
||||||
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mini_left = {
|
|
||||||
backend = "mini",
|
|
||||||
relative = "editor",
|
|
||||||
align = "left",
|
|
||||||
timeout = 2000,
|
|
||||||
reverse = true,
|
|
||||||
focusable = false,
|
|
||||||
position = {
|
|
||||||
row = -1,
|
|
||||||
col = 0,
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
width = "auto",
|
|
||||||
height = "auto",
|
|
||||||
max_height = 10,
|
|
||||||
},
|
|
||||||
border = {
|
|
||||||
style = "none",
|
|
||||||
},
|
|
||||||
zindex = 60,
|
|
||||||
win_options = {
|
|
||||||
winbar = "",
|
|
||||||
foldenable = false,
|
|
||||||
winblend = 30,
|
|
||||||
winhighlight = {
|
|
||||||
Normal = "NoiceMini",
|
|
||||||
IncSearch = "",
|
|
||||||
CurSearch = "",
|
|
||||||
Search = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<S-Enter>",
|
|
||||||
function() require("noice").redirect(vim.fn.getcmdline()) end,
|
|
||||||
mode = "c",
|
|
||||||
desc =
|
|
||||||
"Redirect Cmdline"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>um",
|
|
||||||
function() require("noice").cmd("last") end,
|
|
||||||
desc =
|
|
||||||
"Messages last"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>uM",
|
|
||||||
function() require("noice").cmd("history") end,
|
|
||||||
desc =
|
|
||||||
"Messages all"
|
|
||||||
},
|
|
||||||
{ "<leader>uX", function() require("noice").cmd("dismiss") end, desc = "Message dismiss all" },
|
|
||||||
{
|
|
||||||
"<c-d>",
|
|
||||||
function() if not require("noice.lsp").scroll(4) then return "<c-d>" end end,
|
|
||||||
silent = true,
|
|
||||||
expr = true,
|
|
||||||
desc =
|
|
||||||
"Scroll forward",
|
|
||||||
mode = {
|
|
||||||
"i", "n", "s" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-u>",
|
|
||||||
function() if not require("noice.lsp").scroll(-4) then return "<c-u>" end end,
|
|
||||||
silent = true,
|
|
||||||
expr = true,
|
|
||||||
desc =
|
|
||||||
"Scroll backward",
|
|
||||||
mode = {
|
|
||||||
"i", "n", "s" }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"mbbill/undotree",
|
|
||||||
config = function()
|
|
||||||
vim.g.undotree_WindowLayout = 2
|
|
||||||
vim.g.undotree_ShortIndicators = 1
|
|
||||||
vim.g.undotree_SetFocusWhenToggle = 1
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ "<leader>fu", vim.cmd.UndotreeToggle, desc = "Undo tree" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
return { -- Change colors.none if not using a transparent background
|
|
||||||
"catppuccin/nvim",
|
|
||||||
name = "catppuccin",
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
local utils = require("catppuccin.utils.colors")
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
flavour = "macchiato",
|
|
||||||
transparent_background = true,
|
|
||||||
integrations = {
|
|
||||||
aerial = true,
|
|
||||||
blink_cmp = true,
|
|
||||||
cmp = true,
|
|
||||||
gitsigns = true,
|
|
||||||
indent_blankline = { enabled = true, scope_color = "text", },
|
|
||||||
lsp_trouble = true,
|
|
||||||
mason = true,
|
|
||||||
noice = true,
|
|
||||||
notify = true,
|
|
||||||
},
|
|
||||||
custom_highlights = function(colors)
|
|
||||||
return {
|
|
||||||
-- Fix colors for cmp
|
|
||||||
Pmenu = { bg = colors.none, blend = 0 },
|
|
||||||
FloatBorder = { bg = colors.none },
|
|
||||||
CmpItemMenu = { fg = colors.text, bg = colors.none },
|
|
||||||
-- dadbod-ui
|
|
||||||
NotificationInfo = { bg = colors.none, fg = colors.text },
|
|
||||||
NotificationWarning = { bg = colors.none, fg = colors.yellow },
|
|
||||||
NotificationError = { bg = colors.none, fg = colors.red },
|
|
||||||
|
|
||||||
-- for word diff in previews
|
|
||||||
GitSignsAddInline = {
|
|
||||||
fg = colors.teal,
|
|
||||||
bg = utils.darken(colors.teal, 0.4),
|
|
||||||
style = { "bold" },
|
|
||||||
},
|
|
||||||
GitSignsDeleteInline = {
|
|
||||||
fg = colors.red,
|
|
||||||
bg = utils.darken(colors.red, 0.4),
|
|
||||||
style = { "bold" },
|
|
||||||
},
|
|
||||||
GitSignsChangeInline = {
|
|
||||||
fg = colors.mauve,
|
|
||||||
bg = utils.darken(colors.mauve, 0.4),
|
|
||||||
style = { "bold" },
|
|
||||||
},
|
|
||||||
GitSignsDeleteVirtLn = { bg = colors.none, fg = colors.red },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
require("catppuccin").setup(opts)
|
|
||||||
vim.cmd.colorscheme("catppuccin-macchiato")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
return {
|
|
||||||
-- Detect tabstop and shiftwidth automatically
|
|
||||||
"tpope/vim-sleuth",
|
|
||||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
|
||||||
{
|
|
||||||
-- Highlight word under cursor
|
|
||||||
"RRethy/vim-illuminate",
|
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
|
||||||
opts = {
|
|
||||||
delay = 200,
|
|
||||||
filetypes_denylist = {
|
|
||||||
'dirbuf',
|
|
||||||
'dirvish',
|
|
||||||
'fugitive',
|
|
||||||
'aerial',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("illuminate").configure(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
return {
|
|
||||||
"echasnovski/mini.clue",
|
|
||||||
version = "*",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
local miniclue = require("mini.clue")
|
|
||||||
miniclue.setup({
|
|
||||||
triggers = {
|
|
||||||
-- Leader triggers
|
|
||||||
{ mode = "n", keys = "<Leader>" },
|
|
||||||
{ mode = "v", keys = "<Leader>" },
|
|
||||||
{ mode = "x", keys = "<Leader>" },
|
|
||||||
|
|
||||||
-- Built-in completion
|
|
||||||
{ mode = "i", keys = "<C-x>" },
|
|
||||||
|
|
||||||
-- `g` key
|
|
||||||
{ mode = "n", keys = "g" },
|
|
||||||
{ mode = "x", keys = "g" },
|
|
||||||
|
|
||||||
-- Marks
|
|
||||||
{ mode = "n", keys = "'" },
|
|
||||||
{ mode = "n", keys = "`" },
|
|
||||||
{ mode = "x", keys = "'" },
|
|
||||||
{ mode = "x", keys = "`" },
|
|
||||||
|
|
||||||
-- Registers
|
|
||||||
{ mode = "n", keys = '"' },
|
|
||||||
{ mode = "x", keys = '"' },
|
|
||||||
{ mode = "i", keys = "<C-r>" },
|
|
||||||
{ mode = "c", keys = "<C-r>" },
|
|
||||||
|
|
||||||
-- Window commands
|
|
||||||
{ mode = "n", keys = "<C-w>" },
|
|
||||||
|
|
||||||
-- `z` key
|
|
||||||
{ mode = "n", keys = "z" },
|
|
||||||
{ mode = "x", keys = "z" },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Add a "postkeys" value to activate those keys after others
|
|
||||||
clues = {
|
|
||||||
miniclue.gen_clues.builtin_completion(),
|
|
||||||
miniclue.gen_clues.g(),
|
|
||||||
miniclue.gen_clues.marks(),
|
|
||||||
miniclue.gen_clues.registers(),
|
|
||||||
miniclue.gen_clues.windows(),
|
|
||||||
miniclue.gen_clues.z(),
|
|
||||||
|
|
||||||
{ mode = "n", keys = "<Leader><Leader>", desc = "+Bookmarks" },
|
|
||||||
{ mode = "n", keys = "<Leader><Leader>n", postkeys = "<Leader><Leader>" },
|
|
||||||
{ mode = "n", keys = "<Leader><Leader>N", postkeys = "<Leader><Leader>" },
|
|
||||||
{ mode = "n", keys = "<Leader>b", desc = "+Buffers" },
|
|
||||||
{ mode = "n", keys = "<Leader>bh", postkeys = "<Leader>b" },
|
|
||||||
{ mode = "n", keys = "<Leader>bl", postkeys = "<Leader>b" },
|
|
||||||
{ mode = "n", keys = "<Leader>f", desc = "+Find" },
|
|
||||||
{ mode = "n", keys = "<Leader>g", desc = "+Git" },
|
|
||||||
{ mode = "n", keys = "<Leader>l", desc = "+LSP" },
|
|
||||||
{ mode = "n", keys = "<Leader>r", desc = "+Replace" },
|
|
||||||
{ mode = "n", keys = "<Leader>u", desc = "+UI & Config" },
|
|
||||||
{ mode = "n", keys = "<Leader>un", desc = "+Noice" },
|
|
||||||
{ mode = "n", keys = "<Leader>w", desc = "+Workspace" },
|
|
||||||
{ mode = "n", keys = "<Leader>p", desc = "+Run stuff" },
|
|
||||||
{ mode = "n", keys = "<Leader>z", desc = "+ZK" },
|
|
||||||
{ mode = "v", keys = "<Leader>z", desc = "+ZK" },
|
|
||||||
{ mode = "v", keys = "<Leader>a", desc = "+AI" },
|
|
||||||
{ mode = "n", keys = "<Leader>a", desc = "+AI" },
|
|
||||||
{ mode = "n", keys = "g?", desc = "+Print Debug" },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Clue window settings
|
|
||||||
window = {
|
|
||||||
-- Floating window config
|
|
||||||
config = {
|
|
||||||
width = "auto",
|
|
||||||
},
|
|
||||||
-- Delay before showing clue window
|
|
||||||
delay = 200,
|
|
||||||
-- Keys to scroll inside the clue window
|
|
||||||
scroll_down = "<C-d>",
|
|
||||||
scroll_up = "<C-u>",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,189 +0,0 @@
|
||||||
return {
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
lazy = false,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
"cbochs/grapple.nvim",
|
|
||||||
{ 'AndreM222/copilot-lualine' }
|
|
||||||
},
|
|
||||||
opts = function()
|
|
||||||
local icons = require("aleidk.constants").icons
|
|
||||||
local palete = require("catppuccin.palettes").get_palette "macchiato"
|
|
||||||
|
|
||||||
local function diff_source()
|
|
||||||
local gitsigns = vim.b.gitsigns_status_dict
|
|
||||||
if gitsigns then
|
|
||||||
return {
|
|
||||||
added = gitsigns.added,
|
|
||||||
modified = gitsigns.changed,
|
|
||||||
removed = gitsigns.removed,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function position_scrollbar(str)
|
|
||||||
local sbar = { "▁▁", "▂▂", "▃▃", "▄▄", "▅▅", "▆▆", "▇▇", "██" }
|
|
||||||
|
|
||||||
local curr_line = vim.api.nvim_win_get_cursor(0)[1]
|
|
||||||
local lines = vim.api.nvim_buf_line_count(0)
|
|
||||||
local i = math.floor((curr_line - 1) / lines * #sbar) + 1
|
|
||||||
return str .. " " .. sbar[i]
|
|
||||||
end
|
|
||||||
|
|
||||||
local codecompanion_status = require("lualine.component"):extend()
|
|
||||||
|
|
||||||
codecompanion_status.processing = false
|
|
||||||
codecompanion_status.spinner_index = 1
|
|
||||||
|
|
||||||
local spinner_symbols = require("copilot-lualine.spinners").bouncing_bar
|
|
||||||
|
|
||||||
-- Initializer
|
|
||||||
function codecompanion_status:init(options)
|
|
||||||
codecompanion_status.super.init(self, options)
|
|
||||||
|
|
||||||
local group = vim.api.nvim_create_augroup("CodeCompanionHooks", {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "User" }, {
|
|
||||||
pattern = "CodeCompanionRequest*",
|
|
||||||
group = group,
|
|
||||||
callback = function(request)
|
|
||||||
if request.match == "CodeCompanionRequestStarted" then
|
|
||||||
self.processing = true
|
|
||||||
elseif request.match == "CodeCompanionRequestFinished" then
|
|
||||||
self.processing = false
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Function that runs every time statusline is updated
|
|
||||||
function codecompanion_status:update_status()
|
|
||||||
if self.processing then
|
|
||||||
self.spinner_index = (self.spinner_index % #spinner_symbols) + 1
|
|
||||||
return spinner_symbols[self.spinner_index]
|
|
||||||
else
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
options = {
|
|
||||||
theme = "catppuccin",
|
|
||||||
globalstatus = true,
|
|
||||||
disabled_filetypes = { statusline = { "dashboard", "alpha" } },
|
|
||||||
component_separators = "",
|
|
||||||
section_separators = "",
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {
|
|
||||||
{
|
|
||||||
"mode",
|
|
||||||
padding = 0,
|
|
||||||
fmt = function()
|
|
||||||
return " "
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {
|
|
||||||
{ "branch", icon = icons.git.branch },
|
|
||||||
{
|
|
||||||
"diff",
|
|
||||||
symbols = {
|
|
||||||
added = icons.git.added,
|
|
||||||
modified = icons.git.modified,
|
|
||||||
removed = icons.git.removed,
|
|
||||||
},
|
|
||||||
source = diff_source,
|
|
||||||
},
|
|
||||||
{ codecompanion_status },
|
|
||||||
{
|
|
||||||
"diagnostics",
|
|
||||||
symbols = {
|
|
||||||
error = icons.diagnostics.Error,
|
|
||||||
warn = icons.diagnostics.Warn,
|
|
||||||
info = icons.diagnostics.Info,
|
|
||||||
hint = icons.diagnostics.Hint,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"filetype",
|
|
||||||
{
|
|
||||||
"filename",
|
|
||||||
path = 1,
|
|
||||||
symbols = {
|
|
||||||
modified = "●", -- Text to show when the buffer is modified
|
|
||||||
alternate_file = "#", -- Text to show to identify the alternate file
|
|
||||||
directory = "", -- Text to show when the buffer is a directory
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_x = {
|
|
||||||
{
|
|
||||||
"overseer",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
function()
|
|
||||||
return require("grapple").statusline()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"copilot",
|
|
||||||
cond = function()
|
|
||||||
return vim.bo.filetype ~= "codecompanion"
|
|
||||||
end,
|
|
||||||
show_colors = true,
|
|
||||||
symbols = {
|
|
||||||
status = {
|
|
||||||
icons = {
|
|
||||||
enabled = " ",
|
|
||||||
sleep = " ", -- auto-trigger disabled
|
|
||||||
disabled = " ",
|
|
||||||
warning = " ",
|
|
||||||
unknown = " "
|
|
||||||
},
|
|
||||||
hl = {
|
|
||||||
enabled = palete.teal,
|
|
||||||
sleep = palete.lavender,
|
|
||||||
disabled = palete.subtext0,
|
|
||||||
warning = palete.peach,
|
|
||||||
unknown = palete.red
|
|
||||||
}
|
|
||||||
},
|
|
||||||
spinners = spinner_symbols,
|
|
||||||
spinner_color = palete.mauve
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_y = {
|
|
||||||
{
|
|
||||||
-- Macro recording status
|
|
||||||
function()
|
|
||||||
return require("noice").api.status.mode.get()
|
|
||||||
end,
|
|
||||||
cond = function()
|
|
||||||
return package.loaded["noice"] and require("noice").api.status.mode.has()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ "searchcount" },
|
|
||||||
{ "location" },
|
|
||||||
{
|
|
||||||
"progress",
|
|
||||||
fmt = position_scrollbar,
|
|
||||||
separator = " ",
|
|
||||||
padding = 0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_z = {},
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
"lazy",
|
|
||||||
"fzf",
|
|
||||||
"man",
|
|
||||||
"mason",
|
|
||||||
"quickfix",
|
|
||||||
"trouble",
|
|
||||||
"toggleterm",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"MeanderingProgrammer/markdown.nvim",
|
|
||||||
name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim
|
|
||||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
|
|
||||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
|
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
|
|
||||||
opts = {
|
|
||||||
file_types = { 'markdown', 'copilot-chat' },
|
|
||||||
sign = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
-- Move to windows with Ctrl and hjkl
|
|
||||||
-- Resize to windows with Alt and hjkl
|
|
||||||
-- Tmux aware
|
|
||||||
return {
|
|
||||||
"mrjones2014/smart-splits.nvim",
|
|
||||||
lazy = false,
|
|
||||||
build = './kitty/install-kittens.bash',
|
|
||||||
opts = { ignored_filetypes = { "nofile", "quickfix", "qf", "prompt" }, ignored_buftypes = { "nofile" } },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<C-h>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").move_cursor_left()
|
|
||||||
end,
|
|
||||||
desc = "Move to left window",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-j>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").move_cursor_down()
|
|
||||||
end,
|
|
||||||
desc = "Move to bottom window",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-k>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").move_cursor_up()
|
|
||||||
end,
|
|
||||||
desc = "Move to upper window",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-l>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").move_cursor_right()
|
|
||||||
end,
|
|
||||||
desc = "Move to right window",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<A-h>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").resize_left()
|
|
||||||
end,
|
|
||||||
desc = "Move to left window",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<A-j>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").resize_down()
|
|
||||||
end,
|
|
||||||
desc = "Move to bottom window",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<A-k>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").resize_up()
|
|
||||||
end,
|
|
||||||
desc = "Move to upper window",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<A-l>",
|
|
||||||
function()
|
|
||||||
require("smart-splits").resize_right()
|
|
||||||
end,
|
|
||||||
desc = "Move to right window",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
return {
|
|
||||||
"echasnovski/mini.surround",
|
|
||||||
disabled = true,
|
|
||||||
version = "*",
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
-- Fuzzy Finder (files, lsp, etc)
|
|
||||||
return {
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
branch = "0.1.x",
|
|
||||||
dependencies = {
|
|
||||||
{ "nvim-lua/plenary.nvim" },
|
|
||||||
{
|
|
||||||
-- Blazingly Fast Fuzzy Finder Algorithm for Telescope
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
build = "make",
|
|
||||||
cond = function()
|
|
||||||
return vim.fn.executable("make") == 1
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
local telescope = require("telescope")
|
|
||||||
local builtin = require("telescope.builtin")
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
defaults = {
|
|
||||||
prompt_prefix = " ",
|
|
||||||
selection_caret = " ",
|
|
||||||
layout_strategy = "flex",
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<c-u>"] = actions.preview_scrolling_up,
|
|
||||||
["<c-d>"] = actions.preview_scrolling_down,
|
|
||||||
["<C-j>"] = actions.move_selection_next,
|
|
||||||
["<C-k>"] = actions.move_selection_previous,
|
|
||||||
["<C-s>"] = actions.file_vsplit,
|
|
||||||
["<C-v>"] = actions.file_split,
|
|
||||||
["<ESC>"] = actions.close,
|
|
||||||
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
|
||||||
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
|
||||||
["<c-t>"] = require("trouble.sources.telescope").open,
|
|
||||||
["<a-t>"] = require("trouble.sources.telescope").open,
|
|
||||||
["<M-h>"] = actions.which_key,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
find_files = {
|
|
||||||
hidden = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
telescope.setup(opts)
|
|
||||||
|
|
||||||
-- Enable telescope fzf native, if installed
|
|
||||||
pcall(telescope.load_extension, "fzf")
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Find buffers" })
|
|
||||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Find files" })
|
|
||||||
vim.keymap.set("n", "<leader>fF", function()
|
|
||||||
builtin.find_files({ hidden = true, no_ignore = true })
|
|
||||||
end, { desc = "Find all files" })
|
|
||||||
|
|
||||||
-- Search inside files
|
|
||||||
vim.keymap.set("n", "<leader>fw", builtin.grep_string, { desc = "Find word under cursor" })
|
|
||||||
vim.keymap.set("n", "<leader>fW", builtin.live_grep, { desc = "Find word (live grep)" })
|
|
||||||
|
|
||||||
-- Help
|
|
||||||
vim.keymap.set("n", "<leader>fc", builtin.command_history, { desc = "Find in commands history" })
|
|
||||||
vim.keymap.set("n", "<leader>fC", builtin.commands, { desc = "Find a command" })
|
|
||||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Find Help" })
|
|
||||||
vim.keymap.set("n", "<leader>fk", builtin.keymaps, { desc = "Find Keymaps" })
|
|
||||||
|
|
||||||
-- Git
|
|
||||||
vim.keymap.set("n", "<leader>gb", builtin.git_branches, { desc = "Change branch" })
|
|
||||||
|
|
||||||
-- Diagnosticos
|
|
||||||
-- Disabled, handle by trouble
|
|
||||||
-- vim.keymap.set("n", "<leader>fD", function()
|
|
||||||
-- builtin.diagnostics({ bufnr = 0 })
|
|
||||||
-- end, { desc = "Find diagnostics (Telescope)" })
|
|
||||||
-- vim.keymap.set("n", "<leader>fD", function()
|
|
||||||
-- builtin.diagnostics({ bufnr = nil })
|
|
||||||
-- end, { desc = "Find diagnostics in workspace (Telescope)" })
|
|
||||||
-- vim.keymap.set("n", "<leader>fz", builtin.spell_suggest, { desc = "Find spell suggestion" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
return {
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
cmd = { "TodoTrouble", "TodoTelescope" },
|
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
|
||||||
config = true,
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>ft", "<cmd>TodoTrouble<cr>", desc = "Find todos (Trouble)" },
|
|
||||||
{ "<leader>fT", "<cmd>TodoTelescope<cr>", desc = "Find todos (Telescope)" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
-- Color Picker
|
|
||||||
"uga-rosa/ccc.nvim",
|
|
||||||
opts = {
|
|
||||||
auto_enable = true,
|
|
||||||
lsp = true,
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>uc", "<CMD>CccPick<CR>", desc = "Open Color picker" },
|
|
||||||
{ "<leader>uC", "<CMD>CccHighlighterToggle<CR>", desc = "Toggle Color highlight" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
return {
|
|
||||||
"saghen/blink.cmp",
|
|
||||||
lazy = false,
|
|
||||||
version = "*",
|
|
||||||
dependencies = {
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
"folke/lazydev.nvim",
|
|
||||||
{ "saghen/blink.compat", version = "*", },
|
|
||||||
},
|
|
||||||
opts = function()
|
|
||||||
local window_options = {
|
|
||||||
border = "rounded",
|
|
||||||
winblend = vim.o.pumblend,
|
|
||||||
}
|
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
|
||||||
---@type blink.cmp.Config
|
|
||||||
return {
|
|
||||||
sources = {
|
|
||||||
providers = {
|
|
||||||
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
|
||||||
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
|
|
||||||
luasnip = {
|
|
||||||
name = 'luasnip',
|
|
||||||
module = 'blink.compat.source',
|
|
||||||
score_offset = -3,
|
|
||||||
opts = {
|
|
||||||
use_show_condition = false,
|
|
||||||
show_autosnippets = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- nvim-cmp sources
|
|
||||||
compat = {},
|
|
||||||
completion = {
|
|
||||||
enabled_providers = {
|
|
||||||
"lsp",
|
|
||||||
"path",
|
|
||||||
"snippets",
|
|
||||||
"buffer",
|
|
||||||
"dadbod",
|
|
||||||
"lazydev",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
accept = {
|
|
||||||
auto_brackets = { enabled = true },
|
|
||||||
expand_snippet = function(snippet) require('luasnip').lsp_expand(snippet) end,
|
|
||||||
},
|
|
||||||
-- trigger = { signature_help = { enabled = true } },
|
|
||||||
keymap = {
|
|
||||||
preset = "enter",
|
|
||||||
["<C-j>"] = { 'select_next', 'fallback' },
|
|
||||||
["<C-k>"] = { 'select_prev', 'fallback' },
|
|
||||||
["<C-u>"] = { 'scroll_documentation_up', 'fallback' },
|
|
||||||
["<C-d>"] = { 'scroll_documentation_down', 'fallback' },
|
|
||||||
},
|
|
||||||
highlight = {
|
|
||||||
-- sets the fallback highlight groups to nvim-cmp's highlight groups
|
|
||||||
-- useful for when your theme doesn't support blink.cmp
|
|
||||||
-- will be removed in a future release, assuming themes add support
|
|
||||||
use_nvim_cmp_as_default = false,
|
|
||||||
},
|
|
||||||
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
|
||||||
-- adjusts spacing to ensure icons are aligned
|
|
||||||
nerd_font_variant = "mono",
|
|
||||||
windows = {
|
|
||||||
autocomplete = vim.tbl_extend("force", window_options, {
|
|
||||||
selection = "manual",
|
|
||||||
---@type blink.cmp.Draw
|
|
||||||
draw = {
|
|
||||||
components = {
|
|
||||||
kind_icon = {
|
|
||||||
text = function(ctx)
|
|
||||||
return ctx.kind_icon .. ctx.icon_gap
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
documentation = vim.tbl_extend("force", window_options, {
|
|
||||||
auto_show = true,
|
|
||||||
winblend = 0,
|
|
||||||
}),
|
|
||||||
ghost_text = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
kind_icons = require("aleidk.constants").icons.kinds,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
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",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<Leader>ud", "<CMD>DBUIToggle<CR>", desc = "Toggle DB UI" },
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
-- Your DBUI configuration
|
|
||||||
vim.g.db_ui_use_nerd_fonts = 1
|
|
||||||
vim.g.db_ui_force_echo_notifications = 1
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = {
|
|
||||||
"sql",
|
|
||||||
"mysql",
|
|
||||||
"plsql",
|
|
||||||
},
|
|
||||||
command = [[setlocal omnifunc=vim_dadbod_completion#omni]],
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = {
|
|
||||||
"sql",
|
|
||||||
"mysql",
|
|
||||||
"plsql",
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
|
||||||
require("cmp").setup.buffer({
|
|
||||||
sources = { { name = "vim-dadbod-completion" }, { name = "buffer" } },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
return {
|
|
||||||
"danymat/neogen",
|
|
||||||
opts = { snippet_engine = "luasnip" },
|
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
|
||||||
version = "*", -- stable releases
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"gcd",
|
|
||||||
function()
|
|
||||||
require("neogen").generate()
|
|
||||||
end,
|
|
||||||
desc = "Generate comment docstring",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
return {
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
event = { "BufWritePre" },
|
|
||||||
cmd = { "ConformInfo" },
|
|
||||||
opts = {
|
|
||||||
-- log_level = vim.log.levels.DEBUG,
|
|
||||||
|
|
||||||
-- See aviable formatters in: https://github.com/stevearc/conform.nvim#formatters
|
|
||||||
-- Formatters can be installed by mason
|
|
||||||
formatters_by_ft = {
|
|
||||||
-- Conform will run multiple formatters sequentially
|
|
||||||
-- Use a stop_after_first = true to run only the first available formatter
|
|
||||||
-- Use the "_" filetype to run formatters on filetypes that don't
|
|
||||||
-- have other formatters configured.
|
|
||||||
["_"] = { "trim_whitespace" },
|
|
||||||
blade = { "blade-formatter" },
|
|
||||||
css = { "biome" },
|
|
||||||
go = { "gofumpt", "goimports_reviser", "golines" },
|
|
||||||
html = { "djlint", "prettierd", stop_after_first = true },
|
|
||||||
htmldjango = { "djlint", stop_after_first = true },
|
|
||||||
javascript = { "biome" },
|
|
||||||
javascriptreact = { "biome" },
|
|
||||||
json = { "biome" },
|
|
||||||
jsonc = { "biome" },
|
|
||||||
lua = { "stylua" },
|
|
||||||
markdown = { "markdownlint" },
|
|
||||||
nim = { "nimpretty" },
|
|
||||||
php = { "pint" },
|
|
||||||
python = { "ruff_format", "ruff_organize_imports" },
|
|
||||||
scss = { "prettierd", "prettier", stop_after_first = true },
|
|
||||||
sh = { "shfmt" },
|
|
||||||
toml = { "taplo" },
|
|
||||||
typescript = { "biome" },
|
|
||||||
typescriptreact = { "biome" },
|
|
||||||
xml = { "lemminx" },
|
|
||||||
zsh = { "shfmt" },
|
|
||||||
sql = { "sleek" }
|
|
||||||
},
|
|
||||||
formatters = {
|
|
||||||
djlint = {
|
|
||||||
prepend_args = {
|
|
||||||
"--format-css",
|
|
||||||
"--indent-css",
|
|
||||||
"2",
|
|
||||||
"--format-js",
|
|
||||||
"--indent-js",
|
|
||||||
"2",
|
|
||||||
"--indent",
|
|
||||||
"2",
|
|
||||||
"--preserve-blank-lines",
|
|
||||||
"--quiet"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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 = 2000, lsp_fallback = true }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("conform").setup(opts)
|
|
||||||
|
|
||||||
local function toggleAutoFormat()
|
|
||||||
-- to make this global, change b to g
|
|
||||||
if vim.b.disable_autoformat == nil then
|
|
||||||
vim.b.disable_autoformat = true
|
|
||||||
print("Autoformat set to: " .. tostring(not vim.b.disable_autoformat))
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
|
||||||
print("Autoformat set to: " .. tostring(not vim.b.disable_autoformat))
|
|
||||||
end
|
|
||||||
|
|
||||||
MAP("n", "<leader>uf", toggleAutoFormat, "Toggle auto format")
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("Fmt", function(args)
|
|
||||||
local range = nil
|
|
||||||
if args.count ~= -1 then
|
|
||||||
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
|
||||||
range = {
|
|
||||||
start = { args.line1, 0 },
|
|
||||||
["end"] = { args.line2, end_line:len() },
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
local function callback(err, did_edit)
|
|
||||||
if not did_edit then
|
|
||||||
vim.notify("The file was not formatted:\n" .. tostring(err), vim.log.levels.ERROR)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if args.bang then
|
|
||||||
vim.cmd("w")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
require("conform").format(
|
|
||||||
{
|
|
||||||
async = true,
|
|
||||||
lsp_format = "fallback",
|
|
||||||
range = range,
|
|
||||||
formatters = args.fargs
|
|
||||||
},
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
end, {
|
|
||||||
range = true,
|
|
||||||
bang = true,
|
|
||||||
force = true,
|
|
||||||
desc = "Format the document",
|
|
||||||
nargs = '*',
|
|
||||||
-- complete = function()
|
|
||||||
-- local formatters = require('conform').formatters_by_ft
|
|
||||||
--
|
|
||||||
-- return vim.tbl_keys(formatters)
|
|
||||||
-- end
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
local const = require("aleidk.constants")
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
opts = {
|
|
||||||
-- See `:help gitsigns.txt`
|
|
||||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
|
||||||
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
|
|
||||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
|
||||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
|
||||||
signs = {
|
|
||||||
add = { text = const.icons.git.added },
|
|
||||||
change = { text = const.icons.git.modified },
|
|
||||||
delete = { text = const.icons.git.removed },
|
|
||||||
topdelete = { text = const.icons.git.removed },
|
|
||||||
changedelete = { text = const.icons.git.removed },
|
|
||||||
untracked = { text = "▎" },
|
|
||||||
},
|
|
||||||
signs_staged = {
|
|
||||||
add = { text = const.icons.git.added },
|
|
||||||
change = { text = const.icons.git.modified },
|
|
||||||
delete = { text = const.icons.git.removed },
|
|
||||||
topdelete = { text = const.icons.git.removed },
|
|
||||||
changedelete = { text = const.icons.git.removed },
|
|
||||||
untracked = { text = "▎" },
|
|
||||||
},
|
|
||||||
on_attach = function(buffer)
|
|
||||||
local gs = package.loaded.gitsigns
|
|
||||||
|
|
||||||
local function map(mode, l, r, desc)
|
|
||||||
vim.keymap.set(mode, "<leader>g" .. l, r, { buffer = buffer, desc = desc })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- stylua: ignore start
|
|
||||||
map("n", "j", gs.next_hunk, "Next Hunk")
|
|
||||||
map("n", "k", gs.prev_hunk, "Prev Hunk")
|
|
||||||
map({ "n", "v" }, "s", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
|
||||||
map({ "n", "v" }, "r", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
|
||||||
map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk")
|
|
||||||
map("n", "R", gs.reset_buffer, "Reset Buffer")
|
|
||||||
map("n", "<TAB>", gs.preview_hunk, "Preview Hunk")
|
|
||||||
map("n", "l", function() gs.blame_line({ full = true }) end, "Blame Line")
|
|
||||||
map("n", "L", gs.toggle_current_line_blame, "Toggle current line blame")
|
|
||||||
map("n", "d", gs.toggle_word_diff, "Toggle word diff")
|
|
||||||
map("n", "h", "<CMD>diffget<CR>", "Diff This with last commit")
|
|
||||||
map("n", "l", "<CMD>diffput<CR>", "Diff This with last commit")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"ckolkey/ts-node-action",
|
|
||||||
dependencies = { "nvim-treesitter" },
|
|
||||||
opts = {},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>ls", function() require("ts-node-action").node_action() end, desc = "Node Action" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Wansmer/treesj",
|
|
||||||
cmd = { "TSJToggle" },
|
|
||||||
keys = {
|
|
||||||
{ "<leader>lm", "<CMD>TSJToggle<CR>", desc = "Toggle treesitter join" },
|
|
||||||
},
|
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
|
||||||
opts = {
|
|
||||||
use_default_keymaps = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
return {
|
|
||||||
"mfussenegger/nvim-lint",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
local lint = require("lint")
|
|
||||||
|
|
||||||
lint.linters.gitlint.stdin = true
|
|
||||||
lint.linters.gitlint.args = { "--contrib", "contrib-title-conventional-commits", "--msg-filename", "-" }
|
|
||||||
|
|
||||||
lint.linters_by_ft = {
|
|
||||||
-- astro = { "eslint_d" },
|
|
||||||
python = { "ruff" },
|
|
||||||
sh = { "shellcheck" },
|
|
||||||
NeogitCommitMessage = { "gitlint" },
|
|
||||||
gitcommit = { "gitlint" },
|
|
||||||
markdown = { "markdownlint" },
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
|
||||||
callback = function()
|
|
||||||
require("lint").try_lint()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,229 +0,0 @@
|
||||||
return {
|
|
||||||
-- LSP Plugins
|
|
||||||
{
|
|
||||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
|
||||||
-- used for completion, annotations and signatures of Neovim apis
|
|
||||||
'folke/lazydev.nvim',
|
|
||||||
ft = 'lua',
|
|
||||||
opts = {
|
|
||||||
library = {
|
|
||||||
-- Load luvit types when the `vim.uv` word is found
|
|
||||||
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings
|
|
||||||
{
|
|
||||||
-- LSP Configuration & Plugins
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
|
|
||||||
dependencies = {
|
|
||||||
-- Automatically install LSPs to stdpath for neovim
|
|
||||||
{ "williamboman/mason.nvim", config = true },
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
{ 'saghen/blink.cmp' } -- autocompletion
|
|
||||||
},
|
|
||||||
|
|
||||||
config = function()
|
|
||||||
-- LSP settings.
|
|
||||||
local on_attach = function(_, bufnr)
|
|
||||||
local nmap = function(keys, func, desc)
|
|
||||||
if desc then
|
|
||||||
desc = "LSP: " .. desc
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
|
|
||||||
end
|
|
||||||
|
|
||||||
nmap("<leader>lr", vim.lsp.buf.rename, "Rename")
|
|
||||||
-- stylua: ignore
|
|
||||||
vim.keymap.set({ "n", "x", "v" }, "<leader>la", vim.lsp.buf.code_action, { buffer = bufnr, desc = "Code Action" })
|
|
||||||
nmap("<leader>ld", vim.lsp.buf.type_definition, "Go to type definition")
|
|
||||||
nmap("<leader>lf", function()
|
|
||||||
vim.lsp.buf.format()
|
|
||||||
end, "Format")
|
|
||||||
|
|
||||||
nmap("gd", vim.lsp.buf.definition, "Go to definition")
|
|
||||||
nmap("gr", require("telescope.builtin").lsp_references, "Goto References")
|
|
||||||
nmap("gI", vim.lsp.buf.implementation, "Go to Implementation")
|
|
||||||
|
|
||||||
-- See `:help K` for why this keymap
|
|
||||||
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
|
|
||||||
-- nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
|
|
||||||
|
|
||||||
-- Lesser used LSP functionality
|
|
||||||
nmap("gD", vim.lsp.buf.declaration, "Goto Declaration")
|
|
||||||
|
|
||||||
nmap("<leader>lj", vim.diagnostic.goto_next, "Go to next diagnostic")
|
|
||||||
nmap("<leader>lk", vim.diagnostic.goto_prev, "Go to prev diagnostic")
|
|
||||||
nmap("<leader>lK", function()
|
|
||||||
-- execute twice to enter the float inmediatly
|
|
||||||
vim.diagnostic.open_float()
|
|
||||||
vim.diagnostic.open_float()
|
|
||||||
end, "Hover current diagnostic")
|
|
||||||
|
|
||||||
-- Create a command `:Format` local to the LSP buffer
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
|
|
||||||
vim.lsp.buf.format()
|
|
||||||
end, { desc = "Format current buffer with LSP" })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Enable the following language servers
|
|
||||||
-- To see options and cofigurations `:help lspconfig-all`
|
|
||||||
local servers = {
|
|
||||||
astro = {},
|
|
||||||
bashls = {},
|
|
||||||
biome = {
|
|
||||||
single_file_support = true,
|
|
||||||
},
|
|
||||||
cssls = {},
|
|
||||||
dockerls = {},
|
|
||||||
emmet_ls = {
|
|
||||||
filetypes = {
|
|
||||||
"astro",
|
|
||||||
"css",
|
|
||||||
"eruby",
|
|
||||||
"html",
|
|
||||||
"htmldjango",
|
|
||||||
"javascriptreact",
|
|
||||||
"less",
|
|
||||||
"pug",
|
|
||||||
"sass",
|
|
||||||
"scss",
|
|
||||||
"svelte",
|
|
||||||
"typescriptreact",
|
|
||||||
"vue",
|
|
||||||
"htmlangular",
|
|
||||||
"php",
|
|
||||||
"blade"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
harper_ls = {},
|
|
||||||
html = {},
|
|
||||||
hyprls = {},
|
|
||||||
marksman = {},
|
|
||||||
phpactor = {},
|
|
||||||
gopls = {
|
|
||||||
settings = {
|
|
||||||
gopls = {
|
|
||||||
completeUnimported = true,
|
|
||||||
usePlaceholders = true,
|
|
||||||
analyses = {
|
|
||||||
unusedparams = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ruff = {},
|
|
||||||
rust_analyzer = {
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
imports = {
|
|
||||||
granularity = {
|
|
||||||
group = "module",
|
|
||||||
},
|
|
||||||
prefix = "self",
|
|
||||||
},
|
|
||||||
cargo = {
|
|
||||||
buildScripts = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
procMacro = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sqlls = {},
|
|
||||||
taplo = {},
|
|
||||||
yamlls = {
|
|
||||||
settings = {
|
|
||||||
yaml = {
|
|
||||||
schemas = {},
|
|
||||||
customTags = {
|
|
||||||
"!vault" -- ansible encrypted vars support
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lua_ls = {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
completion = {
|
|
||||||
callSnippet = 'Replace',
|
|
||||||
},
|
|
||||||
diagnostics = { disable = { 'missing-fields' } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
capabilities = require("blink.cmp").get_lsp_capabilities(capabilities)
|
|
||||||
|
|
||||||
-- Ensure the servers above are installed
|
|
||||||
local mason_lspconfig = require("mason-lspconfig")
|
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
|
||||||
ensure_installed = vim.tbl_keys(servers),
|
|
||||||
automatic_installation = false,
|
|
||||||
})
|
|
||||||
|
|
||||||
mason_lspconfig.setup_handlers({
|
|
||||||
function(server_name)
|
|
||||||
local _border = "single"
|
|
||||||
|
|
||||||
local default_config = {
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
handlers = {
|
|
||||||
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
|
||||||
border = _border,
|
|
||||||
}),
|
|
||||||
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
|
||||||
border = _border,
|
|
||||||
max_width = 200,
|
|
||||||
max_height = 200,
|
|
||||||
focus = true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require("lspconfig")[server_name].setup(
|
|
||||||
vim.tbl_deep_extend("force", default_config, servers[server_name] or {})
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
|
||||||
update_in_insert = false,
|
|
||||||
underline = true,
|
|
||||||
float = {
|
|
||||||
source = true
|
|
||||||
},
|
|
||||||
virtual_text = {
|
|
||||||
severity = vim.diagnostic.severity.ERROR,
|
|
||||||
source = true,
|
|
||||||
spacing = -1,
|
|
||||||
prefix = nil,
|
|
||||||
format = function(diagnostic)
|
|
||||||
-- show small error code instead of whole error that probably won't fit in the screen
|
|
||||||
-- to see the whole error use other keybindings
|
|
||||||
return tostring(diagnostic.code)
|
|
||||||
end,
|
|
||||||
virt_text_hide = true
|
|
||||||
},
|
|
||||||
severity_sort = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Customize gutter icons
|
|
||||||
local signs = require("aleidk.constants").icons.diagnostics
|
|
||||||
for type, icon in pairs(signs) do
|
|
||||||
local hl = "DiagnosticSign" .. type
|
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
return {
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
dependencies = {
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
config = function()
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
history = true,
|
|
||||||
delete_check_events = "TextChanged",
|
|
||||||
},
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<tab>",
|
|
||||||
function()
|
|
||||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
|
||||||
end,
|
|
||||||
expr = true,
|
|
||||||
silent = true,
|
|
||||||
mode = "i",
|
|
||||||
},
|
|
||||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
|
||||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"nosduco/remote-sshfs.nvim",
|
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
|
||||||
cmd = { "RemoteSSHFSConnect" },
|
|
||||||
config = function()
|
|
||||||
require("remote-sshfs").setup({})
|
|
||||||
require("telescope").load_extension("remote-sshfs")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"amitds1997/remote-nvim.nvim",
|
|
||||||
version = "*", -- Pin to GitHub releases
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim", -- For standard functions
|
|
||||||
"MunifTanjim/nui.nvim", -- To build the plugin UI
|
|
||||||
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
remote = {
|
|
||||||
copy_dirs = {
|
|
||||||
data = {
|
|
||||||
base = vim.fn.stdpath("data"), -- Path from where data has to be copied. You can choose to copy entire path or subdirectories inside using `dirs`
|
|
||||||
dirs = { "lazy" }, -- Directories inside `base` to copy over. If this is set to string "*"; it means entire `base` should be copied over
|
|
||||||
compression = {
|
|
||||||
enabled = true, -- Should data be compressed before uploading
|
|
||||||
additional_opts = { "--exclude-vcs" }, -- Any arguments that can be passed to `tar` for compression can be specified here to improve your compression
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- cache = {
|
|
||||||
-- base = vim.fn.stdpath("cache"),
|
|
||||||
-- dirs = {},
|
|
||||||
-- compression = {
|
|
||||||
-- enabled = true,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
state = {
|
|
||||||
base = vim.fn.stdpath("state"),
|
|
||||||
dirs = {},
|
|
||||||
compression = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
client_callback = function(port, workspace_config)
|
|
||||||
local cmd = ("tmux new-window 'nvim --server localhost:%s --remote-ui' && tmux select-window -t:$"):format(port)
|
|
||||||
vim.fn.jobstart(cmd, {
|
|
||||||
detach = true,
|
|
||||||
on_exit = function(job_id, exit_code, event_type)
|
|
||||||
-- This function will be called when the job exits
|
|
||||||
print("Client", job_id, "exited with code", exit_code, "Event type:", event_type)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
config = true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,171 +0,0 @@
|
||||||
local function term_get_effective_line_count(bufnr)
|
|
||||||
local linecount = vim.api.nvim_buf_line_count(bufnr)
|
|
||||||
|
|
||||||
local non_blank_lines = linecount
|
|
||||||
for i = linecount, 1, -1 do
|
|
||||||
local line = vim.api.nvim_buf_get_lines(bufnr, i - 1, i, true)[1]
|
|
||||||
non_blank_lines = i
|
|
||||||
if line ~= "" then
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return non_blank_lines
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This is a copy of the original util function of overseer with the change that
|
|
||||||
-- vim.api.nvim_win_set_cursor(winid, { lnum, 0 }) column is set to 0 so the output is visible
|
|
||||||
-- the rest is the same
|
|
||||||
local scroll_to_end = function(winid)
|
|
||||||
winid = winid or 0
|
|
||||||
local bufnr = vim.api.nvim_win_get_buf(winid)
|
|
||||||
local lnum = vim.api.nvim_buf_line_count(bufnr)
|
|
||||||
-- Hack: terminal buffers add a bunch of empty lines at the end. We need to ignore them so that
|
|
||||||
-- we don't end up scrolling off the end of the useful output.
|
|
||||||
local not_much_output = lnum < vim.o.lines + 6
|
|
||||||
if vim.bo[bufnr].buftype == "terminal" and not_much_output then
|
|
||||||
lnum = term_get_effective_line_count(bufnr)
|
|
||||||
end
|
|
||||||
local scrolloff = vim.api.nvim_get_option_value("scrolloff", { scope = "local", win = winid })
|
|
||||||
vim.api.nvim_set_option_value("scrolloff", 0, { scope = "local", win = winid })
|
|
||||||
vim.api.nvim_win_set_cursor(winid, { lnum, 0 })
|
|
||||||
vim.api.nvim_set_option_value("scrolloff", scrolloff, { scope = "local", win = winid })
|
|
||||||
end
|
|
||||||
|
|
||||||
local open_split = function(task, horizontal)
|
|
||||||
local original_window = vim.api.nvim_get_current_win()
|
|
||||||
if horizontal then
|
|
||||||
-- horizontal split across all vertical splits
|
|
||||||
vim.cmd([[botright split]])
|
|
||||||
else
|
|
||||||
-- vertical split across all horizontal splits
|
|
||||||
vim.cmd([[vert botright split]])
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Update tasks buffer options
|
|
||||||
vim.api.nvim_win_set_buf(0, task:get_bufnr())
|
|
||||||
vim.api.nvim_set_option_value("number", false, { scope = "local", win = 0 })
|
|
||||||
vim.api.nvim_set_option_value("relativenumber", false, { scope = "local", win = 0 })
|
|
||||||
vim.api.nvim_set_option_value("signcolumn", "no", { scope = "local", win = 0 })
|
|
||||||
scroll_to_end(0)
|
|
||||||
|
|
||||||
-- Go back to the original window
|
|
||||||
vim.api.nvim_set_current_win(original_window)
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
"stevearc/overseer.nvim",
|
|
||||||
keys = {
|
|
||||||
{ "<leader>pO", "<CMD>OverseerQuickAction hsplit<CR>", desc = "Open task in a hsplit" },
|
|
||||||
{
|
|
||||||
"<leader>pQ",
|
|
||||||
"<CMD>OverseerQuickAction close win<CR><CMD>OverseerQuickAction dispose<CR>",
|
|
||||||
desc = "Close and dispose task's windows",
|
|
||||||
},
|
|
||||||
{ "<leader>pW", "<CMD>OverseerQuickAction unwatch<CR>", desc = "Unwatch task" },
|
|
||||||
{ "<leader>pf", "<CMD>OverseerQuickAction open float<CR>", desc = "Open task in a float window" },
|
|
||||||
{ "<leader>pl", "<CMD>OverseerLoadBundle<CR>", desc = "Load tasks" },
|
|
||||||
{ "<leader>pm", "<CMD>OverseerTaskAction<CR>", desc = "Manage task" },
|
|
||||||
{ "<leader>po", "<CMD>OverseerQuickAction vsplit<CR>", desc = "Open task in a vsplit" },
|
|
||||||
{ "<leader>pp", "<CMD>OverseerRun<CR>", desc = "Run task" },
|
|
||||||
{
|
|
||||||
"<leader>pP",
|
|
||||||
function()
|
|
||||||
local overseer = require('overseer')
|
|
||||||
overseer.run_template({}, function(task)
|
|
||||||
if task then
|
|
||||||
task:add_components({ "restart_on_save" })
|
|
||||||
overseer.run_action(task, "hsplit")
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
desc = "Run task and watch it"
|
|
||||||
},
|
|
||||||
{ "<leader>pq", "<CMD>OverseerQuickAction close win<CR>", desc = "Close task's windows" },
|
|
||||||
{ "<leader>ps", "<CMD>OverseerSaveBundle<CR>", desc = "Save tasks" },
|
|
||||||
{ "<leader>pt", "<CMD>OverseerToggle<CR>", desc = "Toggle tasks list" },
|
|
||||||
{ "<leader>pw", "<CMD>OverseerQuickAction watch<CR>", desc = "Watch task" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
templates = {
|
|
||||||
"cargo",
|
|
||||||
"cargo-make",
|
|
||||||
"composer",
|
|
||||||
"deno",
|
|
||||||
"just",
|
|
||||||
"mage",
|
|
||||||
"make",
|
|
||||||
"mix",
|
|
||||||
"npm",
|
|
||||||
"rake",
|
|
||||||
"task",
|
|
||||||
"tox",
|
|
||||||
"vscode",
|
|
||||||
},
|
|
||||||
actions = {
|
|
||||||
["hsplit"] = {
|
|
||||||
desc = "open terminal in a horizontal split",
|
|
||||||
condition = function(task)
|
|
||||||
local bufnr = task:get_bufnr()
|
|
||||||
return bufnr and vim.api.nvim_buf_is_valid(bufnr)
|
|
||||||
end,
|
|
||||||
run = function(task)
|
|
||||||
open_split(task, true)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
["vsplit"] = {
|
|
||||||
desc = "open terminal in a vertical split",
|
|
||||||
condition = function(task)
|
|
||||||
local bufnr = task:get_bufnr()
|
|
||||||
return bufnr and vim.api.nvim_buf_is_valid(bufnr)
|
|
||||||
end,
|
|
||||||
run = function(task)
|
|
||||||
open_split(task, false)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
["close win"] = {
|
|
||||||
desc = "open terminal in a vertical split",
|
|
||||||
condition = function(task)
|
|
||||||
local bufnr = task:get_bufnr()
|
|
||||||
return bufnr and vim.api.nvim_buf_is_valid(bufnr)
|
|
||||||
end,
|
|
||||||
run = function(task)
|
|
||||||
local buf = task:get_bufnr()
|
|
||||||
-- iterar sobre todas las windows y ver si la window tiene attach el buf que quiero cerrar
|
|
||||||
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
|
||||||
if buf == vim.api.nvim_win_get_buf(win) then
|
|
||||||
vim.api.nvim_win_close(win, false)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
task_list = {
|
|
||||||
direction = "bottom",
|
|
||||||
bindings = {
|
|
||||||
["?"] = "ShowHelp",
|
|
||||||
["g?"] = "ShowHelp",
|
|
||||||
["<CR>"] = "RunAction",
|
|
||||||
["<C-e>"] = "Edit",
|
|
||||||
["o"] = "Open",
|
|
||||||
["<C-v>"] = "OpenVsplit",
|
|
||||||
["<C-s>"] = "OpenSplit",
|
|
||||||
["<C-f>"] = "OpenFloat",
|
|
||||||
["<C-q>"] = "OpenQuickFix",
|
|
||||||
["<TAB>"] = "TogglePreview",
|
|
||||||
["p"] = "TogglePreview",
|
|
||||||
["<C-l>"] = "IncreaseAllDetail",
|
|
||||||
["<C-h>"] = "DecreaseAllDetail",
|
|
||||||
["L"] = "IncreaseDetail",
|
|
||||||
["H"] = "DecreaseDetail",
|
|
||||||
["["] = "DecreaseWidth",
|
|
||||||
["]"] = "IncreaseWidth",
|
|
||||||
["{"] = "PrevTask",
|
|
||||||
["}"] = "NextTask",
|
|
||||||
["<C-u>"] = "ScrollOutputUp",
|
|
||||||
["<C-d>"] = "ScrollOutputDown",
|
|
||||||
["q"] = "Close",
|
|
||||||
["d"] = "<CMD>OverseerQuickAction dispose<CR>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
||||||
---@module 'trouble'
|
|
||||||
|
|
||||||
return {
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
cmd = { "Trouble" },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>fD",
|
|
||||||
"<cmd>Trouble diagnostics open<cr>",
|
|
||||||
desc = "Find diagnostics (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fd",
|
|
||||||
"<cmd>Trouble diagnostics open filter.buf=0<cr>",
|
|
||||||
desc = "Find buffer diagnostics (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ll",
|
|
||||||
"<cmd>Trouble symbols open<cr>",
|
|
||||||
desc = "Symbols (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>li",
|
|
||||||
"<cmd>Trouble lsp open<cr>",
|
|
||||||
desc = "LSP info of node (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fq",
|
|
||||||
"<cmd>Trouble qflist open<cr>",
|
|
||||||
desc = "Quickfix List (Trouble)",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = function()
|
|
||||||
---@type trouble.Window.opts
|
|
||||||
local win_opts = {
|
|
||||||
-- size = { width = 30, height = 0.5 },
|
|
||||||
minimal = true,
|
|
||||||
border = "rounded",
|
|
||||||
position = "bottom",
|
|
||||||
}
|
|
||||||
|
|
||||||
---@type trouble.Config
|
|
||||||
return {
|
|
||||||
focus = true,
|
|
||||||
|
|
||||||
---@type trouble.Window.opts
|
|
||||||
preview = {
|
|
||||||
type = "split",
|
|
||||||
relative = "win",
|
|
||||||
position = "top",
|
|
||||||
},
|
|
||||||
|
|
||||||
---@type table<string, trouble.Action.spec|false>
|
|
||||||
keys = {
|
|
||||||
["<s-cr>"] = "jump_close",
|
|
||||||
["<cr>"] = "jump",
|
|
||||||
["<2-leftmouse>"] = "jump",
|
|
||||||
["<c-v>"] = "jump_split_close",
|
|
||||||
["<c-s>"] = "jump_vsplit_close",
|
|
||||||
["v"] = "jump_split_close",
|
|
||||||
["s"] = "jump_vsplit_close",
|
|
||||||
["<c-k>"] = "cancel", -- hack to fool myself into thinking I move to the avobe window
|
|
||||||
["a"] = function(view, ctx)
|
|
||||||
-- TODO: this is not possible until this issue is solved
|
|
||||||
-- https://github.com/neovim/neovim/issues/31206
|
|
||||||
local trouble = require("trouble")
|
|
||||||
view:action("jump_only")
|
|
||||||
|
|
||||||
vim.lsp.buf.code_action()
|
|
||||||
|
|
||||||
trouble.focus(view, ctx)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
win = win_opts,
|
|
||||||
---@type table<string, trouble.Mode>
|
|
||||||
modes = {
|
|
||||||
symbols = {
|
|
||||||
focus = true,
|
|
||||||
win = win_opts
|
|
||||||
},
|
|
||||||
lsp_references = {
|
|
||||||
focus = true,
|
|
||||||
win = win_opts
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
focus = true,
|
|
||||||
win = win_opts
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
return {
|
|
||||||
"pmizio/typescript-tools.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
|
||||||
opts = {
|
|
||||||
init_options = {
|
|
||||||
preferences = {
|
|
||||||
disableSuggestions = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
settings = {
|
|
||||||
-- array of strings("fix_all"|"add_missing_imports"|"remove_unused"|
|
|
||||||
-- "remove_unused_imports"|"organize_imports") -- or string "all"
|
|
||||||
-- to include all supported code actions
|
|
||||||
-- specify commands exposed as code_actions
|
|
||||||
expose_as_code_action = "all",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M.plugin_should_be_enabled()
|
|
||||||
print("Plugin should be enabled")
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
@ -1,183 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"context": "Editor && (vim_mode == normal || vim_mode == visual) && !VimWaiting && !menu",
|
|
||||||
"bindings": {
|
|
||||||
// Git
|
|
||||||
|
|
||||||
// Toggle inlay hints
|
|
||||||
"space u i": "editor::ToggleInlayHints",
|
|
||||||
|
|
||||||
// NOTE: Toggle Zen mode, not fully working yet
|
|
||||||
"space u z": "workspace::ToggleZoom",
|
|
||||||
|
|
||||||
// Open recent project
|
|
||||||
"space f p": "projects::OpenRecent",
|
|
||||||
// Search word under cursor
|
|
||||||
"space f w": "pane::DeploySearch",
|
|
||||||
|
|
||||||
// Chat with AI
|
|
||||||
"space a c": "assistant::ToggleFocus",
|
|
||||||
|
|
||||||
// Go to file with `gf`
|
|
||||||
"g f": "editor::OpenExcerpts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// move context menus with Ctrl + hjkl in completions
|
|
||||||
"context": "(vim_mode == normal || vim_mode == insert) && (showing_code_actions || showing_completions)",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-h": "editor::ContextMenuPrev",
|
|
||||||
"ctrl-j": "editor::ContextMenuNext",
|
|
||||||
"ctrl-k": "editor::ContextMenuPrev",
|
|
||||||
"ctrl-l": "editor::ContextMenuNext"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "Editor && (vim_mode == normal || vim_mode == insert)",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-shift-v": "editor::Paste"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// move context menus with Ctrl + hjkl in menus
|
|
||||||
"context": "Picker || menu",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-h": "menu::SelectPrev",
|
|
||||||
"ctrl-j": "menu::SelectNext",
|
|
||||||
"ctrl-k": "menu::SelectPrev",
|
|
||||||
"ctrl-l": "menu::SelectNext"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "Editor && VimControl && !VimWaiting && !menu",
|
|
||||||
"bindings": {
|
|
||||||
"|": "pane::SplitVertical",
|
|
||||||
|
|
||||||
// Window movement bindings
|
|
||||||
// Ctrl jklk to move between panes
|
|
||||||
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
||||||
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
||||||
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
||||||
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
|
|
||||||
|
|
||||||
"space e": "pane::RevealInProjectPanel",
|
|
||||||
|
|
||||||
// +LSP
|
|
||||||
"space l a": "editor::ToggleCodeActions",
|
|
||||||
"space l r": "editor::Rename",
|
|
||||||
"g d": "editor::GoToDefinition",
|
|
||||||
"g D": "editor::GoToDefinitionSplit",
|
|
||||||
"g i": "editor::GoToImplementation",
|
|
||||||
"g I": "editor::GoToImplementationSplit",
|
|
||||||
"g t": "editor::GoToTypeDefinition",
|
|
||||||
"g T": "editor::GoToTypeDefinitionSplit",
|
|
||||||
"g r": "editor::FindAllReferences",
|
|
||||||
"space l j": "editor::GoToDiagnostic",
|
|
||||||
"space l k": "editor::GoToPrevDiagnostic",
|
|
||||||
|
|
||||||
// Symbol search
|
|
||||||
"space f o": "outline::Toggle",
|
|
||||||
"space f O": "project_symbols::Toggle",
|
|
||||||
|
|
||||||
// Diagnostic
|
|
||||||
"space f q": "diagnostics::Deploy",
|
|
||||||
|
|
||||||
// +Git
|
|
||||||
// Git prev/next hunk
|
|
||||||
"space g j": "editor::GoToHunk",
|
|
||||||
"space g k": "editor::GoToPrevHunk",
|
|
||||||
|
|
||||||
// + Buffers
|
|
||||||
// Switch between buffers
|
|
||||||
"shift-h": "pane::ActivatePrevItem",
|
|
||||||
"shift-l": "pane::ActivateNextItem",
|
|
||||||
|
|
||||||
// Close active panel
|
|
||||||
"space b c": "pane::CloseActiveItem",
|
|
||||||
"space b d": "pane::CloseActiveItem",
|
|
||||||
// Close other items
|
|
||||||
"space b o": "pane::CloseInactiveItems",
|
|
||||||
// Save file
|
|
||||||
"ctrl-s": "workspace::Save",
|
|
||||||
// File finder
|
|
||||||
"space f f": "file_finder::Toggle",
|
|
||||||
// Project search
|
|
||||||
"space f W": "pane::DeploySearch"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "Editor && vim_mode == visual",
|
|
||||||
"bindings": {
|
|
||||||
"shift-j": "editor::MoveLineDown",
|
|
||||||
"shift-k": "editor::MoveLineUp"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// Empty pane, set of keybindings that are available when there is no active editor
|
|
||||||
{
|
|
||||||
"context": "(EmptyPane || SharedScreen) && vim_mode != insert",
|
|
||||||
"bindings": {
|
|
||||||
// Open file finder
|
|
||||||
"space f f": "file_finder::Toggle",
|
|
||||||
// Open recent project
|
|
||||||
"space f p": "projects::OpenRecent"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "Workspace",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-t": "terminal_panel::ToggleFocus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "Terminal",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
||||||
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
||||||
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
||||||
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// File panel (netrw)
|
|
||||||
{
|
|
||||||
"context": "ProjectPanel && not_editing",
|
|
||||||
"bindings": {
|
|
||||||
"a": "project_panel::NewFile",
|
|
||||||
"A": "project_panel::NewDirectory",
|
|
||||||
"r": "project_panel::Rename",
|
|
||||||
"d": "project_panel::Delete",
|
|
||||||
"x": "project_panel::Cut",
|
|
||||||
"c": "project_panel::Copy",
|
|
||||||
"p": "project_panel::Paste",
|
|
||||||
"y": "project_panel::CopyRelativePath",
|
|
||||||
"Y": "project_panel::CopyPath",
|
|
||||||
"o": ["project_panel::Open", "workspace::toggleLeftDock"],
|
|
||||||
// Close project panel as project file panel on the right
|
|
||||||
// Navigate between panel
|
|
||||||
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
||||||
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
||||||
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
||||||
"ctrl-j": ["workspace ::ActivatePaneInDirection", "Down"],
|
|
||||||
"space e": "workspace::ToggleLeftDock"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// Panel nagivation
|
|
||||||
{
|
|
||||||
"context": "Dock",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-w h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
||||||
"ctrl-w l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
||||||
"ctrl-w k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
||||||
"ctrl-w j": ["workspace::ActivatePaneInDirection", "Down"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Subword motion is not working really nice with `ciw`, disable for now
|
|
||||||
// {
|
|
||||||
// "context": "VimControl && !menu",
|
|
||||||
// "bindings": {
|
|
||||||
// "w": "vim::NextSubwordStart",
|
|
||||||
// "b": "vim::PreviousSubwordStart",
|
|
||||||
// "e": "vim::NextSubwordEnd",
|
|
||||||
// "g e": "vim::PreviousSubwordEnd"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
// Zed settings
|
|
||||||
//
|
|
||||||
// For information on how to configure Zed, see the Zed
|
|
||||||
// documentation: https://zed.dev/docs/configuring-zed
|
|
||||||
//
|
|
||||||
// To see all of Zed's default settings without changing your
|
|
||||||
// custom settings, run `zed: open default settings` from the
|
|
||||||
// command palette (cmd-shift-p / ctrl-shift-p)
|
|
||||||
{
|
|
||||||
"assistant": {
|
|
||||||
"default_model": {
|
|
||||||
"provider": "copilot_chat",
|
|
||||||
"model": "gpt-4o"
|
|
||||||
},
|
|
||||||
"version": "2"
|
|
||||||
},
|
|
||||||
"vim_mode": true,
|
|
||||||
"ui_font_size": 16,
|
|
||||||
"buffer_font_size": 16,
|
|
||||||
"buffer_font_family": "JetBrainsMono Nerd Font",
|
|
||||||
"cursor_blink": true,
|
|
||||||
"use_multiline_find": true,
|
|
||||||
"use_smartcase_search": true,
|
|
||||||
"relative_line_numbers": true,
|
|
||||||
"scroll_beyond_last_line": "vertical_scroll_margin",
|
|
||||||
"vertical_scroll_margin": 15,
|
|
||||||
"theme": {
|
|
||||||
"mode": "system",
|
|
||||||
"light": "One Light",
|
|
||||||
"dark": "Catppuccin Macchiato"
|
|
||||||
},
|
|
||||||
"tab_bar": {
|
|
||||||
"show": true,
|
|
||||||
"show_nav_history_buttons": false
|
|
||||||
},
|
|
||||||
"tabs": {
|
|
||||||
"file_icons": true,
|
|
||||||
"git_status": true
|
|
||||||
},
|
|
||||||
"git": {
|
|
||||||
"git_gutter": "tracked_files",
|
|
||||||
"inline_blame": {
|
|
||||||
"enabled": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indent_guides": {
|
|
||||||
"coloring": "indent_aware"
|
|
||||||
},
|
|
||||||
"terminal": {
|
|
||||||
"copy_on_select": true,
|
|
||||||
"button": true
|
|
||||||
},
|
|
||||||
"hover_popover_enabled": true,
|
|
||||||
"inlay_hints": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
"preview_tabs": {
|
|
||||||
"enabled": true,
|
|
||||||
"enable_preview_from_code_navigation": true,
|
|
||||||
"enable_preview_from_file_finder": false
|
|
||||||
},
|
|
||||||
"scrollbar": {
|
|
||||||
"show": "auto",
|
|
||||||
"cursors": false,
|
|
||||||
"git_diff": false,
|
|
||||||
"search_results": true,
|
|
||||||
"selected_symbol": true,
|
|
||||||
"diagnostics": true
|
|
||||||
},
|
|
||||||
"command_aliases": {
|
|
||||||
"q": "pane: close all items"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue