From 442ad2c8be8d7c42340fe1c233aa74283aefbee3 Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 21 Sep 2022 04:39:15 +0200 Subject: [PATCH 01/26] nvim: added markdown plugin for concealment --- .config/nvim/init.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index c7e1c4e..db95434 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -13,6 +13,7 @@ Plug 'airblade/vim-gitgutter' " git upgrades Plug 'alvan/vim-closetag' " auto close HTML tags Plug 'donRaphaco/neotex' , {'for': 'tex'} " asynchronous pdf rendering for pdf Plug 'fatih/vim-go' , {'for': 'go'} " better support for golang +Plug 'godlygeek/tabular', {'for': 'md'} " needed for preservim/vim-markdown Plug 'hrsh7th/cmp-buffer' " autocompletion bridge for buffer Plug 'hrsh7th/cmp-path' " autocompletion bridge for filesystem Plug 'hrsh7th/nvim-cmp' " autocompletion @@ -25,6 +26,7 @@ Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} " show tags Plug 'mattesgroeger/vim-bookmarks' " Set bookmarks Plug 'neovim/nvim-lspconfig' " Language server client Plug 'onsails/lspkind-nvim' " icons on completion +Plug 'preservim/vim-markdown', {'for': 'md'} " markdown enhancements Plug 'qpkorr/vim-renamer' " bulk renamer Plug 'raimondi/delimitmate' " automatic closing of brackets Plug 'rrethy/vim-hexokinase' , {'do': 'make hexokinase'} " color Preview @@ -255,6 +257,11 @@ require'lspconfig'.jdtls.setup{ EOF +" preservim/vim-markdown + +let g:vim_markdown_folding_style_pythonic = 1 +let g:vim_markdown_folding_disabled = 1 + " rrethy/vim-hexokinase let g:Hexokinase_refreshEvents = ['InsertLeave'] let g:Hexokinase_optInPatterns = [ @@ -435,6 +442,9 @@ autocmd BufEnter,FileType nim set colorcolumn=80 autocmd BufEnter,FileType python set colorcolumn=80 autocmd BufEnter,FileType tex set colorcolumn=80 +" conceallevel +autocmd BufEnter,FileType markdown set conceallevel=2 + "" colorscheme set background=dark colorscheme tccs From e3a9edf5039692a35ef18b37925085e019760842 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sun, 20 Nov 2022 20:49:22 +0100 Subject: [PATCH 02/26] flatpak: added programs to path --- .config/sxhkd/sxhkdrc | 6 ------ .profile | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 8621cb9..e7cc7ce 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -4,16 +4,10 @@ super + b $BROWSER super + f $TERMINAL -e $FILE -super + i - intellij-idea-ultimate-edition super + m thunderbird -super + p - $TERMINAL -e ncmpcpp super + shift + r dmenu_run -c -l 20 -super + s - startpagesearch super + F5 togglemonitor super + F6 diff --git a/.profile b/.profile index 799c986..9fb19d4 100644 --- a/.profile +++ b/.profile @@ -4,6 +4,9 @@ # Adds `~/.local/bin` and all subdirectories to $PATH export PATH="${PATH}:$(du "${HOME}/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" +# Add flatpak to path +export PATH="/var/lib/flatpak/exports/bin:${PATH}" + export BROWSER="firefox" export RTV_BROWSER="qutebrowser" export EDITOR="nvim" From 851cd0945a5b004f66e52bbec1b1861279cbd998 Mon Sep 17 00:00:00 2001 From: tiyn Date: Mon, 21 Nov 2022 00:56:59 +0100 Subject: [PATCH 03/26] fonts: added japanese sans font --- .config/fontconfig/fonts.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index 582601d..093c82f 100644 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -23,6 +23,7 @@ Linux Biolinum Joy Pixels Noto Color Emoji + adobe-source-han-sans-jp-fonts From 32c60c1dcae132e8f9ff1adb9db2aadb56370545 Mon Sep 17 00:00:00 2001 From: tiyn Date: Mon, 5 Dec 2022 03:04:27 +0100 Subject: [PATCH 04/26] mime: removed firefox for rss due to loop --- .config/mimeapps.list | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/mimeapps.list b/.config/mimeapps.list index c5212d2..b034271 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -25,5 +25,4 @@ x-scheme-handler/mid=userapp-Thunderbird-ANNRB1.desktop [Added Associations] x-scheme-handler/mailto=userapp-Thunderbird-ANNRB1.desktop; x-scheme-handler/mid=userapp-Thunderbird-ANNRB1.desktop; -application/rss+xml=firefox.desktop; application/pdf=firefox.desktop; From 0eb506ec2b3b6f01bd000f256a911f7e1d086a0f Mon Sep 17 00:00:00 2001 From: tiyn Date: Mon, 5 Dec 2022 03:43:22 +0100 Subject: [PATCH 05/26] mime: minimal mimeapps list and applications added --- .config/mimeapps.list | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.config/mimeapps.list b/.config/mimeapps.list index b034271..374a264 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -3,6 +3,7 @@ text/plain=text.desktop; text/x-shellscript=text.desktop; application/pdf=pdf.desktop; application/epub+zip=pdf.desktop; +application/rss+xml=text.desktop; image/png=img.desktop; image/jpeg=img.desktop; image/gif=img.desktop; @@ -17,12 +18,3 @@ application/x-extension-shtml=browser.desktop application/xhtml+xml=browser.desktop application/x-extension-xhtml=browser.desktop application/x-extension-xht=browser.desktop -x-scheme-handler/discord-610508934456934412=discord-610508934456934412.desktop -x-scheme-handler/mailto=userapp-Thunderbird-ANNRB1.desktop -message/rfc822=userapp-Thunderbird-ANNRB1.desktop -x-scheme-handler/mid=userapp-Thunderbird-ANNRB1.desktop - -[Added Associations] -x-scheme-handler/mailto=userapp-Thunderbird-ANNRB1.desktop; -x-scheme-handler/mid=userapp-Thunderbird-ANNRB1.desktop; -application/pdf=firefox.desktop; From 00785a397cb3d9a5b4c11e2de34c34845d8b2cc1 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 3 Jan 2023 01:43:27 +0100 Subject: [PATCH 06/26] xorg: sleaker startup --- .config/xorg/xprofile | 1 - .xinitrc | 2 -- 2 files changed, 3 deletions(-) diff --git a/.config/xorg/xprofile b/.config/xorg/xprofile index fff6de7..394a5d7 100644 --- a/.config/xorg/xprofile +++ b/.config/xorg/xprofile @@ -4,7 +4,6 @@ xset r rate 300 50 & # Speed xrate up unclutter & # Remove mouse when idle dunst & # dunst for notifications redshift & # redshift for saving your eyes -mpd & # starts the mpd server for music $STATUSBAR & # for refreshing the statusbar xcompmgr & # compositor for transparency nextcloud & # for my cloud diff --git a/.xinitrc b/.xinitrc index 2912428..59c83d3 100644 --- a/.xinitrc +++ b/.xinitrc @@ -6,7 +6,5 @@ xrandr --auto [ -f "$HOME/.config/xorg/Xdefaults" ] && xrdb -merge "$HOME/.config/xorg/Xdefaults" [ -f "$HOME/.config/xorg/Xpcspec" ] && xrdb -merge "$HOME/.config/xorg/Xpcspec" -xterm -geometry 80x24+10+10 -fn 10x20 - setbg exec dwm From 891e9ef05c5bdd2df6687afff04f077ea9e0c59e Mon Sep 17 00:00:00 2001 From: TiynGER Date: Tue, 3 Jan 2023 02:23:57 +0100 Subject: [PATCH 07/26] xorg: local file for autostart --- .config/xorg/{Xdefaults => xdefaults} | 0 .xinitrc | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) rename .config/xorg/{Xdefaults => xdefaults} (100%) diff --git a/.config/xorg/Xdefaults b/.config/xorg/xdefaults similarity index 100% rename from .config/xorg/Xdefaults rename to .config/xorg/xdefaults diff --git a/.xinitrc b/.xinitrc index 59c83d3..5e02617 100644 --- a/.xinitrc +++ b/.xinitrc @@ -3,8 +3,9 @@ xrandr --auto #adding ressources [ -f "$HOME/.config/xorg/xprofile" ] && . "$HOME/.config/xorg/xprofile" -[ -f "$HOME/.config/xorg/Xdefaults" ] && xrdb -merge "$HOME/.config/xorg/Xdefaults" -[ -f "$HOME/.config/xorg/Xpcspec" ] && xrdb -merge "$HOME/.config/xorg/Xpcspec" +[ -f "$HOME/.config/xorg/xlocal" ] && . "$HOME/.config/xorg/xlocal" +[ -f "$HOME/.config/xorg/xdefaults" ] && xrdb -merge "$HOME/.config/xorg/xdefaults" +[ -f "$HOME/.config/xorg/xpcspec" ] && xrdb -merge "$HOME/.config/xorg/xpcspec" setbg exec dwm From 46cbbb88952ec34be3c9e0c4986b7c7151664413 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 3 Jan 2023 02:27:32 +0100 Subject: [PATCH 08/26] xorg: description for xinit --- .xinitrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.xinitrc b/.xinitrc index 5e02617..4908e1c 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,11 +1,11 @@ #!/bin/sh xrandr --auto -#adding ressources -[ -f "$HOME/.config/xorg/xprofile" ] && . "$HOME/.config/xorg/xprofile" -[ -f "$HOME/.config/xorg/xlocal" ] && . "$HOME/.config/xorg/xlocal" -[ -f "$HOME/.config/xorg/xdefaults" ] && xrdb -merge "$HOME/.config/xorg/xdefaults" -[ -f "$HOME/.config/xorg/xpcspec" ] && xrdb -merge "$HOME/.config/xorg/xpcspec" + +[ -f "$HOME/.config/xorg/xprofile" ] && . "$HOME/.config/xorg/xprofile" # global autostart +[ -f "$HOME/.config/xorg/xlocal" ] && . "$HOME/.config/xorg/xlocal" # local autostart +[ -f "$HOME/.config/xorg/xdefaults" ] && xrdb -merge "$HOME/.config/xorg/xdefaults" # global resources +[ -f "$HOME/.config/xorg/xpcspec" ] && xrdb -merge "$HOME/.config/xorg/xpcspec" # local resources setbg exec dwm From b8a39fd5f6295faa0d66d3d125c62d23db4aea58 Mon Sep 17 00:00:00 2001 From: tiyn Date: Thu, 5 Jan 2023 00:34:41 +0100 Subject: [PATCH 09/26] easyeffects: voice preset --- .config/easyeffects/input/voice.json | 133 +++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .config/easyeffects/input/voice.json diff --git a/.config/easyeffects/input/voice.json b/.config/easyeffects/input/voice.json new file mode 100644 index 0000000..6426793 --- /dev/null +++ b/.config/easyeffects/input/voice.json @@ -0,0 +1,133 @@ +{ + "input": { + "blocklist": [], + "compressor#0": { + "attack": 20.0, + "boost-amount": 6.0, + "boost-threshold": -72.0, + "bypass": false, + "dry": -100.0, + "hpf-frequency": 10.0, + "hpf-mode": "off", + "input-gain": 0.0, + "knee": -6.0, + "lpf-frequency": 20000.0, + "lpf-mode": "off", + "makeup": 0.0, + "mode": "Downward", + "output-gain": 0.0, + "ratio": 4.0, + "release": 100.0, + "release-threshold": -100.0, + "sidechain": { + "lookahead": 0.0, + "mode": "RMS", + "preamp": 0.0, + "reactivity": 10.0, + "source": "Middle", + "type": "Feed-forward" + }, + "threshold": -12.0, + "wet": 0.0 + }, + "deesser#0": { + "bypass": false, + "detection": "RMS", + "f1-freq": 6000.0, + "f1-level": 0.0, + "f2-freq": 4500.0, + "f2-level": 12.0, + "f2-q": 1.0, + "input-gain": 0.0, + "laxity": 15, + "makeup": 0.0, + "mode": "Wide", + "output-gain": 0.0, + "ratio": 3.0, + "sc-listen": false, + "threshold": -18.0 + }, + "filter#0": { + "bypass": false, + "frequency": 80.0, + "inertia": 20.0, + "input-gain": 0.0, + "mode": "12dB/oct Highpass", + "output-gain": 0.0, + "resonance": -3.0 + }, + "gate#0": { + "attack": 5.0, + "bypass": false, + "curve-threshold": -24.0, + "curve-zone": -6.0, + "dry": -100.0, + "hpf-frequency": 10.0, + "hpf-mode": "off", + "hysteresis": false, + "hysteresis-threshold": -12.0, + "hysteresis-zone": -6.0, + "input-gain": 0.0, + "lpf-frequency": 20000.0, + "lpf-mode": "off", + "makeup": 0.0, + "output-gain": 0.0, + "reduction": -12.0, + "release": 100.0, + "sidechain": { + "input": "Internal", + "lookahead": 0.0, + "mode": "RMS", + "preamp": 0.0, + "reactivity": 10.0, + "source": "Middle" + }, + "wet": 0.0 + }, + "limiter#0": { + "alr": false, + "alr-attack": 5.0, + "alr-knee": 0.0, + "alr-release": 50.0, + "attack": 5.0, + "bypass": false, + "dithering": "None", + "external-sidechain": false, + "gain-boost": true, + "input-gain": 0.0, + "lookahead": 5.0, + "mode": "Herm Thin", + "output-gain": 0.0, + "oversampling": "None", + "release": 5.0, + "sidechain-preamp": 0.0, + "stereo-link": 100.0, + "threshold": -1.0 + }, + "loudness#0": { + "bypass": false, + "clipping": false, + "clipping-range": 6.0, + "fft": "4096", + "input-gain": 0.0, + "output-gain": -20.0, + "std": "ISO226-2003", + "volume": -6.499999999999993 + }, + "plugins_order": [ + "compressor#0", + "deesser#0", + "filter#0", + "gate#0", + "rnnoise", + "limiter#0", + "loudness#0" + ], + "rnnoise#0": { + "bypass": false, + "input-gain": 0.0, + "model-path": "", + "output-gain": 0.0 + } + } +} From 76aaa776d50e21ff5b137e4bc9cb34d8b07e0a98 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 10 Jan 2023 01:14:44 +0100 Subject: [PATCH 10/26] maimpick: adapted from lukesmithxyz --- .local/bin/tools/maimpick | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 .local/bin/tools/maimpick diff --git a/.local/bin/tools/maimpick b/.local/bin/tools/maimpick new file mode 100755 index 0000000..033b7d6 --- /dev/null +++ b/.local/bin/tools/maimpick @@ -0,0 +1,18 @@ +#!/bin/sh + +# Requires maim. It lets you choose the kind of screenshot to take, +# including copying the image or even highlighting an area to copy. + +output="$HOME/downloads/screenshot-$(date '+%y%m%d-%H%M-%S').png" +xclip_cmd="xclip -sel clip -t image/png" + +case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (clipboard)\\ncurrent window (clipboard)\\nfull screen (clipboard)\\ncolor picker (clipboard)" | dmenu -l 6 -i -p "Screenshot which area?")" in + "a selected area") maim -s $output ;; + "current window") maim -i "$(xdotool getactivewindow)" $output ;; + "full screen") maim $output ;; + "a selected area (clipboard)") maim -s | ${xclip_cmd} ;; + "current window (clipboard)") maim -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;; + "full screen (clipboard)") maim | ${xclip_cmd} ;; + "color picker (clipboard)") maim -st 0 | convert - -resize 1x1\! -format '%[pixel:p{0,0}]' info:- | ${xclip_cmd} ;; +esac + From 9bd93f5e4e97b2ac6334b7dbe8a7f306ba1dbba9 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 10 Jan 2023 01:15:12 +0100 Subject: [PATCH 11/26] nvim: fixed outdated function --- .config/nvim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index db95434..dd44492 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -119,7 +119,7 @@ let g:bookmark_highlight_lines = 1 lua << EOF -- Add additional capabilities supported by nvim-cmp local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) +capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) -- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' From a96c3076889beacd4e5d15b33dfed3fdefd0cbe8 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 10 Jan 2023 01:25:26 +0100 Subject: [PATCH 12/26] maimpick: added sxhkd key --- .config/sxhkd/sxhkdrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index e7cc7ce..47d0fa6 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -6,6 +6,8 @@ super + f $TERMINAL -e $FILE super + m thunderbird +super + x + pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config' super + shift + r dmenu_run -c -l 20 super + F5 @@ -24,6 +26,9 @@ super + F11 prompt "Shutdown computer?" "sudo -A shutdown -h now" super + F12 prompt "Reboot computer?" "sudo -A reboot now" +super + Print + maimpick + XF86Launch1 xset dpms force off XF86AudioMute @@ -38,3 +43,4 @@ XF86MonBrightnessDown light -U 15 XF86MonBrightnessUp light -A 15 + From 42c68318501a6558b5c21f3240c814e920ea5371 Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Tue, 10 Jan 2023 01:58:41 +0100 Subject: [PATCH 13/26] Update README.md --- README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 65d56b5..77778a8 100644 --- a/README.md +++ b/README.md @@ -43,23 +43,25 @@ There are various shortcuts and hotkeys used in this version. Included in my bui | ModKey | Shift | Key | Function | | ------ | ----- | ----------------- | --------------------------------------------------------- | -| Super | | Return | Spawn terminal | +| Super | | Return | Spawn terminal | | Super | | b | Spawn browser | | Super | Shift | b | Toggle dwmbar | -| Super | | f | Spawn filemanager | +| Super | | f | Spawn filemanager | | Super | | i | Spawn intellij-idea-ultimate-edition | | Super | | m | Spawn thunderbird | | Super | | p | Spawn ncmpcpp in st | -| Super | Shift | r | (dmenu) dmenu\_run | -| Super | | s | (dmenu) startpagesearch | -| Super | | F5 | enable 2 Screen Monitor | -| Super | | F6 | toggle touchpad | -| Super | | F7 | (dmenu) mounting drives | -| Super | | F8 | (dmenu) unmounting drives | +| Super | Shift | r | (dmenu) dmenu\_run | +| Super | Shift | r | Restart sxkd | +| Super | | s | (dmenu) Startpagesearch | +| Super | | F5 | Enable 2 Screen Monitor | +| Super | | F6 | Toggle touchpad | +| Super | | F7 | (dmenu) Mounting drives | +| Super | | F8 | (dmenu) Unmounting drives | | Super | | F9 | Restart NetworkManager | -| Super | | F10 | (dmenu) prompt, if yes: slock | -| Super | | F11 | (dmenu) prompt, if yes: reboot | -| Super | | F12 | (dmenu) prompt, if yes: shutdown | +| Super | | F10 | (dmenu) Prompt, if yes: slock | +| Super | | F11 | (dmenu) Prompt, if yes: reboot | +| Super | | F12 | (dmenu) Prompt, if yes: shutdown | +| Super | | Print | (dmenu) Prompt to take a screenshot | | | | AudioMute | Volume mute | | | | AudioMicMute | Mic Mute | | | | AudioLowerVolume | Volume lower | From 6e5fcdec64575cba54e15ae18b5027920bd3bf4b Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 10 Jan 2023 16:47:31 +0100 Subject: [PATCH 14/26] dragon-drop: added alias --- .config/aliasrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/aliasrc b/.config/aliasrc index 4a0191a..06dba3d 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -26,6 +26,10 @@ flacsplit() { cuebreakpoints $2 | shnsplit $1 -o flac } # diff alias diff="diff --color=auto" +# dragon-drop +alias drag="dragon-drop" +alias drop="dragon-drop" + # fzf src() { find ~/.config/* ~/.local/bin/* -type f | fzf | xargs -r $EDITOR ;} srd() { find ~/nextCloud/* -type f | grep ".pdf" | fzf | xargs -r $READER ;} From 0d221f7db00500f72a139a26c6e75631bda5fa70 Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 11 Jan 2023 01:17:57 +0100 Subject: [PATCH 15/26] screen-record: added hotkeys and scripts --- .config/sxhkd/sxhkdrc | 8 ++++++++ .local/bin/tools/maimpick | 2 +- .local/bin/tools/record_replay_save | 4 ++++ .local/bin/tools/record_replay_start | 11 +++++++++++ .local/bin/tools/record_start | 10 ++++++++++ .local/bin/tools/record_stop | 4 ++++ 6 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 .local/bin/tools/record_replay_save create mode 100755 .local/bin/tools/record_replay_start create mode 100755 .local/bin/tools/record_start create mode 100755 .local/bin/tools/record_stop diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 47d0fa6..0f68032 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -4,8 +4,16 @@ super + b $BROWSER super + f $TERMINAL -e $FILE +super + i + record_stop super + m thunderbird +super + o + record_replay_start +super + p + record_replay_save +super + u + record_start super + x pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config' super + shift + r diff --git a/.local/bin/tools/maimpick b/.local/bin/tools/maimpick index 033b7d6..1fd25cb 100755 --- a/.local/bin/tools/maimpick +++ b/.local/bin/tools/maimpick @@ -3,7 +3,7 @@ # Requires maim. It lets you choose the kind of screenshot to take, # including copying the image or even highlighting an area to copy. -output="$HOME/downloads/screenshot-$(date '+%y%m%d-%H%M-%S').png" +output="$HOME/downloads/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png" xclip_cmd="xclip -sel clip -t image/png" case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (clipboard)\\ncurrent window (clipboard)\\nfull screen (clipboard)\\ncolor picker (clipboard)" | dmenu -l 6 -i -p "Screenshot which area?")" in diff --git a/.local/bin/tools/record_replay_save b/.local/bin/tools/record_replay_save new file mode 100755 index 0000000..c995d6a --- /dev/null +++ b/.local/bin/tools/record_replay_save @@ -0,0 +1,4 @@ +#!/bin/sh + +killall -SIGUSR1 gpu-screen-recorder +notify-send 'Screen record' 'Replay saved' diff --git a/.local/bin/tools/record_replay_start b/.local/bin/tools/record_replay_start new file mode 100755 index 0000000..b1ef2f2 --- /dev/null +++ b/.local/bin/tools/record_replay_start @@ -0,0 +1,11 @@ +#!/bin/sh + +window=$(xdotool getwindowfocus) +fps=30 +audio="$(pactl get-default-sink).monitor" +format="mp4" +lenght=20 +output="$HOME/downloads" + +gpu-screen-recorder -w $window -f $fps -a $audio -c $format -r $lenght -o $output +notify-send 'Screen record' 'Replay started' diff --git a/.local/bin/tools/record_start b/.local/bin/tools/record_start new file mode 100755 index 0000000..14177b9 --- /dev/null +++ b/.local/bin/tools/record_start @@ -0,0 +1,10 @@ +#!/bin/sh + +window=$(xdotool getwindowfocus) +fps=30 +audio="$(pactl get-default-sink).monitor" +format="mp4" +output="$HOME/downloads/recording-$(date '+%Y-%m-%d_%H-%M-%S').$format" + +gpu-screen-recorder -w $window -c "mp4" -f $fps -a $audio -o $output +notify-send 'Screen record' 'Recording started' diff --git a/.local/bin/tools/record_stop b/.local/bin/tools/record_stop new file mode 100755 index 0000000..01e2e5d --- /dev/null +++ b/.local/bin/tools/record_stop @@ -0,0 +1,4 @@ +#!/bin/sh + +killall -SIGINT gpu-screen-recorder +notify-send 'Screen record' 'Recording stopped' From 0c518edd9b655232f2649d923f19a07c010d018f Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Wed, 11 Jan 2023 01:27:54 +0100 Subject: [PATCH 16/26] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 77778a8..275d858 100644 --- a/README.md +++ b/README.md @@ -45,14 +45,14 @@ There are various shortcuts and hotkeys used in this version. Included in my bui | ------ | ----- | ----------------- | --------------------------------------------------------- | | Super | | Return | Spawn terminal | | Super | | b | Spawn browser | -| Super | Shift | b | Toggle dwmbar | | Super | | f | Spawn filemanager | -| Super | | i | Spawn intellij-idea-ultimate-edition | +| Super | | i | (gpu-screen-record) stop recording | | Super | | m | Spawn thunderbird | -| Super | | p | Spawn ncmpcpp in st | +| Super | | o | (gpu-screen-record) start replay | +| Super | | p | (gpu-screen-record) save replay | +| Super | | u | (gpu-screen-record) start recording | | Super | Shift | r | (dmenu) dmenu\_run | -| Super | Shift | r | Restart sxkd | -| Super | | s | (dmenu) Startpagesearch | +| Super | Shift | x | Restart sxkd | | Super | | F5 | Enable 2 Screen Monitor | | Super | | F6 | Toggle touchpad | | Super | | F7 | (dmenu) Mounting drives | @@ -69,6 +69,7 @@ There are various shortcuts and hotkeys used in this version. Included in my bui | | | MonBrightnessDown | Brightness decrease | | | | MonBrightnessUp | Brightness increase | + ## Additional configs Additional configs (and for example firefox plugins) can be found in my [wiki](https://github.com/tiyn/wiki). From db94baae713902563179a2216311f7f72ec37f67 Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 11 Jan 2023 01:31:42 +0100 Subject: [PATCH 17/26] sxhkd: restart moved --- .config/sxhkd/sxhkdrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 0f68032..474d44a 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -14,7 +14,7 @@ super + p record_replay_save super + u record_start -super + x +super + shift + x pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config' super + shift + r dmenu_run -c -l 20 From 1488c9ce5ab94ee86ddb6b4f8c27ad9aa8a3a447 Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 11 Jan 2023 01:33:22 +0100 Subject: [PATCH 18/26] sxhkd: removed unneccessarities --- .config/sxhkd/sxhkdrc | 2 -- 1 file changed, 2 deletions(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 474d44a..1a32cce 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -37,8 +37,6 @@ super + F12 super + Print maimpick -XF86Launch1 - xset dpms force off XF86AudioMute lmc m && pkill -RTMIN+4 $STATUSBAR XF86AudioMicMute From 29ac61618d25f12ebea887a4d95012ea34b6b0ad Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 11 Jan 2023 03:58:46 +0100 Subject: [PATCH 19/26] record: fixed notifications --- .local/bin/tools/record_replay_save | 3 +-- .local/bin/tools/record_replay_start | 2 +- .local/bin/tools/record_start | 2 +- .local/bin/tools/record_stop | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.local/bin/tools/record_replay_save b/.local/bin/tools/record_replay_save index c995d6a..4341c8c 100755 --- a/.local/bin/tools/record_replay_save +++ b/.local/bin/tools/record_replay_save @@ -1,4 +1,3 @@ #!/bin/sh -killall -SIGUSR1 gpu-screen-recorder -notify-send 'Screen record' 'Replay saved' +killall -SIGUSR1 gpu-screen-recorder && notify-send 'Screen record' 'Replay saved' diff --git a/.local/bin/tools/record_replay_start b/.local/bin/tools/record_replay_start index b1ef2f2..00d825a 100755 --- a/.local/bin/tools/record_replay_start +++ b/.local/bin/tools/record_replay_start @@ -7,5 +7,5 @@ format="mp4" lenght=20 output="$HOME/downloads" -gpu-screen-recorder -w $window -f $fps -a $audio -c $format -r $lenght -o $output +gpu-screen-recorder -w $window -f $fps -a $audio -c $format -r $lenght -o $output & notify-send 'Screen record' 'Replay started' diff --git a/.local/bin/tools/record_start b/.local/bin/tools/record_start index 14177b9..2207f61 100755 --- a/.local/bin/tools/record_start +++ b/.local/bin/tools/record_start @@ -6,5 +6,5 @@ audio="$(pactl get-default-sink).monitor" format="mp4" output="$HOME/downloads/recording-$(date '+%Y-%m-%d_%H-%M-%S').$format" -gpu-screen-recorder -w $window -c "mp4" -f $fps -a $audio -o $output +gpu-screen-recorder -w $window -c "mp4" -f $fps -a $audio -o $output & notify-send 'Screen record' 'Recording started' diff --git a/.local/bin/tools/record_stop b/.local/bin/tools/record_stop index 01e2e5d..eedc48b 100755 --- a/.local/bin/tools/record_stop +++ b/.local/bin/tools/record_stop @@ -1,4 +1,3 @@ #!/bin/sh -killall -SIGINT gpu-screen-recorder -notify-send 'Screen record' 'Recording stopped' +killall -SIGINT gpu-screen-recorder && notify-send 'Screen record' 'Recording stopped' From 70d459030349c240111279618cb05277f9b9251a Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 11 Jan 2023 04:36:24 +0100 Subject: [PATCH 20/26] keys: alias for screenkey --- .config/aliasrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/aliasrc b/.config/aliasrc index 06dba3d..0bc4dd9 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -102,9 +102,13 @@ alias rsync="rsync -vh --progress --partial" alias su="sudo -i" alias sudo="sudo " -#sc-im +# sc-im alias sc="sc-im" +# screenkey + +alias keys="screenkey" + # script alias scriptclear="cat typescript | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -b > typescript-processed" From 6563c1133860397b72f9bb184f0ace1e080152a9 Mon Sep 17 00:00:00 2001 From: tiyn Date: Thu, 12 Jan 2023 03:05:28 +0100 Subject: [PATCH 21/26] nvim: edited to recommended setup --- .config/nvim/init.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index dd44492..20c54d0 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -118,8 +118,7 @@ let g:bookmark_highlight_lines = 1 " hrsh7th/nvim-cmp lua << EOF -- Add additional capabilities supported by nvim-cmp -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) +capabilities = require("cmp_nvim_lsp").default_capabilities() -- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' From daaad7b70630fcc001c465f37955335b6386b5e0 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Thu, 12 Jan 2023 17:39:50 +0100 Subject: [PATCH 22/26] statusbar: battery doesnt need time --- .local/bin/tools/statusbar/battery | 1 - 1 file changed, 1 deletion(-) diff --git a/.local/bin/tools/statusbar/battery b/.local/bin/tools/statusbar/battery index b443765..24370d3 100755 --- a/.local/bin/tools/statusbar/battery +++ b/.local/bin/tools/statusbar/battery @@ -1,7 +1,6 @@ #!/usr/bin/env sh capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit -time=$(acpi | awk '{ print $5 }') status=$(cat /sys/class/power_supply/"$1"/status) [ -z $warn ] && warn=" " From 0cc7b1ad9057f9629e16b151baa0d1baede6d750 Mon Sep 17 00:00:00 2001 From: tiyn Date: Fri, 13 Jan 2023 04:03:00 +0100 Subject: [PATCH 23/26] nvim: switched to init.lua --- .config/nvim/init.lua | 74 ++++ .config/nvim/init.vim | 457 ------------------------- .config/nvim/lua/colorscheme.lua | 6 + .config/nvim/lua/filetype.lua | 138 ++++++++ .config/nvim/lua/keymap.lua | 79 +++++ .config/nvim/lua/loadplugins.lua | 75 ++++ .config/nvim/plugin/lightline.lua | 2 + .config/nvim/plugin/neotex.lua | 2 + .config/nvim/plugin/nerdtree.lua | 2 + .config/nvim/plugin/nvim-cmp.lua | 115 +++++++ .config/nvim/plugin/nvim-colorizer.lua | 2 + .config/nvim/plugin/rainbow.lua | 2 + .config/nvim/plugin/vim-go.lua | 2 + .config/nvim/plugin/vim-markdown.lua | 3 + 14 files changed, 502 insertions(+), 457 deletions(-) create mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/init.vim create mode 100644 .config/nvim/lua/colorscheme.lua create mode 100644 .config/nvim/lua/filetype.lua create mode 100644 .config/nvim/lua/keymap.lua create mode 100644 .config/nvim/lua/loadplugins.lua create mode 100644 .config/nvim/plugin/lightline.lua create mode 100644 .config/nvim/plugin/neotex.lua create mode 100644 .config/nvim/plugin/nerdtree.lua create mode 100644 .config/nvim/plugin/nvim-cmp.lua create mode 100644 .config/nvim/plugin/nvim-colorizer.lua create mode 100644 .config/nvim/plugin/rainbow.lua create mode 100644 .config/nvim/plugin/vim-go.lua create mode 100644 .config/nvim/plugin/vim-markdown.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..4a4e0dc --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,74 @@ +vim.o.go = 'a' +vim.o.showmode = false + +-- enable mouse for all modes +vim.o.mouse = 'a' +vim.o.clipboard = 'unnamedplus' + +-- setting Tab-length +vim.o.expandtab = true +vim.o.softtabstop = 4 +vim.o.shiftwidth = 4 + +-- splits open at the bottom and right +vim.o.splitbelow = true +vim.o.splitright = true + +-- disable case sensitive matching +vim.o.ignorecase = true + +-- enable nocompatible mode +vim.o.nocompatible = true + +-- enable syntax highlighting +vim.o.syntax = true + +-- enable true colors +vim.o.termguicolors = true + +-- set utf-8 encoding +vim.o.encoding = "utf-8" + +-- show relative numbers on left side +vim.o.number = true +vim.o.relativenumber = true + +-- speedup vim with long lines +vim.o.ttyfast = true +vim.o.lazyredraw = true + +-- textEdit might fail without hidden +vim.o.hidden = true + +-- disable Backupfiles for Lsp +vim.o.nobackup = true +vim.o.nowritebackup = true + +-- always show the signcolumn +vim.o.signcolumn = "yes" + +-- enable persistent undo +vim.o.undofile = true +vim.o.undodir = vim.env.XDG_CACHE_HOME .. "/vim/undo" + +-- delete trailing whitespaces on save +vim.api.nvim_create_autocmd({'BufWritePre'}, +{pattern = {'*'}, +command = [[%s/\s\+$//e]], +}) + +-- python programs to use +vim.g.python_host_prog = '/usr/bin/python2' +vim.g.python3_host_prog = '/usr/bin/python3' + +-- load filetype specific mappings and commands +require('filetype') + +-- load general mapped keys +require('keymap') + +-- load general colorscheme +require('colorscheme') + +-- load plugins (autoload all files in plugin folder) +require('loadplugins') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index 20c54d0..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,457 +0,0 @@ -let mapleader ="," - -""" Begin Plugin section -if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) - echo "Downloading junegunn/vim-plug to manage plugins..." - silent !mkdir -p ~/.config/nvim/autoload/ - silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim - autocmd VimEnter * PlugInstall -endif - -call plug#begin('~/.local/share/nvim/plugged') -Plug 'airblade/vim-gitgutter' " git upgrades -Plug 'alvan/vim-closetag' " auto close HTML tags -Plug 'donRaphaco/neotex' , {'for': 'tex'} " asynchronous pdf rendering for pdf -Plug 'fatih/vim-go' , {'for': 'go'} " better support for golang -Plug 'godlygeek/tabular', {'for': 'md'} " needed for preservim/vim-markdown -Plug 'hrsh7th/cmp-buffer' " autocompletion bridge for buffer -Plug 'hrsh7th/cmp-path' " autocompletion bridge for filesystem -Plug 'hrsh7th/nvim-cmp' " autocompletion -Plug 'hrsh7th/cmp-nvim-lsp' " autocompletion bridge to lsp -Plug 'itchyny/lightline.vim' " fancy statusline -Plug 'junegunn/fzf.vim' " quickly jump files using fzf -Plug 'l3mon4d3/luasnip' " snippet support -Plug 'luochen1990/rainbow' " colorized matching brackets -Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} " show tags -Plug 'mattesgroeger/vim-bookmarks' " Set bookmarks -Plug 'neovim/nvim-lspconfig' " Language server client -Plug 'onsails/lspkind-nvim' " icons on completion -Plug 'preservim/vim-markdown', {'for': 'md'} " markdown enhancements -Plug 'qpkorr/vim-renamer' " bulk renamer -Plug 'raimondi/delimitmate' " automatic closing of brackets -Plug 'rrethy/vim-hexokinase' , {'do': 'make hexokinase'} " color Preview -Plug 'ryanoasis/vim-devicons' " enable icons for vim -Plug 'saadparwaiz1/cmp_luasnip' " add snippets from luasnips to cmp -Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} " filetree -Plug 'tiyn/vim-tccs' " custom colorscheme -Plug 'tpope/vim-fugitive' " git wrapper -Plug 'tpope/vim-surround' " help for quotes/parantheses -Plug 'uiiaoo/java-syntax.vim' , {'for': 'java'} " better syntax highlight for java than default -Plug 'zah/nim.vim' , {'for': 'nim'} " highlighting for nim -call plug#end() - -" alvan/vim-closetag -let g:closetag_filenames = '*.html,*.xhtml,*.phtml' -let g:closetag_xhtml_filenames = '*.xhtml,*.jsx' -let g:closetag_filetypes = 'html,xhtml,phtml' -let g:closetag_xhtml_filetypes = 'xhtml,jsx' -let g:closetag_emptyTags_caseSensitive = 1 -let g:closetag_regions = { - \ 'typescript.tsx': 'jsxRegion,tsxRegion', - \ 'javascript.jsx': 'jsxRegion', - \ } -let g:closetag_shortcut = '>' -let g:closetag_close_shortcut = '>' - -" donRaphaco/neotex -let g:neotex_enabled = 2 - -" fatih/vim-go -let g:go_def_mapping_enabled = 0 - -" itchyny/lightline.vim -let g:lightline = { 'colorscheme': 'tccs'} - -" junegunn/fzf.vim -let $FZF_DEFAULT_COMMAND = 'find . ~ -type f' -nmap :FZF - -" luochen1990/rainbow -let g:rainbow_active = 1 -let g:rainbow_conf = { -\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'], -\ 'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'], -\ 'guis': [''], -\ 'cterms': [''], -\ 'operators': '_,_', -\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'], -\ 'separately': { -\ '*': {}, -\ 'markdown': { -\ 'parentheses_options': 'containedin=markdownCode contained', -\ }, -\ 'lisp': { -\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'], -\ }, -\ 'haskell': { -\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/\v\{\ze[^-]/ end=/}/ fold'], -\ }, -\ 'vim': { -\ 'parentheses_options': 'containedin=vimFuncBody', -\ }, -\ 'perl': { -\ 'syn_name_prefix': 'perlBlockFoldRainbow', -\ }, -\ 'stylus': { -\ 'parentheses': ['start=/{/ end=/}/ fold contains=@colorableGroup'], -\ }, -\ 'css': 0, -\ } -\} - -" majutsushi/tagbar -map :TagbarToggle - -" mattesgroeger/vim-bookmarks -let g:bookmark_no_default_key_mappings = 1 -nmap mm BookmarkToggle -nmap ma BookmarkAnnotate -nmap ms BookmarkShowAll -nmap mn BookmarkNext -nmap mp BookmarkPrev -nmap mc BookmarkClear -highlight BookmarkSign ctermbg=NONE ctermfg=160 -highlight BookmarkLine ctermbg=194 ctermfg=NONE -let g:bookmark_sign = 'B' -let g:bookmark_highlight_lines = 1 - -" hrsh7th/nvim-cmp -lua << EOF --- Add additional capabilities supported by nvim-cmp -capabilities = require("cmp_nvim_lsp").default_capabilities() - --- Set completeopt to have a better completion experience -vim.o.completeopt = 'menuone,noselect' - --- nvim-cmp setup -local cmp = require("cmp") -local luasnip = require("luasnip") -local lspkind = require("lspkind") -cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = { - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { "i", "s" }), - [''] = cmp.mapping.close(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }}, - sources = { - { name = 'nvim_lsp' }, - { name = 'path' }, - { name = 'buffer' }, - { name = 'luasnip' }, - }, - formatting = { - format = lspkind.cmp_format({ - mode = "symbol_text", - preset = "codicons", - maxwidth = 50, - menu = { - nvim_lsp = "[LSP]", - path = "[PATH]", - buffer = "[BUF]", - luasnip = "[SNIP]", - }, - symbol_map = { - Text = "", - Method = "", - Function = "", - Constructor = "", - Field = "ﰠ", - Variable = "", - Class = "ﴯ", - Interface = "", - Module = "", - Property = "ﰠ", - Unit = "塞", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "פּ", - Event = "", - Operator = "", - TypeParameter = "" - }, - }), - }, -} - -require("luasnip.loaders.from_snipmate").lazy_load() -EOF - -" neovim/nvim-lspconfig -lua << EOF -local nvim_lsp = require('lspconfig') - --- Use an on_attach function to only map the following keys --- after the language server attaches to the current buffer -local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end - - -- Mappings. - local opts = { noremap=true, silent=true } - - -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'gy', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.rename()', opts) - -end - --- Use a loop to conveniently call 'setup' on multiple servers and --- map buffer local keybindings when the language server attaches -local servers = { "pyright", "bashls", "tsserver", "texlab", "ccls", "gopls", "hls", "nimls", "marksman" } -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - on_attach=on_attach, - capabilities=capabilities, - flags = { - debounce_text_changes = 150 - } - } -end - - -require'lspconfig'.jdtls.setup{ - on_attach=on_attach, - flags = { - debounce_text_changes = 150 - }, - cmd = { 'jdtls' } - } - -EOF - -" preservim/vim-markdown - -let g:vim_markdown_folding_style_pythonic = 1 -let g:vim_markdown_folding_disabled = 1 - -" rrethy/vim-hexokinase -let g:Hexokinase_refreshEvents = ['InsertLeave'] -let g:Hexokinase_optInPatterns = [ - \ 'full_hex', - \ 'triple_hex', - \ 'rgb', - \ 'rgba', - \ 'hsl', - \ 'hsla', - \ 'color_names' - \] - -let g:Hexokinase_highlighters = ['backgroundfull'] -autocmd VimEnter * HexokinaseTurnOn - -" scrooloose/nerdtree -map :NERDTreeToggle -autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif -let g:NERDTreeWinPos = "left" - -" tpope/vim-fugitive -nnoremap ga :Git add %:p -nnoremap gd :Git diff -nnoremap gc :Gcommit -nnoremap go :Git checkout -nnoremap gh :diffget //3 -nnoremap gr :Gread -nnoremap gu :diffget //2 -nnoremap gs :G - -""" end plugin section - -set go=a -set noshowmode - -" enable mouse for all modes -set mouse=a -set clipboard+=unnamedplus - -" setting Tab-length -set expandtab -set softtabstop=4 -set shiftwidth=4 - -" splits open at the bottom and right, which is non-retarded, unlike vim defaults. -set splitbelow splitright - -" disable case sensitive matching -set ignorecase - -" enable nocompatible mode -set nocompatible - -" enable Plugins -filetype plugin on - -" enable syntax highlighting -syntax on - -" enable true colors -set termguicolors - -" set utf-8 encoding -set encoding=utf-8 - -" show relative numbers on left side -set number relativenumber - -" speedup vim with long lines -set ttyfast -set lazyredraw - -" textEdit might fail without hidden -set hidden - -" disable Backupfiles for Lsp -set nobackup -set nowritebackup - -" always show the signcolumn, otherwise it would shift the text each time -" diagnostics appear/become resolved. -if has("patch-8.1.1564") - " Recently vim can merge signcolumn and number column into one - set signcolumn=number -else - set signcolumn=yes -endif - -" enable persistent undo -if has('persistent_undo') - set undofile - set undodir=$XDG_CACHE_HOME/vim/undo -endif - -" unmap unwanted commands -nnoremap -nnoremap -nnoremap -nnoremap -nnoremap - -inoremap -inoremap -inoremap -inoremap -inoremap -inoremap -inoremap -inoremap -inoremap -inoremap -inoremap - -" mapping Dictionaries -nnoremap :setlocal spell! spelllang=de_de -nnoremap :setlocal spell! spelllang=en_us - -" compiler for languages -nnoremap c :w! \| !compiler % - -" open corresponding file (pdf/html/...) -nnoremap p :!opout % - -" shortcut for split navigation -nnoremap h -nnoremap j -nnoremap k -nnoremap l - -" save file as sudo on files that require root permission -cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! - -" alias for replacing -nnoremap ss :%s//gI - -" delete trailing whitespaces on save -fun! TrimWhitespace() - let l:save = winsaveview() - keeppatterns %s/\s\+$//e - call winrestview(l:save) -endfun -autocmd BufWritePre * :call TrimWhitespace() - -" read files correctly -autocmd BufRead,BufNewFile *.h set filetype=c -autocmd BufRead,BufNewFile *.html set filetype=html -autocmd BufRead,BufNewFile *.nim set filetype=nim -autocmd BufRead,BufNewFile *.py set filetype=python -autocmd BufRead,BufNewFile *.tex set filetype=tex - -" formatting options -autocmd FileType java setlocal shiftwidth=2 softtabstop=2 -autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 -autocmd FileType markdown setlocal shiftwidth=2 softtabstop=2 - -" formatting programs -autocmd FileType c setlocal formatprg=astyle\ --mode=c\ --style=ansi -autocmd FileType c noremap gggqG -autocmd FileType html noremap :silent %!tidy -q -i --show-errors 0 -autocmd FileType java setlocal formatprg=astyle\ --indent=spaces=2\ --style=google -autocmd FileType java noremap gggqG -autocmd FileType markdown noremap :silent %!prettier --stdin-filepath % -autocmd FileType nim noremap :silent !nimpretty % -autocmd FileType python setlocal formatprg=autopep8\ - -autocmd FileType python noremap gggqG -autocmd FileType tex,latex setlocal formatprg=latexindent\ - -autocmd FileType tex,latex noremap gggqG - -" cleanup certain files after leaving the editor -autocmd VimLeave *.c !cclear -autocmd VimLeave *.tex !texclear % - -" highlighting break line -autocmd BufEnter,FileType c set colorcolumn=80 -autocmd BufEnter,FileType java set colorcolumn=100 -autocmd BufEnter,FileType markdown set colorcolumn=80 -autocmd BufEnter,FileType nim set colorcolumn=80 -autocmd BufEnter,FileType python set colorcolumn=80 -autocmd BufEnter,FileType tex set colorcolumn=80 - -" conceallevel -autocmd BufEnter,FileType markdown set conceallevel=2 - -"" colorscheme -set background=dark -colorscheme tccs -highlight colorcolumn guibg=#772222 - -" python -let g:python_host_prog = "/usr/bin/python2" -let g:python3_host_prog = "/usr/bin/python3" - -" irc compatibility to interactive -nnoremap is :.w >> indd diff --git a/.config/nvim/lua/colorscheme.lua b/.config/nvim/lua/colorscheme.lua new file mode 100644 index 0000000..3935f20 --- /dev/null +++ b/.config/nvim/lua/colorscheme.lua @@ -0,0 +1,6 @@ +-- colorscheme + +-- basic color settings +vim.o.background = 'dark' +vim.cmd('colorscheme tccs') +vim.api.nvim_set_hl(0, 'colorcolumn', {bg='#772222'}) diff --git a/.config/nvim/lua/filetype.lua b/.config/nvim/lua/filetype.lua new file mode 100644 index 0000000..2709f94 --- /dev/null +++ b/.config/nvim/lua/filetype.lua @@ -0,0 +1,138 @@ +-- filetype + +-- read files correctly +vim.filetype.add({ +pattern = { + ['.*.lua'] = 'lua', + ['.*.h'] = 'c', + ['.*.html'] = 'html', + ['.*.nim'] = 'nim', + ['.*.py'] = 'python', + ['.*.tex'] = 'tex', +}}) + +-- formatting options +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'markdown'}, +command = 'setlocal shiftwidth=2 softtabstop=2', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'java'}, +command = 'setlocal shiftwidth=2 softtabstop=2', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'javascript'}, +command = 'setlocal shiftwidth=2 softtabstop=2', +}) + +-- formatting programs +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'c'}, +command = 'setlocal formatprg=astyle --mode=c --style=ansi', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'c'}, +command = 'noremap gggqG', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'html'}, +command = 'noremap :silent %!tidy -q -i --show-errors 0 ', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'java'}, +command = 'setlocal formatprg=astyle --indent=spaces=2 --style=google', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'java'}, +command = 'noremap gggqG', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'markdown'}, +command = 'noremap :silent %!prettier --stdin-filepath % ', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'nim'}, +command = 'noremap :silent !nimpretty %', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'nim'}, +command = 'noremap gggqG', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'python'}, +command = 'setlocal formatprg=autopep8 "%"', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'python'}, +command = 'noremap gggqG', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'tex', 'latex'}, +command = 'setlocal formatprg=latexindent', +}) + +vim.api.nvim_create_autocmd({'FileType'}, +{pattern = {'tex', 'latex'}, +command = 'noremap gggqG', +}) + +-- cleanup certain files after leaving the editor +vim.api.nvim_create_autocmd({'VimLeave'}, +{pattern = {'*.c'}, +command = '!cclear' +}) + +vim.api.nvim_create_autocmd({'VimLeave'}, +{pattern = {'*.tex'}, +command = '!texclear %' +}) + +-- highlighting break line +vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, +{pattern = {'c'}, +command = 'set colorcolumn=80' +}) + +vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, +{pattern = {'java'}, +command = 'set colorcolumn=100' +}) + +vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, +{pattern = {'markdown'}, +command = 'set colorcolumn=80' +}) + +vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, +{pattern = {'nim'}, +command = 'set colorcolumn=80' +}) + +vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, +{pattern = {'python'}, +command = 'set colorcolumn=80' +}) + +vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, +{pattern = {'tex'}, +command = 'set colorcolumn=80' +}) + +-- conceallevel +vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, +{pattern = {'markdown'}, +command = 'set conceallevel=2' +}) + diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua new file mode 100644 index 0000000..458b55c --- /dev/null +++ b/.config/nvim/lua/keymap.lua @@ -0,0 +1,79 @@ +-- keymap + +-- set mapleader for hotkeys +vim.g.mapleader = "," + +-- shortcut for split navigation +vim.api.nvim_set_keymap('n', '', 'h', {noremap = true}) +vim.api.nvim_set_keymap('n', '', 'j', {noremap = true}) +vim.api.nvim_set_keymap('n', '', 'k', {noremap = true}) +vim.api.nvim_set_keymap('n', '', 'l', {noremap = true}) + +-- unmap unwanted commands +vim.api.nvim_set_keymap('n', '', '', {noremap = true}) +vim.api.nvim_set_keymap('n', '', '', {noremap = true}) +vim.api.nvim_set_keymap('n', '', '', {noremap = true}) +vim.api.nvim_set_keymap('n', '', '', {noremap = true}) +vim.api.nvim_set_keymap('n', '', '', {noremap = true}) +vim.api.nvim_set_keymap('n', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) +vim.api.nvim_set_keymap('i', '', '', {noremap = true}) + +-- mapping Dictionaries +vim.api.nvim_set_keymap('n', '', ':setlocal spell! spelllang=de_de', {noremap = true}) +vim.api.nvim_set_keymap('n', '', ':setlocal spell! spelllang=en_us', {noremap = true}) + +-- compiler for languages +vim.api.nvim_set_keymap('n', 'c', ':w! | !compiler %', {noremap = true}) + +-- open corresponding file (pdf/html/...) +vim.api.nvim_set_keymap('n', 'p', ':!opout %', {noremap = true}) + + +-- save file as sudo on files that require root permission +vim.api.nvim_set_keymap('c', 'w!!', '"silent! write !sudo tee % >/dev/null" edit!', {noremap = true}) + + +-- alias for replacing +vim.api.nvim_set_keymap('n', 'ss', ':%s//gI', {noremap = true}) + +-- irc compatibility for interactivity +vim.api.nvim_set_keymap('n', 'is', ':.w >> indd', {noremap = true}) + +-- majutsushi/tagbar +vim.api.nvim_set_keymap('n', '', ':TagbarToggle', {}) + +-- scrooloose/nerdtree +vim.api.nvim_set_keymap('n', '', ':NERDTreeToggle', {}) + +-- tpope/vim-fugitive +vim.api.nvim_set_keymap('n', 'ga', ':Git add %:p', { noremap = true }) +vim.api.nvim_set_keymap('n', 'gd', ':Git diff', { noremap = true }) +vim.api.nvim_set_keymap('n', 'gc', ':Git commit', { noremap = true }) +vim.api.nvim_set_keymap('n', 'gh', ':diffget //3', { noremap = true }) +vim.api.nvim_set_keymap('n', 'gr', ':Gread', { noremap = true }) +vim.api.nvim_set_keymap('n', 'gu', ':diffget //2', { noremap = true }) +vim.api.nvim_set_keymap('n', 'gs', ':G', { noremap = true }) + +-- hrsh7th/nvim-cmp +local on_attach = function(client, bufnr) + local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end + local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end + local opts = { noremap=true, silent=true } + buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'gy', 'lua vim.lsp.buf.type_definition()', opts) + buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) + buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) + buf_set_keymap('n', '', 'lua vim.lsp.buf.rename()', opts) +end diff --git a/.config/nvim/lua/loadplugins.lua b/.config/nvim/lua/loadplugins.lua new file mode 100644 index 0000000..b28e5e5 --- /dev/null +++ b/.config/nvim/lua/loadplugins.lua @@ -0,0 +1,75 @@ +-- loadplugins + +-- load plugins with packer +return require("packer").startup(function(use) + -- automatic closing of brackets + use 'raimondi/delimitmate' + + -- improved java syntax highlighting + use {'uiiaoo/java-syntax.vim', + ft = {'java'}} + + -- custom statusline + use {'itchyny/lightline.vim', + require = {"tiyn/vim-tccs"}} + + -- latex asynchronous pdf rendering + use {'donRaphaco/neotex', + ft = {'tex'}} + + -- navigating folders with a file tree + use {'scrooloose/nerdtree', + cmd = 'NERDTreeToggle', + requires = 'ryanoasis/vim-devicons'} + + -- nim language support + use {'zah/nim.vim', ft = {'nim'}} + + -- autocompletion and its sources + use {'hrsh7th/nvim-cmp', + requires = {'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-nvim-lsp', + 'l3mon4d3/luasnip', + 'saadparwaiz1/cmp_luasnip', + 'neovim/nvim-lspconfig', + 'onsails/lspkind-nvim'}} + + -- showing color of hex values, etc + use 'norcalli/nvim-colorizer.lua' + + -- package manager + use 'wbthomason/packer.nvim' + + -- colorful brackets + use 'luochen1990/rainbow' + + -- show tags + use {'majutsushi/tagbar', + cmd = 'TagbarToggle'} + + -- git wrapper + use 'tpope/vim-fugitive' + + -- indicate git diff status of line + use 'airblade/vim-gitgutter' + + -- golang language support + use {'fatih/vim-go', + ft = {'go'}} + + -- markdown language support + use {'preservim/vim-markdown', + ft = {'md'}, + requires = {'godlygeek/tabular'}} + + -- bulk renamer + use 'qpkorr/vim-renamer' + + -- additional quote/parantheses funtions + use 'tpope/vim-surround' + + -- colorscheme + use 'tiyn/vim-tccs' + +end) diff --git a/.config/nvim/plugin/lightline.lua b/.config/nvim/plugin/lightline.lua new file mode 100644 index 0000000..e9bdee4 --- /dev/null +++ b/.config/nvim/plugin/lightline.lua @@ -0,0 +1,2 @@ +-- itchyny/lightline.vim +vim.g.lightline = { colorscheme = 'tccs'} diff --git a/.config/nvim/plugin/neotex.lua b/.config/nvim/plugin/neotex.lua new file mode 100644 index 0000000..efafbb0 --- /dev/null +++ b/.config/nvim/plugin/neotex.lua @@ -0,0 +1,2 @@ +-- donRaphaco/neotex +vim.g.neotex_enabled = 2 diff --git a/.config/nvim/plugin/nerdtree.lua b/.config/nvim/plugin/nerdtree.lua new file mode 100644 index 0000000..32993db --- /dev/null +++ b/.config/nvim/plugin/nerdtree.lua @@ -0,0 +1,2 @@ +-- scrooloose/nerdtree +vim.g.NERDTreeWinPos = 'left' diff --git a/.config/nvim/plugin/nvim-cmp.lua b/.config/nvim/plugin/nvim-cmp.lua new file mode 100644 index 0000000..a493bb6 --- /dev/null +++ b/.config/nvim/plugin/nvim-cmp.lua @@ -0,0 +1,115 @@ +-- hrsh7th/nvim-cmp +-- Add additional capabilities supported by nvim-cmp +capabilities = require("cmp_nvim_lsp").default_capabilities() + +-- Set completeopt to have a better completion experience +vim.o.completeopt = 'menuone,noselect' + +-- nvim-cmp setup +local cmp = require("cmp") +local luasnip = require("luasnip") +local lspkind = require("lspkind") +cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = { + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + [''] = cmp.mapping.close(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }}, + sources = { + { name = 'nvim_lsp' }, + { name = 'path' }, + { name = 'buffer' }, + { name = 'luasnip' }, + }, + formatting = { + format = lspkind.cmp_format({ + mode = "symbol_text", + preset = "codicons", + maxwidth = 50, + menu = { + nvim_lsp = "[LSP]", + path = "[PATH]", + buffer = "[BUF]", + luasnip = "[SNIP]", + }, + symbol_map = { + Text = "", + Method = "", + Function = "", + Constructor = "", + Field = "ﰠ", + Variable = "", + Class = "ﴯ", + Interface = "", + Module = "", + Property = "ﰠ", + Unit = "塞", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "פּ", + Event = "", + Operator = "", + TypeParameter = "" + }, + }), + }, +} +require("luasnip.loaders.from_snipmate").lazy_load() + + +-- neovim/nvim-lspconfig +local nvim_lsp = require('lspconfig') + +-- Use a loop to conveniently call 'setup' on multiple servers and +-- map buffer local keybindings when the language server attaches +local servers = { "pyright", "bashls", "tsserver", "texlab", "ccls", "gopls", "hls", "nimls", "marksman" } +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup { + on_attach=on_attach, + capabilities=capabilities, + flags = { + debounce_text_changes = 150 + } + } +end + + +require'lspconfig'.jdtls.setup{ + on_attach=on_attach, + flags = { + debounce_text_changes = 150 + }, + cmd = { 'jdtls' } + } diff --git a/.config/nvim/plugin/nvim-colorizer.lua b/.config/nvim/plugin/nvim-colorizer.lua new file mode 100644 index 0000000..20b73ac --- /dev/null +++ b/.config/nvim/plugin/nvim-colorizer.lua @@ -0,0 +1,2 @@ +-- norcalli/nvim-colorizer.lua +require 'colorizer'.setup() diff --git a/.config/nvim/plugin/rainbow.lua b/.config/nvim/plugin/rainbow.lua new file mode 100644 index 0000000..837e990 --- /dev/null +++ b/.config/nvim/plugin/rainbow.lua @@ -0,0 +1,2 @@ +-- luochen1990/rainbow +vim.g.rainbow_active = 1 diff --git a/.config/nvim/plugin/vim-go.lua b/.config/nvim/plugin/vim-go.lua new file mode 100644 index 0000000..0eb49ab --- /dev/null +++ b/.config/nvim/plugin/vim-go.lua @@ -0,0 +1,2 @@ +-- fatih/vim-go +vim.g.go_def_mapping_enabled = 0 diff --git a/.config/nvim/plugin/vim-markdown.lua b/.config/nvim/plugin/vim-markdown.lua new file mode 100644 index 0000000..78bedf0 --- /dev/null +++ b/.config/nvim/plugin/vim-markdown.lua @@ -0,0 +1,3 @@ +-- preservim/vim-markdown +vim.g.vim_markdown_folding_style_pythonic = 1 +vim.g.vim_markdown_folding_disabled = 1 From aabc0f208e49e28daaeb4270a30830f239da0d2f Mon Sep 17 00:00:00 2001 From: tiyn Date: Fri, 13 Jan 2023 04:10:00 +0100 Subject: [PATCH 24/26] nvim: bootstrap packer --- .config/nvim/lua/loadplugins.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/loadplugins.lua b/.config/nvim/lua/loadplugins.lua index b28e5e5..9f25cca 100644 --- a/.config/nvim/lua/loadplugins.lua +++ b/.config/nvim/lua/loadplugins.lua @@ -1,5 +1,19 @@ -- loadplugins +-- bootstrap packer +local ensure_packer = function() + local fn = vim.fn + local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' + if fn.empty(fn.glob(install_path)) > 0 then + fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) + vim.cmd [[packadd packer.nvim]] + return true + end + return false +end + +local packer_bootstrap = ensure_packer() + -- load plugins with packer return require("packer").startup(function(use) -- automatic closing of brackets @@ -39,7 +53,9 @@ return require("packer").startup(function(use) use 'norcalli/nvim-colorizer.lua' -- package manager - use 'wbthomason/packer.nvim' + if packer_bootstrap then + require('packer').sync() + end -- colorful brackets use 'luochen1990/rainbow' From adef5705a70308c231ec2a5f709db5c4dbbce91c Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 13 Jan 2023 05:06:36 +0100 Subject: [PATCH 25/26] nvim: bootstrapping bugfixes --- .config/nvim/lua/loadplugins.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.config/nvim/lua/loadplugins.lua b/.config/nvim/lua/loadplugins.lua index 9f25cca..bbcbc51 100644 --- a/.config/nvim/lua/loadplugins.lua +++ b/.config/nvim/lua/loadplugins.lua @@ -16,6 +16,12 @@ local packer_bootstrap = ensure_packer() -- load plugins with packer return require("packer").startup(function(use) + -- package manager + use 'wbthomason/packer.nvim' + if packer_bootstrap then + require('packer').sync() + end + -- automatic closing of brackets use 'raimondi/delimitmate' @@ -52,11 +58,6 @@ return require("packer").startup(function(use) -- showing color of hex values, etc use 'norcalli/nvim-colorizer.lua' - -- package manager - if packer_bootstrap then - require('packer').sync() - end - -- colorful brackets use 'luochen1990/rainbow' From e15c73282503284088ff7b925faedb57a218ccf2 Mon Sep 17 00:00:00 2001 From: tiyn Date: Fri, 13 Jan 2023 05:37:16 +0100 Subject: [PATCH 26/26] nvim: removed bootstrap bug due to wrong loading order --- .config/nvim/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 4a4e0dc..3a249f8 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -61,6 +61,9 @@ command = [[%s/\s\+$//e]], vim.g.python_host_prog = '/usr/bin/python2' vim.g.python3_host_prog = '/usr/bin/python3' +-- load plugins (autoload all files in plugin folder) +require('loadplugins') + -- load filetype specific mappings and commands require('filetype') @@ -69,6 +72,3 @@ require('keymap') -- load general colorscheme require('colorscheme') - --- load plugins (autoload all files in plugin folder) -require('loadplugins')