From 46f4fdcc69fb5a81907350fa6eabbb82a4c0c29e Mon Sep 17 00:00:00 2001 From: Fabio Lenherr / DashieTM Date: Thu, 21 Sep 2023 19:26:09 +0200 Subject: [PATCH] nvim: add neotest --- gtk-3.0/bookmarks | 2 + gtk-4.0/servers | 4 +- hypr_desktop/hyprland.conf | 89 ++++--------- hypr_desktop/hyprpaper.conf | 12 +- hypr_desktop/neovide_backtraces.log | 25 ++++ ironbar/style.css | 17 +-- nvim/lazy-lock.json | 84 ++++++------ nvim/lua/config/keymaps.lua | 47 ++----- nvim/lua/config/lazy.lua | 5 +- nvim/lua/config/lsp-keymap.lua | 42 ++++-- nvim/lua/plugins/lsp.lua | 10 +- nvim/lua/plugins/plugins.lua | 192 ++++++++++++++++++++++++---- 12 files changed, 333 insertions(+), 196 deletions(-) diff --git a/gtk-3.0/bookmarks b/gtk-3.0/bookmarks index e65b647..0ea417d 100644 --- a/gtk-3.0/bookmarks +++ b/gtk-3.0/bookmarks @@ -1,3 +1,4 @@ +file:///home/dashie/gits/ReSet file:///home/dashie/Documents file:///home/dashie/Pictures file:///home/dashie/Downloads @@ -10,3 +11,4 @@ file:///home/dashie/Documents/OST%204.semester file:///drive2 file:///drive2/animu file:///home/dashie/tako +file:///home/dashie/ReSet diff --git a/gtk-4.0/servers b/gtk-4.0/servers index 42c988b..b08f253 100644 --- a/gtk-4.0/servers +++ b/gtk-4.0/servers @@ -3,12 +3,12 @@ xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks" xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info" > - + Windows shares on 192.168.1.4 - + diff --git a/hypr_desktop/hyprland.conf b/hypr_desktop/hyprland.conf index bf95cd2..0510911 100644 --- a/hypr_desktop/hyprland.conf +++ b/hypr_desktop/hyprland.conf @@ -1,4 +1,3 @@ - # #fix the fucking portal exec-once=systemctl --user import-environment @@ -6,11 +5,10 @@ exec-once=dbus-update-activation-environment --all # # -monitor=DP-3,2560x1440@165,0x0,1 -monitor=DP-1,3440x1440@180,2560x0,1 -monitor=DP-2,1920x1200@60,6000x0,1 +monitor=DP-3,2560x1440@165,-2560x0,1 +monitor=DP-1,3440x1440@180,0x0,1 +monitor=DP-2,1920x1200@60,3440x0,1 monitor=DP-2,transform,1 - monitor=,highrr,auto,1 workspace=DP-3,1 @@ -19,12 +17,7 @@ workspace=DP-2,3 input { - kb_file= kb_layout=diaeresis - kb_variant= - kb_model= - kb_options= - kb_rules= repeat_delay=200 natural_scroll=false follow_mouse=1 @@ -32,34 +25,27 @@ input { touchpad { natural_scroll=yes - tap-to-click=yes + tap-to-click=yes } } general { sensitivity=1.0 # for mouse cursor - - gaps_in=3 - gaps_out=5 + gaps_in=3 3 3 3 + gaps_out=2 5 5 5 border_size=3 col.active_border=0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg col.inactive_border=0x66333333 - apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse) - # layout=hy3 - } decoration { rounding=4 - blur { - # enabled=false - } } animations { enabled=1 - # animation=windowsMove,1,4,default + animation=windowsMove,1,4,default animation=windows,1,7,default,popin 70% animation=border,1,10,default animation=fade,1,10,default @@ -68,9 +54,8 @@ animations { dwindle { preserve_split=true - pseudotile=0 # enable pseudotiling on dwindle + pseudotile=0 permanent_direction_override=false - # smart_resizing=true } gestures { @@ -78,44 +63,30 @@ gestures { } misc { - - vfr=true - vrr = 1 - animate_manual_resizes=1 - enable_swallow=true - swallow_regex=^(.*)(kitty)(.*)$ - layers_hog_keyboard_focus=false - # animate_mouse_windowdragging=true - # swallow_exception_regex = ^(?:(?:^|\s)([a-zA-Z0-9]+\b)+(?:$|[^\w\s]))$ - + vfr=true + vrr = 1 + animate_manual_resizes=1 + enable_swallow=true + disable_splash_rendering = true + disable_hyprland_logo = true + swallow_regex=^(.*)(kitty)(.*)$ + layers_hog_keyboard_focus=false } -#reserve place for bar -#monitor=eDP-1,addreserved,45,0,0,0 - -# example window rules -# for windows named/classed as abc and xyz +# window rules windowrule=tile,^(.*)(Spotify)(.*)$ -# windowrule=float,^(.*)(Steam)(.*)$ windowrule=float,^(.*)(OxiCalc)(.*)$ windowrule=float,^(.*)(winecfg.exe)(.*)$ windowrule=float,^(.*)(speed.exe)(.*)$ windowrule=float,^(.*)(copyq)(.*)$ windowrule=center,^(.*)(gnome)(.*)$ -# windowrule=windowdance,^(.*)(ota)(.*)$ -windowrule=forceinput,^(.*)(ota)(.*)$ windowrule=size 1200 800,^(org.gnome.NautilusPreviewer)$ windowrule=center,^(.*)(swappy)(.*)$ -# windowrule=opacity 80,^(.*)(dunst)(.*)$ windowrule=float,title:^(.*)(Spirit)(.*)$ -#windowrule=tile,xyz -#windowrule=float,abc -#windowrule=pseudo,abc -#windowrule=monitor 0,xyz -# example binds +# binds bind=SUPER,S,exec,grim -g "$(slurp)" - | wl-copy -bind=SUPERSHIFTALT,S,exec, grim -g "$(slurp)" $HOME/gits/ost-4semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy +bind=SUPERSHIFTALT,S,exec, grim -g "$(slurp)" $HOME/gits/ost-5semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy bind=SUPERSHIFT,S,exec,grim -g "$(slurp)" - | swappy -f - bind=SUPER,F,exec,firefox bind=SUPER,T,exec,kitty -1 @@ -123,14 +94,13 @@ bind=SUPER,Q,killactive, bind=SUPERSHIFTALT,M,exit, bind=SUPER,E,exec,nautilus --new-window bind=SUPER,N,exec,neovide --novsync -bind=SUPER,M,exec,oxidash --css /home/dashie/gits/oxidash-gtk/style.css +bind=SUPER,M,exec,oxidash --css /home/dashie/gits/oxidash/style.css bind=SUPER,V,togglefloating, bind=SUPER,B,fullscreen, bind=SUPER,R,exec,anyrun -# bind=SUPER,R,exec,rofi -show drun -theme tokyonight -# bind=SUPERSHIFT,R,exec,rofi -show run -theme tokyonight bind=SUPER,C,togglesplit bind=SUPER,G,exec,oxicalc +bind=SUPERSHIFT,G,exec,gamelock bind=SUPERSHIFT,L,exec, playerctl -a pause & swaylock -c 000000 & systemctl suspend bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle bind=,XF86AudioLowerVolume,exec, $HOME/.config/eww/scripts/change-volume sink -5% @@ -140,8 +110,10 @@ bind=,XF86AudioNext,exec, playerctl next bind=,XF86AudioPrev,exec, playerctl previous bind=,XF86MonBrightnessDown,exec, $HOME/.config/eww/scripts/change-brightness brightness 10%- bind=,XF86MonBrightnessUp,exec, $HOME/.config/eww/scripts/change-brightness brightness +10% -bind=SUPER,D,exec,$HOME/.config/eww/scripts/cockpit_toggle +bind=SUPER,D,exec,oxishut --css /home/dashie/gits/OxiShut/style.css bind=SUPER,A,exec,copyq toggle +bind=SUPERSHIFT,W,togglespecialworkspace +bind=SUPER,W,movetoworkspace,special binde=SUPER,J,movefocus,l @@ -202,13 +174,7 @@ bindm=SUPER,mouse:272,movewindow bindm=SUPER,mouse:273,resizewindow #binds for debug testing - -debug { - # overlay=true - } -# bind=SUPERALT,H,pass,^(wlroots)$ # bind=SUPERALT,J,pass,^(wlroots)$ -# # bind=SUPERALT,left,pass,^(wlroots)$ # bind=SUPERALT,right,pass,^(wlroots)$ # bind=SUPERALT,up,pass,^(wlroots)$ @@ -217,18 +183,11 @@ debug { #autostart programs -#exec=~/Documents/scripts/hyprstart.sh -#exec=hyprstart.sh exec-once=hyprpaper -# exec-once=eww daemon -# exec-once=eww open bar exec-once=ironbar -exec-once=element-desktop exec-once=firefox exec-once=streamdeck -n exec-once=copyq --start-server exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec-once= easyeffects --gapplication-service exec-once=nextcloud --background exec-once=oxinoti --css /home/dashie/gits/oxinoti/style.css -# plugin=/home/dashie/gits/hy3/build/libhy3.so diff --git a/hypr_desktop/hyprpaper.conf b/hypr_desktop/hyprpaper.conf index 2137dc8..a3a340b 100644 --- a/hypr_desktop/hyprpaper.conf +++ b/hypr_desktop/hyprpaper.conf @@ -1,8 +1,8 @@ # wallpaper -preload = /home/dashie/Pictures/backgrounds/arch-chan2.jpg -preload = /home/dashie/Pictures/backgrounds/Arch_chan.png -preload = /home/dashie/Pictures/backgrounds/arch-chan3-2560.png -wallpaper = DP-2,/home/dashie/Pictures/backgrounds/arch-chan2.jpg -wallpaper = DP-1,/home/dashie/Pictures/backgrounds/Arch_chan.png -wallpaper = DP-3,/home/dashie/Pictures/backgrounds/arch-chan3-2560.png +preload = /home/dashie/Pictures/backgrounds/tree_1200.jpg +preload = /home/dashie/Pictures/backgrounds/pxfuel.jpg +preload = /home/dashie/Pictures/backgrounds/pxfuel(3).jpg +wallpaper = DP-2,/home/dashie/Pictures/backgrounds/tree_1200.jpg +wallpaper = DP-1,/home/dashie/Pictures/backgrounds/pxfuel.jpg +wallpaper = DP-3,/home/dashie/Pictures/backgrounds/pxfuel(3).jpg diff --git a/hypr_desktop/neovide_backtraces.log b/hypr_desktop/neovide_backtraces.log index 051982a..a2d354d 100644 --- a/hypr_desktop/neovide_backtraces.log +++ b/hypr_desktop/neovide_backtraces.log @@ -13,3 +13,28 @@ 11: __libc_start_main 12: +2023-09-06 13:16:38 - Neovide panicked with the message 'Received event for dead output'. (File: /home/dashie/.cargo/registry/src/github.com-1ecc6299db9ec823/smithay-client-toolkit-0.17.0/src/output.rs; Line: 568, Column: 14) + 0: + 1: + 2: + 3: + 4: + 5: + 6: + 7: + 8: + 9: + 10: + 11: + 12: + 13: + 14: + 15: + 16: + 17: + 18: + 19: + 20: + 21: __libc_start_main + 22: + diff --git a/ironbar/style.css b/ironbar/style.css index 44b4635..a7c244b 100644 --- a/ironbar/style.css +++ b/ironbar/style.css @@ -14,7 +14,7 @@ margin: 2px 0px 0px 5px; border-radius: 10px; /* background-color: #2b2c3b; */ - background-color: #1a1b26; + background-color: #1E1E2E; padding: 2px 5px 2px 5px; } @@ -36,7 +36,7 @@ .audio-box { padding: 2em; - background-color: #1a1b26; + background-color: #1E1E2E; border-radius: 5px; } @@ -59,7 +59,8 @@ .focused { /* margin: 2px 0px 0px 0px; */ padding: 0px 5px 0px 5px; - background-color: #1a1b26; + /* background-color: 1a1b26; */ + background-color: #1E1E2E; font-size: 17px; border-radius: 10px; } @@ -67,7 +68,7 @@ #bar #end { margin: 0px 5px 0px 0px; padding: 0px 5px 0px 5px; - background-color: #1a1b26; + background-color: #1E1E2E; border-radius: 10px; } @@ -76,7 +77,7 @@ margin: 0em 3px; border-radius: 100%; font-size: 13px; - background-color: #1a1b26; + background-color: #1E1E2E; } .popup-button-box { @@ -86,7 +87,7 @@ .clock { padding: 0px 5px 0px 5px; font-size: 17px; - background-color: #1a1b26; + background-color: #1E1E2E; } .clock:hover { @@ -94,7 +95,7 @@ } .custom button { - background-color: #1a1b26; + background-color: #1E1E2E; } .custom button:hover { @@ -111,7 +112,7 @@ } .popup-clock { - background-color: #1a1b26; + background-color: #1E1E2E; border-radius: 5px; padding: 2px 8px 10px 8px; } diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 5b3e368..d686c6f 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,21 +1,20 @@ { - "LazyVim": { "branch": "main", "commit": "aa1cccf230a01bd85d5173f7d87f782fd83caa88" }, - "LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" }, - "alpha-nvim": { "branch": "main", "commit": "7a6b9487dba044a43fde534bf5036f0fda5b6b23" }, - "bufferline.nvim": { "branch": "main", "commit": "417b303328118b6d836ae330142e88771c48a8a3" }, - "catppuccin": { "branch": "main", "commit": "b573866ef64122119668f375ebb794bcb3b518e2" }, + "LazyVim": { "branch": "main", "commit": "a72a84972d85e5bbc6b9d60a0983b37efef21b8a" }, + "LuaSnip": { "branch": "master", "commit": "c5fb16a934892086d4ba01bac48b77c65435025e" }, + "alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" }, + "bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" }, + "catppuccin": { "branch": "main", "commit": "85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280" }, "cmp-async-path": { "branch": "main", "commit": "d8229a93d7b71f22c66ca35ac9e6c6cd850ec61d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "crates.nvim": { "branch": "main", "commit": "d5caf28aba49e81ac4099426231f3cf3c151013a" }, - "dressing.nvim": { "branch": "master", "commit": "ee571505f3566f84fd252e76c4ce6df6eaf2fb94" }, - "editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" }, - "flash.nvim": { "branch": "main", "commit": "967117690bd677cb7b6a87f0bc0077d2c0be3a27" }, - "friendly-snippets": { "branch": "main", "commit": "377d45475b49e37460a902d6d569d2093d4037d0" }, - "git-blame.nvim": { "branch": "master", "commit": "41e22dc843c6821a410db57be0b7025154f9d8ec" }, - "gitsigns.nvim": { "branch": "main", "commit": "749267aaa863c30d721c9913699c5d94e0c07dd3" }, + "crates.nvim": { "branch": "main", "commit": "db629b5cfb2aa8de9e44efb795657297ee95ca91" }, + "dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" }, + "flash.nvim": { "branch": "main", "commit": "cc8c7e03987134997d74ee87e55a5717279f2d05" }, + "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, + "git-blame.nvim": { "branch": "master", "commit": "a36b277e527f9d34efe16c3636555ce0e0c0464c" }, + "gitsigns.nvim": { "branch": "main", "commit": "bce4576a9047085a528c479a7fe1e2f6b787b6c1" }, "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, "instant.nvim": { "branch": "master", "commit": "294b6d08143b3db8f9db7f606829270149e1a786" }, @@ -23,49 +22,54 @@ "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "2997f467881ac4faa6f8c5e7065e3a672297c8ad" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "2451adb9bdb0fd32140bf3aa8dbc17ff60050db3" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" }, - "mason.nvim": { "branch": "main", "commit": "a51c2d063c5377ee9e58c5f9cda7c7436787be72" }, + "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, "mini.ai": { "branch": "main", "commit": "7ae226f331885e6f30e9a8229e113debc59308ae" }, "mini.bufremove": { "branch": "main", "commit": "7821606e35c1ac931b56d8e3155f45ffe76ee7e5" }, "mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" }, + "mini.hipatterns": { "branch": "main", "commit": "eb93970cf1f92233e6475008dfc10fac7b025475" }, "mini.indentscope": { "branch": "main", "commit": "f60e9b51a6214c73a170ffc5445ce91560981031" }, "mini.pairs": { "branch": "main", "commit": "dfa9f6e2576bb8853be277d96b735af59d9be7c2" }, "mini.surround": { "branch": "main", "commit": "9d1956b576d7051da3a483b251dfc778121c60db" }, - "neoconf.nvim": { "branch": "main", "commit": "08f146d53e075055500dca35e93281faff95716b" }, - "neodev.nvim": { "branch": "main", "commit": "c05273b0833021fee8069ea4258fc5ea327596ac" }, + "neoconf.nvim": { "branch": "main", "commit": "b7cde4ba41eabf9bec9464c990bcf84a0fef4526" }, + "neodev.nvim": { "branch": "main", "commit": "e9dd1535759794635a951644c183beb327879407" }, "neoscroll.nvim": { "branch": "master", "commit": "4bc0212e9f2a7bc7fe7a6bceb15b33e39f0f41fb" }, - "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, + "neotest": { "branch": "master", "commit": "1e67a504d03def3a6a1125d934cb511680f72555" }, + "neotest-dotnet": { "branch": "main", "commit": "6528e761e4528aed3f4b60aff4c9f3406beb3cdd" }, + "neotest-go": { "branch": "main", "commit": "1a15e1136db43775214a3e7a598f8930c29c94b7" }, + "neotest-java": { "branch": "main", "commit": "5b915ad065e24149983a672c63e7273fe742fc0e" }, + "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" }, + "neotest-rust": { "branch": "main", "commit": "139cff7c85598ec591b5ed7d71ce8ed3b5313b97" }, + "nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "51f1e11a89ec701221877532ee1a23557d291dd5" }, - "nvim-dap": { "branch": "master", "commit": "897c433ff2fbcf6f71a57bf18460d810e173d1e0" }, - "nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" }, + "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, + "nvim-dap": { "branch": "master", "commit": "b3d4408e29d924fe130c9397a7c3b3630b3ea671" }, + "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-highlight-colors": { "branch": "main", "commit": "231547093a788b925b8fc36351ad422701c3a8c8" }, - "nvim-jdtls": { "branch": "master", "commit": "095dc490f362adc85be66dc14bd9665ddd94413b" }, - "nvim-lspconfig": { "branch": "master", "commit": "93c6826b16217eaef568ca5c224ea5d0c12bbb82" }, - "nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" }, - "nvim-spectre": { "branch": "master", "commit": "eb17a856a6f17e03d8d610cbc00cd9f2f39e3fd7" }, - "nvim-tree.lua": { "branch": "master", "commit": "920868dba13466586897a8f40220eca6b2caac41" }, - "nvim-treesitter": { "branch": "master", "commit": "2ee71c1a2fa74c10692be10ae420ff0c3a02eb3c" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "56272167a6dead91c47c02dbdbfe1ae5643c59f5" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "9bff161dfece6ecf3459e6e46ca42e49f9ed939f" }, - "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, + "nvim-jdtls": { "branch": "master", "commit": "3ca419c52a7c20a2565237db2c110ed68fc7e6f1" }, + "nvim-lspconfig": { "branch": "master", "commit": "4266f9bb36b4fb09edd19b67d95043cf7ff88ddf" }, + "nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" }, + "nvim-spectre": { "branch": "master", "commit": "97cfd1b0f5a6ab35979ce1bee6c17f54745fd1e5" }, + "nvim-tree.lua": { "branch": "master", "commit": "a3aa3b47eac8b6289f028743bef4ce9eb0f6782e" }, + "nvim-treesitter": { "branch": "master", "commit": "b7f2dd5dfbd24a1239844e15637b637b990df164" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" }, + "nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" }, "persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" }, - "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, - "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "65565c62963579897d28390dbd1ba8fb15ba545f" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" }, + "plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" }, + "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "c3670c088bfb83e892ae69989875a1dfdd5cff99" }, "telescope-project.nvim": { "branch": "master", "commit": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "2d92125620417fbea82ec30303823e3cd69e90e8" }, + "telescope.nvim": { "branch": "master", "commit": "40c8d2fc2b729dd442eda093cf8c9496d6e23732" }, "todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" }, - "toggleterm.nvim": { "branch": "main", "commit": "12cba0a1967b4f3f31903484dec72a6100dcf515" }, - "tokyonight.nvim": { "branch": "main", "commit": "1ee11019f8a81dac989ae1db1a013e3d582e2033" }, - "trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" }, - "typst.vim": { "branch": "main", "commit": "97f21818cb8d3d5ed6bb4b672ddb5af975aab71a" }, - "vim-illuminate": { "branch": "master", "commit": "76f28e858f1caae87bfa45fb4fd09e4b053fc45b" }, + "tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" }, + "trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" }, + "typst.vim": { "branch": "main", "commit": "65f9e78c11829a643d1539f3481c0ff875c83603" }, + "vim-illuminate": { "branch": "master", "commit": "6acf7d4a18255a3ddc43770866c8e148fe85af7b" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" }, - "vimtex": { "branch": "master", "commit": "534fd725f2475a9083b032e402c7e73b8a3fc6bb" }, + "vimtex": { "branch": "master", "commit": "d7221267f5642e5904a45a8e661f751dff26c1a9" }, "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" } } \ No newline at end of file diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index 3342b9b..cc18066 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua @@ -31,15 +31,25 @@ map("n", "dc", ':lua require("dap").continue()', { desc = "Continue" map("n", "dt", ':lua require("dap").continue() :lua require("dapui").toggle()', { desc = "Open DAP" }) map("n", "dq", ':lua require("dapui").toggle() :lua require("dap").close()', { desc = "Close DAP" }) +-- window movement +map("n", "", [[wincmd h]], opts) +map("n", "", [[wincmd l]], opts) +map("n", "", [[wincmd j]], opts) +map("i", "", [[wincmd h]], opts) +map("i", "", [[wincmd l]], opts) +map("i", "", [[wincmd j]], opts) + -- file tree map("n", "", function() require("nvim-tree.api").tree.toggle() end, opts) -- toggle terminal -map("n", "", function() - require("toggleterm").toggle(1) -end, { desc = "Toggle Terminal" }) +local lazyterm = function() + Util.float_term(nil, { cwd = Util.get_root() }) +end +map("n", "", lazyterm, { desc = "Terminal (root dir)" }) +map("t", "", "close", { desc = "Hide Terminal" }) -- semicolon thing -- map("i","" ,"A;", {desc = "add semi and newline"}) @@ -78,37 +88,6 @@ map("n", "gb", function() vim.cmd(":GitBlameToggle") end, { desc = "gitui (cwd)" }) --- window switching -function _G.set_terminal_maps() - local opts = { buffer = 0 } - vim.keymap.set("t", "", [[]], opts) - vim.keymap.set("t", "jk", [[]], opts) - vim.keymap.set("t", "", [[wincmd h]], opts) - vim.keymap.set("t", "", [[wincmd j]], opts) - vim.keymap.set("n", "", function() - require("toggleterm").toggle(1) - end, opts) - vim.keymap.set("i", "", function() - require("toggleterm").toggle(1) - end, opts) - vim.keymap.set("t", "", function() - require("toggleterm").toggle(1) - end, opts) -end - --- if you only want these mappings for toggle term use term://*toggleterm#* instead -vim.cmd("autocmd! TermOpen term://* lua set_terminal_maps()") -map("t", "", [[wincmd h]], opts) -map("t", "", [[wincmd j]], opts) -map("t", "", [[wincmd k]], opts) -map("t", "", [[wincmd l]], opts) -map("n", "", [[wincmd h]], opts) -map("n", "", [[wincmd l]], opts) -map("n", "", [[wincmd j]], opts) -map("i", "", [[wincmd h]], opts) -map("i", "", [[wincmd l]], opts) -map("i", "", [[wincmd j]], opts) - -- harpoon man map("n", "h1", function() require("harpoon.ui").nav_file(1) diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index 9f14d86..b546940 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -11,12 +11,13 @@ require("lazy").setup({ spec = { -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "plugins.plugins" }, + { import = "plugins" }, -- import any extras modules here -- { import = "lazyvim.plugins.extras.lang.typescript" }, -- { import = "lazyvim.plugins.extras.lang.json" }, -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins - { import = "plugins" }, }, defaults = { -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. @@ -27,7 +28,7 @@ require("lazy").setup({ version = false, -- always use the latest git commit -- version = "*", -- try installing the latest stable version for plugins that support semver }, - install = { colorscheme = { "tokyonight", "habamax" } }, + install = { colorscheme = { "tokyonight", "catppuccin-mocha" } }, checker = { enabled = true, notify = false }, change_detection = { enabled = true, notify = false }, --know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. performance = { diff --git a/nvim/lua/config/lsp-keymap.lua b/nvim/lua/config/lsp-keymap.lua index 25451e2..8fe5ab0 100644 --- a/nvim/lua/config/lsp-keymap.lua +++ b/nvim/lua/config/lsp-keymap.lua @@ -7,9 +7,8 @@ M._keys = nil function M.get() local format = require("lazyvim.plugins.lsp.format").format if not M._keys then - ---@class PluginLspKeys - -- stylua: ignore - M._keys = { + ---@class PluginLspKeys + M._keys = { { "cld", vim.diagnostic.open_float, desc = "Line Diagnostics" }, { "cl", "LspInfo", desc = "Lsp Info" }, { "ca", "Telescope lsp_definitions", desc = "Goto Definition", has = "definition" }, @@ -28,23 +27,44 @@ function M.get() { "[w", M.diagnostic_goto(false, "WARN"), desc = "Prev Warning" }, { "", format, desc = "Format Document", has = "documentFormatting" }, -- { "cf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" }, - { "cq",function() - vim.lsp.buf.code_action({ + { + "cq", + function() + vim.lsp.buf.code_action({ context = { only = { "quickfix", + "quickfix.ltex", "source", + "source.fixAll", + "source.organizeImports", + "", }, - diagnostics = {}, }, - }) - end, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" }, + }) + end, + desc = "Fix", + mode = { "n", "v" }, + has = "codeAction", + }, { "cQ", - vim.lsp.buf.code_action, - desc = "Source Action", + function() + vim.lsp.buf.code_action({ + context = { + only = { + "refactor", + "refactor.inline", + "refactor.extract", + "refactor.rewrite", + }, + }, + }) + end, + desc = "Refactor", + mode = { "n", "v" }, has = "codeAction", - } + }, } if require("lazyvim.util").has("inc-rename.nvim") then M._keys[#M._keys + 1] = { diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index e2f4cbd..4720084 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -102,7 +102,12 @@ return { }, }, }, - typst_lsp = {}, + typst_lsp = { + settings = { + experimentalFormatterMode = "On", + exportPdf = "onSave", + }, + }, ltex = { settings = { ltex = { @@ -120,6 +125,7 @@ return { "tex", "pandoc", "typst", + "typ", }, }, texlab = {}, @@ -156,7 +162,7 @@ return { require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat -- setup formatting and keymaps require("lazyvim.util").on_attach(function(client, buffer) - require("lazyvim.plugins.lsp.format").setup(opts) + require("lazyvim.plugins.lsp.format").setup(opts) require("config.lsp-keymap").on_attach(client, buffer) end) diff --git a/nvim/lua/plugins/plugins.lua b/nvim/lua/plugins/plugins.lua index aabedbd..1db6bad 100644 --- a/nvim/lua/plugins/plugins.lua +++ b/nvim/lua/plugins/plugins.lua @@ -3,6 +3,7 @@ return { "LazyVim/LazyVim", opts = { colorscheme = "tokyonight-night", + -- colorscheme = "catppuccin-mocha", }, }, { @@ -15,31 +16,6 @@ return { require("telescope").setup(opts) end, }, - { - "akinsho/toggleterm.nvim", - lazy = true, - opts = { - autochdir = true, - }, - }, - { - "brenoprata10/nvim-highlight-colors", - lazy = true, - event = { "BufReadPre", "BufNewFile" }, - config = function(_, _) - require("nvim-highlight-colors").setup({ - enable_tailwind = true, - }) - vim.cmd(":hi clear CursorLine") - vim.cmd(":hi clear CursorLineFold") - vim.cmd(":hi clear CursorLineSign") - end, - }, - { - "gpanders/editorconfig.nvim", - event = { "BufReadPre", "BufNewFile" }, - lazy = true, - }, { "lvimuser/lsp-inlayhints.nvim", event = { "BufReadPre", "BufNewFile" }, @@ -107,7 +83,6 @@ return { { "lervag/vimtex", config = function() - -- require("vimtex").setup() vim.cmd("let g:vimtex_quickfix_mode=0") vim.cmd("let g:vimtex_view_general_viewer = 'evince'") vim.cmd("let g:vimtex_compiler_method = 'latexmk'") @@ -212,4 +187,169 @@ return { { "mg979/vim-visual-multi", }, + { + "rouge8/neotest-rust", + }, + { + "Issafalcon/neotest-dotnet", + }, + { + "andy-bell101/neotest-java", + }, + { + "nvim-neotest/neotest-go", + }, + { + "nvim-neotest/neotest-python", + }, + { + "nvim-neotest/neotest", + dependencies = { + "rouge8/neotest-rust", + "Issafalcon/neotest-dotnet", + "andy-bell101/neotest-java", + "nvim-neotest/neotest-go", + "nvim-neotest/neotest-python", + }, + opts = { + adapters = { + ["neotest-rust"] = {}, + ["neotest-dotnet"] = {}, + ["neotest-java"] = {}, + ["neotest-go"] = {}, + ["neotest-python"] = {}, + }, + status = { virtual_text = true }, + output = { open_on_run = true }, + quickfix = { + open = function() + if require("lazyvim.util").has("trouble.nvim") then + vim.cmd("Trouble quickfix") + else + vim.cmd("copen") + end + end, + }, + }, + config = function(_, opts) + local neotest_ns = vim.api.nvim_create_namespace("neotest") + vim.diagnostic.config({ + virtual_text = { + format = function(diagnostic) + -- Replace newline and tab characters with space for more compact diagnostics + local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "") + return message + end, + }, + }, neotest_ns) + + if opts.adapters then + local adapters = {} + for name, config in pairs(opts.adapters or {}) do + if type(name) == "number" then + if type(config) == "string" then + config = require(config) + end + adapters[#adapters + 1] = config + elseif config ~= false then + local adapter = require(name) + if type(config) == "table" and not vim.tbl_isempty(config) then + local meta = getmetatable(adapter) + if adapter.setup then + adapter.setup(config) + elseif meta and meta.__call then + adapter(config) + else + error("Adapter " .. name .. " does not support setup") + end + end + adapters[#adapters + 1] = adapter + end + end + opts.adapters = adapters + end + + require("neotest").setup(opts) + end, + -- stylua: ignore + keys = { + { "tT", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, + { "tt", function() require("neotest").run.run(vim.loop.cwd()) end, desc = "Run All Test Files" }, + { "tr", function() require("neotest").run.run() end, desc = "Run Nearest" }, + { "ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" }, + { "to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" }, + { "tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" }, + { "tS", function() require("neotest").run.stop() end, desc = "Stop" }, + }, + }, + { + "echasnovski/mini.hipatterns", + event = "BufReadPre", + opts = function() + local hi = require("mini.hipatterns") + return { + -- custom LazyVim option to enable the tailwind integration + tailwind = { + enabled = true, + ft = { "typescriptreact", "javascriptreact", "css", "javascript", "typescript", "html" }, + -- full: the whole css class will be highlighted + -- compact: only the color will be highlighted + style = "full", + }, + highlighters = { + hex_color = hi.gen_highlighter.hex_color({ priority = 2000 }), + }, + } + end, + config = function(_, opts) + -- backward compatibility + if opts.tailwind == true then + opts.tailwind = { + enabled = true, + ft = { "typescriptreact", "javascriptreact", "css", "javascript", "typescript", "html" }, + style = "full", + } + end + if type(opts.tailwind) == "table" and opts.tailwind.enabled then + -- reset hl groups when colorscheme changes + vim.api.nvim_create_autocmd("ColorScheme", { + callback = function() + M.hl = {} + end, + }) + opts.highlighters.tailwind = { + pattern = function() + if not vim.tbl_contains(opts.tailwind.ft, vim.bo.filetype) then + return + end + if opts.tailwind.style == "full" then + return "%f[%w:-]()[%w:-]+%-[a-z%-]+%-%d+()%f[^%w:-]" + elseif opts.tailwind.style == "compact" then + return "%f[%w:-][%w:-]+%-()[a-z%-]+%-%d+()%f[^%w:-]" + end + end, + group = function(_, _, m) + ---@type string + local match = m.full_match + ---@type string, number + local color, shade = match:match("[%w-]+%-([a-z%-]+)%-(%d+)") + shade = tonumber(shade) + local bg = vim.tbl_get(M.colors, color, shade) + if bg then + local hl = "MiniHipatternsTailwind" .. color .. shade + if not M.hl[hl] then + M.hl[hl] = true + local bg_shade = shade == 500 and 950 or shade < 500 and 900 or 100 + local fg = vim.tbl_get(M.colors, color, bg_shade) + vim.api.nvim_set_hl(0, hl, { bg = "#" .. bg, fg = "#" .. fg }) + end + return hl + end + end, + priority = 2000, + } + end + require("mini.hipatterns").setup(opts) + end, + }, }