Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e1cb66425 | |||
| 947f936f52 | |||
| 488199c732 | |||
| f159b348ad | |||
| cc1870ecd2 | |||
| ac8f51e7cf | |||
| 33ff75f1da | |||
| 1c163481ff | |||
| 4c99de0833 | |||
| 3202ccba44 | |||
| 62325b5fb7 | |||
| 44cd8fe1f7 | |||
| 3049fa792e | |||
| 7a1fe84744 | |||
| 450d64d713 | |||
| d29f8a933d | |||
| 991110b28c | |||
| 2fe6bab602 | |||
| 8f66011e00 | |||
| bcafeebc6b | |||
| 494dde3c10 | |||
| 68b28e8890 | |||
| 7db9320ad9 |
@@ -1,16 +0,0 @@
|
||||
[font]
|
||||
size = 12
|
||||
|
||||
[font.normal]
|
||||
family = "FiraCode Nerd Font"
|
||||
style = "Regular"
|
||||
|
||||
[window]
|
||||
opacity = 0.7
|
||||
|
||||
[window.padding]
|
||||
#x = 15
|
||||
#y = 15
|
||||
|
||||
[selection]
|
||||
save_to_clipboard = true
|
||||
1
dotfiles/chromium-flags.conf
Normal file
1
dotfiles/chromium-flags.conf
Normal file
@@ -0,0 +1 @@
|
||||
--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --enable-features=VaapiVideoDecoder
|
||||
1
dotfiles/code-flags.conf
Normal file
1
dotfiles/code-flags.conf
Normal file
@@ -0,0 +1 @@
|
||||
--ozone-platform=wayland
|
||||
@@ -3,10 +3,11 @@
|
||||
# -----------------------------------------------------
|
||||
|
||||
# Setup XDG for screen sharing
|
||||
exec-once = ../scripts/xdg.sh
|
||||
#exec-once = ../scripts/xdg.sh
|
||||
|
||||
# Start Polkit
|
||||
# exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = systemctl --user start hyprpolkitagent
|
||||
|
||||
# Load Dunst Notification Manager
|
||||
exec-once = dunst
|
||||
@@ -31,6 +32,7 @@ exec-once = ~/dotfiles/hypr/scripts/init-wallpaper-engine.sh
|
||||
|
||||
exec-once = pypr
|
||||
|
||||
exec-once = activate-linux -t "激活 Win——" -m "什么?Gentoo Linux?那没事了" -f "Noto Sans CJK SC" &
|
||||
|
||||
# Start autostart cleanup
|
||||
# exec-once = ~/dotfiles/hypr/scripts/cleanup.sh
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
decoration {
|
||||
rounding = 10
|
||||
#rounding_power = 4.0
|
||||
blur {
|
||||
enabled = true
|
||||
size = 10
|
||||
@@ -18,8 +19,14 @@ decoration {
|
||||
inactive_opacity = 0.8
|
||||
fullscreen_opacity = 1.0
|
||||
|
||||
drop_shadow = true
|
||||
shadow_range = 30
|
||||
shadow_render_power = 3
|
||||
col.shadow = 0x66000000
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 30
|
||||
render_power = 3
|
||||
color = 0x66000000
|
||||
}
|
||||
#drop_shadow = true
|
||||
#shadow_range = 30
|
||||
#shadow_render_power = 3
|
||||
#col.shadow = 0x66000000
|
||||
}
|
||||
|
||||
@@ -102,3 +102,4 @@ submap = reset
|
||||
|
||||
# Pyprland
|
||||
bind = $mainMod SHIFT, RETURN, exec, pypr toggle term
|
||||
bind = $mainMod, C, exec, pypr toggle chat
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
monitor=DP-1,preferred,0x0,2
|
||||
monitor=DP-2,preferred,1920x-275,2,transform,1
|
||||
|
||||
workspace=1,monitor:DP-1
|
||||
#workspace=1,monitor:DP-1
|
||||
#exec-once=hyprctl dispatch workspace 1
|
||||
|
||||
@@ -15,9 +15,11 @@ windowrule = float,^(showmethekey-gtk)$
|
||||
windowrule = pin,^(showmethekey-gtk)$
|
||||
layerrule = blur, gtk-layer-shell
|
||||
layerrule = blur, logout_dialog
|
||||
layerrule = blur, waybar
|
||||
|
||||
windowrule = float,title:^(Mathematica)$
|
||||
windowrule = opacity 0.8, ^(Code)$
|
||||
windowrule = opacity 0.8, ^(code)$
|
||||
windowrule = opacity 0.8, ^(code-oss)$
|
||||
windowrule = opacity 0.8, ^(code-url-handler)$
|
||||
windowrule = float,^(QQ)$
|
||||
@@ -27,3 +29,8 @@ windowrule = float,^(fdm)$
|
||||
windowrule = float,^(Uget-gtk)$
|
||||
windowrule = float,^(xdg-desktop-portal-gtk)$
|
||||
windowrule = float,title:^(打开文件)$
|
||||
|
||||
windowrule = tile,^(explorer.exe)$
|
||||
windowrule = float,chrome-chatgpt
|
||||
|
||||
windowrule = fullscreen,^(eu4)$
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
# }
|
||||
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
||||
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||
#lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
||||
#before_sleep_cmd = loginctl lock-session # lock before suspend.
|
||||
#after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||
}
|
||||
|
||||
# Screenlock
|
||||
listener {
|
||||
# HYPRLOCK TIMEOUT
|
||||
timeout = 1200
|
||||
# HYPRLOCK ONTIMEOUT
|
||||
on-timeout = loginctl lock-session
|
||||
}
|
||||
#listener {
|
||||
# # HYPRLOCK TIMEOUT
|
||||
# timeout = 1200
|
||||
# # HYPRLOCK ONTIMEOUT
|
||||
# on-timeout = loginctl lock-session
|
||||
#}
|
||||
|
||||
# dpms
|
||||
listener {
|
||||
|
||||
@@ -7,6 +7,15 @@ plugins = [
|
||||
|
||||
[scratchpads.term]
|
||||
animation = "fromTop"
|
||||
command = "alacritty --class alacritty-dropterm"
|
||||
class = "alacritty-dropterm"
|
||||
command = "kitty --class kitty-dropterm"
|
||||
class = "kitty-dropterm"
|
||||
size = "75% 60%"
|
||||
unfocus = "hide"
|
||||
|
||||
[scratchpads.chat]
|
||||
animation = "fromLeft"
|
||||
command = "google-chrome-stable --ozone-platform=wayland --enable-wayland-ime --user-data-dir=$HOME/.config/chatgpt-webapp --app=https://chatgpt.com"
|
||||
class = "chatgpt-webapp"
|
||||
size = "30% 85%"
|
||||
margin = 12
|
||||
force_monitor = "DP-1"
|
||||
|
||||
@@ -53,7 +53,7 @@ case $1 in
|
||||
# Select wallpaper with rofi
|
||||
"select")
|
||||
sleep 0.2
|
||||
selected=$( find "$wallpaper_folder" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile
|
||||
selected=$( find -L "$wallpaper_folder" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -exec basename {} \; | sort -R | while read rfile
|
||||
do
|
||||
echo -en "$rfile\x00icon\x1f$wallpaper_folder/${rfile}\n"
|
||||
done | rofi -dmenu -i -replace -config ~/dotfiles/rofi/config-wallpaper.rasi)
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
font_family Fira Code Nerd Font
|
||||
# Maple
|
||||
#font_family Maple Mono NF CN
|
||||
# end Maple
|
||||
# Fica Code
|
||||
font_family FiraCode Nerd Font
|
||||
font_features FiraCodeNF-Reg +cv01 +cv02 +cv06 +cv31 +zero +cv30
|
||||
font_features FiraCodeNF-SemBd +cv01 +cv02 +cv06 +cv31 +zero +cv30
|
||||
# end Fira Code
|
||||
font_size 16.0
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
cursor_shape block
|
||||
cursor_trail 10
|
||||
|
||||
background_opacity 0.7
|
||||
|
||||
confirm_os_window_close 0
|
||||
@@ -13,8 +23,6 @@ include ~/.cache/wal/colors-kitty.conf
|
||||
detect_urls yes
|
||||
copy_on_select clipboard
|
||||
strip_trailing_spaces smart
|
||||
rectangle_select_modifiers ctrl+alt
|
||||
terminal_select_modifiers shift
|
||||
|
||||
enable_audio_bell no
|
||||
|
||||
|
||||
@@ -8,4 +8,4 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: lunarmodules/luacheck@v1
|
||||
with:
|
||||
args: . --std luajit --globals vim _debugging _command_panel _flash_esc_or_noh _telescope_collections _toggle_lazygit --max-line-length 150 --no-config
|
||||
args: . --std luajit --max-line-length 150 --no-config --globals vim _debugging _command_panel _flash_esc_or_noh _telescope_collections _toggle_inlayhint _toggle_virtualtext _toggle_lazygit
|
||||
|
||||
32
dotfiles/nvim/flake.lock
generated
32
dotfiles/nvim/flake.lock
generated
@@ -5,11 +5,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722113426,
|
||||
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||
"lastModified": 1735644329,
|
||||
"narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||
"rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -23,11 +23,11 @@
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"lastModified": 1738453229,
|
||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -43,11 +43,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722462338,
|
||||
"narHash": "sha256-ss0G8t8RJVDewA3MyqgAlV951cWRK6EtVhVKEZ7J5LU=",
|
||||
"lastModified": 1740796616,
|
||||
"narHash": "sha256-JU97wIfRxeFN6rpTsUVCwWAdix+Wka4Or23907YIrFI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6e090576c4824b16e8759ebca3958c5b09659ee8",
|
||||
"rev": "f0b5e7e8a75abdea32bbff09ddd7b6eeb4b9b445",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -74,23 +74,23 @@
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1719876945,
|
||||
"narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
|
||||
"lastModified": 1738452942,
|
||||
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1722415718,
|
||||
"narHash": "sha256-5US0/pgxbMksF92k1+eOa8arJTJiPvsdZj9Dl+vJkM4=",
|
||||
"lastModified": 1740547748,
|
||||
"narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3392ad349a5227f4a3464dce87bcc5046692fce",
|
||||
"rev": "3a05eebede89661660945da1f151959900903b6a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" },
|
||||
"advanced-git-search.nvim": { "branch": "main", "commit": "36ea105a7b7063a6879ac3b8afffe6fb326e27b1" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "92f93f4e155b2135fc47ed2daf8b63f40726b545" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "b6f4129302db197a7249e67a90de3f2b676de13e" },
|
||||
"autoclose.nvim": { "branch": "main", "commit": "b2077aa2c83df7ebc19b2a20a3a0654b24ae9c8f" },
|
||||
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
|
||||
@@ -24,6 +23,7 @@
|
||||
"csv.vim": { "branch": "master", "commit": "bddfcbadd788ab11eb3dbba4550a38a412fe3705" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dropbar.nvim": { "branch": "master", "commit": "6156e07759fd8c7cbf764414f583aa7e47470368" },
|
||||
"edgy.nvim": { "branch": "main", "commit": "7e8dedc39abebe40c289b8012cc89b11c69aa7a0" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
|
||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||
@@ -32,11 +32,11 @@
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" },
|
||||
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" },
|
||||
"go.nvim": { "branch": "master", "commit": "8389adb56ab124b75d858df5f87b741eaca7b8b3" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "1b7a54633071cbb7a378162b8f04a38913987d64" },
|
||||
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
|
||||
"hop.nvim": { "branch": "master", "commit": "8f51ef02700bb3cdcce94e92eff16170a6343c4f" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||
"local-highlight.nvim": { "branch": "master", "commit": "ae3ada3a332128b1036c84c8587b9069891c63da" },
|
||||
"lsp-format-modifications.nvim": { "branch": "main", "commit": "006d4cd88f4f09fdc4375fcb75dd5b7d981a723b" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "e6d225e27770db81346c2f2aa6c30d0e249f9e7f" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "4ce44df854f447cf0a8972e5387b3aeb5efc798b" },
|
||||
@@ -47,8 +47,8 @@
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.align": { "branch": "main", "commit": "b54d88b16bfac62ca6b3d699566135639a3ca4fa" },
|
||||
"mini.cursorword": { "branch": "main", "commit": "939ffcc8c57694608ac0896418d4b9a7c5273909" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "f5befe4772c9d94c43bd3dd318f5546cf955ba3f" },
|
||||
"neodim": { "branch": "master", "commit": "d87470828690342d0139efc2fd56ea0b29e9ecb3" },
|
||||
"neoscroll.nvim": { "branch": "master", "commit": "532dcc8cea4287c4cad6bb77532989a8217cfc7b" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "203f5ebde4a1af48ba2eb146401b5be2e7866942" },
|
||||
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
|
||||
@@ -61,7 +61,6 @@
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||
"nvim-scrollview": { "branch": "main", "commit": "401c0498689dcaa54b2e7483d823e33cdc051e72" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "d43ab67d0eb4317961c5e9d15fffe908519debe0" },
|
||||
"nvim-treehopper": { "branch": "master", "commit": "13559079e33665a310d9ccf0e43f4e9bb9f337e2" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "7a64148896289a91cb2a92e9da3f76d5512a3fb8" },
|
||||
|
||||
@@ -32,7 +32,13 @@ local leader_map = function()
|
||||
end
|
||||
|
||||
local gui_config = function()
|
||||
vim.api.nvim_set_option_value("guifont", settings.gui_config.font_name .. ":h" .. settings.gui_config.font_size, {})
|
||||
if next(settings.gui_config) then
|
||||
vim.api.nvim_set_option_value(
|
||||
"guifont",
|
||||
settings.gui_config.font_name .. ":h" .. settings.gui_config.font_size,
|
||||
{}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
local neovide_config = function()
|
||||
@@ -104,7 +110,6 @@ local load_core = function()
|
||||
shell_config()
|
||||
|
||||
require("core.options")
|
||||
require("core.mapping")
|
||||
require("core.event")
|
||||
require("core.pack")
|
||||
require("keymap")
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
local bind = require("keymap.bind")
|
||||
local map_cr = bind.map_cr
|
||||
local map_cu = bind.map_cu
|
||||
local map_cmd = bind.map_cmd
|
||||
local map_callback = bind.map_callback
|
||||
|
||||
local core_map = {
|
||||
-- Suckless
|
||||
["n|<S-Tab>"] = map_cr("normal za"):with_noremap():with_silent():with_desc("edit: Toggle code fold"),
|
||||
["n|<C-s>"] = map_cu("write"):with_noremap():with_silent():with_desc("edit: Save file"),
|
||||
["n|Y"] = map_cmd("y$"):with_desc("edit: Yank text to EOL"),
|
||||
["n|D"] = map_cmd("d$"):with_desc("edit: Delete text to EOL"),
|
||||
["n|n"] = map_cmd("nzzzv"):with_noremap():with_desc("edit: Next search result"),
|
||||
["n|N"] = map_cmd("Nzzzv"):with_noremap():with_desc("edit: Prev search result"),
|
||||
["n|J"] = map_cmd("mzJ`z"):with_noremap():with_desc("edit: Join next line"),
|
||||
["n|<Esc>"] = map_callback(function()
|
||||
_flash_esc_or_noh()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("edit: Clear search highlight"),
|
||||
["n|<C-h>"] = map_cmd("<C-w>h"):with_noremap():with_desc("window: Focus left"),
|
||||
["n|<C-l>"] = map_cmd("<C-w>l"):with_noremap():with_desc("window: Focus right"),
|
||||
["n|<C-j>"] = map_cmd("<C-w>j"):with_noremap():with_desc("window: Focus down"),
|
||||
["n|<C-k>"] = map_cmd("<C-w>k"):with_noremap():with_desc("window: Focus up"),
|
||||
["t|<C-w>h"] = map_cmd("<Cmd>wincmd h<CR>"):with_silent():with_noremap():with_desc("window: Focus left"),
|
||||
["t|<C-w>l"] = map_cmd("<Cmd>wincmd l<CR>"):with_silent():with_noremap():with_desc("window: Focus right"),
|
||||
["t|<C-w>j"] = map_cmd("<Cmd>wincmd j<CR>"):with_silent():with_noremap():with_desc("window: Focus down"),
|
||||
["t|<C-w>k"] = map_cmd("<Cmd>wincmd k<CR>"):with_silent():with_noremap():with_desc("window: Focus up"),
|
||||
["n|<A-h>"] = map_cr("vertical resize -3"):with_silent():with_desc("window: Resize -3 vertically"),
|
||||
["n|<A-l>"] = map_cr("vertical resize +3"):with_silent():with_desc("window: Resize +3 vertically"),
|
||||
["n|<A-j>"] = map_cr("resize -3"):with_silent():with_desc("window: Resize -3 horizontally"),
|
||||
["n|<A-k>"] = map_cr("resize +3"):with_silent():with_desc("window: Resize +3 horizontally"),
|
||||
["n|<C-q>"] = map_cr("wq"):with_desc("edit: Save file and quit"),
|
||||
["n|<A-S-q>"] = map_cr("q!"):with_desc("edit: Force quit"),
|
||||
["n|<leader>o"] = map_cr("setlocal spell! spelllang=en_us"):with_desc("edit: Toggle spell check"),
|
||||
["n|<leader>bn"] = map_cu("enew"):with_noremap():with_silent():with_desc("buffer: New"),
|
||||
["n|tn"] = map_cr("tabnew"):with_noremap():with_silent():with_desc("tab: Create a new tab"),
|
||||
["n|tk"] = map_cr("tabnext"):with_noremap():with_silent():with_desc("tab: Move to next tab"),
|
||||
["n|tj"] = map_cr("tabprevious"):with_noremap():with_silent():with_desc("tab: Move to previous tab"),
|
||||
["n|to"] = map_cr("tabonly"):with_noremap():with_silent():with_desc("tab: Only keep current tab"),
|
||||
-- Insert mode
|
||||
["i|<C-u>"] = map_cmd("<C-G>u<C-U>"):with_noremap():with_desc("edit: Delete previous block"),
|
||||
["i|<C-b>"] = map_cmd("<Left>"):with_noremap():with_desc("edit: Move cursor to left"),
|
||||
["i|<C-a>"] = map_cmd("<ESC>^i"):with_noremap():with_desc("edit: Move cursor to line start"),
|
||||
["i|<C-s>"] = map_cmd("<Esc>:w<CR>"):with_desc("edit: Save file"),
|
||||
["i|<C-q>"] = map_cmd("<Esc>:wq<CR>"):with_desc("edit: Save file and quit"),
|
||||
-- Command mode
|
||||
["c|<C-b>"] = map_cmd("<Left>"):with_noremap():with_desc("edit: Left"),
|
||||
["c|<C-f>"] = map_cmd("<Right>"):with_noremap():with_desc("edit: Right"),
|
||||
["c|<C-a>"] = map_cmd("<Home>"):with_noremap():with_desc("edit: Home"),
|
||||
["c|<C-e>"] = map_cmd("<End>"):with_noremap():with_desc("edit: End"),
|
||||
["c|<C-d>"] = map_cmd("<Del>"):with_noremap():with_desc("edit: Delete"),
|
||||
["c|<C-h>"] = map_cmd("<BS>"):with_noremap():with_desc("edit: Backspace"),
|
||||
["c|<C-t>"] = map_cmd([[<C-R>=expand("%:p:h") . "/" <CR>]])
|
||||
:with_noremap()
|
||||
:with_desc("edit: Complete path of current file"),
|
||||
-- Visual mode
|
||||
["v|J"] = map_cmd(":m '>+1<CR>gv=gv"):with_desc("edit: Move this line down"),
|
||||
["v|K"] = map_cmd(":m '<-2<CR>gv=gv"):with_desc("edit: Move this line up"),
|
||||
["v|<"] = map_cmd("<gv"):with_desc("edit: Decrease indent"),
|
||||
["v|>"] = map_cmd(">gv"):with_desc("edit: Increase indent"),
|
||||
}
|
||||
|
||||
bind.nvim_load_mapping(core_map)
|
||||
@@ -125,7 +125,7 @@ function Lazy:load_lazy()
|
||||
---@type string[]
|
||||
paths = {}, -- add any custom paths here that you want to include in the rtp
|
||||
disabled_plugins = {
|
||||
-- Set this to true in order to enable native EditorConfig support
|
||||
-- Comment out `"editorconfig"` to enable native EditorConfig support
|
||||
-- WARN: Sleuth.vim already includes all the features provided by this plugin.
|
||||
-- Do NOT enable both at the same time, or you risk breaking the entire detection system.
|
||||
"editorconfig",
|
||||
|
||||
@@ -46,9 +46,9 @@ settings["formatter_block_list"] = {
|
||||
-- Servers in this list will skip setting formatting capabilities if rhs is true.
|
||||
---@type table<string, boolean>
|
||||
settings["server_formatting_block_list"] = {
|
||||
lua_ls = true,
|
||||
tsserver = true,
|
||||
clangd = true,
|
||||
lua_ls = true,
|
||||
ts_ls = true,
|
||||
}
|
||||
|
||||
-- Set it to false if you want to turn off LSP Inlay Hints
|
||||
|
||||
@@ -1,27 +1,32 @@
|
||||
local bind = require("keymap.bind")
|
||||
local map_cr = bind.map_cr
|
||||
local map_cmd = bind.map_cmd
|
||||
local map_callback = bind.map_callback
|
||||
|
||||
local plug_map = {
|
||||
["n|<A-f>"] = map_cmd("<Cmd>FormatToggle<CR>"):with_noremap():with_desc("formatter: Toggle format on save"),
|
||||
local mappings = {
|
||||
fmt = {
|
||||
["n|<A-f>"] = map_cr("FormatToggle"):with_noremap():with_silent():with_desc("formatter: Toggle format on save"),
|
||||
["n|<A-S-f>"] = map_cr("Format"):with_noremap():with_silent():with_desc("formatter: Format buffer manually"),
|
||||
},
|
||||
}
|
||||
bind.nvim_load_mapping(plug_map)
|
||||
bind.nvim_load_mapping(mappings.fmt)
|
||||
|
||||
local mapping = {}
|
||||
--- The following code allows this file to be exported ---
|
||||
--- for use with LSP lazy-loaded keymap bindings ---
|
||||
|
||||
function mapping.lsp(buf)
|
||||
local M = {}
|
||||
|
||||
---@param buf integer
|
||||
function M.lsp(buf)
|
||||
local map = {
|
||||
-- LSP-related keymaps, ONLY effective in buffers with LSP(s) attached
|
||||
["n|<leader>li"] = map_cr("LspInfo"):with_silent():with_buffer(buf):with_desc("lsp: Info"),
|
||||
["n|<leader>lr"] = map_cr("LspRestart"):with_silent():with_buffer(buf):with_nowait():with_desc("lsp: Restart"),
|
||||
["n|go"] = map_cr("AerialToggle!"):with_silent():with_buffer(buf):with_desc("lsp: Toggle outline"),
|
||||
["n|gto"] = map_callback(function()
|
||||
require("telescope").extensions.aerial.aerial()
|
||||
["n|go"] = map_callback(function()
|
||||
require("edgy").toggle("right")
|
||||
end)
|
||||
:with_silent()
|
||||
:with_buffer(buf)
|
||||
:with_desc("lsp: Toggle outline in Telescope"),
|
||||
:with_desc("lsp: Toggle outline"),
|
||||
["n|g["] = map_cr("Lspsaga diagnostic_jump_prev")
|
||||
:with_silent()
|
||||
:with_buffer(buf)
|
||||
@@ -62,6 +67,18 @@ function mapping.lsp(buf)
|
||||
:with_silent()
|
||||
:with_buffer(buf)
|
||||
:with_desc("lsp: Show outgoing calls"),
|
||||
["n|<leader>lv"] = map_callback(function()
|
||||
_toggle_virtualtext()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Toggle virtual text display of current buffer"),
|
||||
["n|<leader>lh"] = map_callback(function()
|
||||
_toggle_inlayhint()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Toggle inlay hints dispaly of current buffer"),
|
||||
}
|
||||
bind.nvim_load_mapping(map)
|
||||
|
||||
@@ -71,4 +88,4 @@ function mapping.lsp(buf)
|
||||
end
|
||||
end
|
||||
|
||||
return mapping
|
||||
return M
|
||||
|
||||
@@ -5,105 +5,136 @@ local map_cmd = bind.map_cmd
|
||||
local map_callback = bind.map_callback
|
||||
local et = bind.escape_termcode
|
||||
|
||||
local plug_map = {
|
||||
-- Plugin persisted.nvim
|
||||
["n|<leader>ss"] = map_cu("SessionSave"):with_noremap():with_silent():with_desc("session: Save"),
|
||||
["n|<leader>sl"] = map_cu("SessionLoad"):with_noremap():with_silent():with_desc("session: Load current"),
|
||||
["n|<leader>sd"] = map_cu("SessionDelete"):with_noremap():with_silent():with_desc("session: Delete"),
|
||||
local mappings = {
|
||||
builtins = {
|
||||
-- Builtins: Save & Quit
|
||||
["n|<C-s>"] = map_cu("write"):with_noremap():with_silent():with_desc("edit: Save file"),
|
||||
["n|<C-q>"] = map_cr("wq"):with_desc("edit: Save file and quit"),
|
||||
["n|<A-S-q>"] = map_cr("q!"):with_desc("edit: Force quit"),
|
||||
|
||||
-- Plugin: nvim-bufdel
|
||||
["n|<A-q>"] = map_cr("BufDel"):with_noremap():with_silent():with_desc("buffer: Close current"),
|
||||
-- Builtins: Insert mode
|
||||
["i|<C-u>"] = map_cmd("<C-G>u<C-U>"):with_noremap():with_desc("edit: Delete previous block"),
|
||||
["i|<C-b>"] = map_cmd("<Left>"):with_noremap():with_desc("edit: Move cursor to left"),
|
||||
["i|<C-a>"] = map_cmd("<ESC>^i"):with_noremap():with_desc("edit: Move cursor to line start"),
|
||||
["i|<C-s>"] = map_cmd("<Esc>:w<CR>"):with_desc("edit: Save file"),
|
||||
["i|<C-q>"] = map_cmd("<Esc>:wq<CR>"):with_desc("edit: Save file and quit"),
|
||||
|
||||
-- Plugin: comment.nvim
|
||||
["n|gcc"] = map_callback(function()
|
||||
return vim.v.count == 0 and et("<Plug>(comment_toggle_linewise_current)")
|
||||
or et("<Plug>(comment_toggle_linewise_count)")
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_expr()
|
||||
:with_desc("edit: Toggle comment for line"),
|
||||
["n|gbc"] = map_callback(function()
|
||||
return vim.v.count == 0 and et("<Plug>(comment_toggle_blockwise_current)")
|
||||
or et("<Plug>(comment_toggle_blockwise_count)")
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_expr()
|
||||
:with_desc("edit: Toggle comment for block"),
|
||||
["n|gc"] = map_cmd("<Plug>(comment_toggle_linewise)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for line with operator"),
|
||||
["n|gb"] = map_cmd("<Plug>(comment_toggle_blockwise)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for block with operator"),
|
||||
["x|gc"] = map_cmd("<Plug>(comment_toggle_linewise_visual)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for line with selection"),
|
||||
["x|gb"] = map_cmd("<Plug>(comment_toggle_blockwise_visual)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for block with selection"),
|
||||
-- Builtins: Command mode
|
||||
["c|<C-b>"] = map_cmd("<Left>"):with_noremap():with_desc("edit: Left"),
|
||||
["c|<C-f>"] = map_cmd("<Right>"):with_noremap():with_desc("edit: Right"),
|
||||
["c|<C-a>"] = map_cmd("<Home>"):with_noremap():with_desc("edit: Home"),
|
||||
["c|<C-e>"] = map_cmd("<End>"):with_noremap():with_desc("edit: End"),
|
||||
["c|<C-d>"] = map_cmd("<Del>"):with_noremap():with_desc("edit: Delete"),
|
||||
["c|<C-h>"] = map_cmd("<BS>"):with_noremap():with_desc("edit: Backspace"),
|
||||
["c|<C-t>"] = map_cmd([[<C-R>=expand("%:p:h") . "/" <CR>]])
|
||||
:with_noremap()
|
||||
:with_desc("edit: Complete path of current file"),
|
||||
|
||||
-- Plugin: diffview.nvim
|
||||
["n|<leader>gd"] = map_cr("DiffviewOpen"):with_silent():with_noremap():with_desc("git: Show diff"),
|
||||
["n|<leader>gD"] = map_cr("DiffviewClose"):with_silent():with_noremap():with_desc("git: Close diff"),
|
||||
-- Builtins: Visual mode
|
||||
["v|J"] = map_cmd(":m '>+1<CR>gv=gv"):with_desc("edit: Move this line down"),
|
||||
["v|K"] = map_cmd(":m '<-2<CR>gv=gv"):with_desc("edit: Move this line up"),
|
||||
["v|<"] = map_cmd("<gv"):with_desc("edit: Decrease indent"),
|
||||
["v|>"] = map_cmd(">gv"):with_desc("edit: Increase indent"),
|
||||
|
||||
-- Plugin: hop.nvim
|
||||
["nv|<leader>w"] = map_cmd("<Cmd>HopWordMW<CR>"):with_noremap():with_desc("jump: Goto word"),
|
||||
["nv|<leader>j"] = map_cmd("<Cmd>HopLineMW<CR>"):with_noremap():with_desc("jump: Goto line"),
|
||||
["nv|<leader>k"] = map_cmd("<Cmd>HopLineMW<CR>"):with_noremap():with_desc("jump: Goto line"),
|
||||
["nv|<leader>c"] = map_cmd("<Cmd>HopChar1MW<CR>"):with_noremap():with_desc("jump: Goto one char"),
|
||||
["nv|<leader>C"] = map_cmd("<Cmd>HopChar2MW<CR>"):with_noremap():with_desc("jump: Goto two chars"),
|
||||
-- Builtins: "Suckless" - named after r/suckless
|
||||
["n|Y"] = map_cmd("y$"):with_desc("edit: Yank text to EOL"),
|
||||
["n|D"] = map_cmd("d$"):with_desc("edit: Delete text to EOL"),
|
||||
["n|n"] = map_cmd("nzzzv"):with_noremap():with_desc("edit: Next search result"),
|
||||
["n|N"] = map_cmd("Nzzzv"):with_noremap():with_desc("edit: Prev search result"),
|
||||
["n|J"] = map_cmd("mzJ`z"):with_noremap():with_desc("edit: Join next line"),
|
||||
["n|<S-Tab>"] = map_cr("normal za"):with_noremap():with_silent():with_desc("edit: Toggle code fold"),
|
||||
["n|<Esc>"] = map_callback(function()
|
||||
_flash_esc_or_noh()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("edit: Clear search highlight"),
|
||||
["n|<leader>o"] = map_cr("setlocal spell! spelllang=en_us"):with_desc("edit: Toggle spell check"),
|
||||
},
|
||||
plugins = {
|
||||
-- Plugin: persisted.nvim
|
||||
["n|<leader>ss"] = map_cu("SessionSave"):with_noremap():with_silent():with_desc("session: Save"),
|
||||
["n|<leader>sl"] = map_cu("SessionLoad"):with_noremap():with_silent():with_desc("session: Load current"),
|
||||
["n|<leader>sd"] = map_cu("SessionDelete"):with_noremap():with_silent():with_desc("session: Delete"),
|
||||
|
||||
-- Plugin: smart-splits.nvim
|
||||
["n|<A-h>"] = map_cu("SmartResizeLeft"):with_silent():with_noremap():with_desc("window: Resize -3 horizontally"),
|
||||
["n|<A-j>"] = map_cu("SmartResizeDown"):with_silent():with_noremap():with_desc("window: Resize -3 vertically"),
|
||||
["n|<A-k>"] = map_cu("SmartResizeUp"):with_silent():with_noremap():with_desc("window: Resize +3 vertically"),
|
||||
["n|<A-l>"] = map_cu("SmartResizeRight"):with_silent():with_noremap():with_desc("window: Resize +3 horizontally"),
|
||||
["n|<C-h>"] = map_cu("SmartCursorMoveLeft"):with_silent():with_noremap():with_desc("window: Focus left"),
|
||||
["n|<C-j>"] = map_cu("SmartCursorMoveDown"):with_silent():with_noremap():with_desc("window: Focus down"),
|
||||
["n|<C-k>"] = map_cu("SmartCursorMoveUp"):with_silent():with_noremap():with_desc("window: Focus up"),
|
||||
["n|<C-l>"] = map_cu("SmartCursorMoveRight"):with_silent():with_noremap():with_desc("window: Focus right"),
|
||||
["n|<leader>Wh"] = map_cu("SmartSwapLeft"):with_silent():with_noremap():with_desc("window: Move window leftward"),
|
||||
["n|<leader>Wj"] = map_cu("SmartSwapDown"):with_silent():with_noremap():with_desc("window: Move window downward"),
|
||||
["n|<leader>Wk"] = map_cu("SmartSwapUp"):with_silent():with_noremap():with_desc("window: Move window upward"),
|
||||
["n|<leader>Wl"] = map_cu("SmartSwapRight"):with_silent():with_noremap():with_desc("window: Move window rightward"),
|
||||
-- Plugin: comment.nvim
|
||||
["n|gcc"] = map_callback(function()
|
||||
return vim.v.count == 0 and et("<Plug>(comment_toggle_linewise_current)")
|
||||
or et("<Plug>(comment_toggle_linewise_count)")
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_expr()
|
||||
:with_desc("edit: Toggle comment for line"),
|
||||
["n|gbc"] = map_callback(function()
|
||||
return vim.v.count == 0 and et("<Plug>(comment_toggle_blockwise_current)")
|
||||
or et("<Plug>(comment_toggle_blockwise_count)")
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_expr()
|
||||
:with_desc("edit: Toggle comment for block"),
|
||||
["n|gc"] = map_cmd("<Plug>(comment_toggle_linewise)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for line with operator"),
|
||||
["n|gb"] = map_cmd("<Plug>(comment_toggle_blockwise)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for block with operator"),
|
||||
["x|gc"] = map_cmd("<Plug>(comment_toggle_linewise_visual)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for line with selection"),
|
||||
["x|gb"] = map_cmd("<Plug>(comment_toggle_blockwise_visual)")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: Toggle comment for block with selection"),
|
||||
|
||||
-- Plugin: nvim-spectre
|
||||
["n|<leader>Ss"] = map_callback(function()
|
||||
require("spectre").toggle()
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("editn: Toggle search & replace panel"),
|
||||
["n|<leader>Sp"] = map_callback(function()
|
||||
require("spectre").open_visual({ select_word = true })
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("editn: search&replace current word (project)"),
|
||||
["v|<leader>Sp"] = map_callback(function()
|
||||
require("spectre").open_visual()
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: search & replace current word (project)"),
|
||||
["n|<leader>Sf"] = map_callback(function()
|
||||
require("spectre").open_file_search({ select_word = true })
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("editn: search & replace current word (file)"),
|
||||
-- Plugin: diffview.nvim
|
||||
["n|<leader>gd"] = map_cr("DiffviewOpen"):with_silent():with_noremap():with_desc("git: Show diff"),
|
||||
["n|<leader>gD"] = map_cr("DiffviewClose"):with_silent():with_noremap():with_desc("git: Close diff"),
|
||||
|
||||
-- Plugin: nvim-treehopper
|
||||
["o|m"] = map_cu("lua require('tsht').nodes()"):with_silent():with_desc("jump: Operate across syntax tree"),
|
||||
-- Plugin: hop.nvim
|
||||
["nv|<leader>w"] = map_cmd("<Cmd>HopWordMW<CR>"):with_noremap():with_desc("jump: Goto word"),
|
||||
["nv|<leader>j"] = map_cmd("<Cmd>HopLineMW<CR>"):with_noremap():with_desc("jump: Goto line"),
|
||||
["nv|<leader>k"] = map_cmd("<Cmd>HopLineMW<CR>"):with_noremap():with_desc("jump: Goto line"),
|
||||
["nv|<leader>c"] = map_cmd("<Cmd>HopChar1MW<CR>"):with_noremap():with_desc("jump: Goto one char"),
|
||||
["nv|<leader>C"] = map_cmd("<Cmd>HopChar2MW<CR>"):with_noremap():with_desc("jump: Goto two chars"),
|
||||
|
||||
-- Plugin suda.vim
|
||||
["n|<A-s>"] = map_cu("SudaWrite"):with_silent():with_noremap():with_desc("editn: Save file using sudo"),
|
||||
-- Plugin: grug-far
|
||||
["n|<leader>Ss"] = map_callback(function()
|
||||
require("grug-far").open()
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("editn: Toggle search & replace panel"),
|
||||
["n|<leader>Sp"] = map_callback(function()
|
||||
require("grug-far").open({ prefills = { search = vim.fn.expand("<cword>") } })
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("editn: search&replace current word (project)"),
|
||||
["v|<leader>Sp"] = map_callback(function()
|
||||
require("grug-far").with_visual_selection()
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("edit: search & replace current word (project)"),
|
||||
["n|<leader>Sf"] = map_callback(function()
|
||||
require("grug-far").open({ prefills = { paths = vim.fn.expand("%") } })
|
||||
end)
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("editn: search & replace current word (file)"),
|
||||
|
||||
-- Plugin: nvim-treehopper
|
||||
["o|m"] = map_cu("lua require('tsht').nodes()"):with_silent():with_desc("jump: Operate across syntax tree"),
|
||||
|
||||
-- Plugin: suda.vim
|
||||
["n|<A-s>"] = map_cu("SudaWrite"):with_silent():with_noremap():with_desc("editn: Save file using sudo"),
|
||||
},
|
||||
}
|
||||
|
||||
bind.nvim_load_mapping(plug_map)
|
||||
bind.nvim_load_mapping(mappings.builtins)
|
||||
bind.nvim_load_mapping(mappings.plugins)
|
||||
|
||||
@@ -3,14 +3,20 @@ _G._command_panel = function()
|
||||
lhs_filter = function(lhs)
|
||||
return not string.find(lhs, "Þ")
|
||||
end,
|
||||
layout_config = {
|
||||
width = 0.6,
|
||||
height = 0.6,
|
||||
prompt_position = "top",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
_G._flash_esc_or_noh = function()
|
||||
local flash_active, state = pcall(function()
|
||||
return require("flash.plugins.char").state
|
||||
end)
|
||||
if flash_active and state then
|
||||
state:hide()
|
||||
else
|
||||
pcall(vim.cmd.noh)
|
||||
end
|
||||
end
|
||||
|
||||
_G._telescope_collections = function(picker_type)
|
||||
local actions = require("telescope.actions")
|
||||
local action_state = require("telescope.actions.state")
|
||||
@@ -38,14 +44,27 @@ _G._telescope_collections = function(picker_type)
|
||||
:find()
|
||||
end
|
||||
|
||||
_G._flash_esc_or_noh = function()
|
||||
local flash_active, state = pcall(function()
|
||||
return require("flash.plugins.char").state
|
||||
end)
|
||||
if flash_active and state then
|
||||
state:hide()
|
||||
else
|
||||
pcall(vim.cmd.noh)
|
||||
_G._toggle_inlayhint = function()
|
||||
local is_enabled = vim.lsp.inlay_hint.is_enabled()
|
||||
|
||||
vim.lsp.inlay_hint.enable(not is_enabled)
|
||||
vim.notify(
|
||||
(is_enabled and "Inlay hint disabled successfully" or "Inlay hint enabled successfully"),
|
||||
vim.log.levels.INFO,
|
||||
{ title = "LSP Inlay Hint" }
|
||||
)
|
||||
end
|
||||
|
||||
local _vt_enabled = require("core.settings").diagnostics_virtual_text
|
||||
_G._toggle_virtualtext = function()
|
||||
if vim.diagnostic.is_enabled() then
|
||||
_vt_enabled = not _vt_enabled
|
||||
vim.diagnostic[_vt_enabled and "show" or "hide"]()
|
||||
vim.notify(
|
||||
(_vt_enabled and "Virtual text is now displayed" or "Virtual text is now hidden"),
|
||||
vim.log.levels.INFO,
|
||||
{ title = "LSP Diagnostic" }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,27 +1,42 @@
|
||||
require("keymap.helpers")
|
||||
local bind = require("keymap.bind")
|
||||
local map_cr = bind.map_cr
|
||||
-- local map_cu = bind.map_cu
|
||||
-- local map_cmd = bind.map_cmd
|
||||
-- local map_callback = bind.map_callback
|
||||
|
||||
local plug_map = {
|
||||
-- Package manager: lazy.nvim
|
||||
["n|<leader>ph"] = map_cr("Lazy"):with_silent():with_noremap():with_nowait():with_desc("package: Show"),
|
||||
["n|<leader>ps"] = map_cr("Lazy sync"):with_silent():with_noremap():with_nowait():with_desc("package: Sync"),
|
||||
["n|<leader>pu"] = map_cr("Lazy update"):with_silent():with_noremap():with_nowait():with_desc("package: Update"),
|
||||
["n|<leader>pi"] = map_cr("Lazy install"):with_silent():with_noremap():with_nowait():with_desc("package: Install"),
|
||||
["n|<leader>pl"] = map_cr("Lazy log"):with_silent():with_noremap():with_nowait():with_desc("package: Log"),
|
||||
["n|<leader>pc"] = map_cr("Lazy check"):with_silent():with_noremap():with_nowait():with_desc("package: Check"),
|
||||
["n|<leader>pd"] = map_cr("Lazy debug"):with_silent():with_noremap():with_nowait():with_desc("package: Debug"),
|
||||
["n|<leader>pp"] = map_cr("Lazy profile"):with_silent():with_noremap():with_nowait():with_desc("package: Profile"),
|
||||
["n|<leader>pr"] = map_cr("Lazy restore"):with_silent():with_noremap():with_nowait():with_desc("package: Restore"),
|
||||
["n|<leader>px"] = map_cr("Lazy clean"):with_silent():with_noremap():with_nowait():with_desc("package: Clean"),
|
||||
local mappings = {
|
||||
core = {
|
||||
-- Package manager: lazy.nvim
|
||||
["n|<leader>ph"] = map_cr("Lazy"):with_silent():with_noremap():with_nowait():with_desc("package: Show"),
|
||||
["n|<leader>ps"] = map_cr("Lazy sync"):with_silent():with_noremap():with_nowait():with_desc("package: Sync"),
|
||||
["n|<leader>pu"] = map_cr("Lazy update")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_nowait()
|
||||
:with_desc("package: Update"),
|
||||
["n|<leader>pi"] = map_cr("Lazy install")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_nowait()
|
||||
:with_desc("package: Install"),
|
||||
["n|<leader>pl"] = map_cr("Lazy log"):with_silent():with_noremap():with_nowait():with_desc("package: Log"),
|
||||
["n|<leader>pc"] = map_cr("Lazy check"):with_silent():with_noremap():with_nowait():with_desc("package: Check"),
|
||||
["n|<leader>pd"] = map_cr("Lazy debug"):with_silent():with_noremap():with_nowait():with_desc("package: Debug"),
|
||||
["n|<leader>pp"] = map_cr("Lazy profile")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_nowait()
|
||||
:with_desc("package: Profile"),
|
||||
["n|<leader>pr"] = map_cr("Lazy restore")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_nowait()
|
||||
:with_desc("package: Restore"),
|
||||
["n|<leader>px"] = map_cr("Lazy clean"):with_silent():with_noremap():with_nowait():with_desc("package: Clean"),
|
||||
},
|
||||
}
|
||||
|
||||
bind.nvim_load_mapping(plug_map)
|
||||
bind.nvim_load_mapping(mappings.core)
|
||||
|
||||
-- Plugin keymaps
|
||||
-- Builtin & Plugin keymaps
|
||||
require("keymap.completion")
|
||||
require("keymap.editor")
|
||||
require("keymap.lang")
|
||||
@@ -29,7 +44,7 @@ require("keymap.tool")
|
||||
require("keymap.ui")
|
||||
|
||||
-- User keymaps
|
||||
local ok, mappings = pcall(require, "user.keymap.init")
|
||||
local ok, def = pcall(require, "user.keymap.init")
|
||||
if ok then
|
||||
require("modules.utils.keymap").replace(mappings)
|
||||
require("modules.utils.keymap").replace(def)
|
||||
end
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
local bind = require("keymap.bind")
|
||||
local map_cr = bind.map_cr
|
||||
-- local map_cu = bind.map_cu
|
||||
-- local map_cmd = bind.map_cmd
|
||||
-- local map_callback = bind.map_callback
|
||||
|
||||
local plug_map = {
|
||||
-- Plugin render-markdown.nvim
|
||||
["n|<F1>"] = map_cr("RenderMarkdown toggle")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: toggle markdown preview within nvim"),
|
||||
-- Plugin MarkdownPreview
|
||||
["n|<F12>"] = map_cr("MarkdownPreviewToggle"):with_noremap():with_silent():with_desc("tool: Preview markdown"),
|
||||
local mappings = {
|
||||
plugins = {
|
||||
-- Plugin: render-markdown.nvim
|
||||
["n|<F1>"] = map_cr("RenderMarkdown toggle")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: toggle markdown preview within nvim"),
|
||||
-- Plugin: MarkdownPreview
|
||||
["n|<F12>"] = map_cr("MarkdownPreviewToggle"):with_noremap():with_silent():with_desc("tool: Preview markdown"),
|
||||
},
|
||||
}
|
||||
|
||||
bind.nvim_load_mapping(plug_map)
|
||||
bind.nvim_load_mapping(mappings.plugins)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
local vim_path = require("core.global").vim_path
|
||||
local bind = require("keymap.bind")
|
||||
local map_cr = bind.map_cr
|
||||
local map_cu = bind.map_cu
|
||||
@@ -5,187 +6,211 @@ local map_cmd = bind.map_cmd
|
||||
local map_callback = bind.map_callback
|
||||
require("keymap.helpers")
|
||||
|
||||
local plug_map = {
|
||||
-- Plugin: vim-fugitive
|
||||
["n|gps"] = map_cr("G push"):with_noremap():with_silent():with_desc("git: Push"),
|
||||
["n|gpl"] = map_cr("G pull"):with_noremap():with_silent():with_desc("git: Pull"),
|
||||
["n|<leader>gG"] = map_cu("Git"):with_noremap():with_silent():with_desc("git: Open git-fugitive"),
|
||||
local mappings = {
|
||||
plugins = {
|
||||
-- Plugin: edgy
|
||||
["n|<C-n>"] = map_callback(function()
|
||||
require("edgy").toggle("left")
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("filetree: Toggle"),
|
||||
|
||||
-- Plugin: nvim-tree
|
||||
["n|<C-n>"] = map_cr("NvimTreeToggle"):with_noremap():with_silent():with_desc("filetree: Toggle"),
|
||||
["n|<leader>nf"] = map_cr("NvimTreeFindFile"):with_noremap():with_silent():with_desc("filetree: Find file"),
|
||||
["n|<leader>nr"] = map_cr("NvimTreeRefresh"):with_noremap():with_silent():with_desc("filetree: Refresh"),
|
||||
-- Plugin: vim-fugitive
|
||||
["n|gps"] = map_cr("G push"):with_noremap():with_silent():with_desc("git: Push"),
|
||||
["n|gpl"] = map_cr("G pull"):with_noremap():with_silent():with_desc("git: Pull"),
|
||||
["n|<leader>gG"] = map_cu("Git"):with_noremap():with_silent():with_desc("git: Open git-fugitive"),
|
||||
|
||||
-- Plugin: sniprun
|
||||
["v|<leader>r"] = map_cr("SnipRun"):with_noremap():with_silent():with_desc("tool: Run code by range"),
|
||||
["n|<leader>r"] = map_cu([[%SnipRun]]):with_noremap():with_silent():with_desc("tool: Run code by file"),
|
||||
-- Plugin: nvim-tree
|
||||
["n|<leader>nf"] = map_cr("NvimTreeFindFile"):with_noremap():with_silent():with_desc("filetree: Find file"),
|
||||
["n|<leader>nr"] = map_cr("NvimTreeRefresh"):with_noremap():with_silent():with_desc("filetree: Refresh"),
|
||||
|
||||
-- Plugin: toggleterm
|
||||
["t|<Esc><Esc>"] = map_cmd([[<C-\><C-n>]]):with_noremap():with_silent(), -- switch to normal mode in terminal.
|
||||
["n|<C-\\>"] = map_cr("ToggleTerm direction=horizontal")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle horizontal"),
|
||||
["i|<C-\\>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=horizontal<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle horizontal"),
|
||||
["t|<C-\\>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle horizontal"),
|
||||
["n|<A-\\>"] = map_cr("ToggleTerm direction=vertical")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["i|<A-\\>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=vertical<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["t|<A-\\>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle vertical"),
|
||||
["n|<F5>"] = map_cr("ToggleTerm direction=vertical")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["i|<F5>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=vertical<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["t|<F5>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle vertical"),
|
||||
["n|<A-d>"] = map_cr("ToggleTerm direction=float"):with_noremap():with_silent():with_desc("terminal: Toggle float"),
|
||||
["i|<A-d>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=float<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle float"),
|
||||
["t|<A-d>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle float"),
|
||||
["n|<leader>gg"] = map_callback(function()
|
||||
_toggle_lazygit()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("git: Toggle lazygit"),
|
||||
-- Plugin: sniprun
|
||||
["v|<leader>r"] = map_cr("SnipRun"):with_noremap():with_silent():with_desc("tool: Run code by range"),
|
||||
["n|<leader>r"] = map_cu([[%SnipRun]]):with_noremap():with_silent():with_desc("tool: Run code by file"),
|
||||
|
||||
-- Plugin: trouble
|
||||
["n|gt"] = map_cr("Trouble diagnostics toggle"):with_noremap():with_silent():with_desc("lsp: Toggle trouble list"),
|
||||
["n|<leader>lw"] = map_cr("Trouble diagnostics toggle")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Show workspace diagnostics"),
|
||||
["n|<leader>lp"] = map_cr("Trouble project_diagnostics toggle")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Show project diagnostics"),
|
||||
["n|<leader>ld"] = map_cr("Trouble diagnostics toggle filter.buf=0")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Show document diagnostics"),
|
||||
-- Plugin: toggleterm
|
||||
["t|<Esc><Esc>"] = map_cmd([[<C-\><C-n>]]):with_noremap():with_silent(), -- switch to normal mode in terminal.
|
||||
["n|<C-\\>"] = map_cr("ToggleTerm direction=horizontal")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle horizontal"),
|
||||
["i|<C-\\>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=horizontal<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle horizontal"),
|
||||
["t|<C-\\>"] = map_cmd("<Cmd>ToggleTerm<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle horizontal"),
|
||||
["n|<A-\\>"] = map_cr("ToggleTerm direction=vertical")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["i|<A-\\>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=vertical<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["t|<A-\\>"] = map_cmd("<Cmd>ToggleTerm<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["n|<F5>"] = map_cr("ToggleTerm direction=vertical")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["i|<F5>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=vertical<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle vertical"),
|
||||
["t|<F5>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle vertical"),
|
||||
["n|<A-d>"] = map_cr("ToggleTerm direction=float")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle float"),
|
||||
["i|<A-d>"] = map_cmd("<Esc><Cmd>ToggleTerm direction=float<CR>")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("terminal: Toggle float"),
|
||||
["t|<A-d>"] = map_cmd("<Cmd>ToggleTerm<CR>"):with_noremap():with_silent():with_desc("terminal: Toggle float"),
|
||||
["n|<leader>gg"] = map_callback(function()
|
||||
_toggle_lazygit()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("git: Toggle lazygit"),
|
||||
|
||||
-- Plugin: telescope
|
||||
["n|<C-p>"] = map_callback(function()
|
||||
_command_panel()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Toggle command panel"),
|
||||
["n|<leader>fc"] = map_callback(function()
|
||||
_telescope_collections(require("telescope.themes").get_dropdown())
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Open Telescope collections"),
|
||||
["n|<leader>ff"] = map_callback(function()
|
||||
require("search").open({ collection = "file" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Find files"),
|
||||
["n|<leader>fp"] = map_callback(function()
|
||||
require("search").open({ collection = "pattern" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Find patterns"),
|
||||
["v|<leader>fs"] = map_cu("Telescope grep_string")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Find word under cursor"),
|
||||
["n|<leader>fg"] = map_callback(function()
|
||||
require("search").open({ collection = "git" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Locate Git objects"),
|
||||
["n|<leader>fd"] = map_callback(function()
|
||||
require("search").open({ collection = "dossier" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Retrieve dossiers"),
|
||||
["n|<leader>fm"] = map_callback(function()
|
||||
require("search").open({ collection = "misc" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Miscellaneous"),
|
||||
-- Plugin: trouble
|
||||
["n|gt"] = map_cr("Trouble diagnostics toggle")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Toggle trouble list"),
|
||||
["n|<leader>lw"] = map_cr("Trouble diagnostics toggle")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Show workspace diagnostics"),
|
||||
["n|<leader>lp"] = map_cr("Trouble project_diagnostics toggle")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Show project diagnostics"),
|
||||
["n|<leader>ld"] = map_cr("Trouble diagnostics toggle filter.buf=0")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("lsp: Show document diagnostics"),
|
||||
|
||||
-- Plugin: dap
|
||||
["n|<F6>"] = map_callback(function()
|
||||
require("dap").continue()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Run/Continue"),
|
||||
["n|<F7>"] = map_callback(function()
|
||||
require("dap").terminate()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Stop"),
|
||||
["n|<F8>"] = map_callback(function()
|
||||
require("dap").toggle_breakpoint()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Toggle breakpoint"),
|
||||
["n|<F9>"] = map_callback(function()
|
||||
require("dap").step_into()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Step into"),
|
||||
["n|<F10>"] = map_callback(function()
|
||||
require("dap").step_out()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Step out"),
|
||||
["n|<F11>"] = map_callback(function()
|
||||
require("dap").step_over()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Step over"),
|
||||
["n|<leader>db"] = map_callback(function()
|
||||
require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Set breakpoint with condition"),
|
||||
["n|<leader>dc"] = map_callback(function()
|
||||
require("dap").run_to_cursor()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Run to cursor"),
|
||||
["n|<leader>dl"] = map_callback(function()
|
||||
require("dap").run_last()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Run last"),
|
||||
["n|<leader>do"] = map_callback(function()
|
||||
require("dap").repl.open()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Open REPL"),
|
||||
-- Plugin: telescope
|
||||
["n|<C-p>"] = map_callback(function()
|
||||
_command_panel()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Toggle command panel"),
|
||||
["n|<leader>fc"] = map_callback(function()
|
||||
_telescope_collections(require("telescope.themes").get_dropdown())
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Open Telescope collections"),
|
||||
["n|<leader>ff"] = map_callback(function()
|
||||
require("search").open({ collection = "file" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Find files"),
|
||||
["n|<leader>fp"] = map_callback(function()
|
||||
require("search").open({ collection = "pattern" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Find patterns"),
|
||||
["v|<leader>fs"] = map_callback(function()
|
||||
local opts = vim.fn.getcwd() == vim_path and { additional_args = { "--no-ignore" } } or {}
|
||||
require("telescope-live-grep-args.shortcuts").grep_visual_selection(opts)
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Find word under cursor"),
|
||||
["n|<leader>fg"] = map_callback(function()
|
||||
require("search").open({ collection = "git" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Locate Git objects"),
|
||||
["n|<leader>fd"] = map_callback(function()
|
||||
require("search").open({ collection = "dossier" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Retrieve dossiers"),
|
||||
["n|<leader>fm"] = map_callback(function()
|
||||
require("search").open({ collection = "misc" })
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("tool: Miscellaneous"),
|
||||
|
||||
-- Plugin: dap
|
||||
["n|<F6>"] = map_callback(function()
|
||||
require("dap").continue()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Run/Continue"),
|
||||
["n|<F7>"] = map_callback(function()
|
||||
require("dap").terminate()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Stop"),
|
||||
["n|<F8>"] = map_callback(function()
|
||||
require("dap").toggle_breakpoint()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Toggle breakpoint"),
|
||||
["n|<F9>"] = map_callback(function()
|
||||
require("dap").step_into()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Step into"),
|
||||
["n|<F10>"] = map_callback(function()
|
||||
require("dap").step_out()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Step out"),
|
||||
["n|<F11>"] = map_callback(function()
|
||||
require("dap").step_over()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Step over"),
|
||||
["n|<leader>db"] = map_callback(function()
|
||||
require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Set breakpoint with condition"),
|
||||
["n|<leader>dc"] = map_callback(function()
|
||||
require("dap").run_to_cursor()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Run to cursor"),
|
||||
["n|<leader>dl"] = map_callback(function()
|
||||
require("dap").run_last()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Run last"),
|
||||
["n|<leader>do"] = map_callback(function()
|
||||
require("dap").repl.open()
|
||||
end)
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("debug: Open REPL"),
|
||||
},
|
||||
}
|
||||
|
||||
bind.nvim_load_mapping(plug_map)
|
||||
bind.nvim_load_mapping(mappings.plugins)
|
||||
|
||||
@@ -1,105 +1,171 @@
|
||||
local bind = require("keymap.bind")
|
||||
local map_cr = bind.map_cr
|
||||
-- local map_cu = bind.map_cu
|
||||
-- local map_cmd = bind.map_cmd
|
||||
-- local map_callback = bind.map_callback
|
||||
local map_cu = bind.map_cu
|
||||
local map_cmd = bind.map_cmd
|
||||
local map_callback = bind.map_callback
|
||||
|
||||
local plug_map = {
|
||||
-- Plugin: bufferline.nvim
|
||||
["n|<A-i>"] = map_cr("BufferLineCycleNext"):with_noremap():with_silent():with_desc("buffer: Switch to next"),
|
||||
["n|<A-o>"] = map_cr("BufferLineCyclePrev"):with_noremap():with_silent():with_desc("buffer: Switch to prev"),
|
||||
["n|<A-S-i>"] = map_cr("BufferLineMoveNext"):with_noremap():with_silent():with_desc("buffer: Move current to next"),
|
||||
["n|<A-S-o>"] = map_cr("BufferLineMovePrev"):with_noremap():with_silent():with_desc("buffer: Move current to prev"),
|
||||
["n|<leader>be"] = map_cr("BufferLineSortByExtension"):with_noremap():with_desc("buffer: Sort by extension"),
|
||||
["n|<leader>bd"] = map_cr("BufferLineSortByDirectory"):with_noremap():with_desc("buffer: Sort by directory"),
|
||||
["n|<A-1>"] = map_cr("BufferLineGoToBuffer 1"):with_noremap():with_silent():with_desc("buffer: Goto buffer 1"),
|
||||
["n|<A-2>"] = map_cr("BufferLineGoToBuffer 2"):with_noremap():with_silent():with_desc("buffer: Goto buffer 2"),
|
||||
["n|<A-3>"] = map_cr("BufferLineGoToBuffer 3"):with_noremap():with_silent():with_desc("buffer: Goto buffer 3"),
|
||||
["n|<A-4>"] = map_cr("BufferLineGoToBuffer 4"):with_noremap():with_silent():with_desc("buffer: Goto buffer 4"),
|
||||
["n|<A-5>"] = map_cr("BufferLineGoToBuffer 5"):with_noremap():with_silent():with_desc("buffer: Goto buffer 5"),
|
||||
["n|<A-6>"] = map_cr("BufferLineGoToBuffer 6"):with_noremap():with_silent():with_desc("buffer: Goto buffer 6"),
|
||||
["n|<A-7>"] = map_cr("BufferLineGoToBuffer 7"):with_noremap():with_silent():with_desc("buffer: Goto buffer 7"),
|
||||
["n|<A-8>"] = map_cr("BufferLineGoToBuffer 8"):with_noremap():with_silent():with_desc("buffer: Goto buffer 8"),
|
||||
["n|<A-9>"] = map_cr("BufferLineGoToBuffer 9"):with_noremap():with_silent():with_desc("buffer: Goto buffer 9"),
|
||||
local mappings = {
|
||||
builtins = {
|
||||
-- Builtins: Buffer
|
||||
["n|<leader>bn"] = map_cu("enew"):with_noremap():with_silent():with_desc("buffer: New"),
|
||||
|
||||
-- Builtins: Terminal
|
||||
["t|<C-w>h"] = map_cmd("<Cmd>wincmd h<CR>"):with_silent():with_noremap():with_desc("window: Focus left"),
|
||||
["t|<C-w>l"] = map_cmd("<Cmd>wincmd l<CR>"):with_silent():with_noremap():with_desc("window: Focus right"),
|
||||
["t|<C-w>j"] = map_cmd("<Cmd>wincmd j<CR>"):with_silent():with_noremap():with_desc("window: Focus down"),
|
||||
["t|<C-w>k"] = map_cmd("<Cmd>wincmd k<CR>"):with_silent():with_noremap():with_desc("window: Focus up"),
|
||||
|
||||
-- Builtins: Tabpage
|
||||
["n|tn"] = map_cr("tabnew"):with_noremap():with_silent():with_desc("tab: Create a new tab"),
|
||||
["n|tk"] = map_cr("tabnext"):with_noremap():with_silent():with_desc("tab: Move to next tab"),
|
||||
["n|tj"] = map_cr("tabprevious"):with_noremap():with_silent():with_desc("tab: Move to previous tab"),
|
||||
["n|to"] = map_cr("tabonly"):with_noremap():with_silent():with_desc("tab: Only keep current tab"),
|
||||
},
|
||||
plugins = {
|
||||
-- Plugin: nvim-bufdel
|
||||
["n|<A-q>"] = map_cr("BufDel"):with_noremap():with_silent():with_desc("buffer: Close current"),
|
||||
|
||||
-- Plugin: bufferline.nvim
|
||||
["n|<A-i>"] = map_cr("BufferLineCycleNext"):with_noremap():with_silent():with_desc("buffer: Switch to next"),
|
||||
["n|<A-o>"] = map_cr("BufferLineCyclePrev"):with_noremap():with_silent():with_desc("buffer: Switch to prev"),
|
||||
["n|<A-S-i>"] = map_cr("BufferLineMoveNext")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("buffer: Move current to next"),
|
||||
["n|<A-S-o>"] = map_cr("BufferLineMovePrev")
|
||||
:with_noremap()
|
||||
:with_silent()
|
||||
:with_desc("buffer: Move current to prev"),
|
||||
["n|<leader>be"] = map_cr("BufferLineSortByExtension"):with_noremap():with_desc("buffer: Sort by extension"),
|
||||
["n|<leader>bd"] = map_cr("BufferLineSortByDirectory"):with_noremap():with_desc("buffer: Sort by directory"),
|
||||
["n|<A-1>"] = map_cr("BufferLineGoToBuffer 1"):with_noremap():with_silent():with_desc("buffer: Goto buffer 1"),
|
||||
["n|<A-2>"] = map_cr("BufferLineGoToBuffer 2"):with_noremap():with_silent():with_desc("buffer: Goto buffer 2"),
|
||||
["n|<A-3>"] = map_cr("BufferLineGoToBuffer 3"):with_noremap():with_silent():with_desc("buffer: Goto buffer 3"),
|
||||
["n|<A-4>"] = map_cr("BufferLineGoToBuffer 4"):with_noremap():with_silent():with_desc("buffer: Goto buffer 4"),
|
||||
["n|<A-5>"] = map_cr("BufferLineGoToBuffer 5"):with_noremap():with_silent():with_desc("buffer: Goto buffer 5"),
|
||||
["n|<A-6>"] = map_cr("BufferLineGoToBuffer 6"):with_noremap():with_silent():with_desc("buffer: Goto buffer 6"),
|
||||
["n|<A-7>"] = map_cr("BufferLineGoToBuffer 7"):with_noremap():with_silent():with_desc("buffer: Goto buffer 7"),
|
||||
["n|<A-8>"] = map_cr("BufferLineGoToBuffer 8"):with_noremap():with_silent():with_desc("buffer: Goto buffer 8"),
|
||||
["n|<A-9>"] = map_cr("BufferLineGoToBuffer 9"):with_noremap():with_silent():with_desc("buffer: Goto buffer 9"),
|
||||
|
||||
-- Plugin: smart-splits.nvim
|
||||
["n|<A-h>"] = map_cu("SmartResizeLeft")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("window: Resize -3 horizontally"),
|
||||
["n|<A-j>"] = map_cu("SmartResizeDown"):with_silent():with_noremap():with_desc("window: Resize -3 vertically"),
|
||||
["n|<A-k>"] = map_cu("SmartResizeUp"):with_silent():with_noremap():with_desc("window: Resize +3 vertically"),
|
||||
["n|<A-l>"] = map_cu("SmartResizeRight")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("window: Resize +3 horizontally"),
|
||||
["n|<C-h>"] = map_cu("SmartCursorMoveLeft"):with_silent():with_noremap():with_desc("window: Focus left"),
|
||||
["n|<C-j>"] = map_cu("SmartCursorMoveDown"):with_silent():with_noremap():with_desc("window: Focus down"),
|
||||
["n|<C-k>"] = map_cu("SmartCursorMoveUp"):with_silent():with_noremap():with_desc("window: Focus up"),
|
||||
["n|<C-l>"] = map_cu("SmartCursorMoveRight"):with_silent():with_noremap():with_desc("window: Focus right"),
|
||||
["n|<leader>Wh"] = map_cu("SmartSwapLeft")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("window: Move window leftward"),
|
||||
["n|<leader>Wj"] = map_cu("SmartSwapDown")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("window: Move window downward"),
|
||||
["n|<leader>Wk"] = map_cu("SmartSwapUp"):with_silent():with_noremap():with_desc("window: Move window upward"),
|
||||
["n|<leader>Wl"] = map_cu("SmartSwapRight")
|
||||
:with_silent()
|
||||
:with_noremap()
|
||||
:with_desc("window: Move window rightward"),
|
||||
},
|
||||
}
|
||||
|
||||
bind.nvim_load_mapping(plug_map)
|
||||
bind.nvim_load_mapping(mappings.builtins)
|
||||
bind.nvim_load_mapping(mappings.plugins)
|
||||
|
||||
local mapping = {}
|
||||
--- The following code enables this file to be exported ---
|
||||
--- for use with gitsigns lazy-loaded keymap bindings ---
|
||||
|
||||
function mapping.gitsigns(buf)
|
||||
local actions = require("gitsigns.actions")
|
||||
local M = {}
|
||||
|
||||
function M.gitsigns(bufnr)
|
||||
local gitsigns = require("gitsigns")
|
||||
local map = {
|
||||
["n|]g"] = bind.map_callback(function()
|
||||
if vim.wo.diff then
|
||||
return "]g"
|
||||
end
|
||||
vim.schedule(function()
|
||||
actions.next_hunk()
|
||||
["n|]g"] = map_callback(function()
|
||||
if vim.wo.diff then
|
||||
return "]g"
|
||||
end
|
||||
vim.schedule(function()
|
||||
gitsigns.nav_hunk("next")
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_expr()
|
||||
:with_desc("git: Goto next hunk"),
|
||||
["n|[g"] = bind.map_callback(function()
|
||||
if vim.wo.diff then
|
||||
return "[g"
|
||||
end
|
||||
vim.schedule(function()
|
||||
actions.prev_hunk()
|
||||
["n|[g"] = map_callback(function()
|
||||
if vim.wo.diff then
|
||||
return "[g"
|
||||
end
|
||||
vim.schedule(function()
|
||||
gitsigns.nav_hunk("prev")
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_expr()
|
||||
:with_desc("git: Goto prev hunk"),
|
||||
["n|<leader>gs"] = bind.map_callback(function()
|
||||
actions.stage_hunk()
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
:with_desc("git: Stage hunk"),
|
||||
["v|<leader>gs"] = bind.map_callback(function()
|
||||
actions.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
:with_desc("git: Stage hunk"),
|
||||
["n|<leader>gu"] = bind.map_callback(function()
|
||||
actions.undo_stage_hunk()
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
:with_desc("git: Undo stage hunk"),
|
||||
["n|<leader>gr"] = bind.map_callback(function()
|
||||
actions.reset_hunk()
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
["n|<leader>gs"] = map_callback(function()
|
||||
gitsigns.stage_hunk()
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_desc("git: Toggle staging/unstaging of hunk"),
|
||||
["v|<leader>gs"] = map_callback(function()
|
||||
gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_desc("git: Toggle staging/unstaging of selected hunk"),
|
||||
["n|<leader>gr"] = map_callback(function()
|
||||
gitsigns.reset_hunk()
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_desc("git: Reset hunk"),
|
||||
["v|<leader>gr"] = bind.map_callback(function()
|
||||
actions.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
["v|<leader>gr"] = map_callback(function()
|
||||
gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_desc("git: Reset hunk"),
|
||||
["n|<leader>gR"] = bind.map_callback(function()
|
||||
actions.reset_buffer()
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
["n|<leader>gR"] = map_callback(function()
|
||||
gitsigns.reset_buffer()
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_desc("git: Reset buffer"),
|
||||
["n|<leader>gp"] = bind.map_callback(function()
|
||||
actions.preview_hunk()
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
["n|<leader>gp"] = map_callback(function()
|
||||
gitsigns.preview_hunk()
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_desc("git: Preview hunk"),
|
||||
["n|<leader>gb"] = bind.map_callback(function()
|
||||
actions.blame_line({ full = true })
|
||||
end)
|
||||
:with_buffer(buf)
|
||||
["n|<leader>gb"] = map_callback(function()
|
||||
gitsigns.blame_line({ full = true })
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap()
|
||||
:with_desc("git: Blame line"),
|
||||
-- Text objects
|
||||
["ox|ih"] = bind.map_callback(function()
|
||||
actions.text_object()
|
||||
end):with_buffer(buf),
|
||||
["ox|ih"] = map_callback(function()
|
||||
gitsigns.select_hunk()
|
||||
end)
|
||||
:with_buffer(bufnr)
|
||||
:with_noremap(),
|
||||
}
|
||||
bind.nvim_load_mapping(map)
|
||||
end
|
||||
|
||||
return mapping
|
||||
return M
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
return function()
|
||||
require("modules.utils").load_plugin("aerial", {
|
||||
lazy_load = false,
|
||||
close_on_select = true,
|
||||
highlight_on_jump = false,
|
||||
disable_max_lines = 8500,
|
||||
disable_max_size = 1000000,
|
||||
ignore = { filetypes = { "NvimTree", "terminal", "nofile" } },
|
||||
-- Use symbol tree for folding. Set to true or false to enable/disable
|
||||
-- Set to "auto" to manage folds if your previous foldmethod was 'manual'
|
||||
-- This can be a filetype map (see :help aerial-filetype-map)
|
||||
manage_folds = "auto",
|
||||
layout = {
|
||||
-- Determines the default direction to open the aerial window. The 'prefer'
|
||||
-- options will open the window in the other direction *if* there is a
|
||||
-- different buffer in the way of the preferred direction
|
||||
-- Enum: prefer_right, prefer_left, right, left, float
|
||||
default_direction = "prefer_right",
|
||||
},
|
||||
-- Keymaps in aerial window. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", nowait = true })
|
||||
-- Additionally, if it is a string that matches "actions.<name>",
|
||||
-- it will use the mapping at require("aerial.actions").<name>
|
||||
-- Set to `false` to remove a keymap
|
||||
keymaps = {
|
||||
["?"] = "actions.show_help",
|
||||
["g?"] = "actions.show_help",
|
||||
["<CR>"] = "actions.jump",
|
||||
["<2-LeftMouse>"] = "actions.jump",
|
||||
["<C-v>"] = "actions.jump_vsplit",
|
||||
["<C-s>"] = "actions.jump_split",
|
||||
["<C-d>"] = "actions.down_and_scroll",
|
||||
["<C-u>"] = "actions.up_and_scroll",
|
||||
["{"] = "actions.prev",
|
||||
["}"] = "actions.next",
|
||||
["[["] = "actions.prev_up",
|
||||
["]]"] = "actions.next_up",
|
||||
["q"] = "actions.close",
|
||||
["o"] = "actions.tree_toggle",
|
||||
["O"] = "actions.tree_toggle_recursive",
|
||||
["zr"] = "actions.tree_increase_fold_level",
|
||||
["zR"] = "actions.tree_open_all",
|
||||
["zm"] = "actions.tree_decrease_fold_level",
|
||||
["zM"] = "actions.tree_close_all",
|
||||
["zx"] = "actions.tree_sync_folds",
|
||||
["zX"] = "actions.tree_sync_folds",
|
||||
},
|
||||
-- A list of all symbols to display. Set to false to display all symbols.
|
||||
-- This can be a filetype map (see :help aerial-filetype-map)
|
||||
-- To see all available values, see :help SymbolKind
|
||||
filter_kind = {
|
||||
"Array",
|
||||
"Boolean",
|
||||
"Class",
|
||||
"Constant",
|
||||
"Constructor",
|
||||
"Enum",
|
||||
"EnumMember",
|
||||
"Event",
|
||||
"Field",
|
||||
"File",
|
||||
"Function",
|
||||
"Interface",
|
||||
"Key",
|
||||
"Method",
|
||||
"Module",
|
||||
"Namespace",
|
||||
"Null",
|
||||
-- "Number",
|
||||
"Object",
|
||||
"Operator",
|
||||
"Package",
|
||||
-- "Property",
|
||||
-- "String",
|
||||
"Struct",
|
||||
-- "TypeParameter",
|
||||
-- "Variable",
|
||||
},
|
||||
})
|
||||
end
|
||||
@@ -8,6 +8,13 @@ local format_modifications_only = settings.format_modifications_only
|
||||
local server_formatting_block_list = settings.server_formatting_block_list
|
||||
local format_timeout = settings.format_timeout
|
||||
|
||||
vim.api.nvim_create_user_command("Format", function()
|
||||
M.format({
|
||||
timeout = format_timeout,
|
||||
filter = M.format_filter,
|
||||
})
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("FormatToggle", function()
|
||||
M.toggle_format_on_save()
|
||||
end, {})
|
||||
@@ -118,7 +125,7 @@ function M.format(opts)
|
||||
end
|
||||
|
||||
local bufnr = opts.bufnr or vim.api.nvim_get_current_buf()
|
||||
local clients = vim.lsp.get_clients({ buffer = bufnr })
|
||||
local clients = vim.lsp.get_clients({ bufnr = bufnr })
|
||||
|
||||
if opts.filter then
|
||||
clients = opts.filter(clients)
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
return function()
|
||||
local snippet_path = vim.fn.stdpath("config") .. "/snips/"
|
||||
if not vim.tbl_contains(vim.opt.rtp:get(), snippet_path) then
|
||||
vim.opt.rtp:append(snippet_path)
|
||||
end
|
||||
local vim_path = require("core.global").vim_path
|
||||
local snippet_path = vim_path .. "/snips/"
|
||||
local user_snippet_path = vim_path .. "/lua/user/snips/"
|
||||
|
||||
require("modules.utils").load_plugin("luasnip", {
|
||||
history = true,
|
||||
update_events = "TextChanged,TextChangedI",
|
||||
delete_check_events = "TextChanged,InsertLeave",
|
||||
}, false, require("luasnip").config.set_config)
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load({
|
||||
paths = {
|
||||
snippet_path,
|
||||
user_snippet_path,
|
||||
},
|
||||
})
|
||||
require("luasnip.loaders.from_lua").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_snipmate").lazy_load()
|
||||
|
||||
@@ -52,10 +52,12 @@ please REMOVE your LSP configuration (rust_analyzer.lua) from the `servers` dire
|
||||
end
|
||||
|
||||
local ok, custom_handler = pcall(require, "user.configs.lsp-servers." .. lsp_name)
|
||||
local default_ok, default_handler = pcall(require, "completion.servers." .. lsp_name)
|
||||
-- Use preset if there is no user definition
|
||||
if not ok then
|
||||
ok, custom_handler = pcall(require, "completion.servers." .. lsp_name)
|
||||
ok, custom_handler = default_ok, default_handler
|
||||
end
|
||||
|
||||
if not ok then
|
||||
-- Default to use factory config for server(s) that doesn't include a spec
|
||||
nvim_lsp[lsp_name].setup(opts)
|
||||
@@ -66,7 +68,14 @@ please REMOVE your LSP configuration (rust_analyzer.lua) from the `servers` dire
|
||||
--- See `clangd.lua` for example.
|
||||
custom_handler(opts)
|
||||
elseif type(custom_handler) == "table" then
|
||||
nvim_lsp[lsp_name].setup(vim.tbl_deep_extend("force", opts, custom_handler))
|
||||
nvim_lsp[lsp_name].setup(
|
||||
vim.tbl_deep_extend(
|
||||
"force",
|
||||
opts,
|
||||
type(default_handler) == "table" and default_handler or {},
|
||||
custom_handler
|
||||
)
|
||||
)
|
||||
else
|
||||
vim.notify(
|
||||
string.format(
|
||||
|
||||
@@ -83,7 +83,9 @@ M.setup = function()
|
||||
)
|
||||
end,
|
||||
on_stderr = function(_, msg_stream)
|
||||
vim.notify(msg_stream, vim.log.levels.ERROR, { title = "[lsp] Install Failure" })
|
||||
if msg_stream then
|
||||
vim.notify(msg_stream, vim.log.levels.ERROR, { title = "[lsp] Install Failure" })
|
||||
end
|
||||
end,
|
||||
})
|
||||
:start()
|
||||
|
||||
@@ -17,7 +17,7 @@ return function()
|
||||
-- Don't specify any config here if you are using the default one.
|
||||
local sources = {
|
||||
btns.formatting.clang_format.with({
|
||||
filetypes = { "c", "cpp", "objc", "objcpp", "cs", "java", "cuda", "proto" },
|
||||
filetypes = { "c", "cpp", "objc", "objcpp", "cs", "cuda", "proto" },
|
||||
extra_args = formatter_args("clang_format"),
|
||||
}),
|
||||
btns.formatting.prettier.with({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/bashls.lua
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/bashls.lua
|
||||
return {
|
||||
cmd = { "bash-language-server", "start" },
|
||||
filetypes = { "bash", "sh" },
|
||||
|
||||
@@ -33,7 +33,7 @@ local function get_binary_path_list(binaries)
|
||||
return table.concat(path_list, ",")
|
||||
end
|
||||
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/clangd.lua
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/clangd.lua
|
||||
return function(options)
|
||||
require("lspconfig").clangd.setup({
|
||||
on_attach = options.on_attach,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/dartls.lua
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/dartls.lua
|
||||
return {
|
||||
cmd = { "dart", "language-server", "--protocol=lsp" },
|
||||
filetypes = { "dart" },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/gopls.lua
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/gopls.lua
|
||||
return {
|
||||
cmd = { "gopls", "-remote.debug=:0", "-remote=auto" },
|
||||
filetypes = { "go", "gomod", "gosum", "gotmpl", "gohtmltmpl", "gotexttmpl" },
|
||||
@@ -31,11 +31,11 @@ return {
|
||||
gopls = {
|
||||
staticcheck = true,
|
||||
semanticTokens = true,
|
||||
noSemanticString = true,
|
||||
usePlaceholders = true,
|
||||
completeUnimported = true,
|
||||
symbolMatcher = "Fuzzy",
|
||||
buildFlags = { "-tags", "integration" },
|
||||
semanticTokenTypes = { string = false },
|
||||
codelenses = {
|
||||
generate = true,
|
||||
gc_details = true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/jsonls.lua
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/jsonls.lua
|
||||
return {
|
||||
flags = { debounce_text_changes = 500 },
|
||||
settings = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/lua_ls.lua
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/lua_ls.lua
|
||||
return {
|
||||
settings = {
|
||||
Lua = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/pylsp.lua
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/pylsp.lua
|
||||
return {
|
||||
cmd = { "pylsp" },
|
||||
filetypes = { "python" },
|
||||
|
||||
7
dotfiles/nvim/lua/modules/configs/editor/cursorword.lua
Normal file
7
dotfiles/nvim/lua/modules/configs/editor/cursorword.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return function()
|
||||
require("mini.cursorword").setup({
|
||||
-- Delay (in ms) between when cursor moved and when highlighting appeared
|
||||
delay = 200,
|
||||
})
|
||||
require("modules.utils").gen_cursorword_hl()
|
||||
end
|
||||
20
dotfiles/nvim/lua/modules/configs/editor/grug-far.lua
Normal file
20
dotfiles/nvim/lua/modules/configs/editor/grug-far.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return function()
|
||||
vim.g.maplocalleader = ","
|
||||
require("modules.utils").load_plugin("grug-far", {
|
||||
engine = "ripgrep",
|
||||
engines = {
|
||||
ripgrep = {
|
||||
path = "rg",
|
||||
showReplaceDiff = true,
|
||||
placeholders = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
windowCreationCommand = "bot split",
|
||||
disableBufferLineNumbers = false,
|
||||
icons = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
end
|
||||
@@ -1,6 +0,0 @@
|
||||
return function()
|
||||
require("modules.utils").load_plugin("local-highlight", {
|
||||
hlgroup = "IlluminatedWordText",
|
||||
insert_mode = false,
|
||||
})
|
||||
end
|
||||
5
dotfiles/nvim/lua/modules/configs/editor/matchup.lua
Normal file
5
dotfiles/nvim/lua/modules/configs/editor/matchup.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return function()
|
||||
vim.g.matchup_transmute_enabled = 1
|
||||
vim.g.matchup_surround_enabled = 1
|
||||
vim.g.matchup_matchparen_offscreen = { method = "popup" }
|
||||
end
|
||||
@@ -10,7 +10,6 @@ return function()
|
||||
require("modules.utils").load_plugin("crates", {
|
||||
smart_insert = true,
|
||||
insert_closing_quote = true,
|
||||
avoid_prerelease = true,
|
||||
autoload = true,
|
||||
autoupdate = true,
|
||||
autoupdate_throttle = 250,
|
||||
@@ -19,7 +18,6 @@ return function()
|
||||
thousands_separator = ",",
|
||||
notification_title = "Crates",
|
||||
curl_args = { "-sL", "--retry", "1" },
|
||||
disable_invalid_feature_diagnostic = false,
|
||||
text = {
|
||||
loading = " " .. icons.misc.Watch .. "Loading",
|
||||
version = " " .. icons.ui.Check .. "%s",
|
||||
|
||||
@@ -5,20 +5,43 @@ return function()
|
||||
misc = require("modules.utils.icons").get("misc", true),
|
||||
ui = require("modules.utils.icons").get("ui", true),
|
||||
}
|
||||
local utils = require("dropbar.utils")
|
||||
local sources = require("dropbar.sources")
|
||||
-- Custom source to display only the leaf filename in the dropbar
|
||||
sources.symbols = {
|
||||
get_symbols = function(buf, win, cursor)
|
||||
local symbols = sources.path.get_symbols(buf, win, cursor)
|
||||
return { symbols[#symbols] }
|
||||
end,
|
||||
}
|
||||
|
||||
require("modules.utils").load_plugin("dropbar", {
|
||||
bar = {
|
||||
hover = false,
|
||||
truncate = true,
|
||||
pick = { pivots = "etovxqpdygfblzhckisuran" },
|
||||
sources = function(buf)
|
||||
if vim.bo[buf].ft == "markdown" then
|
||||
return {
|
||||
sources.symbols,
|
||||
sources.markdown,
|
||||
}
|
||||
end
|
||||
if vim.bo[buf].buftype == "terminal" then
|
||||
return {
|
||||
sources.terminal,
|
||||
}
|
||||
end
|
||||
return {
|
||||
sources.symbols,
|
||||
utils.source.fallback({
|
||||
sources.lsp,
|
||||
sources.treesitter,
|
||||
}),
|
||||
}
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
path = {
|
||||
relative_to = function()
|
||||
-- Only show the leaf filename in dropbar
|
||||
return vim.fn.expand("%:p:h")
|
||||
end,
|
||||
},
|
||||
terminal = {
|
||||
name = function(buf)
|
||||
local name = vim.api.nvim_buf_get_name(buf)
|
||||
@@ -35,7 +58,6 @@ return function()
|
||||
icons = {
|
||||
enable = true,
|
||||
kinds = {
|
||||
use_devicons = true,
|
||||
symbols = {
|
||||
-- Type
|
||||
Array = icons.type.Array,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
return function()
|
||||
local builtin = require("telescope.builtin")
|
||||
local extensions = require("telescope").extensions
|
||||
local vim_path = require("core.global").vim_path
|
||||
|
||||
require("modules.utils").load_plugin("search", {
|
||||
collections = {
|
||||
@@ -12,7 +13,9 @@ return function()
|
||||
name = "Files",
|
||||
tele_func = function(opts)
|
||||
opts = opts or {}
|
||||
if vim.fn.isdirectory(".git") == 1 then
|
||||
if vim.fn.getcwd() == vim_path then
|
||||
builtin.find_files(vim.tbl_deep_extend("force", opts, { no_ignore = true }))
|
||||
elseif vim.fn.isdirectory(".git") == 1 then
|
||||
builtin.git_files(opts)
|
||||
else
|
||||
builtin.find_files(opts)
|
||||
@@ -46,13 +49,20 @@ return function()
|
||||
{
|
||||
name = "Word in project",
|
||||
tele_func = function()
|
||||
extensions.live_grep_args.live_grep_args()
|
||||
local opts = {}
|
||||
if vim.fn.getcwd() == vim_path then
|
||||
opts["additional_args"] = { "--no-ignore" }
|
||||
end
|
||||
extensions.live_grep_args.live_grep_args(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
name = "Word under cursor",
|
||||
tele_func = function(opts)
|
||||
opts = opts or {}
|
||||
if vim.fn.getcwd() == vim_path then
|
||||
opts["additional_args"] = { "--no-ignore" }
|
||||
end
|
||||
builtin.grep_string(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -44,13 +44,6 @@ return function()
|
||||
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
|
||||
},
|
||||
extensions = {
|
||||
aerial = {
|
||||
show_lines = false,
|
||||
show_nesting = {
|
||||
["_"] = false, -- This key will be the default
|
||||
lua = true, -- You can set the option for specific filetypes
|
||||
},
|
||||
},
|
||||
fzf = {
|
||||
fuzzy = false,
|
||||
override_generic_sorter = true,
|
||||
@@ -97,6 +90,5 @@ return function()
|
||||
require("telescope").load_extension("undo")
|
||||
require("telescope").load_extension("zoxide")
|
||||
require("telescope").load_extension("persisted")
|
||||
require("telescope").load_extension("aerial")
|
||||
require("telescope").load_extension("advanced_git_search")
|
||||
end
|
||||
|
||||
@@ -8,21 +8,11 @@ return function()
|
||||
return vim.o.columns * 0.40
|
||||
end
|
||||
end,
|
||||
on_open = function(term)
|
||||
on_open = function()
|
||||
-- Prevent infinite calls from freezing neovim.
|
||||
-- Only set these options specific to this terminal buffer.
|
||||
vim.api.nvim_set_option_value("foldmethod", "manual", { scope = "local" })
|
||||
vim.api.nvim_set_option_value("foldexpr", "0", { scope = "local" })
|
||||
|
||||
-- Prevent horizontal terminal from obscuring `nvim-tree`.
|
||||
local api = require("nvim-tree.api")
|
||||
local tree = require("nvim-tree.view")
|
||||
if tree.is_visible() and term.direction == "horizontal" then
|
||||
local width = vim.fn.winwidth(tree.get_winnr())
|
||||
api.tree.toggle()
|
||||
tree.View.width = width
|
||||
api.tree.toggle(false, true)
|
||||
end
|
||||
end,
|
||||
highlights = {
|
||||
Normal = {
|
||||
|
||||
@@ -34,8 +34,8 @@ return function()
|
||||
padding = 0,
|
||||
},
|
||||
{
|
||||
filetype = "aerial",
|
||||
text = "Symbol Outline",
|
||||
filetype = "trouble",
|
||||
text = "LSP Outline",
|
||||
text_align = "center",
|
||||
padding = 0,
|
||||
},
|
||||
|
||||
@@ -30,7 +30,23 @@ return function()
|
||||
properties = {},
|
||||
},
|
||||
integrations = {
|
||||
treesitter = true,
|
||||
cmp = true,
|
||||
dap = true,
|
||||
dap_ui = true,
|
||||
diffview = true,
|
||||
dropbar = { enabled = true, color_mode = true },
|
||||
fidget = true,
|
||||
flash = true,
|
||||
fzf = true,
|
||||
gitsigns = true,
|
||||
grug_far = true,
|
||||
hop = true,
|
||||
indent_blankline = { enabled = true, colored_indent_levels = true },
|
||||
lsp_saga = true,
|
||||
lsp_trouble = true,
|
||||
markdown = true,
|
||||
mason = true,
|
||||
mini = { enabled = true, indentscope_color = "" },
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
@@ -46,53 +62,14 @@ return function()
|
||||
information = { "underline" },
|
||||
},
|
||||
},
|
||||
aerial = true,
|
||||
alpha = false,
|
||||
barbar = false,
|
||||
beacon = false,
|
||||
cmp = true,
|
||||
coc_nvim = false,
|
||||
dap = true,
|
||||
dap_ui = true,
|
||||
dashboard = false,
|
||||
dropbar = { enabled = true, color_mode = true },
|
||||
fern = false,
|
||||
fidget = true,
|
||||
flash = true,
|
||||
gitgutter = false,
|
||||
gitsigns = true,
|
||||
harpoon = false,
|
||||
headlines = false,
|
||||
hop = true,
|
||||
illuminate = true,
|
||||
indent_blankline = { enabled = true, colored_indent_levels = false },
|
||||
leap = false,
|
||||
lightspeed = false,
|
||||
lsp_saga = true,
|
||||
lsp_trouble = true,
|
||||
markdown = true,
|
||||
mason = true,
|
||||
mini = false,
|
||||
navic = { enabled = false },
|
||||
neogit = false,
|
||||
neotest = false,
|
||||
neotree = { enabled = false, show_root = true, transparent_panel = false },
|
||||
noice = false,
|
||||
notify = true,
|
||||
nvimtree = true,
|
||||
overseer = false,
|
||||
pounce = false,
|
||||
rainbow_delimiters = true,
|
||||
render_markdown = true,
|
||||
sandwich = false,
|
||||
semantic_tokens = true,
|
||||
symbols_outline = false,
|
||||
telekasten = false,
|
||||
telescope = { enabled = true, style = "nvchad" },
|
||||
treesitter = true,
|
||||
treesitter_context = true,
|
||||
ts_rainbow = false,
|
||||
vim_sneak = false,
|
||||
vimwiki = false,
|
||||
which_key = true,
|
||||
},
|
||||
color_overrides = {},
|
||||
|
||||
76
dotfiles/nvim/lua/modules/configs/ui/edgy.lua
Normal file
76
dotfiles/nvim/lua/modules/configs/ui/edgy.lua
Normal file
@@ -0,0 +1,76 @@
|
||||
return function()
|
||||
local trouble_filter = function(position)
|
||||
return function(_, win)
|
||||
return vim.w[win].trouble
|
||||
and vim.w[win].trouble.position == position
|
||||
and vim.w[win].trouble.type == "split"
|
||||
and vim.w[win].trouble.relative == "editor"
|
||||
and not vim.w[win].trouble_preview
|
||||
end
|
||||
end
|
||||
|
||||
require("modules.utils").load_plugin("edgy", {
|
||||
close_when_all_hidden = true,
|
||||
exit_when_last = true,
|
||||
wo = { winbar = false },
|
||||
keys = {
|
||||
["q"] = false,
|
||||
["Q"] = false,
|
||||
["<C-q>"] = false,
|
||||
["<A-j>"] = function(win)
|
||||
win:resize("height", -2)
|
||||
end,
|
||||
["<A-k>"] = function(win)
|
||||
win:resize("height", 2)
|
||||
end,
|
||||
["<A-h>"] = function(win)
|
||||
win:resize("width", -2)
|
||||
end,
|
||||
["<A-l>"] = function(win)
|
||||
win:resize("width", 2)
|
||||
end,
|
||||
},
|
||||
bottom = {
|
||||
{ ft = "qf", size = { height = 0.3 } },
|
||||
{
|
||||
ft = "toggleterm",
|
||||
size = { height = 0.3 },
|
||||
filter = function(_, win)
|
||||
return vim.w[win].relative == ""
|
||||
end,
|
||||
},
|
||||
{
|
||||
ft = "help",
|
||||
size = { height = 0.3 },
|
||||
filter = function(buf)
|
||||
return vim.bo[buf].buftype == "help"
|
||||
end,
|
||||
},
|
||||
},
|
||||
left = {
|
||||
{
|
||||
ft = "NvimTree",
|
||||
pinned = true,
|
||||
open = "NvimTreeOpen",
|
||||
size = { width = 30 },
|
||||
},
|
||||
},
|
||||
right = {
|
||||
{
|
||||
ft = "trouble",
|
||||
pinned = true,
|
||||
size = { height = 0.6, width = 0.3 },
|
||||
open = "Trouble symbols toggle win.position=right",
|
||||
filter = trouble_filter("right"),
|
||||
},
|
||||
{
|
||||
ft = "trouble",
|
||||
pinned = true,
|
||||
collapsed = true,
|
||||
size = { height = 0.4, width = 0.3 },
|
||||
open = "Trouble lsp toggle win.position=right",
|
||||
filter = trouble_filter("right"),
|
||||
},
|
||||
},
|
||||
}, false, nil, true)
|
||||
end
|
||||
@@ -164,7 +164,7 @@ return function()
|
||||
lsp = {
|
||||
function()
|
||||
local buf_ft = vim.bo.filetype
|
||||
local clients = vim.lsp.get_clients({ buffer = vim.api.nvim_get_current_buf() })
|
||||
local clients = vim.lsp.get_clients({ bufnr = vim.api.nvim_get_current_buf() })
|
||||
local lsp_lists = {}
|
||||
local available_servers = {}
|
||||
if next(clients) == nil then
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
return function()
|
||||
local blend_color = require("modules.utils").gen_neodim_blend_attr()
|
||||
|
||||
require("modules.utils").load_plugin("neodim", {
|
||||
alpha = 0.45,
|
||||
blend_color = blend_color,
|
||||
refresh_delay = 75, -- time in ms to wait after typing before refreshing diagnostics
|
||||
hide = {
|
||||
virtual_text = true,
|
||||
signs = false,
|
||||
underline = false,
|
||||
},
|
||||
priority = 80,
|
||||
disable = {
|
||||
"alpha",
|
||||
"bigfile",
|
||||
"checkhealth",
|
||||
"dap-repl",
|
||||
"diff",
|
||||
"fugitive",
|
||||
"fugitiveblame",
|
||||
"git",
|
||||
"gitcommit",
|
||||
"help",
|
||||
"log",
|
||||
"notify",
|
||||
"NvimTree",
|
||||
"Outline",
|
||||
"qf",
|
||||
"TelescopePrompt",
|
||||
"text",
|
||||
"toggleterm",
|
||||
"undotree",
|
||||
"vimwiki",
|
||||
},
|
||||
})
|
||||
end
|
||||
@@ -21,11 +21,6 @@ completion["nvimdev/lspsaga.nvim"] = {
|
||||
config = require("completion.lspsaga"),
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
}
|
||||
completion["stevearc/aerial.nvim"] = {
|
||||
lazy = true,
|
||||
event = "LspAttach",
|
||||
config = require("completion.aerial"),
|
||||
}
|
||||
completion["DNLHC/glance.nvim"] = {
|
||||
lazy = true,
|
||||
event = "LspAttach",
|
||||
|
||||
@@ -55,17 +55,17 @@ editor["echasnovski/mini.align"] = {
|
||||
event = { "CursorHold", "CursorHoldI" },
|
||||
config = require("editor.align"),
|
||||
}
|
||||
editor["echasnovski/mini.cursorword"] = {
|
||||
lazy = true,
|
||||
event = { "BufReadPost", "BufAdd", "BufNewFile" },
|
||||
config = require("editor.cursorword"),
|
||||
}
|
||||
editor["smoka7/hop.nvim"] = {
|
||||
lazy = true,
|
||||
version = "*",
|
||||
event = { "CursorHold", "CursorHoldI" },
|
||||
config = require("editor.hop"),
|
||||
}
|
||||
editor["tzachar/local-highlight.nvim"] = {
|
||||
lazy = true,
|
||||
event = { "BufReadPost", "BufAdd", "BufNewFile" },
|
||||
config = require("editor.local-highlight"),
|
||||
}
|
||||
editor["brenoprata10/nvim-highlight-colors"] = {
|
||||
lazy = true,
|
||||
event = { "CursorHold", "CursorHoldI" },
|
||||
@@ -84,32 +84,30 @@ editor["tpope/vim-sleuth"] = {
|
||||
lazy = true,
|
||||
event = { "BufNewFile", "BufReadPost", "BufFilePost" },
|
||||
}
|
||||
editor["nvim-pack/nvim-spectre"] = {
|
||||
editor["MagicDuck/grug-far.nvim"] = {
|
||||
lazy = true,
|
||||
cmd = "Spectre",
|
||||
cmd = "GrugFar",
|
||||
config = require("editor.grug-far"),
|
||||
}
|
||||
editor["mrjones2014/smart-splits.nvim"] = {
|
||||
lazy = true,
|
||||
event = { "CursorHoldI", "CursorHold" },
|
||||
config = require("editor.splits"),
|
||||
}
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- :treesitter related plugins --
|
||||
----------------------------------------------------------------------
|
||||
editor["nvim-treesitter/nvim-treesitter"] = {
|
||||
lazy = true,
|
||||
build = function()
|
||||
if vim.fn.has("gui_running") == 1 then
|
||||
if #vim.api.nvim_list_uis() > 0 then
|
||||
vim.api.nvim_command([[TSUpdate]])
|
||||
end
|
||||
end,
|
||||
event = "BufReadPre",
|
||||
config = require("editor.treesitter"),
|
||||
dependencies = {
|
||||
{ "andymass/vim-matchup" },
|
||||
{ "mfussenegger/nvim-treehopper" },
|
||||
{ "nvim-treesitter/nvim-treesitter-textobjects" },
|
||||
{
|
||||
"andymass/vim-matchup",
|
||||
init = require("editor.matchup"),
|
||||
},
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
config = require("editor.autotag"),
|
||||
|
||||
@@ -7,9 +7,14 @@ ui["goolord/alpha-nvim"] = {
|
||||
}
|
||||
ui["akinsho/bufferline.nvim"] = {
|
||||
lazy = true,
|
||||
event = { "BufReadPost", "BufAdd", "BufNewFile" },
|
||||
event = { "BufReadPre", "BufAdd", "BufNewFile" },
|
||||
config = require("ui.bufferline"),
|
||||
}
|
||||
ui["folke/edgy.nvim"] = {
|
||||
lazy = true,
|
||||
event = { "BufReadPre", "BufAdd", "BufNewFile" },
|
||||
config = require("ui.edgy"),
|
||||
}
|
||||
ui["Jint-lzxy/nvim"] = {
|
||||
lazy = false,
|
||||
branch = "refactor/syntax-highlighting",
|
||||
@@ -36,11 +41,6 @@ ui["nvim-lualine/lualine.nvim"] = {
|
||||
event = { "BufReadPost", "BufAdd", "BufNewFile" },
|
||||
config = require("ui.lualine"),
|
||||
}
|
||||
ui["zbirenbaum/neodim"] = {
|
||||
lazy = true,
|
||||
event = "LspAttach",
|
||||
config = require("ui.neodim"),
|
||||
}
|
||||
ui["karb94/neoscroll.nvim"] = {
|
||||
lazy = true,
|
||||
event = { "CursorHold", "CursorHoldI" },
|
||||
@@ -56,6 +56,11 @@ ui["folke/paint.nvim"] = {
|
||||
event = { "CursorHold", "CursorHoldI" },
|
||||
config = require("ui.paint"),
|
||||
}
|
||||
ui["mrjones2014/smart-splits.nvim"] = {
|
||||
lazy = true,
|
||||
event = { "CursorHoldI", "CursorHold" },
|
||||
config = require("ui.splits"),
|
||||
}
|
||||
ui["folke/todo-comments.nvim"] = {
|
||||
lazy = true,
|
||||
event = { "CursorHold", "CursorHoldI" },
|
||||
|
||||
@@ -57,7 +57,7 @@ local function init_palette()
|
||||
end
|
||||
|
||||
if not palette then
|
||||
palette = vim.g.colors_name:find("catppuccin") and require("catppuccin.palettes").get_palette()
|
||||
palette = (vim.g.colors_name or ""):find("catppuccin") and require("catppuccin.palettes").get_palette()
|
||||
or {
|
||||
rosewater = "#DC8A78",
|
||||
flamingo = "#DD7878",
|
||||
@@ -104,7 +104,7 @@ end
|
||||
-- NOTE: If the active colorscheme isn't `catppuccin`, this function won't overwrite existing definitions
|
||||
---Sets a global highlight group.
|
||||
---@param name string @Highlight group name, e.g. "ErrorMsg"
|
||||
---@param foreground string @The foreground color
|
||||
---@param foreground? string @The foreground color
|
||||
---@param background? string @The background color
|
||||
---@param italic? boolean
|
||||
local function set_global_hl(name, foreground, background, italic)
|
||||
@@ -133,6 +133,24 @@ function M.blend(foreground, background, alpha)
|
||||
return string.format("#%02x%02x%02x", blend_channel(1), blend_channel(2), blend_channel(3))
|
||||
end
|
||||
|
||||
---Darken a color by blending it with the background color.
|
||||
---@param hex string @The color in hex to darken
|
||||
---@param amount number @The amount to darken the color
|
||||
---@param bg string @The background color to blend with
|
||||
---@return string @The darkened color as a hex string
|
||||
function M.darken(hex, amount, bg)
|
||||
return M.blend(hex, bg or "#000000", math.abs(amount))
|
||||
end
|
||||
|
||||
---Lighten a color by blending it with the foreground color.
|
||||
---@param hex string @The color in hex to lighten
|
||||
---@param amount number @The amount to lighten the color
|
||||
---@param fg string @The foreground color to blend with
|
||||
---@return string @The lightened color as a hex string
|
||||
function M.lighten(hex, amount, fg)
|
||||
return M.blend(hex, fg or "#FFFFFF", math.abs(amount))
|
||||
end
|
||||
|
||||
---Get RGB highlight by highlight group
|
||||
---@param hl_group string @Highlight group name
|
||||
---@param use_bg boolean @Returns background or not
|
||||
@@ -143,7 +161,10 @@ function M.hl_to_rgb(hl_group, use_bg, fallback_hl)
|
||||
local hlexists = pcall(vim.api.nvim_get_hl, 0, { name = hl_group, link = false })
|
||||
|
||||
if hlexists then
|
||||
local result = vim.api.nvim_get_hl(0, { name = hl_group, link = false })
|
||||
-- FIXME: Investigate why hl-StatusLine is undefined in toggleterm and remove this workaround
|
||||
-- (@Jint-lzxy)
|
||||
local link = vim.bo.filetype == "toggleterm"
|
||||
local result = vim.api.nvim_get_hl(0, { name = hl_group, link = link })
|
||||
if use_bg then
|
||||
hex = result.bg and string.format("#%06x", result.bg) or "NONE"
|
||||
else
|
||||
@@ -166,6 +187,7 @@ function M.extend_hl(name, def)
|
||||
local current_def = vim.api.nvim_get_hl(0, { name = name, link = false })
|
||||
local combined_def = vim.tbl_deep_extend("force", current_def, def)
|
||||
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
vim.api.nvim_set_hl(0, name, combined_def)
|
||||
end
|
||||
|
||||
@@ -235,18 +257,13 @@ function M.gen_alpha_hl()
|
||||
set_global_hl("AlphaFooter", colors.yellow)
|
||||
end
|
||||
|
||||
-- Generate blend_color for neodim.
|
||||
function M.gen_neodim_blend_attr()
|
||||
local trans_bg = require("core.settings").transparent_background
|
||||
local appearance = require("core.settings").background
|
||||
-- Generate highlight groups for cursorword. Existing attributes will NOT be overwritten
|
||||
function M.gen_cursorword_hl()
|
||||
local colors = M.get_palette()
|
||||
|
||||
if trans_bg and appearance == "dark" then
|
||||
return "#000000"
|
||||
elseif trans_bg and appearance == "light" then
|
||||
return "#FFFFFF"
|
||||
else
|
||||
return M.hl_to_rgb("Normal", true)
|
||||
end
|
||||
-- Do not highlight `MiniCursorwordCurrent`
|
||||
set_global_hl("MiniCursorword", nil, M.darken(colors.surface1, 0.7, colors.base))
|
||||
set_global_hl("MiniCursorwordCurrent", nil)
|
||||
end
|
||||
|
||||
---Convert number (0/1) to boolean
|
||||
@@ -303,7 +320,8 @@ end
|
||||
---@param opts nil|table @The default config to be merged with
|
||||
---@param vim_plugin? boolean @If this plugin is written in vimscript or not
|
||||
---@param setup_callback? function @Add new callback if the plugin needs unusual setup function
|
||||
function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback)
|
||||
---@param overwrite? boolean @If load user table-type config by overwriting
|
||||
function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback, overwrite)
|
||||
vim_plugin = vim_plugin or false
|
||||
|
||||
-- Get the file name of the default config
|
||||
@@ -336,7 +354,11 @@ function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback)
|
||||
if ok then
|
||||
-- Extend base config if the returned user config is a table
|
||||
if type(user_config) == "table" then
|
||||
opts = tbl_recursive_merge(opts, user_config)
|
||||
if overwrite == true then
|
||||
opts = vim.tbl_deep_extend("force", opts, user_config)
|
||||
else
|
||||
opts = tbl_recursive_merge(opts, user_config)
|
||||
end
|
||||
setup_callback(opts)
|
||||
-- Replace base config if the returned user config is a function
|
||||
elseif type(user_config) == "function" then
|
||||
|
||||
0
dotfiles/nvim/lua/user_template/snips/.gitkeep
Normal file
0
dotfiles/nvim/lua/user_template/snips/.gitkeep
Normal file
598
dotfiles/termusic/config.toml
Normal file
598
dotfiles/termusic/config.toml
Normal file
@@ -0,0 +1,598 @@
|
||||
music_dir = ["/home/wyj/Music"]
|
||||
player_port = 50101
|
||||
player_interface = "::"
|
||||
player_loop_mode = "Random"
|
||||
player_volume = 70
|
||||
player_speed = 10
|
||||
player_gapless = false
|
||||
podcast_simultanious_download = 3
|
||||
podcast_max_retries = 3
|
||||
podcast_dir = "/home/wyj/Music/podcast"
|
||||
player_seek_step = "Auto"
|
||||
player_remember_last_played_position = "Auto"
|
||||
enable_exit_confirmation = true
|
||||
playlist_display_symbol = false
|
||||
playlist_select_random_track_quantity = 20
|
||||
playlist_select_random_album_quantity = 5
|
||||
theme_selected = "Palenight"
|
||||
kill_daemon_when_quit = false
|
||||
player_use_mpris = true
|
||||
player_use_discord = true
|
||||
|
||||
[album_photo_xywh]
|
||||
x_between_1_100 = 100
|
||||
y_between_1_100 = 77
|
||||
width_between_1_100 = 20
|
||||
align = "BottomRight"
|
||||
|
||||
[style_color_symbol]
|
||||
library_foreground = "Foreground"
|
||||
library_background = "Reset"
|
||||
library_border = "Blue"
|
||||
library_highlight = "LightYellow"
|
||||
library_highlight_symbol = "🦄"
|
||||
playlist_foreground = "Foreground"
|
||||
playlist_background = "Reset"
|
||||
playlist_border = "Blue"
|
||||
playlist_highlight = "LightYellow"
|
||||
playlist_highlight_symbol = "🚀"
|
||||
progress_foreground = "LightBlack"
|
||||
progress_background = "Reset"
|
||||
progress_border = "Blue"
|
||||
lyric_foreground = "Foreground"
|
||||
lyric_background = "Reset"
|
||||
lyric_border = "Blue"
|
||||
currently_playing_track_symbol = "►"
|
||||
|
||||
[style_color_symbol.alacritty_theme]
|
||||
path = "/home/wyj/.config/termusic/themes/Palenight.yml"
|
||||
name = "empty name"
|
||||
author = "empty author"
|
||||
background = "#292d3e"
|
||||
foreground = "#959dcb"
|
||||
cursor = "#959dcb"
|
||||
text = "#292d3e"
|
||||
black = "#292d3e"
|
||||
red = "#f07178"
|
||||
green = "#c3e88d"
|
||||
yellow = "#ffcb6b"
|
||||
blue = "#82aaff"
|
||||
magenta = "#c792ea"
|
||||
cyan = "#89ddff"
|
||||
white = "#d0d0d0"
|
||||
light_black = "#434758"
|
||||
light_red = "#ff8b92"
|
||||
light_green = "#ddffa7"
|
||||
light_yellow = "#ffe585"
|
||||
light_blue = "#9cc4ff"
|
||||
light_magenta = "#e1acff"
|
||||
light_cyan = "#a3f7ff"
|
||||
light_white = "#ffffff"
|
||||
|
||||
[keys.global_esc.code]
|
||||
type = "Esc"
|
||||
|
||||
[keys.global_esc.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_quit.code]
|
||||
type = "Char"
|
||||
args = "q"
|
||||
|
||||
[keys.global_quit.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_left.code]
|
||||
type = "Char"
|
||||
args = "h"
|
||||
|
||||
[keys.global_left.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_down.code]
|
||||
type = "Char"
|
||||
args = "j"
|
||||
|
||||
[keys.global_down.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_up.code]
|
||||
type = "Char"
|
||||
args = "k"
|
||||
|
||||
[keys.global_up.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_right.code]
|
||||
type = "Char"
|
||||
args = "l"
|
||||
|
||||
[keys.global_right.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_goto_top.code]
|
||||
type = "Char"
|
||||
args = "g"
|
||||
|
||||
[keys.global_goto_top.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_goto_bottom.code]
|
||||
type = "Char"
|
||||
args = "G"
|
||||
|
||||
[keys.global_goto_bottom.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_player_toggle_pause.code]
|
||||
type = "Char"
|
||||
args = " "
|
||||
|
||||
[keys.global_player_toggle_pause.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_player_next.code]
|
||||
type = "Char"
|
||||
args = "n"
|
||||
|
||||
[keys.global_player_next.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_player_previous.code]
|
||||
type = "Char"
|
||||
args = "N"
|
||||
|
||||
[keys.global_player_previous.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_player_volume_plus_1.code]
|
||||
type = "Char"
|
||||
args = "+"
|
||||
|
||||
[keys.global_player_volume_plus_1.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_player_volume_plus_2.code]
|
||||
type = "Char"
|
||||
args = "="
|
||||
|
||||
[keys.global_player_volume_plus_2.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_player_volume_minus_1.code]
|
||||
type = "Char"
|
||||
args = "_"
|
||||
|
||||
[keys.global_player_volume_minus_1.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_player_volume_minus_2.code]
|
||||
type = "Char"
|
||||
args = "-"
|
||||
|
||||
[keys.global_player_volume_minus_2.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_help.code]
|
||||
type = "Char"
|
||||
args = "h"
|
||||
|
||||
[keys.global_help.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 2
|
||||
|
||||
[keys.global_player_seek_forward.code]
|
||||
type = "Char"
|
||||
args = "f"
|
||||
|
||||
[keys.global_player_seek_forward.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_player_seek_backward.code]
|
||||
type = "Char"
|
||||
args = "b"
|
||||
|
||||
[keys.global_player_seek_backward.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_lyric_adjust_forward.code]
|
||||
type = "Char"
|
||||
args = "F"
|
||||
|
||||
[keys.global_lyric_adjust_forward.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_lyric_adjust_backward.code]
|
||||
type = "Char"
|
||||
args = "B"
|
||||
|
||||
[keys.global_lyric_adjust_backward.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_player_speed_up.code]
|
||||
type = "Char"
|
||||
args = "f"
|
||||
|
||||
[keys.global_player_speed_up.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 2
|
||||
|
||||
[keys.global_player_speed_down.code]
|
||||
type = "Char"
|
||||
args = "b"
|
||||
|
||||
[keys.global_player_speed_down.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 2
|
||||
|
||||
[keys.global_lyric_cycle.code]
|
||||
type = "Char"
|
||||
args = "T"
|
||||
|
||||
[keys.global_lyric_cycle.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_layout_treeview.code]
|
||||
type = "Char"
|
||||
args = "1"
|
||||
|
||||
[keys.global_layout_treeview.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_layout_database.code]
|
||||
type = "Char"
|
||||
args = "2"
|
||||
|
||||
[keys.global_layout_database.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_player_toggle_gapless.code]
|
||||
type = "Char"
|
||||
args = "g"
|
||||
|
||||
[keys.global_player_toggle_gapless.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 2
|
||||
|
||||
[keys.global_config_open.code]
|
||||
type = "Char"
|
||||
args = "C"
|
||||
|
||||
[keys.global_config_open.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.global_save_playlist.code]
|
||||
type = "Char"
|
||||
args = "s"
|
||||
|
||||
[keys.global_save_playlist.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 2
|
||||
|
||||
[keys.global_layout_podcast.code]
|
||||
type = "Char"
|
||||
args = "3"
|
||||
|
||||
[keys.global_layout_podcast.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.global_xywh_move_left.code]
|
||||
type = "Left"
|
||||
|
||||
[keys.global_xywh_move_left.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 3
|
||||
|
||||
[keys.global_xywh_move_right.code]
|
||||
type = "Right"
|
||||
|
||||
[keys.global_xywh_move_right.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 3
|
||||
|
||||
[keys.global_xywh_move_up.code]
|
||||
type = "Up"
|
||||
|
||||
[keys.global_xywh_move_up.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 3
|
||||
|
||||
[keys.global_xywh_move_down.code]
|
||||
type = "Down"
|
||||
|
||||
[keys.global_xywh_move_down.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 3
|
||||
|
||||
[keys.global_xywh_zoom_in.code]
|
||||
type = "PageUp"
|
||||
|
||||
[keys.global_xywh_zoom_in.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 3
|
||||
|
||||
[keys.global_xywh_zoom_out.code]
|
||||
type = "PageDown"
|
||||
|
||||
[keys.global_xywh_zoom_out.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 3
|
||||
|
||||
[keys.global_xywh_hide.code]
|
||||
type = "End"
|
||||
|
||||
[keys.global_xywh_hide.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 3
|
||||
|
||||
[keys.library_load_dir.code]
|
||||
type = "Char"
|
||||
args = "L"
|
||||
|
||||
[keys.library_load_dir.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.library_delete.code]
|
||||
type = "Char"
|
||||
args = "d"
|
||||
|
||||
[keys.library_delete.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_yank.code]
|
||||
type = "Char"
|
||||
args = "y"
|
||||
|
||||
[keys.library_yank.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_paste.code]
|
||||
type = "Char"
|
||||
args = "p"
|
||||
|
||||
[keys.library_paste.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_search.code]
|
||||
type = "Char"
|
||||
args = "/"
|
||||
|
||||
[keys.library_search.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_search_youtube.code]
|
||||
type = "Char"
|
||||
args = "s"
|
||||
|
||||
[keys.library_search_youtube.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_tag_editor_open.code]
|
||||
type = "Char"
|
||||
args = "t"
|
||||
|
||||
[keys.library_tag_editor_open.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_switch_root.code]
|
||||
type = "Char"
|
||||
args = "o"
|
||||
|
||||
[keys.library_switch_root.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_add_root.code]
|
||||
type = "Char"
|
||||
args = "a"
|
||||
|
||||
[keys.library_add_root.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.library_remove_root.code]
|
||||
type = "Char"
|
||||
args = "A"
|
||||
|
||||
[keys.library_remove_root.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.playlist_delete.code]
|
||||
type = "Char"
|
||||
args = "d"
|
||||
|
||||
[keys.playlist_delete.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.playlist_delete_all.code]
|
||||
type = "Char"
|
||||
args = "D"
|
||||
|
||||
[keys.playlist_delete_all.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.playlist_shuffle.code]
|
||||
type = "Char"
|
||||
args = "r"
|
||||
|
||||
[keys.playlist_shuffle.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.playlist_mode_cycle.code]
|
||||
type = "Char"
|
||||
args = "m"
|
||||
|
||||
[keys.playlist_mode_cycle.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.playlist_play_selected.code]
|
||||
type = "Char"
|
||||
args = "l"
|
||||
|
||||
[keys.playlist_play_selected.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.playlist_search.code]
|
||||
type = "Char"
|
||||
args = "/"
|
||||
|
||||
[keys.playlist_search.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.playlist_swap_down.code]
|
||||
type = "Char"
|
||||
args = "J"
|
||||
|
||||
[keys.playlist_swap_down.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.playlist_swap_up.code]
|
||||
type = "Char"
|
||||
args = "K"
|
||||
|
||||
[keys.playlist_swap_up.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.playlist_cmus_lqueue.code]
|
||||
type = "Char"
|
||||
args = "S"
|
||||
|
||||
[keys.playlist_cmus_lqueue.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.playlist_cmus_tqueue.code]
|
||||
type = "Char"
|
||||
args = "s"
|
||||
|
||||
[keys.playlist_cmus_tqueue.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.database_add_all.code]
|
||||
type = "Char"
|
||||
args = "L"
|
||||
|
||||
[keys.database_add_all.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.config_save.code]
|
||||
type = "Char"
|
||||
args = "s"
|
||||
|
||||
[keys.config_save.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 2
|
||||
|
||||
[keys.podcast_mark_played.code]
|
||||
type = "Char"
|
||||
args = "m"
|
||||
|
||||
[keys.podcast_mark_played.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.podcast_mark_all_played.code]
|
||||
type = "Char"
|
||||
args = "M"
|
||||
|
||||
[keys.podcast_mark_all_played.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.podcast_episode_download.code]
|
||||
type = "Char"
|
||||
args = "d"
|
||||
|
||||
[keys.podcast_episode_download.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.podcast_episode_delete_file.code]
|
||||
type = "Char"
|
||||
args = "x"
|
||||
|
||||
[keys.podcast_episode_delete_file.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.podcast_delete_feed.code]
|
||||
type = "Char"
|
||||
args = "d"
|
||||
|
||||
[keys.podcast_delete_feed.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.podcast_delete_all_feeds.code]
|
||||
type = "Char"
|
||||
args = "D"
|
||||
|
||||
[keys.podcast_delete_all_feeds.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
|
||||
[keys.podcast_search_add_feed.code]
|
||||
type = "Char"
|
||||
args = "s"
|
||||
|
||||
[keys.podcast_search_add_feed.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.podcast_refresh_feed.code]
|
||||
type = "Char"
|
||||
args = "r"
|
||||
|
||||
[keys.podcast_refresh_feed.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 0
|
||||
|
||||
[keys.podcast_refresh_all_feeds.code]
|
||||
type = "Char"
|
||||
args = "R"
|
||||
|
||||
[keys.podcast_refresh_all_feeds.modifier]
|
||||
type = "KeyModifiers"
|
||||
bits = 1
|
||||
@@ -13,7 +13,8 @@
|
||||
// General Settings
|
||||
"layer": "top",
|
||||
"output": [
|
||||
"DP-1"
|
||||
"DP-1",
|
||||
"HDMI-A-2"
|
||||
],
|
||||
"margin-top": 0,
|
||||
"margin-bottom": 0,
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
"Alacritty",
|
||||
"kitty-dropterm",
|
||||
"kitty",
|
||||
"alacritty-dropterm"
|
||||
"alacritty-dropterm",
|
||||
"chrome-chatgpt.com__-Default"
|
||||
],
|
||||
"app_ids-mapping": {
|
||||
"firefoxdeveloperedition": "firefox-developer-edition"
|
||||
@@ -57,7 +58,8 @@
|
||||
"(.*) Microsoft Teams": "$1",
|
||||
"(.*) - Google Chrome": "$1",
|
||||
"(.*) - Visual Studio Code": "$1",
|
||||
"(.*) _哔哩哔哩*": "$1"
|
||||
"(.*) _哔哩哔哩*": "$1",
|
||||
"imv - (.*)": "$1"
|
||||
},
|
||||
"separate-outputs": true
|
||||
},
|
||||
|
||||
21
dotfiles/yazi/flavors/catppuccin-mocha.yazi/LICENSE
Normal file
21
dotfiles/yazi/flavors/catppuccin-mocha.yazi/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 yazi-rs
|
||||
|
||||
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.
|
||||
21
dotfiles/yazi/flavors/catppuccin-mocha.yazi/LICENSE-tmtheme
Normal file
21
dotfiles/yazi/flavors/catppuccin-mocha.yazi/LICENSE-tmtheme
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Himanshu
|
||||
|
||||
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.
|
||||
33
dotfiles/yazi/flavors/catppuccin-mocha.yazi/README.md
Normal file
33
dotfiles/yazi/flavors/catppuccin-mocha.yazi/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
<div align="center">
|
||||
<img src="https://github.com/sxyazi/yazi/blob/main/assets/logo.png?raw=true" alt="Yazi logo" width="20%">
|
||||
</div>
|
||||
|
||||
<h3 align="center">
|
||||
Catppuccin Mocha Flavor for <a href="https://github.com/sxyazi/yazi">Yazi</a>
|
||||
</h3>
|
||||
|
||||
## 👀 Preview
|
||||
|
||||
<img src="preview.png" width="600" />
|
||||
|
||||
## 🎨 Installation
|
||||
|
||||
Download and copy this folder as:
|
||||
|
||||
- `~/.config/yazi/flavors/catppuccin-mocha.yazi` on Linux/macOS
|
||||
- `%AppData%\yazi\config\flavors\catppuccin-mocha.yazi` on Windows
|
||||
|
||||
## ⚙️ Usage
|
||||
|
||||
Add these lines to your `theme.toml` configuration file to use it:
|
||||
|
||||
```toml
|
||||
[flavor]
|
||||
use = "catppuccin-mocha"
|
||||
```
|
||||
|
||||
## 📜 License
|
||||
|
||||
The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed.
|
||||
|
||||
Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details.
|
||||
162
dotfiles/yazi/flavors/catppuccin-mocha.yazi/flavor.toml
Normal file
162
dotfiles/yazi/flavors/catppuccin-mocha.yazi/flavor.toml
Normal file
@@ -0,0 +1,162 @@
|
||||
# vim:fileencoding=utf-8:foldmethod=marker
|
||||
|
||||
# : Manager {{{
|
||||
|
||||
[manager]
|
||||
cwd = { fg = "#94e2d5" }
|
||||
|
||||
# Hovered
|
||||
hovered = { reversed = true }
|
||||
preview_hovered = { underline = true }
|
||||
|
||||
# Find
|
||||
find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true }
|
||||
find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true }
|
||||
|
||||
# Marker
|
||||
marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" }
|
||||
marker_cut = { fg = "#f38ba8", bg = "#f38ba8" }
|
||||
marker_marked = { fg = "#94e2d5", bg = "#94e2d5" }
|
||||
marker_selected = { fg = "#f9e2af", bg = "#f9e2af" }
|
||||
|
||||
# Tab
|
||||
tab_active = { reversed = true }
|
||||
tab_inactive = {}
|
||||
tab_width = 1
|
||||
|
||||
# Count
|
||||
count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" }
|
||||
count_cut = { fg = "#1e1e2e", bg = "#f38ba8" }
|
||||
count_selected = { fg = "#1e1e2e", bg = "#f9e2af" }
|
||||
|
||||
# Border
|
||||
border_symbol = "│"
|
||||
border_style = { fg = "#7f849c" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Status {{{
|
||||
|
||||
[status]
|
||||
separator_open = ""
|
||||
separator_close = ""
|
||||
separator_style = { fg = "#45475a", bg = "#45475a" }
|
||||
|
||||
# Mode
|
||||
mode_normal = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
|
||||
mode_select = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true }
|
||||
mode_unset = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true }
|
||||
|
||||
# Progress
|
||||
progress_label = { fg = "#ffffff", bold = true }
|
||||
progress_normal = { fg = "#89b4fa", bg = "#45475a" }
|
||||
progress_error = { fg = "#f38ba8", bg = "#45475a" }
|
||||
|
||||
# Permissions
|
||||
permissions_t = { fg = "#89b4fa" }
|
||||
permissions_r = { fg = "#f9e2af" }
|
||||
permissions_w = { fg = "#f38ba8" }
|
||||
permissions_x = { fg = "#a6e3a1" }
|
||||
permissions_s = { fg = "#7f849c" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Select {{{
|
||||
|
||||
[select]
|
||||
border = { fg = "#89b4fa" }
|
||||
active = { fg = "#f5c2e7", bold = true }
|
||||
inactive = {}
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Input {{{
|
||||
|
||||
[input]
|
||||
border = { fg = "#89b4fa" }
|
||||
title = {}
|
||||
value = {}
|
||||
selected = { reversed = true }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Completion {{{
|
||||
|
||||
[completion]
|
||||
border = { fg = "#89b4fa" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Tasks {{{
|
||||
|
||||
[tasks]
|
||||
border = { fg = "#89b4fa" }
|
||||
title = {}
|
||||
hovered = { fg = "#f5c2e7", underline = true }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Which {{{
|
||||
|
||||
[which]
|
||||
mask = { bg = "#313244" }
|
||||
cand = { fg = "#94e2d5" }
|
||||
rest = { fg = "#9399b2" }
|
||||
desc = { fg = "#f5c2e7" }
|
||||
separator = " "
|
||||
separator_style = { fg = "#585b70" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Help {{{
|
||||
|
||||
[help]
|
||||
on = { fg = "#94e2d5" }
|
||||
run = { fg = "#f5c2e7" }
|
||||
hovered = { reversed = true, bold = true }
|
||||
footer = { fg = "#45475a", bg = "#cdd6f4" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : Notify {{{
|
||||
|
||||
[notify]
|
||||
title_info = { fg = "#a6e3a1" }
|
||||
title_warn = { fg = "#f9e2af" }
|
||||
title_error = { fg = "#f38ba8" }
|
||||
|
||||
# : }}}
|
||||
|
||||
|
||||
# : File-specific styles {{{
|
||||
|
||||
[filetype]
|
||||
|
||||
rules = [
|
||||
# Images
|
||||
{ mime = "image/*", fg = "#94e2d5" },
|
||||
|
||||
# Media
|
||||
{ mime = "{audio,video}/*", fg = "#f9e2af" },
|
||||
|
||||
# Archives
|
||||
{ mime = "application/*zip", fg = "#f5c2e7" },
|
||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "#f5c2e7" },
|
||||
|
||||
# Documents
|
||||
{ mime = "application/{pdf,doc,rtf,vnd.*}", fg = "#a6e3a1" },
|
||||
|
||||
# Fallback
|
||||
{ name = "*", fg = "#cdd6f4" },
|
||||
{ name = "*/", fg = "#89b4fa" }
|
||||
]
|
||||
|
||||
# : }}}
|
||||
BIN
dotfiles/yazi/flavors/catppuccin-mocha.yazi/preview.png
Normal file
BIN
dotfiles/yazi/flavors/catppuccin-mocha.yazi/preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 660 KiB |
2021
dotfiles/yazi/flavors/catppuccin-mocha.yazi/tmtheme.xml
Normal file
2021
dotfiles/yazi/flavors/catppuccin-mocha.yazi/tmtheme.xml
Normal file
File diff suppressed because it is too large
Load Diff
11
dotfiles/yazi/theme.toml
Normal file
11
dotfiles/yazi/theme.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[flavor]
|
||||
#use = "tokyo-night"
|
||||
use = "catppuccin-mocha"
|
||||
|
||||
[manager]
|
||||
# Hovered
|
||||
preview_hovered = { underline = false }
|
||||
|
||||
# Border
|
||||
border_symbol = "┆"
|
||||
border_style = { fg = "#7f849c" , dim = true }
|
||||
25
dotfiles/yazi/yazi.toml
Normal file
25
dotfiles/yazi/yazi.toml
Normal file
@@ -0,0 +1,25 @@
|
||||
[manager]
|
||||
ratio = [ 1, 3, 3 ]
|
||||
sort_by = "natural"
|
||||
|
||||
[preview]
|
||||
max_width = 1900
|
||||
max_height = 900
|
||||
|
||||
[open]
|
||||
rules = [
|
||||
{ name = "*/", use = [ "edit", "open", "reveal" ] },
|
||||
|
||||
{ mime = "text/*", use = [ "edit", "reveal" ] },
|
||||
{ mime = "image/*", use = [ "open", "reveal" ] },
|
||||
{ mime = "{audio,video}/*", use = [ "play", "reveal" ] },
|
||||
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] },
|
||||
|
||||
{ mime = "application/{,g}zip", use = [ "extract", "reveal" ] },
|
||||
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = [ "extract", "reveal" ] },
|
||||
|
||||
{ mime = "application/{json,x-ndjson}", use = [ "edit", "reveal" ] },
|
||||
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
|
||||
|
||||
{ name = "*", use = [ "open", "reveal" ] },
|
||||
]
|
||||
13
issue
Normal file
13
issue
Normal file
@@ -0,0 +1,13 @@
|
||||
[0;35;40m .
|
||||
[0;35;40m .vir. d$b
|
||||
[0;35;40m .d$$$$$$b. .cd$$b. .d$$b. d$$$$$$$$$$$b .d$$b. .d$$b.
|
||||
[0;35;40m $$$$( )$$$b d$$$()$$$. d$$$$$$$b Q$$$$$$$P$$$P.$$$$$$$b. .$$$$$$$b.
|
||||
[0;35;40m Q$$$$$$$$$$B$$$$$$$$P" d$$$PQ$$$$b. $$$$. .$$$P' `$$$ .$$$P' `$$$
|
||||
[0;35;40m "$$$$$$$P Q$$$$$$$b d$$$P Q$$$$b $$$$b $$$$b..d$$$ $$$$b..d$$$
|
||||
[0;35;40m d$$$$$$P" "$$$$$$$$ Q$$$ Q$$$$ $$$$$ `Q$$$$$$$P `Q$$$$$$$P
|
||||
[0;35;40m $$$$$$$P `""""" "" "" Q$$$P "Q$$$P" "Q$$$P"
|
||||
[0;35;40m `Q$$P" """
|
||||
[0;37;40m
|
||||
|
||||
This is \n (\s \m \r) \t
|
||||
|
||||
162
local-overlay/app-misc/clock-tui/clock-tui-0.6.0.ebuild
Normal file
162
local-overlay/app-misc/clock-tui/clock-tui-0.6.0.ebuild
Normal file
@@ -0,0 +1,162 @@
|
||||
# Copyright 2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Autogenerated by pycargoebuild 0.13.5
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
aho-corasick@1.1.3
|
||||
allocator-api2@0.2.21
|
||||
android-tzdata@0.1.1
|
||||
android_system_properties@0.1.5
|
||||
atty@0.2.14
|
||||
autocfg@1.1.0
|
||||
bitflags@1.3.2
|
||||
bitflags@2.8.0
|
||||
bumpalo@3.11.0
|
||||
cassowary@0.3.0
|
||||
cfg-if@1.0.0
|
||||
chrono-tz-build@0.2.1
|
||||
chrono-tz@0.8.6
|
||||
chrono@0.4.39
|
||||
clap@3.2.12
|
||||
clap@4.1.11
|
||||
clap_complete@3.2.4
|
||||
clap_derive@3.2.7
|
||||
clap_derive@4.1.9
|
||||
clap_lex@0.2.4
|
||||
clap_lex@0.3.3
|
||||
clap_mangen@0.1.11
|
||||
core-foundation-sys@0.8.3
|
||||
crossterm@0.25.0
|
||||
crossterm@0.27.0
|
||||
crossterm_winapi@0.9.1
|
||||
dirs-sys@0.4.1
|
||||
dirs@5.0.1
|
||||
either@1.13.0
|
||||
equivalent@1.0.2
|
||||
foldhash@0.1.4
|
||||
getrandom@0.2.15
|
||||
hashbrown@0.12.3
|
||||
hashbrown@0.15.2
|
||||
heck@0.4.1
|
||||
hermit-abi@0.1.19
|
||||
hermit-abi@0.4.0
|
||||
iana-time-zone@0.1.46
|
||||
indexmap@1.9.1
|
||||
indexmap@2.7.1
|
||||
indoc@2.0.5
|
||||
is-terminal@0.4.15
|
||||
itertools@0.12.1
|
||||
js-sys@0.3.59
|
||||
libc@0.2.169
|
||||
libredox@0.1.3
|
||||
lock_api@0.4.7
|
||||
log@0.4.17
|
||||
lru@0.12.5
|
||||
memchr@2.7.4
|
||||
mio@0.8.4
|
||||
num-traits@0.2.15
|
||||
once_cell@1.13.0
|
||||
option-ext@0.2.0
|
||||
os_str_bytes@6.2.0
|
||||
parking_lot@0.12.1
|
||||
parking_lot_core@0.9.3
|
||||
parse-zoneinfo@0.3.0
|
||||
paste@1.0.15
|
||||
phf@0.11.1
|
||||
phf_codegen@0.11.1
|
||||
phf_generator@0.11.1
|
||||
phf_shared@0.11.1
|
||||
proc-macro-error-attr@1.0.4
|
||||
proc-macro-error@1.0.4
|
||||
proc-macro2@1.0.93
|
||||
quote@1.0.38
|
||||
rand@0.8.5
|
||||
rand_core@0.6.3
|
||||
ratatui@0.25.0
|
||||
redox_syscall@0.2.13
|
||||
redox_users@0.4.6
|
||||
regex-automata@0.4.9
|
||||
regex-syntax@0.8.5
|
||||
regex@1.11.1
|
||||
roff@0.2.1
|
||||
rustversion@1.0.19
|
||||
scopeguard@1.1.0
|
||||
serde@1.0.147
|
||||
serde_derive@1.0.147
|
||||
serde_spanned@0.6.8
|
||||
signal-hook-mio@0.2.3
|
||||
signal-hook-registry@1.4.0
|
||||
signal-hook@0.3.17
|
||||
siphasher@0.3.10
|
||||
smallvec@1.9.0
|
||||
stability@0.1.1
|
||||
strsim@0.10.0
|
||||
strum@0.25.0
|
||||
strum_macros@0.25.3
|
||||
syn@1.0.98
|
||||
syn@2.0.98
|
||||
termcolor@1.1.3
|
||||
textwrap@0.15.0
|
||||
thiserror-impl@1.0.39
|
||||
thiserror@1.0.39
|
||||
toml@0.7.8
|
||||
toml_datetime@0.6.8
|
||||
toml_edit@0.19.15
|
||||
unicode-ident@1.0.2
|
||||
unicode-segmentation@1.12.0
|
||||
unicode-width@0.1.9
|
||||
version_check@0.9.4
|
||||
wasi@0.11.0+wasi-snapshot-preview1
|
||||
wasm-bindgen-backend@0.2.82
|
||||
wasm-bindgen-macro-support@0.2.82
|
||||
wasm-bindgen-macro@0.2.82
|
||||
wasm-bindgen-shared@0.2.82
|
||||
wasm-bindgen@0.2.82
|
||||
winapi-i686-pc-windows-gnu@0.4.0
|
||||
winapi-util@0.1.5
|
||||
winapi-x86_64-pc-windows-gnu@0.4.0
|
||||
winapi@0.3.9
|
||||
windows-sys@0.36.1
|
||||
windows-sys@0.48.0
|
||||
windows-sys@0.59.0
|
||||
windows-targets@0.48.5
|
||||
windows-targets@0.52.6
|
||||
windows_aarch64_gnullvm@0.48.5
|
||||
windows_aarch64_gnullvm@0.52.6
|
||||
windows_aarch64_msvc@0.36.1
|
||||
windows_aarch64_msvc@0.48.5
|
||||
windows_aarch64_msvc@0.52.6
|
||||
windows_i686_gnu@0.36.1
|
||||
windows_i686_gnu@0.48.5
|
||||
windows_i686_gnu@0.52.6
|
||||
windows_i686_gnullvm@0.52.6
|
||||
windows_i686_msvc@0.36.1
|
||||
windows_i686_msvc@0.48.5
|
||||
windows_i686_msvc@0.52.6
|
||||
windows_x86_64_gnu@0.36.1
|
||||
windows_x86_64_gnu@0.48.5
|
||||
windows_x86_64_gnu@0.52.6
|
||||
windows_x86_64_gnullvm@0.48.5
|
||||
windows_x86_64_gnullvm@0.52.6
|
||||
windows_x86_64_msvc@0.36.1
|
||||
windows_x86_64_msvc@0.48.5
|
||||
windows_x86_64_msvc@0.52.6
|
||||
winnow@0.5.40
|
||||
"
|
||||
|
||||
inherit cargo
|
||||
|
||||
DESCRIPTION="A clock app in terminal"
|
||||
HOMEPAGE="https://github.com/race604/clock-tui"
|
||||
SRC_URI="
|
||||
${CARGO_CRATE_URIS}
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
# Dependent crate licenses
|
||||
LICENSE+=" MIT MPL-2.0 Unicode-DFS-2016 ZLIB"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
@@ -1,3 +0,0 @@
|
||||
AUX hypridle-0.1.4-fix-CFLAGS-CXXFLAGS.patch 901 BLAKE2B 8dd15b2a06beb5e10760f0ab84f8becf22722e8b8990c19e58d51a6865e10d68592e1d9041146a746d6deeb9d03dc2567056017f18c9623046c25153a9e13299 SHA512 8e7d1db099b4872e52bcf676db8b92a1f4d27ff79a7d340ef77f691c6c5305d2f98c28fe71f7b0f3c82bb63ef13115f76b43dc3eba769791e845e631cf9a27f8
|
||||
DIST hypridle-0.1.4.gh.tar.gz 13948 BLAKE2B 450e2505fe8c245fd120fb22662e96648c8267a2878a9e9421ae06a8f2831b7f03f3e1ec23416c37e392e3b295cfb7d0cf8a61f7f611f62dea7affa6c3aadd06 SHA512 203dd5ff6c588fb1858d660baba71ede9d2c353abd63a5273fbc4befff8b77d416d802138881bce11605b248b05145e66847b5aa5395e9c150aaf07e67c8bcd8
|
||||
EBUILD hypridle-0.1.4.ebuild 717 BLAKE2B 0be274204f4cd8da6cc787baa42f12b9867b9dd114dbf7d19c0ef56b9c70fc22bd6826ac96fd7abf8eacebb282124f046cc9a8d7e1276f385095062e054668fc SHA512 ce4e07b92c7b480ccc9da005fc5b9004856997ad39be27bee4a117e8cd565a1230adbc893b9387a04ddfdee338756fe9688972212520165cb47f26f64f62f2d2
|
||||
@@ -1,29 +0,0 @@
|
||||
From e2b3acf133c104574724f705f9f07007ec8bbe3b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Gon=C3=A7alo=20Negrier=20Duarte?=
|
||||
<gonegrier.duarte@gmail.com>
|
||||
Date: Wed, 21 Feb 2024 15:29:01 +0000
|
||||
Subject: [PATCH] Removed added CFLAGS/CXXFLAGS by CMakeLists.txt
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3d60b42..bb37060 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,7 +14,6 @@ if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
message(STATUS "Configuring hypridle in Debug with CMake")
|
||||
add_compile_definitions(HYPRLAND_DEBUG)
|
||||
else()
|
||||
- add_compile_options(-O3)
|
||||
message(STATUS "Configuring hypridle in Release with CMake")
|
||||
endif()
|
||||
|
||||
--
|
||||
2.43.2
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# Copyright 2023-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="Hyprland's idle daemon"
|
||||
HOMEPAGE="https://github.com/hyprwm/hypridle"
|
||||
|
||||
if [[ "${PV}" = *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/hyprwm/${PN^}.git"
|
||||
else
|
||||
SRC_URI="https://github.com/hyprwm/${PN^}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
dev-cpp/sdbus-c++:0/2
|
||||
>=dev-libs/hyprlang-0.4.0
|
||||
dev-libs/wayland
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-libs/wayland-protocols
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
dev-util/wayland-scanner
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/hypridle-0.1.4-fix-CFLAGS-CXXFLAGS.patch"
|
||||
)
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>gonegrier.duarte@gmail.com</email>
|
||||
<name>Gonçalo Negrier Duarte</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<changelog>https://github.com/hyprwm/hypridle/releases</changelog>
|
||||
<doc>https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/</doc>
|
||||
<bugs-to>https://github.com/hyprwm/hypridle/issues</bugs-to>
|
||||
<remote-id type="github">hyprwm/hypridle</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -1,11 +0,0 @@
|
||||
AUX config.json 197 BLAKE2B 7857d382a02a15fbc86018cd61e759927be2c009b0eefa10d282772f236680f54bd90169e0b404e98857657b7f16ef537be78d5e7ec18a498c48d3d490bffead SHA512 9b2b6663bddadc249221aa81669d26a44102926caa8ce6c683c0f1bb65466f1b5449f821b73468e6da57515d5367e9bea829cfb08ddb4c3b48e1f178c4c88677
|
||||
AUX qq.sh 340 BLAKE2B f06daf0857721e55b2c3ed2a5538b5582acf4cff41b336a89b972abe4ceb1626b7c9cf51889ea731e00219fcee7da9a9d8c68375eaf7a84c71b5a13a8c11bd4f SHA512 4553c2cc6c6d0f7921237476ad3376c992571eb90f692dd339fb628bd1352746f6e46df61bf5d00f24099bafbfbee4074702be6e77577c44b448d38e3ee82c8b
|
||||
AUX start.sh 5065 BLAKE2B de4dd4684820dfb35069408659612cc009c5fe6b6a397ddc2cf59f350341c286828f727d10edf3115e4ba7d5c1da7890e08c62c8a5da93b750fe8de5d0beb3b8 SHA512 bc66e6592b10cc805b747cead85b26650fc47e10cb3e08f38272631b22c29b817c468cbbcd31a52139b75427fb48b171b4ad14969da939e1d6703943c6555397
|
||||
AUX vercmp.sh 1492 BLAKE2B ac4ae2aeef54225cfbf31e50345b1bfd9b71310fe24ff9025956801589db258c215a5120115d19044d941c5f63814d7f7a5ddfb638d8af98cdbfbd3aa83569e7 SHA512 e2843a84c6f66918a8de60ef83d07a14881b072e7eed2e374e16542d8079e088974a65cea336cba3e5a41d72c5824de381bdce26d54ca21509196ab5f2befd76
|
||||
AUX xdg-open.sh 206 BLAKE2B 1ed3d1f9c659fffc3476fa0cd28030f8646be0ff2d1d97968433f6eb0fe88dd7717c2fb137c8fd6c93686e4c652cc74434d8aceb69ccba594a205e241d7ea93e SHA512 b12a65aa3cbd5da758e47bbc9a98930c009a9aeeffc12a6329aabd9dc0a9b206dfec9af8950122e912be311985fe7d2daa6dae815ccabdd00ecdbfbc2760a143
|
||||
DIST LiteLoaderQQNT-1.2.1.zip 32390 BLAKE2B ab626bba9fdff7566657b22bcbc1ac32e9ea3878eea461aeb58c0ba27e92e3111479c2a72c9d08d2067e43497f854a1a30090da18f5941eb6a0b705bce0d6639 SHA512 a0a179942f3b6ee8ed1c8388f6a5234e2f84b3340c94ddc91b497dd7f12cc9cac80ae250c62e21bdaab9e52cfecaa6c78b13b6849ddc5ff7db65efe852d753d0
|
||||
DIST QQ_3.2.12_240808_amd64_01.deb 152276798 BLAKE2B fa70a6e198203df87546115de7ae07b2479f3992848c5b361797330f7c3d5757ff8a1ff2bdb16b72e74a60cb8db5e41ab20cf56ec653a86ea58fb43604256544 SHA512 ad4657fd72ba13f804db24336cc07636454afd9fc97dac1a9d575a8500227f996879386e2257e290139bc7ba9e2f56e305b4969ca9c9ee5dbd7efd0302ed7ca9
|
||||
DIST QQ_3.2.12_240808_arm64_01.deb 152230448 BLAKE2B 0a4ad45efd111aac457723124a934fe6b80701bb8a4c9363f959abf4d5e2b7fcc4dfcc8c82ddfa324992bc1bc4561168d6597cc5217d998257561d6f9a0386e8 SHA512 22fb0f590f8a4be148750fde203fd42647557998caa8516b165094020ee3f670f967d9d313d47fdbbf449f497cbe23f612355b6afae9cfde7df02c52e64ef0ca
|
||||
DIST QQ_3.2.12_240808_loongarch64_01.deb 144876648 BLAKE2B 2813becfcd657f093925d53e94137c16a8e0037e02e354cb11c98e2c978a89643dcc9a7794961f7edcdf15a4509880564dbe85463f7bfbe3e3c45e9362b87af9 SHA512 19192fb5d4b1de95fe677195db92fcf70fea0daa286697faf558305f44ecb980a3f44f29cc7b9d846ef76a4dd4b06a2e5ecc2c1c2e21c1603188d3a7e79292ce
|
||||
EBUILD tencent-qq-3.2.12_p240808.ebuild 4928 BLAKE2B 4167fa15062f201a109c67d07aaab6074631564f15e6ff1e42094fb14e3875cd272f9b31e19cfbf42a0d5b5cef70807e8d06d29ad1dddbb7eacea6d37dc3d955 SHA512 17b14aa95d165e8a05920eb363a0da831567bcffb178f04df9d9a22f135b3b9fe7aad309b1c7d2ef56286d63e40ab96b2c7a0c6357034a4315875cc46ea0922e
|
||||
MISC metadata.xml 877 BLAKE2B ccb294dfc292e53c35bfc5c8669c0edcf41d24050ce9fb097a73d874687717de009048e0bf6d6bc1c5194afc05d274b9d70e8f4d5a3787fceb45fceab1bbf4d0 SHA512 520778cfee8e5977f4a766a1dfff82ed9fed287567ad96de11a9dbb49d4fae571001cb46bc714669172ebca8441cf51a6ec0b778215bb4709a57ace72c6a70f8
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"baseVersion": "__BASE_VER__",
|
||||
"currentVersion": "__CURRENT_VER__",
|
||||
"previousVersion": "",
|
||||
"buildVersion": "__BUILD_VER__",
|
||||
"skippedVersions": [],
|
||||
"inUsePkg": "",
|
||||
"hasRan": false
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -d ~/.config/QQ/versions ]; then
|
||||
find ~/.config/QQ/versions -name sharp-lib -type d -exec rm -r {} \; 2>/dev/null
|
||||
fi
|
||||
|
||||
# Allow users to override command-line options
|
||||
if [[ -f $XDG_CONFIG_HOME/qq-flags.conf ]]; then
|
||||
QQ_USER_FLAGS="$(grep -v '^#' $XDG_CONFIG_HOME/qq-flags.conf)"
|
||||
fi
|
||||
|
||||
exec /opt/QQ/qq $QQ_USER_FLAGS "$@"
|
||||
@@ -1,149 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
QQ_HOTUPDATE_VERSION="__CURRENT_VER__"
|
||||
|
||||
function command_exists() {
|
||||
local command="$1"
|
||||
command -v "${command}" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
function show_error_dialog() {
|
||||
title="linuxqq-nt-bwrap"
|
||||
if command_exists kdialog; then
|
||||
kdialog --error "$1" --title "$title" --icon qq
|
||||
elif command_exists zenity; then
|
||||
zenity --error --title "$title" --icon-name qq --text "$1"
|
||||
else
|
||||
all_off="$(tput sgr0)"
|
||||
bold="${all_off}$(tput bold)"
|
||||
blue="${bold}$(tput setaf 4)"
|
||||
yellow="${bold}$(tput setaf 3)"
|
||||
printf "${blue}==>${yellow} ${bold} $1${all_off}\n"
|
||||
fi
|
||||
}
|
||||
|
||||
# 进行必要文件的检查
|
||||
if [ ! -e "/etc/localtime" ]; then
|
||||
show_error_dialog "/etc/localtime 未找到。\n请先设置系统时区。"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
USER_RUN_DIR="/run/user/$(id -u)"
|
||||
XAUTHORITY="${XAUTHORITY:-$HOME/.Xauthority}"
|
||||
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
FONTCONFIG_HOME="${XDG_CONFIG_HOME}/fontconfig"
|
||||
QQ_APP_DIR="${XDG_CONFIG_HOME}/QQ"
|
||||
if [ -z "${QQ_DOWNLOAD_DIR}" ]; then
|
||||
if [ -z "${XDG_DOWNLOAD_DIR}" ]; then
|
||||
XDG_DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
|
||||
fi
|
||||
QQ_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}"
|
||||
fi
|
||||
|
||||
# 从 flags 文件中加载参数
|
||||
|
||||
set -euo pipefail
|
||||
flags_file="${XDG_CONFIG_HOME}/qq-electron-flags.conf"
|
||||
declare -a flags
|
||||
|
||||
if [[ -f "${flags_file}" ]]; then
|
||||
mapfile -t <"${flags_file}"
|
||||
fi
|
||||
|
||||
for line in "${MAPFILE[@]}"; do
|
||||
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
|
||||
flags+=("${line}")
|
||||
fi
|
||||
done
|
||||
|
||||
QQ_HOTUPDATE_DIR="${QQ_APP_DIR}/versions"
|
||||
|
||||
# 在「下载」目录不存在的时候,自动使用 ~/Downloads
|
||||
# 避免挂载整个 home
|
||||
if [ "${QQ_DOWNLOAD_DIR%*/}" == "${HOME}" ]; then
|
||||
QQ_DOWNLOAD_DIR="${HOME}/Downloads"
|
||||
fi
|
||||
|
||||
# 安装当前版本
|
||||
HOTUPDATE_VERSION_DIR="${QQ_HOTUPDATE_DIR}/${QQ_HOTUPDATE_VERSION}"
|
||||
install -d "${QQ_HOTUPDATE_DIR}"
|
||||
if [ ! -d "${HOTUPDATE_VERSION_DIR}" ] && [ ! -L "${HOTUPDATE_VERSION_DIR}" ]; then
|
||||
ln -sfd "/opt/QQ/resources/app" "${HOTUPDATE_VERSION_DIR}"
|
||||
fi
|
||||
|
||||
# 处理旧版本
|
||||
rm -rf "${QQ_HOTUPDATE_DIR}/"**".zip"
|
||||
is_hotupdated_version=0 # 正在运行的版本是否经过热更新?
|
||||
|
||||
find "${QQ_HOTUPDATE_DIR}/"*[-_]* -maxdepth 1 -type "d,l" | while read path; do
|
||||
this_version="$(basename "$path")"
|
||||
if [ "$(/opt/QQ/workarounds/vercmp.sh "${this_version}" lt "${QQ_HOTUPDATE_VERSION//_/-}")" == "true" ]; then
|
||||
# 这个版本小于当前版本,删除之
|
||||
echo "rm $this_version"
|
||||
rm -rf "$path"
|
||||
else
|
||||
is_hotupdated_version=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$is_hotupdated_version" == "0" ]; then
|
||||
cp "/opt/QQ/workarounds/config.json" "${QQ_HOTUPDATE_DIR}/config.json"
|
||||
fi
|
||||
|
||||
bwrap --new-session --cap-drop ALL --unshare-user-try --unshare-pid --unshare-cgroup-try \
|
||||
--ro-bind /lib /lib \
|
||||
--ro-bind /lib64 /lib64 \
|
||||
--ro-bind /bin /bin \
|
||||
--ro-bind /usr /usr \
|
||||
--ro-bind /opt /opt \
|
||||
--ro-bind /opt/QQ/workarounds/xdg-open.sh /usr/bin/xdg-open \
|
||||
--ro-bind /usr/lib/snapd-xdg-open/xdg-open /snapd-xdg-open \
|
||||
--ro-bind /usr/lib/flatpak-xdg-utils/xdg-open /flatpak-xdg-open \
|
||||
--ro-bind /etc/machine-id /etc/machine-id \
|
||||
--ro-bind /etc/ld.so.cache /etc/ld.so.cache \
|
||||
--dev-bind /dev /dev \
|
||||
--ro-bind /sys /sys \
|
||||
--ro-bind /etc/passwd /etc/passwd \
|
||||
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
|
||||
--ro-bind-try /run/systemd/userdb /run/systemd/userdb \
|
||||
--ro-bind /etc/resolv.conf /etc/resolv.conf \
|
||||
--ro-bind /etc/localtime /etc/localtime \
|
||||
--proc /proc \
|
||||
--dev-bind /run/dbus /run/dbus \
|
||||
--bind "${USER_RUN_DIR}" "${USER_RUN_DIR}" \
|
||||
--ro-bind-try /etc/fonts /etc/fonts \
|
||||
--dev-bind /tmp /tmp \
|
||||
--bind-try "${HOME}/.pki" "${HOME}/.pki" \
|
||||
--ro-bind-try "${XAUTHORITY}" "${XAUTHORITY}" \
|
||||
--bind-try "${QQ_DOWNLOAD_DIR}" "${QQ_DOWNLOAD_DIR}" \
|
||||
--setenv QQ_APP_DIR "${QQ_APP_DIR}" \
|
||||
--bind "${QQ_APP_DIR}" "${QQ_APP_DIR}" \
|
||||
--ro-bind-try "${FONTCONFIG_HOME}" "${FONTCONFIG_HOME}" \
|
||||
--ro-bind-try "${HOME}/.icons" "${HOME}/.icons" \
|
||||
--ro-bind-try "${HOME}/.local/share/.icons" "${HOME}/.local/share/.icons" \
|
||||
--ro-bind-try "${XDG_CONFIG_HOME}/gtk-3.0" "${XDG_CONFIG_HOME}/gtk-3.0" \
|
||||
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
|
||||
--ro-bind-try /run/systemd/userdb/ /run/systemd/userdb/ \
|
||||
--setenv IBUS_USE_PORTAL 1 \
|
||||
--setenv QQNTIM_HOME "${QQ_APP_DIR}/QQNTim" \
|
||||
--setenv LITELOADERQQNT_PROFILE "${QQ_APP_DIR}/LiteLoaderQQNT" \
|
||||
/opt/QQ/qq "${flags[@]}" "$@"
|
||||
|
||||
# 移除无用崩溃报告和日志
|
||||
# 如果需要向腾讯反馈 bug,请注释掉如下几行
|
||||
rm -rf ${QQ_APP_DIR}/crash_files
|
||||
touch ${QQ_APP_DIR}/crash_files
|
||||
if [ -d "${QQ_APP_DIR}/log" ]; then
|
||||
rm -rf "${QQ_APP_DIR}/log"
|
||||
fi
|
||||
for nt_qq_userdata in "${QQ_APP_DIR}/nt_qq_"*; do
|
||||
if [ -d "${nt_qq_userdata}/log" ]; then
|
||||
rm -rf "${nt_qq_userdata}/log"
|
||||
fi
|
||||
if [ -d "${nt_qq_userdata}/log-cache" ]; then
|
||||
rm -rf "${nt_qq_userdata}/log-cache"
|
||||
fi
|
||||
done
|
||||
if [ -d "${QQ_APP_DIR}/Crashpad" ]; then
|
||||
rm -rf "${QQ_APP_DIR}/Crashpad"
|
||||
fi
|
||||
@@ -1,93 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Comparison expressions for semantic versions.
|
||||
# only supports semver standard MAJOR.MINOR.PATCH syntax;
|
||||
# pre-release or build-metadata extensions have undefined behavior.
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
function usage() {
|
||||
echo "Comparison expressions for semantic versions."
|
||||
echo
|
||||
echo "usage: vercmp VERSION_A OPERATOR VERSION_B"
|
||||
echo
|
||||
echo "OPERATORS"
|
||||
echo
|
||||
echo " lt - Less than"
|
||||
echo " lteq - Less than or equal to"
|
||||
echo " eq - Equal to"
|
||||
echo " gteq - Grater than or equal to"
|
||||
echo " gt - Greater than"
|
||||
echo
|
||||
}
|
||||
|
||||
if [ "$#" -ne 3 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LEFT="$1"
|
||||
OPERATOR="$2"
|
||||
RIGHT="$3"
|
||||
|
||||
if [ "$LEFT" = "$RIGHT" ]; then
|
||||
COMPARISON=0
|
||||
else
|
||||
SORTED=($(for VER in "$LEFT" "$RIGHT"; do echo "$VER"; done | sort -V))
|
||||
if [ "${SORTED[0]}" = "$LEFT" ]; then
|
||||
COMPARISON=-1
|
||||
else
|
||||
COMPARISON=1
|
||||
fi
|
||||
fi
|
||||
|
||||
OUTCOME=false
|
||||
|
||||
case $OPERATOR in
|
||||
lt)
|
||||
if [ "$COMPARISON" -eq -1 ]; then
|
||||
OUTCOME=true
|
||||
fi
|
||||
;;
|
||||
|
||||
lteq)
|
||||
if [ "$COMPARISON" -lt 1 ]; then
|
||||
OUTCOME=true
|
||||
fi
|
||||
;;
|
||||
|
||||
eq)
|
||||
if [ "$COMPARISON" -eq 0 ]; then
|
||||
OUTCOME=true
|
||||
fi
|
||||
;;
|
||||
|
||||
gteq)
|
||||
if [ "$COMPARISON" -gt -1 ]; then
|
||||
OUTCOME=true
|
||||
fi
|
||||
;;
|
||||
|
||||
gt)
|
||||
if [ "$COMPARISON" -eq 1 ]; then
|
||||
OUTCOME=true
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
VERCMP_QUIET="${VERCMP_QUIET:-false}"
|
||||
if [ ! "$VERCMP_QUIET" = "true" ]; then
|
||||
echo "$OUTCOME"
|
||||
fi
|
||||
|
||||
if [ "$OUTCOME" = "true" ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
URI_TO_OPEN="$1"
|
||||
|
||||
if ! [ "${URI_TO_OPEN:0:8}" == "jsbridge" ]; then
|
||||
if [ "${URI_TO_OPEN:0:4}" == "http" ]; then
|
||||
/snapd-xdg-open "$URI_TO_OPEN"
|
||||
else
|
||||
/flatpak-xdg-open "$URI_TO_OPEN"
|
||||
fi
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE
|
||||
pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>git@xen0n.name</email>
|
||||
<name>WANG Xuerui</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>ston.jia@qq.com</email>
|
||||
<name>ston</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="bwrap">Use sys-apps/bubblewrap to prevent
|
||||
private information leakage</flag>
|
||||
<flag name="system-vips">Use media-libs/vips instead of
|
||||
shipped libs.</flag>
|
||||
<flag name="gnome">Supporting screenshot when using
|
||||
GNOME</flag>
|
||||
<flag name="appindicator">Build in support for
|
||||
notifications using the libindicate or libappindicator
|
||||
plugin</flag>
|
||||
<flag name="liteloader">Add liteloader support</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
@@ -1,156 +0,0 @@
|
||||
# Copyright 2019-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit unpacker xdg
|
||||
|
||||
MY_PV=${PV/_p/_}
|
||||
_I="Linux"
|
||||
_ArchExt="_01"
|
||||
_QQDownSite="https://dldir1.qq.com/qqfile/qq/QQNT"
|
||||
_QQFileName="QQ"
|
||||
_QQFileSuffix=".deb"
|
||||
|
||||
_LiteLoader_PV="1.2.1"
|
||||
DESCRIPTION="The new version of the official linux-qq"
|
||||
HOMEPAGE="https://im.qq.com/linuxqq/index.shtml"
|
||||
|
||||
SRC_URI="
|
||||
amd64? ( ${_QQDownSite}/$_I/${_QQFileName}_${MY_PV}_amd64${_ArchExt}${_QQFileSuffix} )
|
||||
arm64? ( ${_QQDownSite}/$_I/${_QQFileName}_${MY_PV}_arm64${_ArchExt}${_QQFileSuffix} )
|
||||
loong? ( ${_QQDownSite}/$_I/${_QQFileName}_${MY_PV}_loongarch64${_ArchExt}${_QQFileSuffix} )
|
||||
liteloader? (
|
||||
https://github.com/LiteLoaderQQNT/LiteLoaderQQNT/releases/download/${_LiteLoader_PV}/LiteLoaderQQNT.zip \
|
||||
-> LiteLoaderQQNT-${_LiteLoader_PV}.zip
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}
|
||||
LICENSE="Tencent"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64 ~arm64"
|
||||
|
||||
IUSE="+bwrap system-vips gnome appindicator liteloader"
|
||||
|
||||
RESTRICT="strip mirror"
|
||||
|
||||
RDEPEND="
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libnotify
|
||||
dev-libs/nss
|
||||
appindicator? ( dev-libs/libayatana-appindicator )
|
||||
x11-libs/libXScrnSaver
|
||||
x11-libs/libXcomposite
|
||||
x11-libs/libXdamage
|
||||
x11-libs/libXtst
|
||||
x11-misc/xdg-utils
|
||||
app-accessibility/at-spi2-core:2
|
||||
app-crypt/libsecret
|
||||
virtual/krb5
|
||||
sys-apps/keyutils
|
||||
system-vips? (
|
||||
dev-libs/glib
|
||||
>=media-libs/vips-8.15.2[-pdf]
|
||||
)
|
||||
bwrap? (
|
||||
sys-apps/bubblewrap
|
||||
x11-misc/snapd-xdg-open
|
||||
x11-misc/flatpak-xdg-utils
|
||||
)
|
||||
gnome? ( dev-libs/gjs )
|
||||
media-libs/openslide
|
||||
loong? (
|
||||
virtual/loong-ow-compat
|
||||
)
|
||||
"
|
||||
BDEPEND="liteloader? ( app-arch/unzip )"
|
||||
|
||||
src_unpack() {
|
||||
:
|
||||
if use liteloader; then
|
||||
unpack LiteLoaderQQNT-${_LiteLoader_PV}.zip
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /
|
||||
cd "${D}" || die
|
||||
if [ "${ARCH}" = "loong" ]; then
|
||||
unpacker "${DISTDIR}/${_QQFileName}_${MY_PV}_loongarch64${_QQFileSuffix}"
|
||||
else
|
||||
unpacker "${DISTDIR}/${_QQFileName}_${MY_PV}_${ARCH}${_ArchExt}${_QQFileSuffix}"
|
||||
fi
|
||||
|
||||
if use system-vips; then
|
||||
rm -r "${D}"/opt/QQ/resources/app/sharp-lib || die
|
||||
fi
|
||||
|
||||
if use bwrap; then
|
||||
exeinto /opt/QQ
|
||||
doexe "${FILESDIR}"/start.sh
|
||||
sed -i 's!/opt/QQ/qq!/opt/QQ/start.sh!' "${D}"/usr/share/applications/qq.desktop || die
|
||||
insinto /opt/QQ/workarounds
|
||||
doins "${FILESDIR}"/{config.json,xdg-open.sh,vercmp.sh}
|
||||
fperms +x /opt/QQ/workarounds/{xdg-open.sh,vercmp.sh}
|
||||
|
||||
local _base_pkgver=${PV/_p/-} || die
|
||||
local _update_pkgver=${_base_pkgver} || die
|
||||
local cur_ver=${_update_pkgver:-${base_ver}} || die
|
||||
local build_ver=${cur_ver#*-} || die
|
||||
|
||||
sed -i "s|__BASE_VER__|${base_ver}|g;s|__CURRENT_VER__|${cur_ver}|g;s|__BUILD_VER__|${build_ver}|g" \
|
||||
"${D}"/opt/QQ/workarounds/config.json \
|
||||
"${D}"/opt/QQ/start.sh || die
|
||||
|
||||
else
|
||||
sed -i 's!/opt/QQ/qq!/usr/bin/qq!' "${D}"/usr/share/applications/qq.desktop || die
|
||||
fi
|
||||
|
||||
if use bwrap; then
|
||||
dosym -r /opt/QQ/start.sh /usr/bin/qq
|
||||
elif use system-vips; then
|
||||
newbin "$FILESDIR/qq.sh" qq
|
||||
else
|
||||
dosym -r /opt/QQ/qq /usr/bin/qq
|
||||
fi
|
||||
|
||||
# https://bugs.gentoo.org/898912
|
||||
if use appindicator; then
|
||||
dosym ../../usr/lib64/libayatana-appindicator3.so /opt/QQ/libappindicator3.so
|
||||
fi
|
||||
|
||||
sed -i 's!/usr/share/icons/hicolor/512x512/apps/qq.png!qq!' "${D}"/usr/share/applications/qq.desktop || die
|
||||
gzip -d "${D}"/usr/share/doc/linuxqq/changelog.gz || die
|
||||
dodoc "${D}"/usr/share/doc/linuxqq/changelog
|
||||
rm -rf "${D}"/usr/share/doc/linuxqq/ || die
|
||||
|
||||
if use liteloader; then
|
||||
insinto /opt/LiteLoader
|
||||
doins -r "${WORKDIR}"/*
|
||||
dosym -r /opt/LiteLoader/src/preload.js /opt/QQ/resources/app/application/preload.js
|
||||
sed -i "1 i require(\"/opt/LiteLoader\");" "${D}"/opt/QQ/resources/app/app_launcher/index.js || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
if use bwrap; then
|
||||
elog "-EN-----------------------------------------------------------------"
|
||||
elog "If you want to download files in QQ"
|
||||
elog "Please set the QQ download path to ~/Download"
|
||||
elog "If you have enabled LiteLoaderQQNT support, relevant plugins can be "
|
||||
elog "downloaded from https://liteloaderqqnt.github.io/, "
|
||||
elog "For instance, after downloading the 「轻量工具箱」 and unzipping it, "
|
||||
elog "download it to the directory ~/.config/QQ/LiteLoaderQQNT/plugins/lite_tools_v4/, "
|
||||
elog "and the changes will take effect after a restart."
|
||||
elog "--------------------------------------------------------------------"
|
||||
elog "-ZH-----------------------------------------------------------------"
|
||||
elog "如果要在 QQ 中下载文件,请先在「设置」->「存储管理」中把下载文件夹"
|
||||
elog "更改为系统的“下载”/“Downloads”文件夹。"
|
||||
elog "如果您启用了 LiteLoaderQQNT 支持,"
|
||||
elog "可以从 https://liteloaderqqnt.github.io/ 下载相关插件,"
|
||||
elog "例如:「轻量工具箱」下载后"
|
||||
elog "解压到 ~/.config/QQ/LiteLoaderQQNT/plugins/“lite_tools_v4”/ 目录下,重启后生效。"
|
||||
elog "--------------------------------------------------------------------"
|
||||
fi
|
||||
}
|
||||
6
portage/env/nolto.conf
vendored
6
portage/env/nolto.conf
vendored
@@ -1,6 +0,0 @@
|
||||
# Env setup to disable LTO and related warnings for problematic builds
|
||||
DISABLE_LTO="-Wno-error=odr -Wno-error=lto-type-mismatch -Wno-error=strict-aliasing -fno-lto"
|
||||
CFLAGS="${CFLAGS} ${DISABLE_LTO}"
|
||||
CXXFLAGS="${CXXFLAGS} ${DISABLE_LTO}"
|
||||
FCFLAGS="${FCFLAGS} ${DISABLE_LTO}"
|
||||
FFLAGS="${FFLAGS} ${DISABLE_LTO}"
|
||||
@@ -2,33 +2,35 @@
|
||||
# built this stage.
|
||||
# Please consult /usr/share/portage/config/make.conf.example for a more
|
||||
# detailed example.
|
||||
WARNING_FLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
|
||||
COMMON_FLAGS="-march=native -O2 -pipe -flto ${WARNING_FLAGS}"
|
||||
COMMON_FLAGS="-march=native -O2 -pipe"
|
||||
CFLAGS="${COMMON_FLAGS}"
|
||||
CXXFLAGS="${COMMON_FLAGS}"
|
||||
FCFLAGS="${COMMON_FLAGS}"
|
||||
FFLAGS="${COMMON_FLAGS}"
|
||||
|
||||
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3"
|
||||
RUSTFLAGS="${RUSTFLAGS} -C target-cpu=native"
|
||||
|
||||
# NOTE: This stage was built with the bindist USE flag enabled
|
||||
PORTAGE_TMPDIR="/tmp"
|
||||
|
||||
ACCEPT_LISENCE="@FREE"
|
||||
ACCEPT_LISENCE="@FREE @BINARY-REDISTRIBUTABLE"
|
||||
ACCEPT_KEYWORDS="amd64"
|
||||
|
||||
VIDEO_CARDS="intel amdgpu radeonsi"
|
||||
VIDEO_CARDS="amdgpu radeonsi"
|
||||
|
||||
USE="wayland cjk pipewire pulseaudio zstd zsh-completion vulkan dbus lto pgo -kde -gnome -initramfs"
|
||||
L10N="zh-CN"
|
||||
# NOTE: This stage was built with the bindist Use flag enabled
|
||||
L10N="en zh en-US zh-CN"
|
||||
LINGUAS="en en_US zh zh_CN"
|
||||
|
||||
MAKEOPTS="-j4"
|
||||
MAKEOPTS="-j12"
|
||||
|
||||
GRUB_PLATFORMS="efi-64"
|
||||
PYTHON_TARGETS="python3_12 python3_13"
|
||||
PYTHON_SINGLE_TARGET="python3_12"
|
||||
|
||||
# This sets the language of build output to English.
|
||||
# Please keep this setting intact when reporting bugs.
|
||||
LC_MESSAGES=C.utf8
|
||||
|
||||
RUBY_SINGLE_TARGET="ruby32"
|
||||
|
||||
GENTOO_MIRRORS="${GENTOO_MIRRORS} https://distfiles.gentoocn.org"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
gui-apps/aylurs-gtk-shell ~amd64
|
||||
@@ -1 +0,0 @@
|
||||
x11-terms/alacritty ~amd64
|
||||
@@ -1 +0,0 @@
|
||||
app-i18n/fcitx-configtool ~amd64
|
||||
3
portage/package.accept_keywords/gimp
Normal file
3
portage/package.accept_keywords/gimp
Normal file
@@ -0,0 +1,3 @@
|
||||
media-gfx/gimp ~amd64
|
||||
media-libs/babl ~amd64
|
||||
media-libs/gegl ~amd64
|
||||
@@ -1,4 +1,9 @@
|
||||
gui-libs/hyprutils ~amd64
|
||||
gui-apps/hyprlock ~amd64
|
||||
gui-apps/hypridle ~amd64
|
||||
sys-auth/hyprpolkitagent ~amd64
|
||||
dev-libs/hyprgraphics ~amd64
|
||||
dev-libs/hyprlang ~amd64
|
||||
|
||||
# xdg-desktop-portal-hyprland
|
||||
gui-libs/xdg-desktop-portal-hyprland ~amd64
|
||||
@@ -30,6 +35,7 @@ dev-python/aiohttp-oauthlib ~amd64
|
||||
|
||||
# multimedia
|
||||
media-sound/termusic ~amd64
|
||||
media-sound/kew ~amd64
|
||||
|
||||
# misc
|
||||
media-video/obs-studio ~amd64
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
app-misc/liquidctl ~amd64
|
||||
@@ -1,4 +0,0 @@
|
||||
games-action/minecraft-launcher ~amd64
|
||||
dev-java/openjdk-jre-bin ~amd64
|
||||
dev-java/openjdk ~amd64
|
||||
virtual/jre ~amd64
|
||||
@@ -1,3 +1 @@
|
||||
app-mobilephone/scrcpy ~amd64
|
||||
net-misc/anydesk ~amd64
|
||||
x11-libs/gtkglext ~amd64
|
||||
app-misc/activate-linux ~amd64
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
app-shells/zoxide ~amd64
|
||||
dev-vcs/lazygit ~amd64
|
||||
|
||||
app-editors/neovide ~amd64
|
||||
|
||||
11
portage/package.accept_keywords/ollama
Normal file
11
portage/package.accept_keywords/ollama
Normal file
@@ -0,0 +1,11 @@
|
||||
app-misc/ollama ~amd64
|
||||
sci-libs/hipBLAS ~amd64
|
||||
dev-util/hip ~amd64
|
||||
sci-libs/rocBLAS ~amd64
|
||||
sci-libs/rocSOLVER ~amd64
|
||||
sci-libs/rocSPARSE ~amd64
|
||||
sci-libs/rocPRIM ~amd64
|
||||
dev-util/Tensile ~amd64
|
||||
dev-util/rocm-smi ~amd64
|
||||
dev-util/rocminfo ~amd64
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
dev-libs/rocm-opencl-runtime ~amd64
|
||||
dev-libs/rocr-runtime ~amd64
|
||||
dev-libs/rocm-comgr ~amd64
|
||||
dev-libs/rocm-comgr ~amd64
|
||||
dev-libs/rocm-device-libs ~amd64
|
||||
dev-build/rocm-cmake ~amd64
|
||||
dev-util/hipcc ~amd64
|
||||
dev-libs/roct-thunk-interface ~amd64
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
sci-mathematics/sage-conf ~amd64
|
||||
sci-mathematics/sage-doc ~amd64
|
||||
sci-mathematics/sage_docbuild ~amd64
|
||||
sci-mathematics/sage_setup ~amd64
|
||||
sci-mathematics/sagemath-standard ~amd64
|
||||
dev-python/jupyter-jsmol ~amd64
|
||||
media-gfx/threejs-sage-extension ~amd64
|
||||
dev-python/cvxopt ~amd64
|
||||
dev-python/rpy ~amd64
|
||||
media-gfx/tachyon ~amd64
|
||||
sci-mathematics/cu2 ~amd64
|
||||
sci-mathematics/cubex ~amd64
|
||||
sci-mathematics/dikcube ~amd64
|
||||
sci-mathematics/ExportSageNB ~amd64
|
||||
sci-mathematics/mcube ~amd64
|
||||
sci-mathematics/optimal ~amd64
|
||||
sci-mathematics/sage-data-combinatorial_designs ~amd64
|
||||
sci-mathematics/sage-data-elliptic_curves ~amd64
|
||||
sci-mathematics/sage-data-graphs ~amd64
|
||||
sci-mathematics/sage-data-polytopes_db ~amd64
|
||||
sci-chemistry/sage-jmol-bin ~amd64
|
||||
sci-libs/dsdp ~amd64
|
||||
dev-python/jupyter-sphinx ~amd64
|
||||
dev-python/sphinx-copybutton ~amd64
|
||||
dev-python/sphinx-inline-tabs ~amd64
|
||||
dev-tex/sagetex ~amd64
|
||||
|
||||
3
portage/package.accept_keywords/steam
Normal file
3
portage/package.accept_keywords/steam
Normal file
@@ -0,0 +1,3 @@
|
||||
*/*::steam-overlay
|
||||
games-util/game-device-udev-rules
|
||||
sys-libs/libudev-compat
|
||||
@@ -1,7 +1,14 @@
|
||||
sys-process/nvtop ~amd64
|
||||
app-admin/s-tui ~amd64
|
||||
app-misc/fastfetch ~amd64
|
||||
app-misc/onefetch ~amd64
|
||||
app-misc/cpufetch ~amd64
|
||||
|
||||
sys-apps/lsplug ~amd64
|
||||
|
||||
app-backup/timeshift ~amd64
|
||||
app-backup/timeshift-autosnap ~amd64
|
||||
|
||||
net-dns/dnslookup ~amd64
|
||||
|
||||
app-arch/unrar ~amd64
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user