├── .Xresources ├── .config ├── X11 │ └── nvidia-xinitrc ├── brittany │ └── config.yaml ├── deadd │ └── deadd.conf ├── images │ ├── abstract.jpg │ ├── abstract_1.jpg │ ├── moon.png │ └── squares.jpg ├── kitty │ ├── kitty.conf │ └── open-actions.conf ├── nvim │ ├── after │ │ └── queries │ │ │ └── rst │ │ │ ├── highlihgts.scm │ │ │ └── injections.scm │ ├── ftplugin │ │ ├── dapui_scopes.vim │ │ ├── go.vim │ │ ├── lua.lua │ │ ├── python.vim │ │ └── tex.vim │ ├── init.lua │ ├── lazy-lock.json │ ├── lua │ │ ├── colors.lua │ │ ├── config │ │ │ ├── dap.lua │ │ │ ├── galaxyline.lua │ │ │ ├── lsp.lua │ │ │ ├── lsp │ │ │ │ ├── handlers.lua │ │ │ │ ├── settings.lua │ │ │ │ └── util.lua │ │ │ ├── neotest.lua │ │ │ └── treesitter.lua │ │ ├── plugins.lua │ │ └── util.lua │ └── queries │ │ ├── gotmpl │ │ ├── highlights.scm │ │ └── injections.scm │ │ ├── lua │ │ └── highlights.scm │ │ └── python │ │ └── injections.scm ├── packages │ ├── aur.txt │ ├── mirrorlist │ └── native.txt ├── picom.conf ├── polybar │ └── config ├── rofi │ ├── config.rasi │ └── theme.rasi ├── scripts │ ├── brightness │ ├── lock │ ├── screen │ └── volume ├── stylua.toml ├── vifm │ ├── colors │ │ └── Default.vifm │ ├── scripts │ │ └── README │ ├── vifm-help.txt │ └── vifmrc ├── vis │ ├── colors │ │ ├── basic_colors │ │ └── rainbow │ └── config ├── xmonad │ ├── build │ ├── hie.yaml │ ├── package.yaml │ ├── src │ │ └── main.hs │ ├── stack.yaml │ └── stack.yaml.lock ├── yapf │ └── style ├── zathura │ └── zathurarc └── zsh │ ├── .p10k.zsh │ ├── .zimrc │ ├── .zprofile │ ├── .zshrc │ ├── alias.sh │ ├── base.sh │ ├── completions │ └── _yadm │ ├── export.sh │ ├── functions │ ├── colorcode │ ├── create_task │ ├── fetch_release │ ├── fuzzy_git_ignore │ ├── fuzzy_git_log │ ├── fuzzy_preview │ ├── nvm │ └── palette │ ├── options.sh │ └── widgets.sh ├── .gitconfig ├── .gitignore ├── .gitmodules ├── .latexmkrc ├── .resources └── neofetch.jpg ├── .xinitrc ├── .zshenv └── README.md /.Xresources: -------------------------------------------------------------------------------- 1 | ! Fonts {{{ 2 | Xft.antialias: true 3 | Xft.hinting: true 4 | Xft.rgba: rgb 5 | Xft.hintstyle: hintfull 6 | Xft.dpi: 96 7 | ! }}} 8 | 9 | Xcursor.size: 16 10 | -------------------------------------------------------------------------------- /.config/X11/nvidia-xinitrc: -------------------------------------------------------------------------------- 1 | if [ $# -gt 0 ]; then 2 | $* 3 | else 4 | systemctl --user import-environment DISPLAY 5 | xinput set-prop "DLL07BE:01 06CB:7A13 Touchpad" "libinput Tapping Enabled" 1 6 | xinput set-prop "DLL07BE:01 06CB:7A13 Touchpad" "libinput Natural Scrolling Enabled" 1 7 | setxkbmap -layout gb 8 | setxkbmap -option caps:escape 9 | xset r rate 150 40 10 | xsetroot -cursor_name left_ptr 11 | xrdb -merge ~/.Xresources 12 | export XMONAD_MODE=game 13 | xmonad 14 | fi 15 | -------------------------------------------------------------------------------- /.config/brittany/config.yaml: -------------------------------------------------------------------------------- 1 | conf_debug: 2 | dconf_roundtrip_exactprint_only: false 3 | dconf_dump_bridoc_simpl_par: false 4 | dconf_dump_ast_unknown: false 5 | dconf_dump_bridoc_simpl_floating: false 6 | dconf_dump_config: false 7 | dconf_dump_bridoc_raw: false 8 | dconf_dump_bridoc_final: false 9 | dconf_dump_bridoc_simpl_alt: false 10 | dconf_dump_bridoc_simpl_indent: false 11 | dconf_dump_annotations: false 12 | dconf_dump_bridoc_simpl_columns: false 13 | dconf_dump_ast_full: false 14 | conf_forward: 15 | options_ghc: [] 16 | conf_errorHandling: 17 | econf_ExactPrintFallback: ExactPrintFallbackModeInline 18 | econf_Werror: false 19 | econf_omit_output_valid_check: false 20 | econf_produceOutputOnErrors: false 21 | conf_preprocessor: 22 | ppconf_CPPMode: CPPModeAbort 23 | ppconf_hackAroundIncludes: false 24 | conf_obfuscate: false 25 | conf_roundtrip_exactprint_only: false 26 | conf_version: 1 27 | conf_layout: 28 | lconfig_reformatModulePreamble: true 29 | lconfig_altChooser: 30 | tag: AltChooserBoundedSearch 31 | contents: 3 32 | lconfig_allowSingleLineExportList: false 33 | lconfig_importColumn: 80 34 | lconfig_hangingTypeSignature: false 35 | lconfig_importAsColumn: 50 36 | lconfig_alignmentLimit: 80 37 | lconfig_indentListSpecial: true 38 | lconfig_indentAmount: 2 39 | lconfig_alignmentBreakOnMultiline: true 40 | lconfig_cols: 120 41 | lconfig_indentPolicy: IndentPolicyLeft 42 | lconfig_indentWhereSpecial: true 43 | lconfig_columnAlignMode: 44 | tag: ColumnAlignModeMajority 45 | contents: 0.7 46 | -------------------------------------------------------------------------------- /.config/deadd/deadd.conf: -------------------------------------------------------------------------------- 1 | [notification-center] 2 | 3 | # Hide the notification center when the mouse leaves the window 4 | hideOnMouseLeave = True 5 | 6 | # Margin at the top of the notification center in pixels. This can be 7 | # used to avoid overlap between the notification center and bars such 8 | # as polybar or i3blocks. 9 | marginTop = 0 10 | 11 | # Margin at the bottom of the notification center in pixels. 12 | marginBottom = 0 13 | 14 | # Margin to the right of the notification center in pixels. 15 | marginRight = 0 16 | 17 | 18 | # Width of the notification center in pixels. 19 | width = 500 20 | 21 | # Monitor on which the notification center will be printed. 22 | monitor = 0 23 | 24 | # If true, the notification center will open on the screen, on which the 25 | # mouse is 26 | followMouse = false 27 | 28 | 29 | # (Optional) Command to run at startup. This can be used to setup 30 | # button states. 31 | # startupCommand = "deadd-notification-center-startup" 32 | 33 | # If newFirst is set to true, newest notifications appear on the top 34 | # of the notification center. Else, notifications stack, from top to 35 | # bottom. 36 | newFirst = true 37 | 38 | # If useActionIcons is set to true, Action Buttons can show Icon 39 | useActionIcons = true 40 | 41 | # If true, the transient field in notifications will be ignored and 42 | # the notification will be persisted in the notification center anyways 43 | ignoreTransient = false 44 | 45 | # If true, markup (, , , ) will be displayed properly 46 | useMarkup = true 47 | 48 | # If true, html entities (& for &, % for %, etc) will be parsed 49 | # properly. This is useful for chromium-based apps, which tend to send 50 | # these in notifications. 51 | parseHtmlEntities = true 52 | 53 | # If set to true, the parameter noClosedMsg can be set on 54 | # notifications. If noClosedMsg is set to true on a notification, 55 | # DBUS NotificationClosed messages will not be send for this 56 | # notification. 57 | configSendNotiClosedDbusMessage = false 58 | 59 | # If set to true: If no icon is passed by the app_icon parameter 60 | # and no application "desktop-entry"-hint is present, the notification 61 | # center will try to guess the icon from the application name (if present). 62 | # Default is true. 63 | guessIconFromAppname = true 64 | 65 | # See section "Notification based scripting" for an explanation 66 | #match = "title=Abc;body=abc":"app=notify-send" 67 | #modify = "transient=false" 68 | #run = "":"killall notify-send" 69 | 70 | [notification-center-notification-popup] 71 | 72 | # Default timeout used for notifications in milli-seconds. This can 73 | # be overwritten with the "-t" option (or "--expire-time") of the 74 | # notify-send command. 75 | notiDefaultTimeout = 10000 76 | 77 | # Margin above notifications (in pixels). This can be used to avoid 78 | # overlap between notifications and a bar such as polybar or i3blocks. 79 | distanceTop = 50 80 | 81 | # Margin on the right of the notification (in pixels). 82 | distanceRight = 50 83 | 84 | # Vertical distance between 2 notifications (in pixels). 85 | distanceBetween = 20 86 | 87 | # Width of the notifications. 88 | width = 300 89 | 90 | # Monitor on which the notification will be printed. 91 | monitor = 0 92 | 93 | # If true, the notifications will open on the screen, on which the 94 | # mouse is 95 | followMouse = false 96 | 97 | # The display size of the application icons in the notification 98 | # pop-ups and in the notification center 99 | iconSize = 20 100 | 101 | # The maximal display size of images that are part of notifications 102 | # for notification pop-ups and in the notification center 103 | maxImageSize = 100 104 | 105 | # The margin around the top, bottom, left, and right of notification 106 | # images. Applies to popup notifications and in-center notifications. 107 | imageMarginTop = 15 108 | imageMarginBottom = 15 109 | imageMarginLeft = 15 110 | imageMarginRight = 0 111 | 112 | # Truncates notification bodies with '...' at the specified number of 113 | # lines. If -1 is specified, the body text will not be truncated. 114 | # Applies only to popup notifications 115 | shortenBody = 5 116 | 117 | # The mouse button for closing a popup. Must be either "mouse1", 118 | # "mouse2", "mouse3", "mouse4", or "mouse5" 119 | dismissButton = mouse1 120 | 121 | # The mouse button for opening a popup with the default action. 122 | # Must be either "mouse1", "mouse2", "mouse3", "mouse4", or "mouse5" 123 | defaultActionButton = mouse3 124 | 125 | [buttons] 126 | ### This section describes the configurable buttons within the 127 | ### notification center and NOT the buttons that appear in the 128 | ### notifications 129 | 130 | # Note: If you want your buttons in the notification center to be 131 | # squares you should verify that the following equality holds: 132 | # [notification-center]::width 133 | # == [buttons]::buttonsPerRow * [buttons]::buttonHeight 134 | # + ([buttons]::buttonsPerRow + 1) * [buttons]::buttonMargin 135 | 136 | # Numbers of buttons that can be drawn on a row of the notification 137 | # center. 138 | buttonsPerRow = 5 139 | 140 | # Height of buttons in the notification center (in pixels). 141 | buttonHeight = 60 142 | 143 | # Horizontal and vertical margin between each button in the 144 | # notification center (in pixels). 145 | buttonMargin = 2 146 | 147 | # Labels written on the buttons in the notification center. Labels 148 | # should be written between quotes and separated by a colon. For 149 | # example: 150 | # labels = "VPN":"Bluetooth":"Wifi":"Screensaver" 151 | 152 | # Each label is represented as a clickable button in the notification 153 | # center. The commands variable below define the commands that should 154 | # be launched when the user clicks on the associated button. There 155 | # should be the same number of entries in `commands` and in `labels` 156 | # commands = "sudo vpnToggle":"bluetoothToggle":"wifiToggle":"screensaverToggle" 157 | -------------------------------------------------------------------------------- /.config/images/abstract.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcarriga/dotfiles/991eba3ee32f8b327c725f40afeb1458a30fb013/.config/images/abstract.jpg -------------------------------------------------------------------------------- /.config/images/abstract_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcarriga/dotfiles/991eba3ee32f8b327c725f40afeb1458a30fb013/.config/images/abstract_1.jpg -------------------------------------------------------------------------------- /.config/images/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcarriga/dotfiles/991eba3ee32f8b327c725f40afeb1458a30fb013/.config/images/moon.png -------------------------------------------------------------------------------- /.config/images/squares.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcarriga/dotfiles/991eba3ee32f8b327c725f40afeb1458a30fb013/.config/images/squares.jpg -------------------------------------------------------------------------------- /.config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # :vim set filetype=conf: 2 | allow_remote_control yes 3 | 4 | 5 | font_family JetBrainsMono Nerd Font 6 | font_size 9.0 7 | symbol_map U+f101-U+f208 nonicons 8 | symbol_map U+EA60-U+EBF8 codicon 9 | 10 | # enable_audio_bell no 11 | bell_path pw-play /usr/share/sounds/freedesktop/stereo/bell.oga 12 | bell_on_tab yes 13 | 14 | single_window_margin_width -1 15 | window_margin_width 20 16 | 17 | remember_window_size yes 18 | draw_minimal_borders yes 19 | 20 | active_border_color #00AAAA 21 | inactive_border_color #222222 22 | 23 | tab_bar_style slant 24 | 25 | tab_bar_background #212121 26 | active_tab_foreground #212121 27 | active_tab_background #FAFAFA 28 | active_tab_font_style bold 29 | inactive_tab_foreground #616161 30 | inactive_tab_background #212121 31 | inactive_tab_font_style normal 32 | 33 | 34 | foreground #f8f8f2 35 | background #0B0B14 36 | cursor #F70067 37 | 38 | color0 #262626 39 | color8 #3E3D32 40 | color1 #F70067 41 | color9 #EF9A9A 42 | color2 #64DD17 43 | color10 #A9FF68 44 | color3 #FFEB3B 45 | color11 #FFF59D 46 | color4 #1E88E5 47 | color12 #4FC3F7 48 | color5 #D484FF 49 | color13 #9C27B0 50 | color6 #4DD0E1 51 | color14 #A1EFE4 52 | color7 #BDBDBD 53 | color15 #F8F8F8 54 | dim_opacity 0.75 55 | 56 | cursor_shape block 57 | hide_window_decorations yes 58 | macos_quit_when_last_window_closed yes 59 | 60 | background_opacity 0.85 61 | dynamic_background_opacity no 62 | 63 | 64 | allow_remote_control yes 65 | listen_on unix:/tmp/kitty 66 | 67 | cursor_blink_interval 0 68 | mouse_hide_wait 3 69 | 70 | action_alias kitty_scrollback_nvim kitten ~/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py 71 | scrollback_pager_history_size 1024 72 | 73 | map kitty_mod+y kitty_scrollback_nvim 74 | # Browse output of the last shell command in nvim 75 | map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output 76 | # Show clicked command output in nvim 77 | mouse_map kitty_mod+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output 78 | 79 | 80 | map kitty_mod+enter launch --cwd=current 81 | map kitty_mod+alt+t set_tab_title 82 | map kitty_mod+t new_tab 83 | map kitty_mod+d detach_tab # moves the tab into a new OS window 84 | map kitty_mod+f detach_window # moves the window into a new OS window 85 | map kitty_mod+alt+w close_window 86 | map kitty_mod+w new_window 87 | 88 | 89 | map kitty_mod+s launch --location=hsplit 90 | map kitty_mod+x launch --location=vsplit 91 | map kitty_mod+r layout_action rotate 92 | 93 | map kitty_mod+h neighboring_window left 94 | map kitty_mod+l neighboring_window right 95 | map kitty_mod+k neighboring_window up 96 | map kitty_mod+j neighboring_window down 97 | 98 | map kitty_mod+alt+k move_window up 99 | map kitty_mod+alt+h move_window left 100 | map kitty_mod+alt+l move_window right 101 | map kitty_mod+alt+j move_window down 102 | 103 | # map kitty_mod+left resize_window narrower 104 | # map kitty_mod+right resize_window wider 105 | # map kitty_mod+up resize_window taller 106 | # map kitty_mod+down resize_window shorter 107 | 108 | enabled_layouts splits:split_axis=horizontal 109 | -------------------------------------------------------------------------------- /.config/kitty/open-actions.conf: -------------------------------------------------------------------------------- 1 | # Open any file with a fragment in vim, fragments are generated 2 | # by the hyperlink_grep kitten and nothing else so far. 3 | protocol file 4 | fragment_matches [0-9]+ 5 | action launch --type=overlay vim +${FRAGMENT} ${FILE_PATH} 6 | 7 | # Open text files without fragments in the editor 8 | protocol file 9 | mime text/* 10 | action launch --type=overlay ${EDITOR} ${FILE_PATH} 11 | 12 | -------------------------------------------------------------------------------- /.config/nvim/after/queries/rst/highlihgts.scm: -------------------------------------------------------------------------------- 1 | ;extends 2 | ;; Taken from https://github.com/stsewd/sphinx.nvim 3 | ((role) @function.builtin 4 | (#any-of? 5 | @function.builtin 6 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html 7 | ":any:" ":ref:" ":doc:" ":download:" ":numref:" ":envar:" ":token:" ":keyword:" ":option:" 8 | ":term:" ":math:" ":eq:" ":abbr:" ":command:" ":dfn:" ":file:" ":guilabel:" ":kbd:" ":mailheader:" 9 | ":makevar:" ":manpage:" ":menuselection:" ":mimetype:" ":newsgroup:" ":program:" ":regexp:" ":samp:" 10 | ":pep:" ":rfc:")) 11 | 12 | ((directive 13 | name: (type) @function.builtin) 14 | (#any-of? 15 | @function.builtin 16 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html 17 | "toctree" 18 | "versionadded" "versionchanged" "deprecated" "seealso" "centered" "hlist" 19 | "highlight" "code-block" "literalinclude" 20 | "glossary" 21 | "sectionauthor" "codeauthor" 22 | "index" 23 | "only" 24 | "tabularcolumns" 25 | "productionlist")) 26 | 27 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#substitutions 28 | ((substitution_reference) @constant.builtin 29 | (#any-of? @constant.builtin "|release|" "|version|" "|today|")) 30 | 31 | ; Python domain 32 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-python-domain 33 | ((directive 34 | name: (type) @function.builtin) 35 | (#any-of? 36 | @function.builtin 37 | "py:module" 38 | "py:currentmodule" 39 | "py:function" 40 | "py:data" 41 | "py:exception" 42 | "py:class" 43 | "py:attribute" 44 | "py:method" 45 | "py:staticmethod" 46 | "py:classmethod" 47 | "py:decorator" 48 | "py:decoratormethod")) 49 | 50 | ((role) @function.builtin 51 | (#any-of? 52 | @function.builtin 53 | ":py:mod:" 54 | ":py:func:" 55 | ":py:data:" 56 | ":py:const:" 57 | ":py:class:" 58 | ":py:meth:" 59 | ":py:attr:" 60 | ":py:exc:" 61 | ":py:obj:")) 62 | 63 | ; C Domain 64 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-c-domain 65 | ((directive 66 | name: (type) @function.builtin) 67 | (#any-of? 68 | @function.builtin 69 | "c:member" 70 | "c:var" 71 | "c:function" 72 | "c:macro" 73 | "c:struct" 74 | "c:union" 75 | "c:enum" 76 | "c:enumerator" 77 | "c:type" 78 | "c:alias" 79 | "c:namespace" 80 | "c:namespace-push" 81 | "c:namespace-pop")) 82 | 83 | ((role) @function.builtin 84 | (#any-of? 85 | @function.builtin 86 | ":c:member:" 87 | ":c:data:" 88 | ":c:var:" 89 | ":c:func:" 90 | ":c:macro:" 91 | ":c:struct:" 92 | ":c:union:" 93 | ":c:enum:" 94 | ":c:enumerator:" 95 | ":c:type:" 96 | ":c:expr:" 97 | ":c:texpr:")) 98 | 99 | ; C++ domain 100 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#cpp-domain 101 | ((directive 102 | name: (type) @function.builtin) 103 | (#any-of? 104 | @function.builtin 105 | "cpp:class" 106 | "cpp:struct" 107 | "cpp:function" 108 | "cpp:member" 109 | "cpp:var" 110 | "cpp:type" 111 | "cpp:enum" 112 | "cpp:enum-struct" 113 | "cpp:enum-class" 114 | "cpp:enumerator" 115 | "cpp:union" 116 | "cpp:concept" 117 | "cpp:alias" 118 | "cpp:namespace" 119 | "cpp:namespace-push" 120 | "cpp:namespace-pop")) 121 | 122 | ((role) @function.builtin 123 | (#any-of? 124 | @function.builtin 125 | ":cpp:expr:" 126 | ":cpp:texpr:" 127 | ":cpp:any:" 128 | ":cpp:class:" 129 | ":cpp:struct:" 130 | ":cpp:func:" 131 | ":cpp:member:" 132 | ":cpp:var:" 133 | ":cpp:type:" 134 | ":cpp:concept:" 135 | ":cpp:enum:" 136 | ":cpp:enumerator:")) 137 | 138 | ; Standard domain 139 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-standard-domain 140 | ((directive 141 | name: (type) @function.builtin) 142 | (#any-of? 143 | @function.builtin 144 | "default-domain" 145 | "option" 146 | "envar" 147 | "program" 148 | "describe" 149 | "object")) 150 | 151 | ; JavaScript domain 152 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-javascript-domain 153 | ((directive 154 | name: (type) @function.builtin) 155 | (#any-of? 156 | @function.builtin 157 | "js:module" 158 | "js:function" 159 | "js:method" 160 | "js:class" 161 | "js:data" 162 | "js:attribute")) 163 | 164 | ((role) @function.builtin 165 | (#any-of? 166 | @function.builtin 167 | ":js:mod:" 168 | ":js:func:" 169 | ":js:meth:" 170 | ":js:class:" 171 | ":js:data:" 172 | ":js:attr:")) 173 | 174 | ; reStructuredtext domain 175 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-restructuredtext-domain 176 | ((directive 177 | name: (type) @function.builtin) 178 | (#any-of? 179 | @function.builtin 180 | "rst:directive" 181 | "rst:directive:option" 182 | "rst:role")) 183 | 184 | ((role) @function.builtin 185 | (#any-of? 186 | @function.builtin 187 | ":rst:dir:" 188 | ":rst:role:")) 189 | 190 | ; Math domain 191 | ; https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-math-domain 192 | ((role) @function.builtin 193 | (#eq? 194 | @function.builtin 195 | ":math:numref:")) 196 | 197 | -------------------------------------------------------------------------------- /.config/nvim/after/queries/rst/injections.scm: -------------------------------------------------------------------------------- 1 | ;extends 2 | ;; Taken from https://github.com/stsewd/sphinx.nvim 3 | ;; Directives with nested content 4 | 5 | ; ((directive 6 | ; name: (type) @_type 7 | ; body: (body (content) @rst)) 8 | ; (#any-of? 9 | ; @_type 10 | ; "toctree" 11 | ; "versionadded" "versionchanged" "deprecated" "seealso" "centered" "hlist" 12 | ; "glossary" 13 | ; "index" 14 | ; "productionlist")) 15 | 16 | ; ((directive 17 | ; name: (type) @_type 18 | ; body: (body (arguments) @rst)) 19 | ; (#any-of? @_type "sectionauthor" "codeauthor")) 20 | 21 | ; ;; Code highlight directives 22 | ; ((directive 23 | ; name: (type) @_type 24 | ; body: (body (arguments) @language (content) @content)) 25 | ; (#eq? @_type "highlight")) 26 | 27 | ; ;; Most directives from domains accept nested content 28 | ; ((directive 29 | ; name: (type) @_type 30 | ; body: (body (content) @rst)) 31 | ; (#match? @_type "^(py|c|cpp|js|rst):")) 32 | 33 | ; ((directive 34 | ; name: (type) @_type 35 | ; body: (body (content) @rst)) 36 | ; (#any-of? @_type "default-domain" "option" "envar" "program" "describe" "object")) 37 | 38 | ; ;; Directives from common extensions 39 | 40 | ; ;;; Sphinx docs 41 | ; ((directive 42 | ; name: (type) @_type 43 | ; body: (body (content) @rst)) 44 | ; (#eq? @_type "confval")) 45 | 46 | ; ;;; sphinx-tabs 47 | ; ;;; https://github.com/executablebooks/sphinx-tabs 48 | ; ((directive 49 | ; name: (type) @_type 50 | ; body: (body (content) @rst)) 51 | ; (#any-of? @_type "tabs" "tab" "group-tab")) 52 | 53 | ; ((directive 54 | ; name: (type) @_type 55 | ; body: (body (arguments) @language (content) @content)) 56 | ; (#eq? @_type "code-tab")) 57 | 58 | ; ;;; http domain 59 | ; ;;; https://sphinxcontrib-httpdomain.readthedocs.io/ 60 | ; ((directive 61 | ; name: (type) @_type 62 | ; body: (body (content) @rst)) 63 | ; (#match? @_type "^(http):")) 64 | 65 | ; ((directive 66 | ; name: (type) @_type 67 | ; body: (body (arguments) @language (content) @content)) 68 | ; (#eq? @_type "sourcecode")) 69 | 70 | ; ;;; sphinx-prompt 71 | ; ;;; https://github.com/sbrunner/sphinx-prompt 72 | ; ((directive 73 | ; name: (type) @_type 74 | ; body: (body (arguments) @language (content) @content)) 75 | ; (#eq? @_type "prompt")) 76 | 77 | -------------------------------------------------------------------------------- /.config/nvim/ftplugin/dapui_scopes.vim: -------------------------------------------------------------------------------- 1 | nnoremap J /▸\\|▾:nohlsearch 2 | nnoremap K ?▸\\|▾:nohlsearch 3 | 4 | -------------------------------------------------------------------------------- /.config/nvim/ftplugin/go.vim: -------------------------------------------------------------------------------- 1 | setlocal noexpandtab 2 | setlocal comments=s1:/*,mb:t,ex:*/,:// 3 | -------------------------------------------------------------------------------- /.config/nvim/ftplugin/lua.lua: -------------------------------------------------------------------------------- 1 | 2 | vim.bo.comments = ":---,:--" 3 | -------------------------------------------------------------------------------- /.config/nvim/ftplugin/python.vim: -------------------------------------------------------------------------------- 1 | setlocal tabstop=4 2 | -------------------------------------------------------------------------------- /.config/nvim/ftplugin/tex.vim: -------------------------------------------------------------------------------- 1 | setlocal wrap 2 | 3 | nnoremap j gj 4 | nnoremap k gk 5 | 6 | let b:vimtex_main = "main.tex" 7 | -------------------------------------------------------------------------------- /.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.cmd([[ 2 | augroup NvimAuCommands 3 | au! 4 | au TextYankPost * silent! lua vim.highlight.on_yank {on_visual = false, timeout = 50} 5 | augroup END 6 | ]]) 7 | 8 | vim.api.nvim_create_autocmd("FileType", { 9 | pattern = "dap-repl", 10 | callback = function(args) 11 | vim.api.nvim_buf_set_option(args.buf, "buflisted", false) 12 | end, 13 | }) 14 | 15 | -- Tell neovim which python to use 16 | vim.g.python3_host_prog = "/usr/bin/python3" 17 | 18 | require("colors").set() 19 | vim.cmd([[filetype plugin indent on]]) 20 | 21 | local function set(opt, val) 22 | vim.opt[opt] = val 23 | end 24 | 25 | for opt, val in pairs({ 26 | backspace = "indent,eol,start", 27 | breakindent = true, 28 | completeopt = "menuone,noselect,menu", 29 | concealcursor = "", 30 | conceallevel = 2, 31 | cursorline = true, 32 | cursorlineopt = "number", 33 | diffopt = "internal,filler,closeoff,algorithm:patience,linematch:60", 34 | expandtab = true, 35 | fillchars = "fold:─,foldclose:,foldopen:,foldsep: ,diff: ,eob: ", 36 | fixendofline = false, 37 | foldexpr = "nvim_treesitter#foldexpr()", 38 | foldtext = "", 39 | foldlevel = 99, 40 | foldmethod = "expr", 41 | formatoptions = "lnjqr", 42 | guicursor = "", 43 | ignorecase = true, 44 | inccommand = "split", 45 | laststatus = 3, 46 | linebreak = true, 47 | mouse = "a", 48 | number = true, 49 | relativenumber = true, 50 | scrolloff = 10, 51 | shiftwidth = 0, 52 | showmode = false, 53 | signcolumn = "yes", 54 | smartcase = true, 55 | spelloptions = "noplainbuffer", 56 | splitbelow = true, 57 | splitright = true, 58 | switchbuf = "useopen,uselast", 59 | tabstop = 2, 60 | textwidth = 80, 61 | undodir = vim.fn.expand("~/.cache/nvim/undodir"), 62 | undofile = true, 63 | viewoptions = "cursor,folds,slash,unix", 64 | wrap = false, 65 | }) do 66 | local suc, err = pcall(set, opt, val) 67 | if not suc then 68 | print("Error setting option " .. opt .. ": " .. err) 69 | end 70 | end 71 | 72 | vim.g.mapleader = " " 73 | vim.opt.shortmess:append("c") 74 | vim.g.border_chars = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" } 75 | 76 | vim.notify = function(...) 77 | local exists, notify = pcall(require, "notify") 78 | if exists then 79 | notify(...) 80 | else 81 | print(...) 82 | end 83 | end 84 | 85 | local k = vim.api.nvim_set_keymap 86 | local maps = { 87 | n = { 88 | [";"] = ":", 89 | [";;"] = ";", 90 | H = "^", 91 | L = "$", 92 | ["w"] = "w", 93 | ["q"] = "BufferClose", 94 | [""] = "", 95 | [""] = "", 96 | [""] = "zh", 97 | [""] = "zl", 98 | [""] = "", 99 | [""] = "", 100 | [""] = "", 101 | [""] = "", 102 | }, 103 | t = { 104 | [""] = "", 105 | [""] = "", 106 | [""] = "", 107 | [""] = "", 108 | }, 109 | o = { 110 | ie = "normal! gg0vG$", 111 | }, 112 | } 113 | 114 | for mode, mode_maps in pairs(maps) do 115 | for lhs, rhs in pairs(mode_maps) do 116 | k(mode, lhs, rhs, { silent = true, noremap = true }) 117 | end 118 | end 119 | 120 | -- From vim-unimpaired 121 | local function putline(how) 122 | local body, type = vim.fn.getreg(vim.v.register), vim.fn.getregtype(vim.v.register) 123 | if type == "V" then 124 | vim.api.nvim_exec('normal! "' .. vim.v.register .. how, false) 125 | else 126 | vim.fn.setreg(vim.v.register, body, "l") 127 | vim.api.nvim_exec('normal! "' .. vim.v.register .. how, false) 128 | vim.fn.setreg(vim.v.register, body, type) 129 | end 130 | end 131 | 132 | k("n", "[p", "", { 133 | callback = function() 134 | putline("[p") 135 | end, 136 | }) 137 | k("n", "]p", "", { 138 | callback = function() 139 | putline("]p") 140 | end, 141 | }) 142 | local util = require("util") 143 | 144 | local runners = { 145 | python = function(path) 146 | local python_path 147 | for _, client in pairs(vim.lsp.get_clients({ bufnr = vim.fn.bufnr(path) })) do 148 | if client.settings and client.settings.python then 149 | python_path = client.settings.python.pythonPath 150 | end 151 | end 152 | python_path = python_path or util.get_python_path(vim.loop.cwd()) 153 | vim.cmd(string.format("FloatermNew %s %s", python_path, path)) 154 | end, 155 | lua = function() 156 | vim.cmd(string.format("source %s", vim.fn.expand("%"))) 157 | end, 158 | } 159 | 160 | vim.keymap.set("n", "r", function() 161 | local filetype = vim.bo.filetype 162 | runners[filetype](vim.fn.expand("%")) 163 | end, { silent = true, noremap = true }) 164 | 165 | P = function(...) 166 | local obj = select("#", ...) == 1 and select(1, ...) or { ... } 167 | local s = type(obj) == "string" and obj or vim.inspect(obj) 168 | if vim.in_fast_event() then 169 | vim.schedule(function() 170 | print(s) 171 | end) 172 | else 173 | print(s) 174 | end 175 | end 176 | 177 | PP = vim.schedule_wrap(function(...) 178 | local is_string = select("#", ...) == 1 and type(select(1, ...)) == "string" 179 | local buf = vim.api.nvim_create_buf(false, true) 180 | local lines = vim.split(is_string and select(1, ...) or vim.inspect(...), "\n", { plain = true }) 181 | vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) 182 | vim.cmd("vsplit") 183 | vim.api.nvim_win_set_buf(0, buf) 184 | end) 185 | 186 | -- Find highlight group under cursor for changing colorschemes 187 | vim.cmd([[ 188 | map :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" 189 | ]]) 190 | 191 | if not vim.g.vscode then 192 | require("plugins") 193 | end 194 | -------------------------------------------------------------------------------- /.config/nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, 3 | "advanced-git-search.nvim": { "branch": "main", "commit": "1c5a10f5c838cfad2c17d7464311d6fb416cb319" }, 4 | "blink.cmp": { "branch": "main", "commit": "193423ca584e4e1a9639d6c480a6b952db566c21" }, 5 | "ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" }, 6 | "codewindow.nvim": { "branch": "master", "commit": "dd7017617962943eb1d152fc58940f11c6775a4a" }, 7 | "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, 8 | "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, 9 | "fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" }, 10 | "galaxyline.nvim": { "branch": "main", "commit": "20f5f750002532a35193f55cd499074fc97d933d" }, 11 | "git-messenger.vim": { "branch": "master", "commit": "edc603d4cda7894a743e383e16c638e206d03148" }, 12 | "gitgraph.nvim": { "branch": "main", "commit": "01e466b32c346a165135dd47d42f1244eca06572" }, 13 | "gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" }, 14 | "gitsigns-yadm.nvim": { "branch": "main", "commit": "2bab6ae8c6582a90ae58cc80eb69e35a27586ac2" }, 15 | "gitsigns.nvim": { "branch": "main", "commit": "7c27a30450130cd59c4994a6755e3c5d74d83e76" }, 16 | "indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" }, 17 | "iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" }, 18 | "kitty-scrollback.nvim": { "branch": "main", "commit": "d51725a6b71d65dd9df83ddc07903de2fb2736ee" }, 19 | "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" }, 20 | "line-targets.vim": { "branch": "master", "commit": "8a2a679cd066f76ca4c1bf6be6adc90c06025455" }, 21 | "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, 22 | "lspsaga.nvim": { "branch": "main", "commit": "d027f8b9c7c55e26cf4030c8657a2fc8222ed762" }, 23 | "lua-dev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, 24 | "magazine.nvim": { "branch": "main", "commit": "79f8d1aee3f7117994b5a07694d6eade81057390" }, 25 | "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, 26 | "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, 27 | "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, 28 | "mini.nvim": { "branch": "main", "commit": "0a8a1072137d916406507c941698a4bfa9dbbe7a" }, 29 | "neogit": { "branch": "master", "commit": "001f43f50d9589d837cec59004fd92486ab06870" }, 30 | "neotest-rust": { "branch": "main", "commit": "f2e0b3713d3559ce33be9aa32ace3a6051ec5593" }, 31 | "neotest-vitest": { "branch": "main", "commit": "9e30dca989a2287cf3fde86b3e138ea7fa4de935" }, 32 | "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, 33 | "none-ls.nvim": { "branch": "main", "commit": "dcc8cd4efdcb29275681a3c95786a816330dbca6" }, 34 | "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, 35 | "nvim-coverage": { "branch": "main", "commit": "aa4b4400588e2259e87e372b1e4e90ae13cf5a39" }, 36 | "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, 37 | "nvim-dap-python": { "branch": "master", "commit": "3e3dd98d4d83715c9e0e429b4a5da7bd706e6ceb" }, 38 | "nvim-dbg": { "branch": "master", "commit": "853893085d60a6f063f7223cec0a4ab7119b58c9" }, 39 | "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, 40 | "nvim-lspconfig": { "branch": "master", "commit": "59a6766cbf32c7e4cf3ed685ccad7ffe1dde8c40" }, 41 | "nvim-tree.lua": { "branch": "master", "commit": "120ba58254835d412bbc91cffe847e9be835fadd" }, 42 | "nvim-treesitter": { "branch": "master", "commit": "1c111e3e8f42c85b16cb4bf30e4254fcb5607817" }, 43 | "nvim-treesitter-refactor": { "branch": "master", "commit": "d8b74fa87afc6a1e97b18da23e762efb032dc270" }, 44 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, 45 | "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, 46 | "nvim-ts-hint-textobject": { "branch": "master", "commit": "e87002968983ed23836dfad53bcf023e609db42d" }, 47 | "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, 48 | "one-small-step-for-vimkind": { "branch": "main", "commit": "ad065ad2c814249cfb9e344ce5b2b35d36fbc09f" }, 49 | "packer.nvim": { "branch": "master", "commit": "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3" }, 50 | "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, 51 | "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" }, 52 | "targets.vim": { "branch": "master", "commit": "6325416da8f89992b005db3e4517aaef0242602e" }, 53 | "trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" }, 54 | "vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" }, 55 | "vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" }, 56 | "vim-eunuch": { "branch": "master", "commit": "6c6af39aa0a25223389607338ae965c5dfc7c972" }, 57 | "vim-floaterm": { "branch": "master", "commit": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160" }, 58 | "vim-log-highlighting": { "branch": "master", "commit": "1037e26f3120e6a6a2c0c33b14a84336dee2a78f" }, 59 | "vim-mundo": { "branch": "master", "commit": "2ceda8c65f7b3f9066820729fc02003a09df91f9" }, 60 | "vim-sandwich": { "branch": "master", "commit": "74cf93d58ccc567d8e2310a69860f1b93af19403" }, 61 | "vim-subversive": { "branch": "master", "commit": "cea98a62ded4028118ad71c3e81b26eff2e0b8a0" }, 62 | "yaml-companion.nvim": { "branch": "main", "commit": "131b0d67bd2e0f1a02e0daf2f3460482221ce3c0" } 63 | } 64 | -------------------------------------------------------------------------------- /.config/nvim/lua/colors.lua: -------------------------------------------------------------------------------- 1 | local c = { 2 | transparent = "NONE", 3 | grey1 = "#262626", 4 | grey2 = "#424242", 5 | grey3 = "#8B8B8B", 6 | grey4 = "#bdbdbd", 7 | grey5 = "#F8F8F8", 8 | violet = "#D484FF", 9 | blue = "#2f628e", 10 | cyan = "#00f1f5", 11 | green = "#A9FF68", 12 | dark_green = "#142818", 13 | yellow = "#FFF59D", 14 | orange = "#F79000", 15 | red = "#F70067", 16 | dark_red = "#3F0001", 17 | float_background = "#132434", 18 | background = "NONE", 19 | } 20 | 21 | c.normal = c.grey5 22 | c.border = c.grey3 23 | c.decoration = c.orange 24 | c.hidden = c.grey3 25 | c.built_in = c.red 26 | c.var_name = c.grey5 27 | c.func_name = c.cyan 28 | c.type_name = c.violet 29 | c.key = c.cyan 30 | c.val = c.violet 31 | c.parameter = c.green 32 | c.string = c.yellow 33 | c.operator = c.orange 34 | c.success = c.green 35 | c.warning = c.orange 36 | c.info = c.cyan 37 | c.error = c.red 38 | 39 | local highlights = { 40 | Normal = { fg = c.normal, bg = c.background }, 41 | NormalFloat = { fg = c.normal }, 42 | Border = { fg = c.border }, 43 | FloatBorder = { fg = c.border }, 44 | Decoration = { fg = c.orange }, 45 | Hidden = { fg = c.grey3 }, 46 | Path = { fg = c.blue }, 47 | BuiltIn = { fg = c.red }, 48 | VarName = { fg = c.grey5, bold = true }, 49 | FuncName = { fg = c.cyan }, 50 | TypeName = { fg = c.violet }, 51 | Key = { fg = c.cyan }, 52 | Val = { fg = c.violet }, 53 | String = { fg = c.yellow }, 54 | Operator = { fg = c.orange }, 55 | Success = { fg = c.green }, 56 | Warning = { fg = c.yellow }, 57 | Info = { fg = c.cyan }, 58 | Error = { fg = c.red }, 59 | User1 = { fg = c.success, bg = c.float_background }, 60 | User2 = { fg = c.warning, bg = c.float_background }, 61 | User3 = { fg = c.error, bg = c.float_background }, 62 | User4 = { fg = c.grey1, bg = c.info }, 63 | -- Vim 64 | Cursor = { fg = c.grey1, bg = c.red }, 65 | CursorLine = { fg = c.transparent, bg = c.grey1 }, 66 | CursorColumn = { fg = c.transparent, bg = c.grey1 }, 67 | ColorColumn = { fg = c.transparent, bg = c.grey1 }, 68 | LineNr = { fg = c.hidden }, 69 | CursorLineNr = { fg = c.success, bold = true }, 70 | VertSplit = { fg = c.hidden }, 71 | MatchParen = { fg = c.key, underline = true }, 72 | StatusLine = { fg = c.normal }, 73 | StatusLineNC = { fg = c.hidden }, 74 | WinBar = { fg = c.normal }, 75 | WinBarNC = { fg = c.normal }, 76 | WinBarSep = { fg = c.decoration, bg = c.grey1 }, 77 | WinBarPath = { fg = c.grey5, bg = c.grey1 }, 78 | IncSearch = { fg = c.green, bold = true, underline = true }, 79 | Search = { fg = c.green, bold = true, underline = true }, 80 | Directory = { fg = c.cyan }, 81 | Folded = { fg = c.grey3 }, 82 | WildMenu = { fg = c.cyan }, 83 | VisualNOS = { fg = c.grey3, bg = c.yellow }, 84 | ModeMsg = { fg = c.yellow }, 85 | FoldColumn = { fg = c.grey4 }, 86 | MoreMsg = { fg = c.yellow }, 87 | cursorim = { fg = c.violet }, 88 | Pmenu = { fg = c.grey4 }, 89 | PmenuSel = { fg = c.transparent, bg = c.grey2, bold = true }, 90 | PMenuSbar = { fg = c.transparent }, 91 | PMenuThumb = { fg = c.transparent, bg = c.grey4 }, 92 | Visual = { fg = c.transparent, bg = c.grey1, bold = true, underline = true }, 93 | EndOfBuffer = { fg = c.grey1 }, 94 | Underlined = { fg = c.transparent, underline = true }, 95 | SpellBad = { fg = c.transparent, undercurl = true }, 96 | SpellCap = { fg = c.transparent, undercurl = true }, 97 | SpellLocal = { fg = c.transparent, undercurl = true }, 98 | SignColumn = { fg = c.key }, 99 | Question = { fg = c.info }, 100 | TabLineFill = { fg = c.grey3 }, 101 | NotificationInfo = { fg = c.normal, bg = c.float_background }, 102 | NotificationError = { fg = c.error, bg = c.float_background }, 103 | NotificationWarning = { fg = c.warning, bg = c.float_background }, 104 | WinSeparator = { fg = c.grey2 }, 105 | -- General 106 | Boolean = { fg = c.val }, 107 | Character = { fg = c.val }, 108 | Comment = { fg = c.hidden }, 109 | Conditional = { fg = c.built_in }, 110 | Constant = { fg = c.var_name }, 111 | Define = { fg = c.built_in }, 112 | DiffAdd = { fg = c.background, bg = c.dark_green }, 113 | DiffChange = { fg = c.background, bg = c.grey1 }, 114 | DiffDelete = { fg = c.background, bg = c.dark_red }, 115 | DiffText = { fg = c.background, bg = c.dark_red }, 116 | ErrorMsg = { fg = c.error }, 117 | WarningMsg = { fg = c.warning }, 118 | Float = { fg = c.val }, 119 | Function = { fg = c.func_name }, 120 | Identifier = { fg = c.var_name }, 121 | Keyword = { fg = c.built_in }, 122 | Label = { fg = c.key }, 123 | NonText = { fg = c.hidden }, 124 | Number = { fg = c.val }, 125 | PreProc = { fg = c.key }, 126 | Special = { fg = c.cyan }, 127 | SpecialKey = { fg = c.built_in }, 128 | Statement = { fg = c.built_in }, 129 | Tag = { fg = c.key }, 130 | Title = { fg = c.normal, bold = true }, 131 | Todo = { fg = c.normal, bold = true }, 132 | Type = { fg = c.type_name }, 133 | SpecialComment = { fg = c.info, bold = true }, 134 | Typedef = { fg = c.type_name }, 135 | PreCondit = { fg = c.built_in }, 136 | Include = { fg = c.built_in }, 137 | Ignore = { fg = c.built_in }, 138 | Delimiter = { fg = c.decoration }, 139 | Conceal = { fg = c.transparent, bold = true }, 140 | -- gitsigns 141 | GitSignsAdd = { fg = c.success, bold = true }, 142 | GitSignsDelete = { fg = c.error, bold = true }, 143 | GitSignsChange = { fg = c.yellow, bold = true }, 144 | --ini 145 | dosiniLabel = { fg = c.key }, 146 | dosiniValue = { fg = c.val }, 147 | dosiniHeader = { fg = c.built_in }, 148 | -- TreeSitter 149 | ["@error"] = { fg = c.error }, 150 | ["@comment"] = { fg = c.hidden }, 151 | ["@punct.delimiter"] = { fg = c.decoration }, 152 | ["@punct.bracket"] = { fg = c.decoration }, 153 | ["@punct.special"] = { fg = c.decoration }, 154 | ["@constant"] = { fg = c.var_name }, 155 | ["@const.builtin"] = { fg = c.built_in }, 156 | ["@const.macro"] = { fg = c.built_in }, 157 | ["@string"] = { fg = c.string }, 158 | ["@string.regex"] = { fg = c.operator }, 159 | ["@string.escape"] = { fg = c.operator }, 160 | ["@character"] = { fg = c.val }, 161 | ["@number"] = { fg = c.val }, 162 | ["@boolean"] = { fg = c.val }, 163 | ["@float"] = { fg = c.val }, 164 | ["@function"] = { fg = c.func_name }, 165 | ["@func.builtin"] = { fg = c.built_in }, 166 | ["@func.macro"] = { fg = c.built_in }, 167 | ["@parameter"] = { fg = c.green }, 168 | ["@parameter.reference"] = { fg = c.green }, 169 | ["@method"] = { fg = c.func_name }, 170 | ["@field"] = { fg = c.func_name }, 171 | ["@property"] = { fg = c.parameter }, 172 | ["@tag"] = { fg = c.func_name }, 173 | ["@constructor"] = { fg = c.type_name }, 174 | ["@conditional"] = { fg = c.built_in }, 175 | ["@repeat"] = { fg = c.built_in }, 176 | ["@label"] = { fg = c.key }, 177 | ["@operator"] = { fg = c.operator }, 178 | ["@keyword"] = { fg = c.built_in }, 179 | ["@keyword.function"] = { fg = c.built_in }, 180 | ["@exception"] = { fg = c.error }, 181 | ["@type"] = { fg = c.type_name }, 182 | ["@type.builtin"] = { fg = c.type_name }, 183 | ["@structure"] = { fg = c.error }, 184 | ["@include"] = { fg = c.built_in }, 185 | ["@annotation"] = { fg = c.string }, 186 | ["@text"] = { fg = c.string }, 187 | ["@strong"] = { fg = c.transparent, bold = true }, 188 | ["@emphasis"] = { fg = c.transparent, bold = true, underline = true }, 189 | ["@underline"] = { fg = c.transparent, underline = true }, 190 | ["@title"] = { fg = c.key, bold = true }, 191 | ["@literal"] = { fg = c.decoration }, 192 | ["@uri"] = { fg = c.info }, 193 | ["@variable"] = { fg = c.var_name }, 194 | ["@variable.builtin"] = { fg = c.built_in }, 195 | ["@definition"] = { fg = c.transparent, bold = true }, 196 | ["@definition.usage"] = { fg = c.transparent, bold = true, underline = true }, 197 | ["@current.scope"] = { fg = c.transparent, bold = true }, 198 | ["@text.reference"] = { fg = c.normal, bold = true, underline = true }, 199 | -- Golang 200 | goFunctionCall = { fg = c.func_name }, 201 | goVarDefs = { fg = c.var_name }, 202 | -- Telescope 203 | TelescopeBorder = { fg = c.border }, 204 | -- LSP 205 | LspReferenceText = { fg = c.background, bold = true, underline = true }, 206 | LspReferenceRead = { fg = c.background, bold = true, underline = true }, 207 | LspReferenceWrite = { fg = c.background, bold = true, underline = true }, 208 | DiagnosticTruncateLine = { fg = c.hidden }, 209 | DiagnosticError = { fg = c.error }, 210 | DiagnosticWarn = { fg = c.warning }, 211 | DiagnosticInfo = { fg = c.info }, 212 | DiagnosticHint = { fg = c.info }, 213 | LspCodeLens = { fg = c.type_name, italic = true }, 214 | IblIndent = { fg = c.grey2 }, 215 | 216 | ["@lsp.type.property.lua"] = { fg = c.key }, 217 | ["@lsp.mod.defaultLibrary.lua"] = { fg = c.built_in }, 218 | ["@lsp.type.parameter.python"] = { fg = c.parameter }, 219 | 220 | -- LSP Signature 221 | LspSelectedParam = { fg = c.normal, bold = true, underline = true }, 222 | 223 | --lsp-inlayhints.nvim 224 | LspInlayHint = { fg = c.type_name, italic = true }, 225 | 226 | --nvim-cmp 227 | CmpItemAbbr = { fg = c.normal }, 228 | CmpDocumentationBorder = { fg = c.border }, 229 | CmpItemAbbrMatch = { fg = c.normal, bold = true }, 230 | CmpItemAbbrMatchFuzzy = { fg = c.normal, bold = true, underline = true }, 231 | CmpItemAbbrDeprecated = { fg = c.normal, bold = true }, 232 | CmpItemKindVariable = { fg = c.var_name, bold = true }, 233 | CmpItemKindInterface = { fg = c.type_name, bold = true }, 234 | CmpItemKindText = { fg = c.normal, bold = true }, 235 | CmpItemKindFunction = { fg = c.func_name, bold = true }, 236 | CmpItemKindMethod = { fg = c.func_name, bold = true }, 237 | CmpItemKindKeyword = { fg = c.built_in, bold = true }, 238 | CmpItemKindProperty = { fg = c.key, bold = true }, 239 | CmpItemKindUnit = { fg = c.yellow, bold = true }, 240 | CmpItemKindCopilt = { fg = c.green, bold = true }, 241 | CmpBorderedWindow_FloatBorder = { fg = c.border }, 242 | 243 | --neorg 244 | ["@neorg.headings.1.title"] = { fg = c.red, bold = true }, 245 | ["@neorg.headings.2.title"] = { fg = c.orange, bold = true }, 246 | ["@neorg.headings.3.title"] = { fg = c.cyan, bold = true }, 247 | ["@neorg.headings.4.title"] = { fg = c.green, bold = true }, 248 | ["@neorg.headings.5.title"] = { fg = c.yellow, bold = true }, 249 | ["@neorg.headings.6.title"] = { fg = c.grey3, bold = true }, 250 | ["@neorg.headings.1.prefix"] = { fg = c.red, bold = true }, 251 | ["@neorg.headings.2.prefix"] = { fg = c.orange, bold = true }, 252 | ["@neorg.headings.3.prefix"] = { fg = c.cyan, bold = true }, 253 | ["@neorg.headings.4.prefix"] = { fg = c.green, bold = true }, 254 | ["@neorg.headings.5.prefix"] = { fg = c.yellow, bold = true }, 255 | ["@neorg.headings.6.prefix"] = { fg = c.grey3, bold = true }, 256 | ["@neorg.todo_items.done.1"] = { fg = c.success }, 257 | ["@neorg.todo_items.done.2"] = { fg = c.success }, 258 | ["@neorg.todo_items.done.3"] = { fg = c.success }, 259 | ["@neorg.todo_items.done.4"] = { fg = c.success }, 260 | ["@neorg.todo_items.done.5"] = { fg = c.success }, 261 | ["@neorg.todo_items.done.6"] = { fg = c.success }, 262 | ["@neorg.todo_items.undone.1"] = { fg = c.cyan }, 263 | ["@neorg.todo_items.undone.2"] = { fg = c.cyan }, 264 | ["@neorg.todo_items.undone.3"] = { fg = c.cyan }, 265 | ["@neorg.todo_items.undone.4"] = { fg = c.cyan }, 266 | ["@neorg.todo_items.undone.5"] = { fg = c.cyan }, 267 | ["@neorg.todo_items.undone.6"] = { fg = c.cyan }, 268 | ["@neorg.todo_items.pending.1"] = { fg = c.yellow }, 269 | ["@neorg.todo_items.pending.2"] = { fg = c.yellow }, 270 | ["@neorg.todo_items.pending.3"] = { fg = c.yellow }, 271 | ["@neorg.todo_items.pending.4"] = { fg = c.yellow }, 272 | ["@neorg.todo_items.pending.5"] = { fg = c.yellow }, 273 | ["@neorg.todo_items.pending.6"] = { fg = c.yellow }, 274 | 275 | logDate = { fg = c.info }, 276 | logLevelDebug = { fg = c.grey3 }, 277 | logLevelInfo = { fg = c.info }, 278 | 279 | -- MiniMapNormal = { fg = c.hidden }, 280 | -- MiniMapSymbolCount = { fg = c.info }, 281 | -- MiniMapSymbolLine = { fg = c.cyan }, 282 | -- MiniMapSymbolView = { fg = c.hidden }, 283 | 284 | NeogitDiffAddHighlight = { fg = "#859900" }, 285 | NeogitDiffDeleteHighlight = { fg = "#dc322f" }, 286 | NeogitDiffContextHighlight = { fg = "#b2b2b2" }, 287 | NeogitHunkHeader = { fg = "#cccccc" }, 288 | NeogitHunkHeaderHighlight = { fg = "#cccccc" }, 289 | 290 | 291 | GitGraphHash = { fg = c.cyan }, 292 | GitGraphTimestamp = { fg = c.grey3 }, 293 | GitGraphAuthor = { fg = c.red }, 294 | GitGraphBranchName = { fg = c.green }, 295 | GitGraphBranchTag = { fg = c.yellow, bold = true }, 296 | GitGraphBranchMsg = { fg = c.grey5, bold = true }, 297 | GitGraphBranch1 = { fg = c.cyan }, 298 | GitGraphBranch2 = { fg = c.organge }, 299 | GitGraphBranch3 = { fg = c.red }, 300 | GitGraphBranch4 = { fg = c.violet }, 301 | GitGraphBranch5 = { fg = c.grey3 }, 302 | 303 | FzfLuaBorder = { fg = c.border }, 304 | 305 | NeotestPassedWinBar = { fg = c.success, bg = c.grey1 }, 306 | NeotestFailedWinBar = { fg = c.error, bg = c.grey1 }, 307 | NeotestRunningWinBar = { fg = c.yellow, bg = c.grey1 }, 308 | NeotestSkippedWinBar = { fg = c.cyan, bg = c.grey1 }, 309 | 310 | AerialVariableIcon = { fg = c.green }, 311 | AerialClass = { fg = c.type_name }, 312 | AerialMethod = { fg = c.func_name }, 313 | 314 | NvimTreeExecFile = { fg = c.violet }, 315 | } 316 | 317 | local M = {} 318 | 319 | function M.set() 320 | for group, args in pairs(highlights) do 321 | vim.api.nvim_set_hl(0, group, args) 322 | end 323 | end 324 | 325 | return M 326 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/dap.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.post() 4 | local dap = require("dap") 5 | 6 | local dapui = require("dapui") 7 | dapui.setup({ 8 | force_buffers = false, 9 | element_mappings = { 10 | scopes = { 11 | edit = "l", 12 | }, 13 | }, 14 | layouts = { 15 | { 16 | elements = { 17 | "scopes", 18 | "breakpoints", 19 | "stacks", 20 | "watches", 21 | }, 22 | size = 80, 23 | position = "left", 24 | }, 25 | { 26 | elements = { "repl", "console" }, 27 | size = 0.25, 28 | position = "bottom", 29 | }, 30 | }, 31 | render = { 32 | max_value_lines = 3, 33 | sort_variables = function(a, b) 34 | return a.name < b.name 35 | end, 36 | }, 37 | floating = { max_width = 0.9, max_height = 0.5, border = vim.g.border_chars }, 38 | }) 39 | 40 | local mappings = { 41 | [""] = dap.continue, 42 | [""] = dap.step_over, 43 | [""] = dap.step_into, 44 | [""] = dap.step_out, 45 | [""] = dap.toggle_breakpoint, 46 | [""] = function() 47 | dapui.toggle({ reset = true }) 48 | end, 49 | [""] = dapui.eval, 50 | [""] = dapui.elements.watches.add, 51 | [""] = dapui.float_element, 52 | [""] = function() 53 | dapui.float_element("scopes") 54 | end, 55 | [""] = function() 56 | dapui.float_element("repl") 57 | end, 58 | [""] = dap.terminate, 59 | } 60 | for keys, mapping in pairs(mappings) do 61 | vim.api.nvim_set_keymap("n", keys, "", { callback = mapping, noremap = true }) 62 | end 63 | 64 | vim.api.nvim_set_keymap("v", "", "", { callback = dapui.eval }) 65 | vim.fn.sign_define("DapBreakpoint", { text = "→", texthl = "Error", linehl = "", numhl = "" }) 66 | vim.fn.sign_define("DapStopped", { text = "→", texthl = "Success", linehl = "", numhl = "" }) 67 | 68 | -- Prevent race condition where mason isn't setup 69 | -- TODO: Find a better way to do this 70 | vim.schedule(function() 71 | pcall(require("dap.ext.vscode").load_launchjs) 72 | local dap_python = require("dap-python") 73 | 74 | local mason_registry = require("mason-registry") 75 | dap_python.setup( 76 | mason_registry.get_package("debugpy"):get_install_path() .. "/venv/bin/python", 77 | { include_configs = false } 78 | ) 79 | end) 80 | 81 | dap.configurations.python = { 82 | { 83 | type = "python", 84 | request = "launch", 85 | name = "Launch file", 86 | justMyCode = false, 87 | cwd = vim.fn.getcwd(), 88 | program = "${file}", 89 | console = "integratedTerminal", 90 | pythonPath = require("util").get_python_path(), 91 | }, 92 | { 93 | type = "python", 94 | request = "launch", 95 | name = "Launch Module", 96 | justMyCode = false, 97 | module = function() 98 | return string.gsub(vim.fn.expand("%:.:r"), "/", ".") 99 | end, 100 | console = "integratedTerminal", 101 | pythonPath = require("util").get_python_path(), 102 | }, 103 | { 104 | type = "python", 105 | request = "attach", 106 | name = "Attach remote", 107 | justMyCode = false, 108 | pythonPath = require("util").get_python_path(), 109 | host = function() 110 | local value = vim.fn.input("Host [127.0.0.1]: ") 111 | if value ~= "" then 112 | return value 113 | end 114 | return "127.0.0.1" 115 | end, 116 | port = function() 117 | return tonumber(vim.fn.input("Port [5678]: ")) or 5678 118 | end, 119 | }, 120 | } 121 | 122 | dap.configurations.lua = { 123 | { 124 | type = "nlua", 125 | request = "attach", 126 | name = "Attach to running Neovim instance", 127 | }, 128 | } 129 | 130 | dap.adapters.nlua = function(callback, config) 131 | callback({ type = "server", host = config.host or "127.0.0.1", port = config.port or 8086 }) 132 | end 133 | end 134 | 135 | return M 136 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/galaxyline.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.post() 4 | local gl = require("galaxyline") 5 | local gls = gl.section 6 | local vcs = require("galaxyline.provider_vcs") 7 | local devicons = require("nvim-web-devicons") 8 | 9 | gl.short_line_list = { 10 | "dapui_scopes", 11 | "dapui_stacks", 12 | "dapui_watches", 13 | "dapui_breakpoints", 14 | "LuaTree", 15 | "dbui", 16 | "term", 17 | "fugitive", 18 | "fugitiveblame", 19 | "NvimTree", 20 | "UltestSummary", 21 | } 22 | 23 | local colors = { 24 | bg = "none", 25 | normal = "#F8F8F8", 26 | grey = "#132434", 27 | grey1 = "#262626", 28 | grey2 = "#424242", 29 | grey3 = "#8B8B8B", 30 | grey4 = "#bdbdbd", 31 | grey5 = "#F8F8F8", 32 | violet = "#D484FF", 33 | blue = "#2f628e", 34 | cyan = "#00f1f5", 35 | green = "#A9FF68", 36 | green2 = "#2f7366", 37 | yellow = "#FFF59D", 38 | orange = "#F79000", 39 | red = "#F70067", 40 | } 41 | 42 | local buffer_not_empty = function() 43 | if vim.fn.empty(vim.fn.expand("%:t")) ~= 1 then 44 | return true 45 | end 46 | return false 47 | end 48 | 49 | local mode_color = { 50 | n = colors.green, 51 | i = colors.cyan, 52 | v = colors.violet, 53 | [""] = colors.cyan, 54 | V = colors.cyan, 55 | c = colors.red, 56 | no = colors.violet, 57 | s = colors.orange, 58 | S = colors.orange, 59 | [""] = colors.orange, 60 | ic = colors.yellow, 61 | cv = colors.red, 62 | ce = colors.red, 63 | ["!"] = colors.green, 64 | t = colors.green, 65 | ["r?"] = colors.red, 66 | ["r"] = colors.red, 67 | rm = colors.red, 68 | R = colors.yellow, 69 | Rv = colors.violet, 70 | } 71 | 72 | local mode_alias = { 73 | n = " ", 74 | i = " ", 75 | c = " ", 76 | V = " ", 77 | [""] = " ", 78 | v = " ", 79 | ["r?"] = ":CONFIRM", 80 | rm = "--MORE", 81 | R = " ", 82 | Rv = "VIRTUAL", 83 | s = " ", 84 | S = " ", 85 | ["r"] = "HIT-ENTER", 86 | [""] = " ", 87 | t = " ", 88 | ["!"] = "SHELL", 89 | } 90 | 91 | local function long_filename() 92 | local file = vim.fn.expand("%") 93 | if file == "" then 94 | return "" 95 | end 96 | return file .. " " 97 | end 98 | 99 | local checkwidth = function() 100 | local squeeze_width = vim.opt.columns:get() / 2 101 | if squeeze_width > 60 then 102 | return true 103 | end 104 | return false 105 | end 106 | 107 | local function file_icon(buf) 108 | local suc, icon = pcall(function(...) 109 | local file = vim.api.nvim_buf_get_name(buf or 0) 110 | local f_name, f_extension = vim.fn.fnamemodify(file, ":t"), vim.fn.expand(file, ":e") 111 | return devicons.get_icon(f_name, f_extension) 112 | end) 113 | if not suc then 114 | return nil 115 | end 116 | return icon 117 | end 118 | 119 | local function file_icon_color(buf) 120 | local icon, iconhl = file_icon(buf) 121 | if icon ~= nil then 122 | return vim.fn.synIDattr(vim.fn.hlID(iconhl), "fg") 123 | end 124 | end 125 | 126 | local spinner_frames = { "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" } 127 | local function lsp_status(status) 128 | local success, lsp_status = pcall(require, "lsp-status") 129 | if not success then 130 | return "" 131 | end 132 | local buf_messages = lsp_status.messages() 133 | if vim.tbl_isempty(buf_messages) then 134 | return "" 135 | end 136 | local msgs = {} 137 | for _, msg in ipairs(buf_messages) do 138 | local name = msg.name 139 | local client_name = name 140 | local contents = "" 141 | if msg.progress then 142 | contents = msg.title 143 | if msg.message then 144 | contents = contents .. " " .. msg.message 145 | end 146 | 147 | if msg.percentage then 148 | contents = contents .. "(" .. msg.percentage .. ")" 149 | end 150 | 151 | if msg.spinner then 152 | contents = contents .. " " .. spinner_frames[(msg.spinner % #spinner_frames) + 1] 153 | end 154 | elseif msg.status then 155 | contents = msg.content 156 | if msg.uri then 157 | local filename = vim.uri_to_fname(msg.uri) 158 | filename = vim.fn.fnamemodify(filename, ":~:.") 159 | local space = math.min(60, math.floor(0.6 * vim.opt.columns:get())) 160 | if #filename > space then 161 | filename = vim.fn.pathshorten(filename) 162 | end 163 | 164 | contents = "(" .. filename .. ") " .. contents 165 | end 166 | else 167 | contents = msg.content 168 | end 169 | 170 | table.insert(msgs, client_name .. ":" .. contents) 171 | end 172 | status = "" 173 | for index, msg in ipairs(msgs) do 174 | status = status .. (index > 1 and " | " or "") .. msg 175 | end 176 | return status .. " " 177 | end 178 | 179 | gls.left = { 180 | { 181 | ViMode = { 182 | provider = function() 183 | local vim_mode = vim.fn.mode() 184 | vim.cmd("hi GalaxyViMode guifg=" .. mode_color[vim_mode]) 185 | return " " .. mode_alias[vim_mode] 186 | end, 187 | highlight = "GalaxyViMode", 188 | separator = " ", 189 | }, 190 | }, 191 | 192 | { 193 | LongFileName = { 194 | provider = long_filename, 195 | condition = buffer_not_empty, 196 | highlight = { colors.normal, colors.bg, "bold" }, 197 | }, 198 | }, 199 | 200 | { 201 | FileIcon = { 202 | provider = file_icon, 203 | condition = buffer_not_empty, 204 | separator = " ", 205 | highlight = { file_icon_color, colors.bg }, 206 | }, 207 | }, 208 | 209 | { 210 | FileStatus = { 211 | provider = function() 212 | if vim.bo.filetype ~= "help" and vim.bo.readonly then 213 | return " " 214 | end 215 | end, 216 | highlight = { colors.cyan, colors.bg }, 217 | }, 218 | }, 219 | 220 | { 221 | CustomGitBranch = { 222 | provider = function() 223 | local branch = vcs.get_git_branch() 224 | if branch == nil then 225 | return "" 226 | end 227 | return " " .. branch .. " " 228 | end, 229 | condition = checkwidth, 230 | highlight = { colors.grey3, colors.bg, "bold" }, 231 | }, 232 | }, 233 | 234 | { 235 | DiffAdd = { 236 | provider = "DiffAdd", 237 | condition = checkwidth, 238 | icon = " ", 239 | highlight = { colors.green, "none", "bold" }, 240 | }, 241 | }, 242 | { 243 | DiffModified = { 244 | provider = "DiffModified", 245 | condition = checkwidth, 246 | icon = " ", 247 | highlight = { colors.yellow, "none", "bold" }, 248 | }, 249 | }, 250 | { 251 | DiffRemove = { 252 | provider = "DiffRemove", 253 | condition = checkwidth, 254 | icon = " ", 255 | highlight = { colors.red, "none", "bold" }, 256 | }, 257 | }, 258 | } 259 | 260 | gls.right = { 261 | { 262 | LspStatus = { 263 | provider = lsp_status, 264 | highlight = { colors.grey3, colors.bg }, 265 | }, 266 | }, 267 | { 268 | DiagnosticError = { 269 | provider = "DiagnosticError", 270 | icon = " ", 271 | highlight = { colors.red, colors.bg }, 272 | }, 273 | }, 274 | { 275 | DiagnosticWarn = { 276 | provider = "DiagnosticWarn", 277 | icon = " ", 278 | highlight = { colors.yellow, colors.bg }, 279 | }, 280 | }, 281 | { 282 | DiagnosticInfo = { 283 | provider = "DiagnosticInfo", 284 | icon = " ", 285 | highlight = { colors.green, colors.bg }, 286 | }, 287 | }, 288 | { 289 | DiagnosticHint = { 290 | provider = "DiagnosticHint", 291 | icon = " ", 292 | highlight = { colors.cyan, colors.bg }, 293 | }, 294 | }, 295 | { 296 | LineInfo = { 297 | provider = "LineColumn", 298 | highlight = { colors.fg, colors.bg }, 299 | }, 300 | }, 301 | { 302 | PerCent = { 303 | provider = "LinePercent", 304 | highlight = { colors.cyan, colors.bg, "bold" }, 305 | }, 306 | }, 307 | { 308 | FileSize = { 309 | provider = "FileSize", 310 | condition = buffer_not_empty, 311 | highlight = { colors.normal, colors.bg }, 312 | }, 313 | }, 314 | } 315 | 316 | local function providers_text(provider_groups) 317 | local all_providers = {} 318 | for _, providers in pairs(provider_groups) do 319 | for name, provider in pairs(providers) do 320 | all_providers[name] = provider 321 | end 322 | end 323 | local sum = "" 324 | for name, provider in pairs(all_providers) do 325 | if not provider.condition or provider.condition() then 326 | sum = sum .. gl.component_decorator(name) .. (provider.separator or "") 327 | end 328 | end 329 | return sum 330 | end 331 | 332 | gls.mid = { 333 | { 334 | WinBar = { 335 | provider = function() 336 | -- local colour = colors.grey2 337 | -- if vim.bo.modified then 338 | -- colour = colors.cyan 339 | -- end 340 | -- vim.cmd("hi GalaxyFileStatus guifg=" .. colour) 341 | -- local existing_text = providers_text(gls.left) 342 | -- existing_text = existing_text .. providers_text(gls.right) 343 | -- local width = vim.opt.columns:get() - vim.str_utfindex(existing_text) 344 | -- return "├" .. string.rep("─", width - 2) .. "┤" 345 | end, 346 | highlight = "GalaxyFileStatus", 347 | }, 348 | }, 349 | } 350 | 351 | gls.short_line_left = { 352 | { 353 | LongFileName = { 354 | provider = long_filename, 355 | highight = { colors.grey3, colors.bg }, 356 | }, 357 | }, 358 | 359 | { 360 | FileIcon = { 361 | provider = file_icon, 362 | condition = buffer_not_empty, 363 | separator = " ", 364 | highlight = { file_icon_color, colors.bg }, 365 | }, 366 | }, 367 | { 368 | Bar = { 369 | provider = function() 370 | local existing_text = providers_text({ gls.short_line_left[1], gls.short_line_left[2] }) 371 | local width = vim.opt.columns:get() - vim.str_utfindex(existing_text) 372 | return string.rep("─", width) 373 | end, 374 | -- separator = "%>", 375 | highlight = { colors.grey2 }, 376 | }, 377 | }, 378 | } 379 | end 380 | 381 | return M 382 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/lsp.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local function configure_watching() 4 | local FSWATCH_EVENTS = { 5 | Created = 1, 6 | Updated = 2, 7 | Removed = 3, 8 | -- Renamed 9 | OwnerModified = 2, 10 | AttributeModified = 2, 11 | MovedFrom = 1, 12 | MovedTo = 3, 13 | -- IsFile 14 | -- IsDir 15 | -- IsSymLink 16 | -- Link 17 | -- Overflow 18 | } 19 | 20 | --- @param data string 21 | --- @param opts table 22 | --- @param callback fun(path: string, event: integer) 23 | local function fswatch_output_handler(data, opts, callback) 24 | local d = vim.split(data, "%s+") 25 | local cpath = d[1] 26 | 27 | for i = 2, #d do 28 | if d[i] == "IsDir" or d[i] == "IsSymLink" or d[i] == "PlatformSpecific" then 29 | return 30 | end 31 | end 32 | 33 | if opts.include_pattern and opts.include_pattern:match(cpath) == nil then 34 | return 35 | end 36 | 37 | if opts.exclude_pattern and opts.exclude_pattern:match(cpath) ~= nil then 38 | return 39 | end 40 | 41 | for i = 2, #d do 42 | local e = FSWATCH_EVENTS[d[i]] 43 | if e then 44 | callback(cpath, e) 45 | end 46 | end 47 | end 48 | 49 | local function fswatch(path, opts, callback) 50 | local obj = vim.system({ 51 | "fswatch", 52 | "--recursive", 53 | "--event-flags", 54 | "--exclude", 55 | "/.git/", 56 | path, 57 | }, { 58 | stdout = function(error, data) 59 | if data then 60 | for line in vim.gsplit(data, "\n", { plain = true, trimempty = true }) do 61 | fswatch_output_handler(line, opts, callback) 62 | end 63 | elseif error then 64 | vim.notify(error, vim.log.levels.ERROR, { title = "LSP Watch" }) 65 | end 66 | end, 67 | }) 68 | 69 | return function() 70 | obj:kill(2) 71 | end 72 | end 73 | 74 | if vim.fn.executable("fswatch") == 1 then 75 | require("vim.lsp._watchfiles")._watchfunc = fswatch 76 | end 77 | end 78 | 79 | function M.post() 80 | configure_watching() 81 | local has_status, lsp_status = pcall(require, "lsp-status") 82 | if has_status then 83 | lsp_status.register_progress() 84 | end 85 | require("trouble").setup({}) 86 | vim.diagnostic.config({ 87 | signs = { 88 | priority = 5, 89 | text = { 90 | [vim.diagnostic.severity.ERROR] = "▶", 91 | [vim.diagnostic.severity.WARN] = "▶", 92 | [vim.diagnostic.severity.INFO] = "▶", 93 | [vim.diagnostic.severity.HINT] = "▶", 94 | }, 95 | }, 96 | underline = false, 97 | virtual_text = { 98 | prefix = "", 99 | source = "always", 100 | }, 101 | float = { 102 | show_header = false, 103 | border = vim.g.border_chars, 104 | }, 105 | severity_sort = true, 106 | }) 107 | 108 | require("config.lsp.handlers").setup() 109 | local capabilities = vim.lsp.protocol.make_client_capabilities() 110 | if has_status then 111 | capabilities = vim.tbl_deep_extend("force", capabilities, lsp_status.capabilities) 112 | end 113 | -- pcall(function() 114 | -- capabilities = 115 | -- vim.tbl_deep_extend("keep", require("cmp_nvim_lsp").default_capabilities(), capabilities) 116 | -- end) 117 | capabilities.textDocument.foldingRange = { 118 | dynamicRegistration = false, 119 | lineFoldingOnly = true, 120 | } 121 | 122 | capabilities = vim.tbl_deep_extend( 123 | "force", 124 | vim.lsp.protocol.make_client_capabilities(), 125 | require("lsp-file-operations").default_capabilities() 126 | ) 127 | require("lspsaga").setup({ 128 | diagnostic = { 129 | on_insert = false, 130 | on_insert_follow = false, 131 | insert_winblend = 0, 132 | show_virt_line = false, 133 | show_code_action = true, 134 | show_source = true, 135 | jump_num_shortcut = true, 136 | --1 is max 137 | max_width = 0.7, 138 | custom_fix = nil, 139 | custom_msg = nil, 140 | text_hl_follow = false, 141 | border_follow = true, 142 | keys = { 143 | exec_action = "o", 144 | quit = "q", 145 | go_action = "g", 146 | }, 147 | }, 148 | ui = { 149 | -- This option only works in Neovim 0.9 150 | title = true, 151 | -- Border type can be single, double, rounded, solid, shadow. 152 | border = vim.g.border_chars, 153 | winblend = 0, 154 | expand = "", 155 | collapse = "", 156 | code_action = "", 157 | incoming = " ", 158 | outgoing = " ", 159 | hover = " ", 160 | kind = {}, 161 | }, 162 | }) 163 | 164 | local on_attach = function(client, bufnr) 165 | if has_status then 166 | lsp_status.on_attach(client) 167 | end 168 | ---@type nio.lsp.types.ServerCapabilities 169 | local server_capabilities = client.server_capabilities 170 | 171 | if server_capabilities.inlayHintProvider then 172 | vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) 173 | end 174 | 175 | if client.name == "ruff" then 176 | server_capabilities.hoverProvider = false 177 | end 178 | 179 | -- if client.server_capabilities.codeLensProvider and #vim.tbl_keys(client.server_capabilities.codeLensProvider) > 0 then 180 | -- vim.cmd("autocmd BufEnter,CursorHold,InsertLeave lua vim.lsp.codelens.refresh()") 181 | -- end 182 | 183 | local lsp_util = require("config.lsp.util") 184 | local fzf = require("fzf-lua") 185 | local mappings = { 186 | n = { 187 | gd = vim.lsp.buf.definition, 188 | gt = vim.lsp.buf.type_definition, 189 | ge = function() 190 | vim.diagnostic.open_float(0, { scope = "line" }) 191 | end, 192 | K = vim.lsp.buf.hover, 193 | gq = vim.lsp.buf.references, 194 | gr = lsp_util.rename, 195 | gD = function() 196 | lsp_util.preview("textDocument/definition") 197 | end, 198 | gC = fzf.lsp_outgoing_calls, 199 | gb = lsp_util.previous_win, 200 | gL = vim.lsp.codelens.run, 201 | ["]d"] = vim.diagnostic.goto_next, 202 | ["[d"] = vim.diagnostic.goto_prev, 203 | [""] = vim.lsp.buf.signature_help, 204 | ["la"] = function() 205 | vim.cmd("Lspsaga code_action") 206 | end, 207 | ["ls"] = fzf.lsp_document_symbols, 208 | ["lf"] = function() 209 | vim.lsp.buf.format({ timeout_ms = 5000 }) 210 | end, 211 | ["lc"] = function() 212 | require("trouble").close() 213 | end, 214 | }, 215 | i = { 216 | [""] = vim.lsp.buf.signature_help, 217 | }, 218 | } 219 | 220 | for mode, mode_mappings in pairs(mappings) do 221 | for keys, mapping in pairs(mode_mappings) do 222 | vim.api.nvim_buf_set_keymap(bufnr, mode, keys, "", { callback = mapping, noremap = true }) 223 | end 224 | end 225 | vim.api.nvim_buf_set_keymap( 226 | bufnr, 227 | "x", 228 | "lf", 229 | "", 230 | { callback = vim.lsp.buf.range_formatting, noremap = true } 231 | ) 232 | end 233 | 234 | require("config.lsp.settings").setup(on_attach, capabilities) 235 | end 236 | 237 | return M 238 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/lsp/handlers.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.setup() 4 | vim.lsp.handlers["textDocument/codeLens"] = vim.lsp.codelens.on_codelens 5 | local severity = { 6 | "error", 7 | "warn", 8 | "info", 9 | "info", -- map both hint and info to info? 10 | } 11 | -- vim.lsp.handlers["window/showMessage"] = function(_, method, params, client_id) 12 | -- local client = vim.lsp.get_client_by_id(client_id) 13 | -- vim.notify(method.message, severity[params.type], { title = client and client.name }) 14 | -- end 15 | 16 | local base_logger = vim.lsp.handlers["window/logMessage"] 17 | local protocol = vim.lsp.protocol 18 | local msg_types = { 19 | [protocol.MessageType.Error] = "ERROR", 20 | [protocol.MessageType.Warning] = "WARN", 21 | [protocol.MessageType.Info] = "INFO", 22 | } 23 | local client_logs = {} 24 | vim.lsp.handlers["window/logMessage"] = function(...) 25 | local _, result, ctx, _ = ... 26 | local client_id = ctx.client_id 27 | local msg_type = msg_types[result.type or protocol.MessageType.Info] 28 | client_logs[client_id] = client_logs[client_id] or {} 29 | client_logs[client_id][#client_logs[client_id] + 1] = { 30 | type = msg_type, 31 | message = result.message, 32 | } 33 | 34 | return base_logger(...) 35 | end 36 | 37 | vim.api.nvim_create_user_command("LspLogs", function() 38 | local buf = vim.api.nvim_create_buf(false, true) 39 | local lines = {} 40 | for client_id, logs in pairs(client_logs) do 41 | local client = vim.lsp.get_client_by_id(client_id) 42 | local client_name = client and client.name or string.format("id=%d", client_id) 43 | lines[#lines + 1] = string.format("%s logs:", client_name) 44 | for _, log in ipairs(logs) do 45 | lines[#lines + 1] = string.format("%s | %s", log.type, log.message) 46 | end 47 | end 48 | vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) 49 | vim.api.nvim_buf_set_option(buf, "filetype", "log") 50 | vim.api.nvim_win_set_buf(0, buf) 51 | end, {}) 52 | 53 | local handle_locations = function(err, result, ctx, _) 54 | local client_encoding = vim.lsp.get_client_by_id(ctx.client_id).offset_encoding 55 | if err then 56 | vim.notify(err.message) 57 | return 58 | end 59 | if result == nil then 60 | vim.notify("Location not found", "LSP") 61 | return 62 | end 63 | if vim.islist(result) and result[1] then 64 | vim.lsp.util.jump_to_location(result[1], client_encoding) 65 | 66 | if #result > 1 then 67 | vim.fn.setqflist(vim.lsp.util.locations_to_items(result, client_encoding)) 68 | require("trouble").open({ mode = "quickfix" }) 69 | end 70 | else 71 | vim.lsp.util.jump_to_location(result, client_encoding) 72 | end 73 | end 74 | vim.lsp.handlers["textDocument/definition"] = handle_locations 75 | vim.lsp.handlers["textDocument/typeDefinition"] = handle_locations 76 | vim.lsp.handlers["textDocument/references"] = handle_locations 77 | end 78 | 79 | return M 80 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/lsp/settings.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.setup(on_attach, capabilities) 4 | local null_ls = require("null-ls") 5 | local blt = null_ls.builtins 6 | local lspconfig = require("lspconfig") 7 | 8 | null_ls.setup({ 9 | on_attach = on_attach, 10 | capabilities = capabilities, 11 | autostart = true, 12 | sources = { 13 | blt.formatting.stylua.with({ 14 | extra_args = { "--config-path", vim.fs.normalize("~/.config/stylua.toml") }, 15 | }), 16 | blt.formatting.goimports, 17 | blt.formatting.gofumpt, 18 | blt.formatting.prettier, 19 | blt.formatting.shfmt, 20 | }, 21 | }) 22 | 23 | require("neodev").setup({ 24 | library = { 25 | enabled = true, 26 | runtime = true, 27 | types = true, 28 | plugins = true, 29 | }, 30 | setup_jsonls = true, 31 | override = function(_, options) 32 | options.enabled = true 33 | options.plugins = { 34 | "nvim-cmp", 35 | "plenary.nvim", 36 | "neotest", 37 | "nvim-dap", 38 | "nvim-dap-ui", 39 | "nvim-lspconfig", 40 | "nvim-notify", 41 | "nui.nvim", 42 | "nvim-nio", 43 | } 44 | end, 45 | }) 46 | local server_configs = { 47 | ruff = { 48 | on_attach = on_attach, 49 | init_options = { 50 | settings = { 51 | configurationPreference = "filesystemFirst", 52 | }, 53 | }, 54 | }, 55 | 56 | basedpyright = { 57 | on_attach = on_attach, 58 | before_init = function(_, config) 59 | config.settings.python.pythonPath = require("util").get_python_path(config.root_dir) 60 | end, 61 | settings = { 62 | basedpyright = { 63 | typeCheckingMode = "standard", 64 | }, 65 | python = { 66 | pythonPath = "python", 67 | analysis = { 68 | autoSearchPaths = true, 69 | useLibraryCodeForTypes = true, 70 | diagnosticMode = "workspace", 71 | }, 72 | }, 73 | }, 74 | }, 75 | lua_ls = { 76 | on_attach = on_attach, 77 | capabilities = capabilities, 78 | settings = { 79 | Lua = { 80 | hint = { 81 | enable = true, 82 | paramName = "Disable", 83 | paramType = false, 84 | setType = true, 85 | arrayIndex = false, 86 | }, 87 | IntelliSense = { 88 | traceLocalSet = true, 89 | }, 90 | diagnostics = { 91 | globals = { "describe", "it", "before_each", "after_each", "vim" }, 92 | }, 93 | runtime = { 94 | path = { 95 | "lua/?.lua", 96 | "lua/?/init.lua", 97 | }, 98 | -- plugin = "scripts/lspdoc.old.lua", 99 | }, 100 | workspace = { 101 | library = { 102 | vim.fn.expand("$VIMRUNTIME"), 103 | require("neodev.config").types(), 104 | "${3rd}/busted/library", 105 | "${3rd}/luassert/library", 106 | "${3rd}/luv/library", 107 | }, 108 | }, 109 | }, 110 | }, 111 | }, 112 | 113 | volar = { 114 | on_attach = on_attach, 115 | filetypes = { 116 | "typescript", 117 | "javascript", 118 | "javascriptreact", 119 | "typescriptreact", 120 | "vue", 121 | "json", 122 | }, 123 | capabilities = capabilities, 124 | }, 125 | yamlls = require("yaml-companion").setup({ 126 | on_attach = on_attach, 127 | lspconfig = { 128 | on_attach = on_attach, 129 | settings = { yaml = { schemas = { kubernetes = "helm/**.yaml" } } }, 130 | flags = { debounce_text_changes = 150 }, 131 | capabilities = capabilities, 132 | }, 133 | }), 134 | ocamllsp = {}, 135 | } 136 | 137 | local mason_handlers = { 138 | function(server_name) 139 | if server_name == "tsserver" then 140 | return 141 | end 142 | lspconfig[server_name].setup({ on_attach = on_attach }) 143 | end, 144 | } 145 | 146 | lspconfig.postgres_lsp.setup({}) 147 | lspconfig.nixd.setup({ on_attach = on_attach }) 148 | 149 | for server, settings in pairs(server_configs) do 150 | mason_handlers[server] = function() 151 | lspconfig[server].setup(settings) 152 | end 153 | end 154 | require("mason").setup({ 155 | ui = { 156 | border = vim.g.border_chars, 157 | }, 158 | }) 159 | require("mason-lspconfig").setup({ 160 | ensure_installed = vim.list_extend(vim.tbl_keys(server_configs), { 161 | "bashls", 162 | "gopls", 163 | "jsonls", 164 | "vimls", 165 | }), 166 | }) 167 | require("mason-lspconfig").setup_handlers(mason_handlers) 168 | end 169 | 170 | return M 171 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/lsp/util.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local windows = {} 4 | 5 | local function set_auto_close() 6 | vim.cmd([[ au CursorMoved * ++once lua require('config.lsp.util').remove_wins() ]]) 7 | end 8 | 9 | local function fit_to_node(window) 10 | local node = require("nvim-treesitter.ts_utils").get_node_at_cursor() 11 | if node:type() == "identifier" then 12 | node = node:parent() 13 | end 14 | local start_row, _, end_row, _ = node:range() 15 | local new_height = math.min(math.max(end_row - start_row + 6, 15), 30) 16 | vim.api.nvim_win_set_height(window, new_height) 17 | end 18 | 19 | local open_preview_win = function(target, position) 20 | local buffer = vim.uri_to_bufnr(target) 21 | local win_opts = { 22 | relative = "cursor", 23 | row = 4, 24 | col = 4, 25 | width = 120, 26 | height = 15, 27 | border = vim.g.border_chars, 28 | } 29 | -- Don't jump immediately, we need the windows list to contain ID before autocmd 30 | windows[#windows + 1] = vim.api.nvim_open_win(buffer, false, win_opts) 31 | vim.api.nvim_set_current_win(windows[#windows]) 32 | vim.api.nvim_buf_set_option(buffer, "bufhidden", "wipe") 33 | set_auto_close() 34 | vim.api.nvim_win_set_cursor(windows[#windows], position) 35 | fit_to_node(windows[#windows]) 36 | end 37 | 38 | function M.remove_wins() 39 | local current = vim.api.nvim_get_current_win() 40 | for i = #windows, 1, -1 do 41 | if current == windows[i] then 42 | break 43 | end 44 | pcall(vim.api.nvim_win_close, windows[i], true) 45 | table.remove(windows, i) 46 | end 47 | if #windows > 0 then 48 | set_auto_close() 49 | end 50 | end 51 | 52 | function M.previous_win() 53 | if #windows > 1 then 54 | vim.api.nvim_set_current_win(windows[#windows - 1]) 55 | elseif #windows == 1 then 56 | vim.api.nvim_win_close(windows[#windows], true) 57 | end 58 | end 59 | 60 | function M.rename() 61 | local bufnr = vim.api.nvim_get_current_buf() 62 | local params = vim.lsp.util.make_position_params() 63 | vim.lsp.buf.document_highlight() 64 | local initial = vim.fn.expand("") 65 | local prompt_buf = vim.api.nvim_create_buf(false, true) 66 | 67 | vim.api.nvim_buf_set_option(prompt_buf, "buftype", "prompt") 68 | 69 | local prompt_window = vim.api.nvim_open_win(prompt_buf, true, { 70 | relative = "cursor", 71 | row = 1, 72 | col = 1, 73 | width = 20, 74 | height = 1, 75 | border = vim.g.border_chars, 76 | style = "minimal", 77 | }) 78 | vim.cmd( 79 | "au BufHidden lua pcall(require('config.lsp.util')._close_rename," 80 | .. prompt_window 81 | .. "," 82 | .. prompt_buf 83 | .. "," 84 | .. bufnr 85 | .. ")" 86 | ) 87 | vim.fn.prompt_setprompt(prompt_buf, " → ") 88 | 89 | vim.fn.prompt_setcallback(prompt_buf, function(new_name) 90 | if not (new_name and #new_name > 0) then 91 | return 92 | end 93 | params.newName = new_name 94 | vim.cmd("norm p") 95 | vim.lsp.buf_request(bufnr, "textDocument/rename", params) 96 | M._close_rename(prompt_window, prompt_buf, bufnr) 97 | end) 98 | 99 | vim.cmd("norm i" .. initial) 100 | vim.cmd("startinsert!") 101 | end 102 | 103 | function M._close_rename(prompt_window, prompt_buf, origin_buf) 104 | vim.schedule(function() 105 | pcall(vim.api.nvim_win_close, prompt_window, true) 106 | pcall(vim.api.nvim_buf_delete, prompt_buf, { force = true }) 107 | vim.lsp.util.buf_clear_references(origin_buf) 108 | vim.cmd("stopinsert") 109 | end) 110 | end 111 | 112 | function M.preview(request) 113 | local params = vim.lsp.util.make_position_params() 114 | pcall(vim.lsp.buf_request, 0, request, params, function(_, result, _) 115 | if not result then 116 | return 117 | end 118 | local data = vim.tbl_islist(result) and result[1] or result 119 | local target = data.targetUri or data.uri 120 | local range = data.targetRange or data.range 121 | open_preview_win(target, { range.start.line + 1, range.start.character }) 122 | end) 123 | end 124 | 125 | return M 126 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/neotest.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.post() 4 | local neotest = require("neotest") 5 | _G.NEOTEST_LOADED = true 6 | local lib = require("neotest.lib") 7 | local get_env = function() 8 | local env = {} 9 | local file = ".env" 10 | if not lib.files.exists(file) or true then 11 | return {} 12 | end 13 | 14 | for _, line in ipairs(vim.fn.readfile(file)) do 15 | for name, value in string.gmatch(line, "(%S+)=['\"]?(.*)['\"]?") do 16 | local str_end = string.sub(value, -1, -1) 17 | if str_end == "'" or str_end == '"' then 18 | value = string.sub(value, 1, -2) 19 | end 20 | 21 | env[name] = value 22 | end 23 | end 24 | return env 25 | end 26 | neotest.setup({ 27 | log_level = vim.log.levels.DEBUG, 28 | discovery = { 29 | filter_dir = function(dir) 30 | for _, d in ipairs({ "node_modules", "junk" }) do 31 | if vim.startswith(dir, d) then 32 | return false 33 | end 34 | end 35 | return true 36 | end, 37 | }, 38 | quickfix = { 39 | open = false, 40 | enable = false, 41 | }, 42 | status = { 43 | virtual_text = true, 44 | signs = true, 45 | }, 46 | output = { 47 | open_on_run = false, 48 | }, 49 | icons = { 50 | running_animated = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" }, 51 | }, 52 | strategies = { 53 | integrated = { 54 | width = 180, 55 | }, 56 | }, 57 | adapters = { 58 | require("neotest-python")({ 59 | dap = { justMyCode = false, console = "integratedTerminal", subProcess = false }, 60 | pytest_discover_instances = true, 61 | args = { "-vv" }, 62 | }), 63 | require("neotest-vitest"), 64 | require("neotest-plenary"), 65 | }, 66 | }) 67 | 68 | vim.api.nvim_create_autocmd("FileType", { 69 | pattern = "neotest-*", 70 | callback = function(opts) 71 | vim.keymap.set("n", "q", function() 72 | vim.api.nvim_win_close(0, true) 73 | end, { buffer = opts.buf }) 74 | end, 75 | }) 76 | 77 | vim.api.nvim_create_autocmd("FileType", { 78 | pattern = "neotest-output-panel", 79 | group = group, 80 | callback = function() 81 | vim.cmd("norm G") 82 | end, 83 | }) 84 | 85 | local mappings = { 86 | ["nr"] = function() 87 | neotest.run.run({ vim.fn.expand("%:p"), env = get_env() }) 88 | end, 89 | ["ns"] = function() 90 | for _, adapter_id in ipairs(neotest.state.adapter_ids()) do 91 | neotest.run.run({ suite = true, adapter = adapter_id, env = get_env() }) 92 | end 93 | end, 94 | ["nx"] = function() 95 | neotest.run.stop() 96 | end, 97 | ["nn"] = function() 98 | neotest.run.run({ env = get_env() }) 99 | end, 100 | ["nd"] = function() 101 | neotest.run.run({ strategy = "dap", env = get_env() }) 102 | end, 103 | ["nl"] = neotest.run.run_last, 104 | ["nD"] = function() 105 | neotest.run.run_last({ strategy = "dap" }) 106 | end, 107 | ["na"] = neotest.run.attach, 108 | ["no"] = function() 109 | neotest.output.open({ enter = true, last_run = true }) 110 | end, 111 | ["ni"] = function() 112 | neotest.output.open({ enter = true }) 113 | end, 114 | ["nO"] = function() 115 | neotest.output.open({ enter = true, short = true }) 116 | end, 117 | ["np"] = neotest.summary.toggle, 118 | ["nm"] = neotest.summary.run_marked, 119 | ["ne"] = neotest.output_panel.toggle, 120 | ["[n"] = function() 121 | neotest.jump.prev({ status = "failed" }) 122 | end, 123 | ["]n"] = function() 124 | neotest.jump.next({ status = "failed" }) 125 | end, 126 | } 127 | 128 | for keys, mapping in pairs(mappings) do 129 | vim.api.nvim_set_keymap("n", keys, "", { callback = mapping, noremap = true }) 130 | end 131 | end 132 | 133 | return M 134 | -------------------------------------------------------------------------------- /.config/nvim/lua/config/treesitter.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.post() 4 | local parser_configs = require("nvim-treesitter.parsers").get_parser_configs() 5 | 6 | parser_configs.norg = { 7 | install_info = { 8 | url = "https://github.com/nvim-neorg/tree-sitter-norg", 9 | files = { "src/parser.c", "src/scanner.cc" }, 10 | branch = "main", 11 | }, 12 | } 13 | 14 | vim.cmd([[ 15 | omap m lua require('tsht').nodes() 16 | vnoremap m lua require('tsht').nodes() 17 | ]]) 18 | 19 | parser_configs.gotmpl = { 20 | install_info = { 21 | url = "https://github.com/ngalaiko/tree-sitter-go-template", 22 | files = { "src/parser.c" }, 23 | }, 24 | filetype = "gotmpl", 25 | used_by = { "gohtmltmpl", "gotexttmpl", "gotmpl", "yaml" }, 26 | } 27 | 28 | require("nvim-treesitter.configs").setup({ 29 | highlight = { 30 | enable = true, 31 | }, 32 | ensure_installed = {}, 33 | indent = { enable = true }, 34 | incremental_selection = { 35 | enable = true, 36 | keymaps = { 37 | init_selection = "gl", 38 | node_incremental = "", 39 | node_decremental = "", 40 | }, 41 | }, 42 | refactor = { highlight_definitions = { enable = false } }, 43 | query_linter = { 44 | enable = true, 45 | use_virtual_text = true, 46 | lint_events = { "BufWrite", "CursorHold" }, 47 | }, 48 | textobjects = { 49 | select = { 50 | enable = true, 51 | keymaps = { 52 | ["af"] = "@function.outer", 53 | ["if"] = "@function.inner", 54 | ["ac"] = "@class.outer", 55 | ["ic"] = "@class.inner", 56 | ["ab"] = "@block.outer", 57 | ["ib"] = "@block.inner", 58 | }, 59 | }, 60 | swap = { 61 | enable = true, 62 | swap_next = { 63 | ["sp"] = "@parameter.inner", 64 | ["sf"] = "@function.outer", 65 | ["sc"] = "@class.outer", 66 | ["ss"] = "@statement.outer", 67 | ["sb"] = "@block.outer", 68 | }, 69 | swap_previous = { 70 | ["sP"] = "@parameter.inner", 71 | ["sF"] = "@function.outer", 72 | ["sC"] = "@class.outer", 73 | ["sS"] = "@statement.outer", 74 | ["sB"] = "@block.outer", 75 | }, 76 | }, 77 | move = { 78 | enable = true, 79 | goto_next_start = { 80 | ["]f"] = "@function.outer", 81 | ["]]"] = "@class.outer", 82 | }, 83 | goto_next_end = { 84 | ["]F"] = "@function.outer", 85 | ["]["] = "@class.outer", 86 | }, 87 | goto_previous_start = { 88 | ["[f"] = "@function.outer", 89 | ["[["] = "@class.outer", 90 | }, 91 | goto_previous_end = { 92 | ["[F"] = "@function.outer", 93 | ["[]"] = "@class.outer", 94 | }, 95 | }, 96 | }, 97 | }) 98 | require("ts_context_commentstring").setup({}) 99 | 100 | vim.cmd([[omap m :lua require('tsht').nodes()]]) 101 | vim.cmd([[vnoremap m :lua require('tsht').nodes()]]) 102 | 103 | end 104 | 105 | return M 106 | -------------------------------------------------------------------------------- /.config/nvim/lua/plugins.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 | 3 | if not vim.loop.fs_stat(lazypath) then 4 | vim.fn.system({ 5 | "git", 6 | "clone", 7 | "--filter=blob:none", 8 | "https://github.com/folke/lazy.nvim.git", 9 | "--branch=stable", -- latest stable release 10 | lazypath, 11 | }) 12 | end 13 | vim.opt.rtp:prepend(lazypath) 14 | 15 | local home = vim.loop.os_homedir() 16 | 17 | local function maybe_local(name) 18 | local path = string.format("%s/Dev/%s", home, name) 19 | if vim.loop.fs_stat(path) then 20 | return path 21 | end 22 | end 23 | 24 | local plugins = { 25 | { 26 | "mikesmithgh/kitty-scrollback.nvim", 27 | enabled = true, 28 | lazy = true, 29 | cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" }, 30 | event = { "User KittyScrollbackLaunch" }, 31 | -- version = '*', -- latest stable version, may have breaking changes if major version changed 32 | -- version = '^5.0.0', -- pin major version, include fixes and features that do not have breaking changes 33 | config = function() 34 | require("kitty-scrollback").setup() 35 | end, 36 | }, 37 | { 38 | "gorbit99/codewindow.nvim", 39 | config = function() 40 | local codewindow = require("codewindow") 41 | codewindow.setup() 42 | codewindow.apply_default_keybinds() 43 | end, 44 | }, 45 | { 46 | "williamboman/mason.nvim", 47 | branch = "main", 48 | dependencies = { "williamboman/mason-lspconfig.nvim" }, 49 | }, 50 | { "echasnovski/mini.nvim" }, 51 | { "wbthomason/packer.nvim" }, 52 | { "nvim-lua/plenary.nvim" }, 53 | { 54 | "antoinemadec/FixCursorHold.nvim", 55 | init = function() 56 | vim.g.cursorhold_updatetime = 50 57 | end, 58 | }, 59 | { 60 | "lukas-reineke/indent-blankline.nvim", 61 | config = function() 62 | require("ibl").setup({ 63 | indent = { char = "│" }, 64 | exclude = { 65 | buftypes = { 66 | "terminal", 67 | }, 68 | filetypes = { 69 | "", 70 | "norg", 71 | "help", 72 | "markdown", 73 | "dapui_scopes", 74 | "dapui_stacks", 75 | "dapui_watches", 76 | "dapui_breakpoints", 77 | "dapui_hover", 78 | "dap-repl", 79 | "LuaTree", 80 | "dbui", 81 | "term", 82 | "fugitive", 83 | "fugitiveblame", 84 | "NvimTree", 85 | "packer", 86 | "neotest-summary", 87 | "Outline", 88 | "lsp-installer", 89 | "mason", 90 | }, 91 | }, 92 | }) 93 | end, 94 | }, 95 | { "nvimtools/none-ls.nvim" }, 96 | { 97 | "folke/noice.nvim", 98 | config = function() 99 | vim.defer_fn(function() 100 | require("noice").setup({ 101 | cmdline = { 102 | enabled = false, 103 | }, 104 | messages = { 105 | enabled = false, 106 | }, 107 | popupmenu = { 108 | enabled = false, 109 | }, 110 | signature = { 111 | enabled = false, 112 | }, 113 | commands = {}, 114 | notify = { 115 | enabled = false, 116 | }, 117 | lsp = { 118 | progress = { 119 | enabled = false, 120 | }, 121 | override = { 122 | ["vim.lsp.util.convert_input_to_markdown_lines"] = true, 123 | ["vim.lsp.util.stylize_markdown"] = true, 124 | ["cmp.entry.get_documentation"] = true, 125 | }, 126 | }, 127 | presets = { 128 | lsp_doc_border = true, 129 | }, 130 | }) 131 | end, 1000) 132 | end, 133 | dependencies = { "MunifTanjim/nui.nvim" }, 134 | }, 135 | { 136 | "nvim-neotest/neotest", 137 | dir = maybe_local("neotest"), 138 | keys = { "n" }, 139 | config = function() 140 | require("config.neotest").post() 141 | end, 142 | dependencies = { 143 | { "andythigpen/nvim-coverage" }, 144 | { "nvim-neotest/nvim-nio", dir = maybe_local("nvim-nio") }, 145 | { "nvim-neotest/neotest-python", dir = maybe_local("neotest-python") }, 146 | { "nvim-neotest/neotest-plenary", dir = maybe_local("neotest-plenary") }, 147 | { "marilari88/neotest-vitest" }, 148 | { "rouge8/neotest-rust" }, 149 | { 150 | "mfussenegger/nvim-dap", 151 | lazy = true, 152 | config = function() 153 | require("config.dap").post() 154 | end, 155 | }, 156 | { "mfussenegger/nvim-dap-python" }, 157 | { "rcarriga/nvim-dap-ui", dir = maybe_local("nvim-dap-ui") }, 158 | { "jbyuki/one-small-step-for-vimkind" }, 159 | }, 160 | }, 161 | { 162 | "rcarriga/nvim-notify", 163 | dir = maybe_local("nvim-notify"), 164 | config = function() 165 | local base_stages = require("notify.stages.slide")("bottom_up") 166 | local notify = require("notify") 167 | 168 | notify.setup({ 169 | render = "wrapped-compact", 170 | stages = { 171 | function(...) 172 | local opts = base_stages[1](...) 173 | if not opts then 174 | return 175 | end 176 | return opts 177 | end, 178 | unpack(base_stages, 2), 179 | }, 180 | background_colour = "#121212", 181 | max_width = 80, 182 | on_open = function(win) 183 | vim.api.nvim_set_option_value("wrap", true, { win = win }) 184 | end, 185 | }) 186 | 187 | vim.api.nvim_set_keymap("n", "p", "", { callback = notify.dismiss }) 188 | end, 189 | }, 190 | { 191 | { 192 | "lewis6991/gitsigns.nvim", 193 | -- event = "VeryLazy", 194 | lazy = false, 195 | config = function() 196 | require("gitsigns").setup({ 197 | signs = { 198 | add = { text = "┃" }, 199 | change = { 200 | text = "┃", 201 | }, 202 | delete = { 203 | text = "┃", 204 | }, 205 | topdelete = { 206 | text = "┳", 207 | }, 208 | changedelete = { 209 | text = "~", 210 | }, 211 | }, 212 | -- _on_attach_pre = function(_, callback) 213 | -- -- require("gitsigns-yadm").yadm_signs(callback) 214 | -- end, 215 | }) 216 | end, 217 | keys = { 218 | { "]h", "lua require'gitsigns.actions'.next_hunk()" }, 219 | { "[h", "lua require'gitsigns.actions'prev_hunk()" }, 220 | { "hs", 'lua require"gitsigns".stage_hunk()' }, 221 | { "hu", 'lua require"gitsigns".undo_stage_hunk()' }, 222 | { "hr", 'lua require"gitsigns".reset_hunk()' }, 223 | { "hR", 'lua require"gitsigns".reset_buffer()' }, 224 | { "hp", 'lua require"gitsigns".preview_hunk()' }, 225 | { "hb", 'lua require"gitsigns".blame_line({full = true})' }, 226 | { "hU", 'lua require"gitsigns".reset_buffer_index()' }, 227 | { 228 | "hs", 229 | 'lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})', 230 | mode = "v", 231 | }, 232 | { 233 | "hr", 234 | 'lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})', 235 | mode = "v", 236 | }, 237 | { "ih", ':lua require"gitsigns.actions".select_hunk()', mode = "o" }, 238 | { "ih", ':lua require"gitsigns.actions".select_hunk()', mode = "x" }, 239 | }, 240 | }, 241 | 242 | { 243 | "sindrets/diffview.nvim", 244 | cmd = { "DiffviewOpen" }, 245 | config = function() 246 | require("diffview").setup({}) 247 | end, 248 | keys = { 249 | { "gd", "DiffviewOpen" }, 250 | { "gD", "DiffviewClose" }, 251 | }, 252 | }, 253 | { 254 | "isakbm/gitgraph.nvim", 255 | keys = { 256 | { 257 | "gl", 258 | function() 259 | require("gitgraph").draw({}, { all = true, max_count = 5000 }) 260 | end, 261 | desc = "GitGraph - Draw", 262 | }, 263 | }, 264 | opts = { 265 | hooks = { 266 | -- Check diff of a commit 267 | on_select_commit = function(commit) 268 | vim.notify("DiffviewOpen " .. commit.hash .. "^!") 269 | vim.cmd(":DiffviewOpen " .. commit.hash .. "^!") 270 | end, 271 | -- Check diff from commit a -> commit b 272 | on_select_range_commit = function(from, to) 273 | vim.notify("DiffviewOpen " .. from.hash .. "~1.." .. to.hash) 274 | vim.cmd(":DiffviewOpen " .. from.hash .. "~1.." .. to.hash) 275 | end, 276 | }, 277 | symbols = { 278 | merge_commit = "", 279 | commit = "", 280 | merge_commit_end = "", 281 | commit_end = "", 282 | 283 | -- Advanced symbols 284 | GVER = "", 285 | GHOR = "", 286 | GCLD = "", 287 | GCRD = "╭", 288 | GCLU = "", 289 | GCRU = "", 290 | GLRU = "", 291 | GLRD = "", 292 | GLUD = "", 293 | GRUD = "", 294 | GFORKU = "", 295 | GFORKD = "", 296 | GRUDCD = "", 297 | GRUDCU = "", 298 | GLUDCD = "", 299 | GLUDCU = "", 300 | GLRDCL = "", 301 | GLRDCR = "", 302 | GLRUCL = "", 303 | GLRUCR = "", 304 | }, 305 | }, 306 | }, 307 | { 308 | "ruifm/gitlinker.nvim", 309 | keys = "gy", 310 | config = function() 311 | require("gitlinker").setup() 312 | end, 313 | }, 314 | "seanbreckenridge/gitsigns-yadm.nvim", 315 | { 316 | "aaronhallaert/advanced-git-search.nvim", 317 | cmd = { "AdvancedGitSearch" }, 318 | config = function() 319 | require("advanced_git_search.fzf").setup({ 320 | diff_plugin = "diffview", 321 | }) 322 | end, 323 | }, 324 | { 325 | "TimUntersberger/neogit", 326 | config = function() 327 | require("neogit").setup({}) 328 | end, 329 | }, 330 | }, 331 | { 332 | "iamcco/markdown-preview.nvim", 333 | build = "cd app && npm install", 334 | init = function() 335 | vim.g.mkdp_filetypes = { "markdown" } 336 | vim.g.mkdp_browser = "firefox" 337 | vim.g.mkdp_auto_start = 0 338 | vim.g.mkdp_auto_close = 0 339 | end, 340 | }, 341 | { "MTDL9/vim-log-highlighting" }, 342 | { 343 | "glepnir/galaxyline.nvim", 344 | config = function() 345 | require("config.galaxyline").post() 346 | end, 347 | }, 348 | { "nvim-tree/nvim-web-devicons" }, 349 | { "godlygeek/tabular", cmd = "Tabularize" }, 350 | { 351 | "kyazdani42/nvim-tree.lua", 352 | dependencies = { "antosha417/nvim-lsp-file-operations" }, 353 | keys = { { "x", "NvimTreeToggle" } }, 354 | config = function() 355 | require("lsp-file-operations").setup() 356 | require("nvim-tree").setup({ 357 | view = { 358 | width = 45, 359 | }, 360 | update_focused_file = { 361 | enable = true, 362 | }, 363 | renderer = { 364 | indent_markers = { 365 | enable = true, 366 | }, 367 | }, 368 | }) 369 | end, 370 | }, 371 | { "machakann/vim-sandwich", keys = { "sa", "sr", "sd" } }, 372 | { 373 | "neovim/nvim-lspconfig", 374 | config = function() 375 | require("config.lsp").post() 376 | end, 377 | lazy = false, 378 | keys = { 379 | { 380 | "td", 381 | "Trouble diagnostics toggle win.size=0.3 win.position=right", 382 | desc = "Diagnostics (Trouble)", 383 | }, 384 | { 385 | "tD", 386 | "Trouble diagnostics toggle filter.buf=0", 387 | desc = "Buffer Diagnostics (Trouble)", 388 | }, 389 | { 390 | "ts", 391 | "Trouble symbols toggle", 392 | desc = "Symbols (Trouble)", 393 | }, 394 | { 395 | "tp", 396 | "Trouble lsp toggle win.size=0.3 win.position=right", 397 | desc = "LSP Definitions / references / ... (Trouble)", 398 | }, 399 | { 400 | "tl", 401 | "Trouble loclist toggle", 402 | desc = "Location List (Trouble)", 403 | }, 404 | { 405 | "tq", 406 | "Trouble qflist toggle", 407 | desc = "Quickfix List (Trouble)", 408 | }, 409 | }, 410 | dependencies = { 411 | { 412 | "folke/trouble.nvim", 413 | "nvim-lua/lsp-status.nvim", 414 | "glepnir/lspsaga.nvim", 415 | "folke/lua-dev.nvim", 416 | }, 417 | }, 418 | }, 419 | { 420 | "rhysd/git-messenger.vim", 421 | keys = "gm", 422 | init = function() 423 | vim.g.git_messenger_floating_win_opts = { 424 | border = vim.g.border_chars, 425 | } 426 | end, 427 | }, 428 | { 429 | "uga-rosa/ccc.nvim", 430 | config = function() 431 | require("ccc").setup({ 432 | highlighter = { 433 | auto_enable = true, 434 | }, 435 | }) 436 | end, 437 | }, 438 | { 439 | "simnalamburt/vim-mundo", 440 | cmd = "MundoToggle", 441 | init = function() 442 | vim.g.mundo_right = 1 443 | end, 444 | keys = { 445 | { "u", "MundoToggle" }, 446 | }, 447 | }, 448 | { 449 | "svermeulen/vim-subversive", 450 | keys = { 451 | { "s", "(SubversiveSubstituteRange)" }, 452 | { "s", "(SubversiveSubstituteRange)" }, 453 | { "ss", "(SubversiveSubstituteWordRange)" }, 454 | { "x", "(SubversiveSubstitute)" }, 455 | { "xx", "(SubversiveSubstituteLine)" }, 456 | { "X", "(SubversiveSubstituteToEndOfLine)" }, 457 | }, 458 | }, 459 | { 460 | "JoosepAlviste/nvim-ts-context-commentstring", 461 | dependencies = { "tpope/vim-commentary" }, 462 | }, 463 | { "tpope/vim-abolish" }, 464 | { "tpope/vim-eunuch", cmd = { "Rename", "Delete", "Remove", "Chmod" } }, 465 | { 466 | "voldikss/vim-floaterm", 467 | cmd = "FloatermNew", 468 | init = function() 469 | vim.g.floaterm_autoclose = 0 470 | end, 471 | }, 472 | { "wellle/targets.vim", dependencies = { "wellle/line-targets.vim" } }, 473 | { 474 | "ibhagwan/fzf-lua", 475 | config = function() 476 | vim.cmd([[ 477 | inoremap lua require("fzf-lua").complete_path() 478 | tunmap 479 | tunmap 480 | tunmap 481 | tunmap 482 | ]]) 483 | local fzf = require("fzf-lua") 484 | fzf.setup({ 485 | fzf_colors = true, 486 | winopts = { 487 | border = vim.g.border_chars, 488 | }, 489 | }) 490 | fzf.register_ui_select({ winopts = { height = 0.4, width = 0.4 } }) 491 | end, 492 | keys = { 493 | { "df", "FzfLua files" }, 494 | { "dg", "FzfLua grep" }, 495 | { "db", "FzfLua buffers" }, 496 | { "dh", "FzfLua help_tags" }, 497 | { "dc", "FzfLua files cmd=yadm\\ ls-files cwd=~/" }, 498 | }, 499 | }, 500 | { "hiberabyss/nvim-dbg" }, 501 | { "someone-stole-my-name/yaml-companion.nvim" }, 502 | 503 | { 504 | "nvim-treesitter/nvim-treesitter", 505 | config = function() 506 | require("config.treesitter").post() 507 | end, 508 | dependencies = { 509 | { "nvim-treesitter/nvim-treesitter-textobjects" }, 510 | { "nvim-treesitter/nvim-treesitter-refactor" }, 511 | { "mfussenegger/nvim-ts-hint-textobject" }, 512 | { "mizlan/iswap.nvim" }, 513 | }, 514 | }, 515 | { 516 | "saghen/blink.cmp", 517 | lazy = false, 518 | dependencies = "rafamadriz/friendly-snippets", 519 | build = "cargo build --release", 520 | opts = { 521 | blocked_filetypes = { "markdown" }, 522 | highlight = { 523 | use_nvim_cmp_as_default = true, 524 | }, 525 | windows = { 526 | autocomplete = { 527 | border = vim.g.border_chars, 528 | }, 529 | documentation = { 530 | border = vim.g.border_chars, 531 | auto_show = true, 532 | }, 533 | signature_help = { 534 | border = vim.g.border_chars, 535 | }, 536 | }, 537 | nerd_font_variant = "mono", 538 | accept = { auto_brackets = { enabled = true } }, 539 | trigger = { signature_help = { enabled = false } }, 540 | }, 541 | }, 542 | { 543 | "iguanacucumber/magazine.nvim", 544 | enabled = false, 545 | dependencies = { 546 | { "MattiasMTS/cmp-dbee" }, 547 | { "petertriho/cmp-git" }, 548 | { "hrsh7th/cmp-nvim-lsp" }, 549 | { "rcarriga/cmp-dap", dir = maybe_local("cmp-dap") }, 550 | { "onsails/lspkind.nvim" }, 551 | }, 552 | config = function() 553 | local cmp = require("cmp") 554 | require("cmp_git").setup({}) 555 | 556 | cmp.setup({ 557 | performance = { 558 | debounce = 30, 559 | throttle = 10, 560 | fetching_timeout = 100, 561 | }, 562 | window = { 563 | completion = { 564 | border = vim.g.border_chars, 565 | }, 566 | documentation = { 567 | border = vim.g.border_chars, 568 | }, 569 | }, 570 | sorting = { 571 | comparators = { 572 | cmp.config.compare.offset, 573 | cmp.config.compare.exact, 574 | function(a, b) 575 | local a_under = select(2, a.completion_item.label:find("^_+")) or 0 576 | local b_under = select(2, b.completion_item.label:find("^_+")) or 0 577 | if a_under == b_under then 578 | return nil 579 | end 580 | return a_under < b_under 581 | end, 582 | cmp.config.compare.score, 583 | cmp.config.compare.kind, 584 | cmp.config.compare.sort_text, 585 | cmp.config.compare.length, 586 | cmp.config.compare.order, 587 | }, 588 | }, 589 | experimental = { 590 | ghost_text = { 591 | hl_group = "Comment", 592 | }, 593 | }, 594 | mapping = { 595 | [""] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }), 596 | [""] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }), 597 | [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), 598 | [""] = cmp.mapping({ 599 | i = cmp.mapping.abort(), 600 | c = cmp.mapping.close(), 601 | }), 602 | [""] = cmp.mapping.confirm({}), 603 | [""] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), 604 | [""] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }), 605 | }, 606 | formatting = { 607 | format = require("lspkind").cmp_format({}), 608 | }, 609 | sources = cmp.config.sources({ 610 | { name = "nvim_lsp" }, 611 | { name = "git" }, 612 | { name = "cmp-dbee" }, 613 | }), 614 | view = { 615 | entries = "custom", 616 | }, 617 | enabled = function() 618 | return vim.api.nvim_get_option_value("buftype", {}) ~= "prompt" 619 | or require("cmp_dap").is_dap_buffer() 620 | end, 621 | }) 622 | cmp.setup.filetype({ "dap-repl", "dapui_watches" }, { 623 | sources = { 624 | { name = "dap" }, 625 | }, 626 | }) 627 | end, 628 | }, 629 | } 630 | require("lazy").setup(plugins, { 631 | ui = { 632 | border = vim.g.border_chars, 633 | }, 634 | install = { 635 | colorscheme = {}, 636 | }, 637 | }) 638 | 639 | -- Function to parse Ruff output and populate the quickfix list 640 | local function parse_ruff_output(output) 641 | local qflist = {} 642 | for line in output:gmatch("[^\r\n]+") do 643 | -- Assuming Ruff output format is: FILE:LINE:COLUMN: ERROR 644 | local filename, lnum, col, text = line:match("([^:]+):(%d+):(%d+): (.+)") 645 | if filename and lnum and col and text then 646 | table.insert(qflist, { 647 | filename = filename, 648 | lnum = tonumber(lnum), 649 | col = tonumber(col), 650 | text = text, 651 | }) 652 | end 653 | end 654 | return qflist 655 | end 656 | 657 | local nio = require("nio") 658 | 659 | ---@type nio.tasks.Task | nil 660 | local running_task 661 | 662 | vim.api.nvim_create_user_command("Ruff", function() 663 | if running_task then 664 | running_task.cancel() 665 | running_task = nil 666 | vim.notify("Stopped running Ruff") 667 | return 668 | end 669 | 670 | vim.notify("Running Ruff") 671 | 672 | local group = vim.api.nvim_create_augroup("ruff", { clear = true }) 673 | local ready_to_run = nio.control.event() 674 | ready_to_run.set() 675 | 676 | running_task = nio.run(function() 677 | while true do 678 | ready_to_run.wait() 679 | 680 | local proc, run_err = nio.process.run({ 681 | cmd = "python", 682 | args = { "-m", "ruff", "check", "--output-format=json" }, 683 | }) 684 | assert(not run_err and proc, run_err) 685 | 686 | local output, read_err = proc.stdout.read() 687 | assert(not read_err and output, read_err) 688 | 689 | local success, results = pcall(vim.json.decode, output, {}) 690 | if not success then 691 | vim.notify(("Error running Ruff\n%s"):format(proc.stderr.read()), vim.log.levels.ERROR) 692 | proc.close() 693 | 694 | return 695 | end 696 | 697 | proc.close() 698 | 699 | local qflist = {} 700 | for _, result in ipairs(results) do 701 | qflist[#qflist + 1] = { 702 | filename = result.filename, 703 | lnum = result.location.row, 704 | col = result.location.column, 705 | text = string.format("%s: %s", result.code, result.message), 706 | } 707 | end 708 | table.sort(qflist, function(a, b) 709 | return a.filename < b.filename 710 | end) 711 | nio.fn.setqflist(qflist, "r") 712 | vim.cmd("Trouble qflist open") 713 | ready_to_run.clear() 714 | end 715 | end) 716 | 717 | vim.api.nvim_create_autocmd("BufWrite", { 718 | group = group, 719 | callback = function() 720 | ready_to_run.set() 721 | end, 722 | }) 723 | end, {}) 724 | -------------------------------------------------------------------------------- /.config/nvim/lua/util.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get_python_path(workspace) 4 | -- Use activated virtualenv. 5 | local util = require("lspconfig/util") 6 | 7 | local path = util.path 8 | local env_path = vim.env.VIRTUAL_ENV or vim.env.CONDA_PREFIX 9 | if env_path then 10 | return path.join(env_path, "bin", "python") 11 | end 12 | 13 | -- Find and use virtualenv in workspace directory. 14 | for _, pattern in ipairs({ "*", ".*" }) do 15 | local match = vim.fn.glob(path.join(workspace or vim.fn.getcwd(), pattern, "pyvenv.cfg")) 16 | if match ~= "" then 17 | return path.join(path.dirname(match), "bin", "python") 18 | end 19 | end 20 | 21 | -- Fallback to system Python. 22 | return vim.fn.exepath("python3") or vim.fn.exepath("python") or "python" 23 | end 24 | 25 | function M.kitty_scrollback() 26 | vim.cmd("silent! write! /tmp/kitty_scrollback") 27 | 28 | local buf = vim.api.nvim_create_buf(false, true) 29 | vim.api.nvim_set_current_buf(buf) 30 | local data = io.open("/tmp/kitty_scrollback", "r"):read("*a"):gsub("\n", "\r\n") 31 | local term = vim.api.nvim_open_term(0, {}) 32 | vim.api.nvim_chan_send(term, data) 33 | end 34 | 35 | return M 36 | -------------------------------------------------------------------------------- /.config/nvim/queries/gotmpl/highlights.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | ; Identifiers 3 | 4 | [ 5 | (field) 6 | (field_identifier) 7 | ] @property 8 | 9 | (variable) @variable 10 | 11 | ; Function calls 12 | 13 | (function_call 14 | function: (identifier) @function) 15 | 16 | (method_call 17 | method: (selector_expression 18 | field: (field_identifier) @method)) 19 | 20 | ; Operators 21 | 22 | "|" @operator 23 | ":=" @operator 24 | 25 | ; Builtin functions 26 | 27 | ((identifier) @function.builtin 28 | (#match? @function.builtin "^(and|call|html|index|slice|js|len|not|or|print|printf|println|urlquery|eq|ne|lt|ge|gt|ge)$")) 29 | 30 | ; Delimiters 31 | 32 | "." @punctuation.delimiter 33 | "," @punctuation.delimiter 34 | 35 | "{{" @punctuation.bracket 36 | "}}" @punctuation.bracket 37 | "{{-" @punctuation.bracket 38 | "-}}" @punctuation.bracket 39 | ")" @punctuation.bracket 40 | "(" @punctuation.bracket 41 | 42 | ; Keywords 43 | 44 | [ 45 | "else" 46 | "else if" 47 | "if" 48 | "with" 49 | ] @conditional 50 | 51 | [ 52 | "range" 53 | "end" 54 | "template" 55 | "define" 56 | "block" 57 | ] @keyword 58 | 59 | ; Literals 60 | 61 | [ 62 | (interpreted_string_literal) 63 | (raw_string_literal) 64 | (rune_literal) 65 | ] @string 66 | 67 | (escape_sequence) @string.special 68 | 69 | [ 70 | (int_literal) 71 | (float_literal) 72 | (imaginary_literal) 73 | ] @number 74 | 75 | [ 76 | (true) 77 | (false) 78 | ] @boolean 79 | 80 | [ 81 | (nil) 82 | ] @constant.builtin 83 | 84 | (comment) @comment 85 | (ERROR) @error 86 | -------------------------------------------------------------------------------- /.config/nvim/queries/gotmpl/injections.scm: -------------------------------------------------------------------------------- 1 | (text) @yaml 2 | -------------------------------------------------------------------------------- /.config/nvim/queries/lua/highlights.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | (function_declaration name: ((method_index_expression table: (identifier) @type (#set! "priority" 105)))) 4 | -------------------------------------------------------------------------------- /.config/nvim/queries/python/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ((expression_statement 4 | (string ( 5 | (string_content) @injection.content) 6 | ; (#strip_indent! @injection.content) 7 | ) 8 | (#set! injection.language "markdown_inline") 9 | ) 10 | ) 11 | 12 | ; ((comment) @injection.content 13 | ; (#lua-match? @injection.content "^#: ") 14 | ; (#offset! @injection.content 0 3 0 0) 15 | ; (#set! injection.language "rst")) 16 | 17 | 18 | -------------------------------------------------------------------------------- /.config/packages/aur.txt: -------------------------------------------------------------------------------- 1 | aura-bin 2 | bashtop-git 3 | materia-kde-git 4 | neovim-nightly 5 | nerd-fonts-jetbrains-mono 6 | nerd-fonts-roboto-mono 7 | picom-tryone-git 8 | polybar-git 9 | postman-bin 10 | qmk 11 | stack-static 12 | steam-fonts 13 | vimix-icon-theme 14 | yadm-git 15 | -------------------------------------------------------------------------------- /.config/packages/mirrorlist: -------------------------------------------------------------------------------- 1 | # Server list generated by rankmirrors on 2020-06-13 2 | ## 3 | ## Arch Linux repository mirrorlist 4 | ## Filtered by mirror score from mirror status page 5 | ## Generated on 2020-05-01 6 | ## 7 | ## Germany 8 | ## Canada 9 | ## Denmark 10 | ## Ireland 11 | ## Serbia 12 | ## Australia 13 | ## Germany 14 | ## France 15 | ## United States 16 | ## United States 17 | ## France 18 | ## Germany 19 | ## United Kingdom 20 | ## Germany 21 | ## Vietnam 22 | ## Hungary 23 | ## France 24 | ## Iceland 25 | ## Netherlands 26 | ## Germany 27 | ## United States 28 | ## Denmark 29 | ## France 30 | ## China 31 | ## France 32 | ## Canada 33 | ## Indonesia 34 | ## South Africa 35 | ## Germany 36 | ## Poland 37 | ## United Kingdom 38 | ## Belarus 39 | ## United States 40 | ## France 41 | ## France 42 | ## Romania 43 | ## Germany 44 | ## Netherlands 45 | ## Austria 46 | ## United States 47 | ## United Kingdom 48 | ## Turkey 49 | ## Poland 50 | ## Switzerland 51 | ## United Kingdom 52 | ## Germany 53 | ## Iran 54 | ## France 55 | ## Netherlands 56 | ## South Korea 57 | ## Germany 58 | ## United States 59 | ## Chile 60 | ## Ukraine 61 | ## United States 62 | ## Indonesia 63 | ## United States 64 | ## Portugal 65 | ## Greece 66 | ## United States 67 | ## Spain 68 | ## United States 69 | ## Russia 70 | ## Canada 71 | ## United States 72 | ## Germany 73 | ## Germany 74 | ## Brazil 75 | ## Chile 76 | ## Colombia 77 | ## United States 78 | ## Canada 79 | ## Georgia 80 | ## China 81 | ## United States 82 | ## United States 83 | ## Germany 84 | ## Hungary 85 | ## South Africa 86 | ## United States 87 | ## Bulgaria 88 | ## Romania 89 | ## Netherlands 90 | ## United States 91 | ## United Kingdom 92 | ## Canada 93 | ## New Zealand 94 | ## Germany 95 | ## United States 96 | ## France 97 | ## Hungary 98 | ## France 99 | ## United States 100 | ## Norway 101 | ## Japan 102 | ## France 103 | ## Finland 104 | ## Sweden 105 | ## Worldwide 106 | ## Norway 107 | ## Brazil 108 | ## Czechia 109 | ## Germany 110 | ## Romania 111 | ## United Kingdom 112 | ## United States 113 | ## Romania 114 | ## Ecuador 115 | ## Germany 116 | ## Hungary 117 | ## Sweden 118 | ## United States 119 | ## Portugal 120 | ## Netherlands 121 | ## Netherlands 122 | ## New Zealand 123 | ## Latvia 124 | ## Australia 125 | ## United States 126 | ## China 127 | ## United States 128 | ## Germany 129 | ## United Kingdom 130 | ## Taiwan 131 | ## Brazil 132 | ## Taiwan 133 | ## Slovakia 134 | ## Greece 135 | ## Israel 136 | ## Netherlands 137 | ## Austria 138 | ## Germany 139 | ## Spain 140 | ## Serbia 141 | ## France 142 | ## Belgium 143 | ## Netherlands 144 | ## Taiwan 145 | ## United States 146 | ## Brazil 147 | ## United States 148 | ## United States 149 | ## Poland 150 | ## Italy 151 | ## Greece 152 | ## United Kingdom 153 | ## United States 154 | ## Brazil 155 | ## United States 156 | ## China 157 | ## France 158 | ## United States 159 | ## Czechia 160 | ## United States 161 | ## Norway 162 | ## United States 163 | ## Sweden 164 | ## Netherlands 165 | ## Germany 166 | ## United States 167 | ## United States 168 | ## Hungary 169 | ## China 170 | ## United States 171 | ## Germany 172 | ## Russia 173 | ## Czechia 174 | ## United States 175 | ## Netherlands 176 | ## South Korea 177 | ## United States 178 | ## Sweden 179 | ## Hong Kong 180 | ## Hong Kong 181 | ## South Africa 182 | ## Germany 183 | ## Switzerland 184 | ## United States 185 | ## Germany 186 | ## North Macedonia 187 | ## Norway 188 | ## Czechia 189 | ## Czechia 190 | ## Brazil 191 | ## Ecuador 192 | ## Brazil 193 | ## Romania 194 | ## North Macedonia 195 | ## Belarus 196 | ## Poland 197 | ## Bulgaria 198 | ## Romania 199 | ## Sweden 200 | ## North Macedonia 201 | ## Canada 202 | ## United Kingdom 203 | ## Germany 204 | ## Japan 205 | ## South Korea 206 | ## Kazakhstan 207 | ## France 208 | ## China 209 | ## Lithuania 210 | ## United States 211 | ## United States 212 | ## Canada 213 | ## United States 214 | ## Turkey 215 | ## Lithuania 216 | ## Poland 217 | ## Germany 218 | ## Ukraine 219 | ## Singapore 220 | ## Germany 221 | ## Germany 222 | ## United States 223 | ## Taiwan 224 | ## United States 225 | ## Netherlands 226 | ## Canada 227 | ## South Africa 228 | ## Germany 229 | ## Germany 230 | ## Germany 231 | ## Belgium 232 | ## Thailand 233 | ## Slovakia 234 | ## United States 235 | ## Greece 236 | ## Thailand 237 | ## Slovenia 238 | ## Kenya 239 | ## Indonesia 240 | ## Croatia 241 | ## Australia 242 | ## Germany 243 | ## United States 244 | ## United States 245 | ## Czechia 246 | ## Netherlands 247 | ## China 248 | ## United Kingdom 249 | ## Australia 250 | ## United States 251 | ## Netherlands 252 | ## United States 253 | ## Netherlands 254 | ## Bangladesh 255 | ## Switzerland 256 | ## Hong Kong 257 | ## Germany 258 | ## Australia 259 | ## Germany 260 | ## Germany 261 | ## United States 262 | ## France 263 | ## Germany 264 | ## United States 265 | ## Indonesia 266 | ## Belgium 267 | ## Ecuador 268 | ## India 269 | ## Iran 270 | ## Paraguay 271 | ## New Caledonia 272 | ## Italy 273 | ## Netherlands 274 | ## Bulgaria 275 | ## India 276 | ## Germany 277 | ## Germany 278 | ## Luxembourg 279 | ## Ukraine 280 | ## United States 281 | ## Finland 282 | ## Bosnia and Herzegovina 283 | ## France 284 | ## United States 285 | ## Australia 286 | ## United States 287 | ## Singapore 288 | ## Austria 289 | ## United States 290 | ## Japan 291 | ## France 292 | ## United States 293 | ## Czechia 294 | ## Russia 295 | ## China 296 | ## France 297 | Server = http://archlinux.mirrors.benatherton.com/$repo/os/$arch 298 | Server = http://mirror.archlinux.ikoula.com/archlinux/$repo/os/$arch 299 | Server = http://archlinux.cu.be/$repo/os/$arch 300 | Server = http://ftp.heanet.ie/mirrors/ftp.archlinux.org/$repo/os/$arch 301 | Server = http://archlinux.mirrors.uk2.net/$repo/os/$arch 302 | Server = http://arch.yourlabs.org/$repo/os/$arch 303 | Server = http://archlinux.mirrors.ovh.net/archlinux/$repo/os/$arch 304 | Server = http://piotrkosoft.net/pub/mirrors/ftp.archlinux.org/$repo/os/$arch 305 | Server = http://mirror.metalgamer.eu/archlinux/$repo/os/$arch 306 | Server = http://mirrors.arnoldthebat.co.uk/archlinux/$repo/os/$arch 307 | Server = http://mirror.oldsql.cc/archlinux/$repo/os/$arch 308 | Server = http://mirror.wtnet.de/arch/$repo/os/$arch 309 | Server = http://ftp.snt.utwente.nl/pub/os/linux/archlinux/$repo/os/$arch 310 | Server = http://mirror.netweaver.uk/archlinux/$repo/os/$arch 311 | Server = http://mirrors.n-ix.net/archlinux/$repo/os/$arch 312 | Server = http://mirror.tarellia.net/distr/archlinux/$repo/os/$arch 313 | Server = http://arch.eckner.net/archlinux/$repo/os/$arch 314 | Server = http://mirrors.xtom.nl/archlinux/$repo/os/$arch 315 | Server = http://mirror.pseudoform.org/$repo/os/$arch 316 | Server = http://archlinux.de-labrusse.fr/$repo/os/$arch 317 | Server = http://mirror.united-gameserver.de/archlinux/$repo/os/$arch 318 | Server = http://arch.softver.org.mk/archlinux/$repo/os/$arch 319 | Server = http://ftp.fau.de/archlinux/$repo/os/$arch 320 | Server = http://archlinux.rezopole.net/$repo/os/$arch 321 | Server = http://mirror-archlinux.webruimtehosting.nl/$repo/os/$arch 322 | Server = http://mirror.bytemark.co.uk/archlinux/$repo/os/$arch 323 | Server = http://archlinux.uib.no/$repo/os/$arch 324 | Server = http://mirror.init7.net/archlinux/$repo/os/$arch 325 | Server = http://mirror.chaoticum.net/arch/$repo/os/$arch 326 | Server = http://ftp.nluug.nl/os/Linux/distr/archlinux/$repo/os/$arch 327 | Server = http://archlinux.mirror.iphh.net/$repo/os/$arch 328 | Server = http://mirror.mikrogravitation.org/archlinux/$repo/os/$arch 329 | Server = http://mir.archlinux.fr/$repo/os/$arch 330 | Server = http://mirror.ams1.nl.leaseweb.net/archlinux/$repo/os/$arch 331 | Server = http://mirrors.dotsrc.org/archlinux/$repo/os/$arch 332 | Server = http://artfiles.org/archlinux.org/$repo/os/$arch 333 | Server = http://archlinux.mirror.liteserver.nl/$repo/os/$arch 334 | Server = http://mirror.lastmikoi.net/archlinux/$repo/os/$arch 335 | Server = http://archlinux.mirror.root.lu/$repo/os/$arch 336 | Server = http://mirrors.manchester.m247.com/arch-linux/$repo/os/$arch 337 | Server = http://archlinux.mailtunnel.eu/$repo/os/$arch 338 | Server = http://mirror.koddos.net/archlinux/$repo/os/$arch 339 | Server = http://mirror.neostrada.nl/archlinux/$repo/os/$arch 340 | Server = http://ftp.u-strasbg.fr/linux/distributions/archlinux/$repo/os/$arch 341 | Server = http://arch.mirrors.lavatech.top/$repo/os/$arch 342 | Server = http://mirrors.ukfast.co.uk/sites/archlinux.org/$repo/os/$arch 343 | Server = http://archlinux.mirror.wearetriple.com/$repo/os/$arch 344 | Server = http://mirrors.nic.cz/archlinux/$repo/os/$arch 345 | Server = http://archlinux.polymorf.fr/$repo/os/$arch 346 | Server = http://ftpmirror.infania.net/mirror/archlinux/$repo/os/$arch 347 | Server = http://mirror.easyname.at/archlinux/$repo/os/$arch 348 | Server = http://ftp.wrz.de/pub/archlinux/$repo/os/$arch 349 | Server = http://mirrors.niyawe.de/archlinux/$repo/os/$arch 350 | Server = http://mirror.lnx.sk/pub/linux/archlinux/$repo/os/$arch 351 | Server = http://mirror.puzzle.ch/archlinux/$repo/os/$arch 352 | Server = http://mirror.mijn.host/archlinux/$repo/os/$arch 353 | Server = http://ftp.spline.inf.fu-berlin.de/mirrors/archlinux/$repo/os/$arch 354 | Server = http://quantum-mirror.hu/mirrors/pub/archlinux/$repo/os/$arch 355 | Server = http://tux.rainside.sk/archlinux/$repo/os/$arch 356 | Server = http://mirror.one.com/archlinux/$repo/os/$arch 357 | Server = http://ftp.hosteurope.de/mirror/ftp.archlinux.org/$repo/os/$arch 358 | Server = http://archlinux.iskon.hr/$repo/os/$arch 359 | Server = http://ftp.acc.umu.se/mirror/archlinux/$repo/os/$arch 360 | Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch 361 | Server = http://mirrors.standaloneinstaller.com/archlinux/$repo/os/$arch 362 | Server = http://arch.mirror.far.fi/$repo/os/$arch 363 | Server = http://mirror.ubrco.de/archlinux/$repo/os/$arch 364 | Server = http://mirror.librelabucm.org/archlinux/$repo/os/$arch 365 | Server = http://mirror.fra10.de.leaseweb.net/archlinux/$repo/os/$arch 366 | Server = http://pkg.adfinis-sygroup.ch/archlinux/$repo/os/$arch 367 | Server = http://mirror.netcologne.de/archlinux/$repo/os/$arch 368 | Server = http://arch.nimukaito.net/$repo/os/$arch 369 | Server = http://mirror.vpsfree.cz/archlinux/$repo/os/$arch 370 | Server = http://archmirror.hbit.sztaki.hu/archlinux/$repo/os/$arch 371 | Server = http://archimonde.ts.si/archlinux/$repo/os/$arch 372 | Server = http://super.quantum-mirror.hu/mirrors/pub/archlinux/$repo/os/$arch 373 | Server = http://archlinux.mirror.pcextreme.nl/$repo/os/$arch 374 | Server = http://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/$repo/os/$arch 375 | Server = http://mirror.reisenbauer.ee/archlinux/$repo/os/$arch 376 | Server = http://mirror.f4st.host/archlinux/$repo/os/$arch 377 | Server = http://mirrors.atviras.lt/archlinux/$repo/os/$arch 378 | Server = http://nova.quantum-mirror.hu/mirrors/pub/archlinux/$repo/os/$arch 379 | Server = http://ftp.myrveln.se/pub/linux/archlinux/$repo/os/$arch 380 | Server = http://mirror.digitalnova.at/archlinux/$repo/os/$arch 381 | Server = http://ftp.tu-chemnitz.de/pub/linux/archlinux/$repo/os/$arch 382 | Server = http://mirror.neuf.no/archlinux/$repo/os/$arch 383 | Server = http://packages.oth-regensburg.de/archlinux/$repo/os/$arch 384 | Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch 385 | Server = http://mirror.orbit-os.com/archlinux/$repo/os/$arch 386 | Server = http://mirror.23media.com/archlinux/$repo/os/$arch 387 | Server = http://archlinux.honkgong.info/$repo/os/$arch 388 | Server = http://mirrors.netix.net/archlinux/$repo/os/$arch 389 | Server = http://ftp.uni-hannover.de/archlinux/$repo/os/$arch 390 | Server = http://mirror.rol.ru/archlinux/$repo/os/$arch 391 | Server = http://mirror.cyberbits.eu/archlinux/$repo/os/$arch 392 | Server = http://archlinux.mirror.kangaroot.net/$repo/os/$arch 393 | Server = http://mirror.terrahost.no/linux/archlinux/$repo/os/$arch 394 | Server = http://arch.nixlab.pl/$repo/os/$arch 395 | Server = http://arch.midov.pl/arch/$repo/os/$arch 396 | Server = http://arch.petarmaric.com/$repo/os/$arch 397 | Server = http://mirrors.melbourne.co.uk/archlinux/$repo/os/$arch 398 | Server = http://ftp.otenet.gr/linux/archlinux/$repo/os/$arch 399 | Server = http://mirrors.pidginhost.com/arch/$repo/os/$arch 400 | Server = http://archlinux.koyanet.lv/archlinux/$repo/os/$arch 401 | Server = http://mirror.tiguinet.net/arch/$repo/os/$arch 402 | Server = http://linux.rz.rub.de/archlinux/$repo/os/$arch 403 | Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch 404 | Server = http://ftp.uni-kl.de/pub/linux/archlinux/$repo/os/$arch 405 | Server = http://arch.mirror.constant.com/$repo/os/$arch 406 | Server = http://ftp.uni-bayreuth.de/linux/archlinux/$repo/os/$arch 407 | Server = http://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch 408 | Server = http://archlinux.thaller.ws/$repo/os/$arch 409 | Server = http://mirrors.celianvdb.fr/archlinux/$repo/os/$arch 410 | Server = http://mirrors.nxthost.com/archlinux/$repo/os/$arch 411 | Server = http://arch.jensgutermuth.de/$repo/os/$arch 412 | Server = http://ftp.fi.muni.cz/pub/linux/arch/$repo/os/$arch 413 | Server = http://archlinux.uk.mirror.allworldit.com/archlinux/$repo/os/$arch 414 | Server = http://mirror.isoc.org.il/pub/archlinux/$repo/os/$arch 415 | Server = http://ftp.sh.cvut.cz/arch/$repo/os/$arch 416 | Server = http://ftp.gwdg.de/pub/linux/archlinux/$repo/os/$arch 417 | Server = http://archlinux.mirror.ba/$repo/os/$arch 418 | Server = http://mirror.system.is/arch/$repo/os/$arch 419 | Server = http://mirror.undisclose.de/archlinux/$repo/os/$arch 420 | Server = http://mirror.selfnet.de/archlinux/$repo/os/$arch 421 | Server = http://archlinux.mirrors.linux.ro/$repo/os/$arch 422 | Server = http://mirror.archlinux.no/$repo/os/$arch 423 | Server = http://mirror.efect.ro/archlinux/$repo/os/$arch 424 | Server = http://mirrors.chroot.ro/archlinux/$repo/os/$arch 425 | Server = http://ftp.energia.mta.hu/pub/mirrors/ftp.archlinux.org/$repo/os/$arch 426 | Server = http://glua.ua.pt/pub/archlinux/$repo/os/$arch 427 | Server = http://archlinux.dynamict.se/$repo/os/$arch 428 | Server = http://mirror.yandex.ru/archlinux/$repo/os/$arch 429 | Server = http://mirrors.ims.nksc.lt/archlinux/$repo/os/$arch 430 | Server = http://mirrors.nix.org.ua/linux/archlinux/$repo/os/$arch 431 | Server = http://mirror.onevip.mk/archlinux/$repo/os/$arch 432 | Server = http://mirrors.uni-plovdiv.net/archlinux/$repo/os/$arch 433 | Server = http://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch 434 | Server = http://ftp.cc.uoc.gr/mirrors/linux/archlinux/$repo/os/$arch 435 | Server = http://lon.mirror.rackspace.com/archlinux/$repo/os/$arch 436 | Server = http://ftp.linux.cz/pub/linux/arch/$repo/os/$arch 437 | Server = http://mirror.stephen304.com/archlinux/$repo/os/$arch 438 | Server = http://mirror.datacenter.by/pub/archlinux/$repo/os/$arch 439 | Server = http://mirror.i3d.net/pub/archlinux/$repo/os/$arch 440 | Server = http://mirror.its.dal.ca/archlinux/$repo/os/$arch 441 | Server = http://mirror.t-home.mk/archlinux/$repo/os/$arch 442 | Server = http://gluttony.sin.cvut.cz/arch/$repo/os/$arch 443 | Server = http://mirror.metrocast.net/archlinux/$repo/os/$arch 444 | Server = http://ftp.rediris.es/mirror/archlinux/$repo/os/$arch 445 | Server = http://ftp.byfly.by/pub/archlinux/$repo/os/$arch 446 | Server = http://mirror.siena.edu/archlinux/$repo/os/$arch 447 | Server = http://arch.mirror.square-r00t.net/$repo/os/$arch 448 | Server = http://il.us.mirror.archlinux-br.org/$repo/os/$arch 449 | Server = http://mirror.host.ag/archlinux/$repo/os/$arch 450 | Server = http://mirrors.mit.edu/archlinux/$repo/os/$arch 451 | Server = http://mirror.pmf.kg.ac.rs/archlinux/$repo/os/$arch 452 | Server = http://muug.ca/mirror/archlinux/$repo/os/$arch 453 | Server = http://mirror.math.princeton.edu/pub/archlinux/$repo/os/$arch 454 | Server = http://arlm.tyzoid.com/$repo/os/$arch 455 | Server = http://ftp.rnl.tecnico.ulisboa.pt/pub/archlinux/$repo/os/$arch 456 | Server = http://mirror2.evolution-host.com/archlinux/$repo/os/$arch 457 | Server = http://mirror.veriteknik.net.tr/archlinux/$repo/os/$arch 458 | Server = http://mirror.sergal.org/archlinux/$repo/os/$arch 459 | Server = http://mirror.dal10.us.leaseweb.net/archlinux/$repo/os/$arch 460 | Server = http://archlinux.ip-connect.vn.ua/$repo/os/$arch 461 | Server = http://mirror.cs.vt.edu/pub/ArchLinux/$repo/os/$arch 462 | Server = http://mirrors.mirjamali.ir/archlinux/$repo/os/$arch 463 | Server = http://arch.hu.fo/archlinux/$repo/os/$arch 464 | Server = http://archlinux.grena.ge/$repo/os/$arch 465 | Server = http://mirrors.rit.edu/archlinux/$repo/os/$arch 466 | Server = http://iad.mirrors.misaka.one/archlinux/$repo/os/$arch 467 | Server = http://mirror.pit.teraswitch.com/archlinux/$repo/os/$arch 468 | Server = http://mirrors.advancedhosters.com/archlinux/$repo/os/$arch 469 | Server = http://plug-mirror.rcac.purdue.edu/archlinux/$repo/os/$arch 470 | Server = http://mirrors.myaegean.gr/linux/archlinux/$repo/os/$arch 471 | Server = http://mirror.scd31.com/arch/$repo/os/$arch 472 | Server = http://mirror.cc.columbia.edu/pub/linux/archlinux/$repo/os/$arch 473 | Server = http://mirrors.xtom.com/archlinux/$repo/os/$arch 474 | Server = http://arch.mirrors.pair.com/$repo/os/$arch 475 | Server = http://ca.us.mirror.archlinux-br.org/$repo/os/$arch 476 | Server = http://mirrors.gigenet.com/archlinux/$repo/os/$arch 477 | Server = http://repo.miserver.it.umich.edu/archlinux/$repo/os/$arch 478 | Server = http://mirror.vtti.vt.edu/archlinux/$repo/os/$arch 479 | Server = http://ftp.osuosl.org/pub/archlinux/$repo/os/$arch 480 | Server = http://mirror.ps.kz/archlinux/$repo/os/$arch 481 | Server = http://mirror.truenetwork.ru/archlinux/$repo/os/$arch 482 | Server = http://mirror.xeonbd.com/archlinux/$repo/os/$arch 483 | Server = http://mirror.umd.edu/archlinux/$repo/os/$arch 484 | Server = http://mirror.es.its.nyu.edu/archlinux/$repo/os/$arch 485 | Server = http://mirrors.sonic.net/archlinux/$repo/os/$arch 486 | Server = http://ftp.ntua.gr/pub/linux/archlinux/$repo/os/$arch 487 | Server = http://iad.mirror.rackspace.com/archlinux/$repo/os/$arch 488 | Server = http://mirror.uta.edu.ec/archlinux/$repo/os/$arch 489 | Server = http://za.mirror.archlinux-br.org/$repo/os/$arch 490 | Server = http://mirrors.xmission.com/archlinux/$repo/os/$arch 491 | Server = http://reflector.luehm.com/arch/$repo/os/$arch 492 | Server = http://repo.ialab.dsu.edu/archlinux/$repo/os/$arch 493 | Server = http://mirror.dc02.hackingand.coffee/arch/$repo/os/$arch 494 | Server = http://repo.iut.ac.ir/repo/archlinux/$repo/os/$arch 495 | Server = http://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch 496 | Server = http://mirror.mia11.us.leaseweb.net/archlinux/$repo/os/$arch 497 | Server = http://archlinux.mirror.rafal.ca/$repo/os/$arch 498 | Server = http://archlinux.za.mirror.allworldit.com/archlinux/$repo/os/$arch 499 | Server = http://mirror.is.co.za/mirror/archlinux.org/$repo/os/$arch 500 | Server = http://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/$arch 501 | Server = http://mirror.cs.pitt.edu/archlinux/$repo/os/$arch 502 | Server = http://mirror.cedia.org.ec/archlinux/$repo/os/$arch 503 | Server = http://br.mirror.archlinux-br.org/$repo/os/$arch 504 | Server = http://mirror.arizona.edu/archlinux/$repo/os/$arch 505 | Server = http://mirrors.rutgers.edu/archlinux/$repo/os/$arch 506 | Server = http://mirrors.liquidweb.com/archlinux/$repo/os/$arch 507 | Server = http://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch 508 | Server = http://mirrors.aggregate.org/archlinux/$repo/os/$arch 509 | Server = http://mirror.mirohost.net/archlinux/$repo/os/$arch 510 | Server = http://distro.ibiblio.org/archlinux/$repo/os/$arch 511 | Server = http://mirror.aktkn.sg/archlinux/$repo/os/$arch 512 | Server = http://mirror-hk.koddos.net/archlinux/$repo/os/$arch 513 | Server = http://f.archlinuxvn.org/archlinux/$repo/os/$arch 514 | Server = http://archlinux.surlyjake.com/archlinux/$repo/os/$arch 515 | Server = http://archmirror1.octyl.net/$repo/os/$arch 516 | Server = http://mirrors.prometeus.net/archlinux/$repo/os/$arch 517 | Server = http://ftp.vectranet.pl/archlinux/$repo/os/$arch 518 | Server = http://ord.mirror.rackspace.com/archlinux/$repo/os/$arch 519 | Server = http://mirror.dkm.cz/archlinux/$repo/os/$arch 520 | Server = http://archlinux.mirror.liquidtelecom.com/$repo/os/$arch 521 | Server = http://suro.ubaya.ac.id/archlinux/$repo/os/$arch 522 | Server = http://mirror.lty.me/archlinux/$repo/os/$arch 523 | Server = http://ftp.linux.org.tr/archlinux/$repo/os/$arch 524 | Server = http://mirror.espoch.edu.ec/archlinux/$repo/os/$arch 525 | Server = http://mirror.xtom.com.hk/archlinux/$repo/os/$arch 526 | Server = http://mirror.ufro.cl/archlinux/$repo/os/$arch 527 | Server = http://linorg.usp.br/archlinux/$repo/os/$arch 528 | Server = http://ftp.swin.edu.au/archlinux/$repo/os/$arch 529 | Server = http://www.caco.ic.unicamp.br/archlinux/$repo/os/$arch 530 | Server = http://mirror.smith.geek.nz/archlinux/$repo/os/$arch 531 | Server = http://mirrors.urbanwave.co.za/archlinux/$repo/os/$arch 532 | Server = http://dfw.mirror.rackspace.com/archlinux/$repo/os/$arch 533 | Server = http://mirrors.udenar.edu.co/archlinux/$repo/os/$arch 534 | Server = http://archlinux.melbourneitmirror.net/$repo/os/$arch 535 | Server = http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/$repo/os/$arch 536 | Server = http://mirrors.cat.net/archlinux/$repo/os/$arch 537 | Server = http://mirror.ufscar.br/archlinux/$repo/os/$arch 538 | Server = http://mirror2.totbb.net/archlinux/$repo/os/$arch 539 | Server = http://ftp.tku.edu.tw/Linux/ArchLinux/$repo/os/$arch 540 | Server = http://www.gtlib.gatech.edu/pub/archlinux/$repo/os/$arch 541 | Server = http://mirror.ibcp.fr/pub/archlinux/$repo/os/$arch 542 | Server = http://ftp.harukasan.org/archlinux/$repo/os/$arch 543 | Server = http://shadow.ind.ntou.edu.tw/archlinux/$repo/os/$arch 544 | Server = http://mirror.labkom.id/archlinux/$repo/os/$arch 545 | Server = http://mirror.0x.sg/archlinux/$repo/os/$arch 546 | Server = http://mirror.telkomuniversity.ac.id/archlinux/$repo/os/$arch 547 | Server = http://mirror.lzu.edu.cn/archlinux/$repo/os/$arch 548 | Server = http://archlinux.cs.nctu.edu.tw/$repo/os/$arch 549 | Server = http://mirrors.lug.mtu.edu/archlinux/$repo/os/$arch 550 | Server = http://mirror.premi.st/archlinux/$repo/os/$arch 551 | Server = http://archlinux.nautile.nc/archlinux/$repo/os/$arch 552 | Server = http://archlinux.mirror.py/archlinux/$repo/os/$arch 553 | Server = http://mirror.kku.ac.th/archlinux/$repo/os/$arch 554 | Server = http://mirror.cse.iitk.ac.in/archlinux/$repo/os/$arch 555 | Server = http://mirror.serverion.com/archlinux/$repo/os/$arch 556 | Server = http://syd.mirror.rackspace.com/archlinux/$repo/os/$arch 557 | Server = http://mirror.redrock.team/archlinux/$repo/os/$arch 558 | Server = http://mirror.poliwangi.ac.id/archlinux/$repo/os/$arch 559 | Server = http://ftp.lanet.kr/pub/archlinux/$repo/os/$arch 560 | Server = http://archlinux.pop-es.rnp.br/$repo/os/$arch 561 | Server = http://archlinux.mirror.digitalpacific.com.au/$repo/os/$arch 562 | Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch 563 | Server = http://mirror.archlinux.cl/$repo/os/$arch 564 | Server = http://archlinux.mirror.garr.it/archlinux/$repo/os/$arch 565 | Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch 566 | Server = http://archlinux.c3sl.ufpr.br/$repo/os/$arch 567 | Server = http://hkg.mirror.rackspace.com/archlinux/$repo/os/$arch 568 | Server = http://mirror.ufam.edu.br/archlinux/$repo/os/$arch 569 | Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch 570 | Server = http://mirrors.163.com/archlinux/$repo/os/$arch 571 | Server = http://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch 572 | Server = http://mirror.fsmg.org.nz/archlinux/$repo/os/$arch 573 | Server = http://mirrors.cqu.edu.cn/archlinux/$repo/os/$arch 574 | Server = http://mirror.internode.on.net/pub/archlinux/$repo/os/$arch 575 | Server = http://ftp.yzu.edu.tw/Linux/archlinux/$repo/os/$arch 576 | Server = http://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch 577 | Server = http://ftp.iinet.net.au/pub/archlinux/$repo/os/$arch 578 | Server = http://arch.serverspace.co.uk/arch/$repo/os/$arch 579 | Server = http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch 580 | Server = http://archlinux.mirror.colo-serv.net/$repo/os/$arch 581 | Server = http://mirror.checkdomain.de/archlinux/$repo/os/$arch 582 | Server = http://mirror.kaminski.io/archlinux/$repo/os/$arch 583 | Server = http://mirrors.dgut.edu.cn/archlinux/$repo/os/$arch 584 | Server = http://mirrors.nav.ro/archlinux/$repo/os/$arch 585 | Server = http://mirrors.piconets.webwerks.in/archlinux-mirror/$repo/os/$arch 586 | Server = http://www.mirrorservice.org/sites/ftp.archlinux.org/$repo/os/$arch 587 | -------------------------------------------------------------------------------- /.config/packages/native.txt: -------------------------------------------------------------------------------- 1 | amd-ucode 2 | autoconf 3 | automake 4 | base 5 | binutils 6 | bison 7 | blueman 8 | bluez 9 | bluez-utils 10 | docker 11 | docker-compose 12 | dolphin 13 | fakeroot 14 | feh 15 | firefox 16 | flex 17 | gcc 18 | git 19 | htop 20 | i3-gaps 21 | kitty 22 | kvantum-qt5 23 | libtool 24 | libxss 25 | light 26 | linux 27 | linux-firmware 28 | lua 29 | lvm2 30 | lxappearance 31 | make 32 | man-db 33 | man-pages 34 | materia-gtk-theme 35 | neofetch 36 | network-manager-applet 37 | networkmanager 38 | nodejs 39 | nss-mdns 40 | nvidia 41 | openssh 42 | pacman-contrib 43 | patch 44 | pkgconf 45 | pulseaudio 46 | pulseaudio-alsa 47 | pulseaudio-bluetooth 48 | python 49 | python-pynvim 50 | qt5ct 51 | ripgrep 52 | rofi 53 | sudo 54 | texinfo 55 | thunderbird 56 | tree 57 | ttf-roboto 58 | vim 59 | vlc 60 | which 61 | wqy-zenhei 62 | xclip 63 | xdotool 64 | xf86-video-vesa 65 | xorg-bdftopcf 66 | xorg-docs 67 | xorg-font-util 68 | xorg-fonts-100dpi 69 | xorg-fonts-75dpi 70 | xorg-fonts-encodings 71 | xorg-iceauth 72 | xorg-luit 73 | xorg-mkfontscale 74 | xorg-server-devel 75 | xorg-server-xephyr 76 | xorg-server-xnest 77 | xorg-server-xvfb 78 | xorg-server-xwayland 79 | xorg-sessreg 80 | xorg-smproxy 81 | xorg-x11perf 82 | xorg-xauth 83 | xorg-xbacklight 84 | xorg-xcmsdb 85 | xorg-xcursorgen 86 | xorg-xdpyinfo 87 | xorg-xdriinfo 88 | xorg-xev 89 | xorg-xgamma 90 | xorg-xhost 91 | xorg-xinit 92 | xorg-xinput 93 | xorg-xkbevd 94 | xorg-xkbutils 95 | xorg-xkill 96 | xorg-xlsatoms 97 | xorg-xlsclients 98 | xorg-xmessage 99 | xorg-xmodmap 100 | xorg-xpr 101 | xorg-xprop 102 | xorg-xrandr 103 | xorg-xrdb 104 | xorg-xrefresh 105 | xorg-xset 106 | xorg-xsetroot 107 | xorg-xvinfo 108 | xorg-xwd 109 | xorg-xwininfo 110 | xorg-xwud 111 | xscreensaver 112 | yarn 113 | zsh 114 | -------------------------------------------------------------------------------- /.config/picom.conf: -------------------------------------------------------------------------------- 1 | 2 | # Backend {{{ 3 | backend = "glx"; 4 | # }}} 5 | 6 | # Fading {{{ 7 | fading: true; 8 | fade-delta: 0; 9 | # }}} 10 | 11 | # Opacity {{{ 12 | detect-client-opacity = true; 13 | # }}} 14 | 15 | # Blur {{{ 16 | blur-background-exclude: [ 17 | "name *= 'Firefox'", 18 | "name *= 'Inkscape'", 19 | "name *= 'GIMP'", 20 | "name *= 'Peek'", 21 | "name *= 'vlc'", 22 | "class_g = 'Deadd-notification-center'", 23 | ]; 24 | blur: { 25 | method = "dual_kawase"; 26 | strength = 8; 27 | } 28 | # }}} 29 | 30 | corner-radius = 5.0; 31 | round-borders = 1; 32 | rounded-corners-exclude = [ 33 | "class_g = 'Polybar'", 34 | "class_g = 'firefox'", 35 | "class_g = 'Deadd-notification-center'", 36 | "class_g = 'Rofi'", 37 | ]; 38 | 39 | mark-ovredir-focused = false; 40 | use-ewmh-active-win = true; 41 | vsync = true; 42 | -------------------------------------------------------------------------------- /.config/polybar/config: -------------------------------------------------------------------------------- 1 | ;========================================================== 2 | ; 3 | ; 4 | ; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ 5 | ; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ 6 | ; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ 7 | ; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ 8 | ; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ 9 | ; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ 10 | ; 11 | ; 12 | ; To learn more about how to configure Polybar 13 | ; go to https://github.com/jaagr/polybar 14 | ; 15 | ; The README contains a lot of information 16 | ; 17 | ;========================================================== 18 | 19 | [colors] 20 | background = #212121 21 | background-alt = #444 22 | foreground = #F5F5F5 23 | foreground-alt = #212121 24 | primary = #ffb52a 25 | secondary = #e60053 26 | alert = #bd2c40 27 | light = ${colors.background} 28 | fs = ${colors.background} 29 | cpu = ${colors.background} 30 | memory = ${colors.background} 31 | volume = ${colors.background} 32 | battery = ${colors.background} 33 | 34 | ############################################################################### 35 | # Bars 36 | ############################################################################### 37 | 38 | [bar/xmonad] 39 | ;monitor = ${env:MONITOR:HDMI-1} 40 | monitor-strict = true 41 | height = 40 42 | align = bottom 43 | bottom = true 44 | 45 | background = ${colors.background} 46 | foreground = ${colors.foreground} 47 | 48 | line-size = 3 49 | line-color = #f00 50 | 51 | padding-left = 5 52 | padding-right = 2 53 | 54 | module-margin-left = 1 55 | module-margin-right = 2 56 | 57 | font-0 = Roboto:style=Regular:size=10 58 | font-1 = RobotoMono Nerd Font:style=Regular:size=11 59 | 60 | modules-left = workspaces-xmonad 61 | modules-center = date battery light pulseaudio 62 | modules-right = root memory cpu temperature 63 | 64 | enable-ipc = true 65 | 66 | tray-offset-x = 0 67 | tray-offset-y = 0 68 | tray-detached = false 69 | tray-position = right 70 | 71 | override-redirect = true 72 | wm-restack = generic 73 | 74 | cursor-click = pointer 75 | cursor-scroll = ns-resize 76 | 77 | [bar/xmonadGameMode] 78 | 79 | inherit = bar/xmonad 80 | modules-left = workspaces-xmonadGameMode 81 | modules-center = date battery light pulseaudio 82 | modules-right = root home memory cpu temperature 83 | 84 | 85 | [bar/xmonadHIDPI] 86 | 87 | inhert = bar/xmonad 88 | background = ${colors.background} 89 | foreground = ${colors.foreground} 90 | height = 70 91 | bottom = true 92 | font-0 = Roboto:style=Regular:size=18 93 | font-1 = RobotoMono Nerd Font:style=Regular:size=22 94 | modules-left = workspaces-xmonad-hidpi 95 | modules-center = date battery light pulseaudio 96 | modules-right = root home memory cpu temperature 97 | line-size = 3 98 | line-color = #f00 99 | 100 | padding-left = 5 101 | padding-right = 2 102 | 103 | module-margin-left = 1 104 | module-margin-right = 2 105 | 106 | tray-offset-x = 0 107 | tray-offset-y = 0 108 | tray-detached = false 109 | tray-position = right 110 | 111 | ############################################################################### 112 | 113 | [module/workspaces-xmonadGameMode] 114 | type = custom/script 115 | exec = tail -F /tmp/xmonadGameMode 116 | tail = true 117 | format-background = ${colors.background} 118 | 119 | [module/workspaces-xmonad] 120 | type = custom/script 121 | exec = tail -F /tmp/xmonad 122 | tail = true 123 | format-background = ${colors.background} 124 | 125 | [module/workspaces-xmonad-hidpi] 126 | type = custom/script 127 | exec = tail -F /tmp/xmonadHIDPI 128 | tail = true 129 | format-background = ${colors.background} 130 | 131 | [module/light] 132 | type = custom/script 133 | exec = $SCRIPT_DIR/brightness 134 | format-background=${colors.light} 135 | format = %{A5:$SCRIPT_DIR/brightness DOWN:}%{A4:$SCRIPT_DIR/brightness UP:}