repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk

6b87f790adbb9fe61a20bc2721920d230e6e27e0

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (58)

broot/conf.hjson

Added
new file mode 100644
1 +###############################################################
2 +# This configuration file lets you
3 +# - define new commands
4 +# - change the shortcut or triggering keys of built-in verbs
5 +# - change the colors
6 +# - set default values for flags
7 +# - set special behaviors on specific paths
8 +# - and more...
9 +#
10 +# Configuration documentation is available at
11 +# https://dystroy.org/broot
13 +# This file's format is Hjson ( https://hjson.github.io/ ). Some
14 +# properties are commented out. To enable them, remove the `#`.
16 +###############################################################
18 +###############################################################
19 +# Default flags
20 +# You can set up flags you want broot to start with by
21 +# default, for example `default_flags="-ihp"` if you usually want
22 +# to see hidden and gitignored files and the permissions (then
23 +# if you don't want the hidden files at a specific launch,
24 +# you can launch broot with `br -H`).
25 +# A popular flag is the `g` one which displays git related info.
27 +# default_flags:
29 +###############################################################
30 +# Terminal's title
31 +# If you want the terminal's title to be updated when you change
32 +# directory, set a terminal_title pattern by uncommenting one of
33 +# the examples below and tuning it to your taste.
35 +# terminal_title: "[broot] {git-name}"
36 +# terminal_title: "{file} 🐄"
37 +# terminal_title: "-= {file-name} =-"
39 +###############################################################
40 +# Date/Time format
41 +# If you want to change the format for date/time, uncomment the
42 +# following line and change it according to
43 +# https://docs.rs/chrono/0.4.11/chrono/format/strftime/index.html
45 +# date_time_format: %Y/%m/%d %R
47 +###############################################################
48 +# uncomment to activate modal mode
50 +# (you really should read https://dystroy.org/broot/modal/
51 +# before as it may not suit everybody even among vim users)
53 +# You may start either in 'command' mode, or in 'input' mode
55 +# modal: true
56 +# initial_mode: command
58 +###############################################################
59 +# Whether to mark the selected line with a triangle
61 +show_selection_mark: true
63 +###############################################################
64 +# Column order
65 +# cols_order, if specified, must be a permutation of the following
66 +# array. You should keep the name column at the end as it has a
67 +# variable length.
69 +# cols_order: [
70 +# mark
71 +# git
72 +# size
73 +# permission
74 +# date
75 +# count
76 +# branch
77 +# name
78 +# ]
80 +###############################################################
81 +# True Colors
82 +# If this parameter isn't set, broot tries to automatically
83 +# determine whether true colors (24 bits) are available.
84 +# As this process is unreliable, you may uncomment this setting
85 +# and set it to false or true if you notice the colors in
86 +# previewed images are too off.
88 +true_colors: true
90 +###############################################################
91 +# Icons
92 +# If you want to display icons in broot, uncomment this line
93 +# (see https://dystroy.org/broot/icons for installation and
94 +# troubleshooting)
96 +# icon_theme: vscode
98 +###############################################################
99 +# Special paths
100 +# If some paths must be handled specially, uncomment (and change
101 +# this section as per the examples)
102 +# Setting "list":"never" on a dir prevents broot from looking at its
103 +# children when searching, unless the dir is the selected root.
104 +# Setting "sum":"never" on a dir prevents broot from looking at its
105 +# children when computing the total size and count of files.
106 +# Setting "show":"always" makes a file visible even if its name
107 +# starts with a dot.
108 +# Setting "list":"always" may be useful on a link to a directory
109 +# (they're otherwise not entered by broot unless selected)
111 +special_paths: {
112 + "/media" : {
113 + list: "never"
114 + sum: "never"
116 + "~/.config": { "show": "always" }
117 + "trav": {
118 + show: always
119 + list: "always",
120 + sum: "never"
122 + # "~/useless": { "show": "never" }
123 + # "~/my-link-I-want-to-explore": { "list": "always" }
126 +###############################################################
127 +# Quit on last cancel
128 +# You can usually cancel the last state change on escape.
129 +# If you want the escape key to quit broot when there's nothing
130 +# to cancel (for example when you just opened broot), uncomment
131 +# this parameter
133 +# quit_on_last_cancel: true
135 +###############################################################
136 +# Search modes
138 +# broot allows many search modes.
139 +# A search mode is defined by
140 +# - the way to search: 'fuzzy', 'exact', 'regex', or 'tokens'.
141 +# - where to search: file 'name', 'path', or file 'content'
142 +# A search pattern may for example be "fuzzy path" (default),
143 +# "regex content" or "exact path".
145 +# The search mode is selected from its prefix. For example, if
146 +# you type "abc", the default mode is "fuzzy path". If you type
147 +# "/abc", the mode is "regex path". If you type "rn/abc", the mode
148 +# is "regex name".
150 +# This mapping may be modified. You may want to dedicate the
151 +# empty prefix (the one which doesn't need a '/') to the
152 +# search mode you use most often. The example below makes it
153 +# easy to search on name rather than on the subpath.
155 +# More information on
156 +# https://dystroy.org/broot/input/#the-filtering-pattern
158 +# search_modes: {
159 +# <empty>: fuzzy name
160 +# /: regex name
161 +# }
163 +###############################################################
164 +# File Extension Colors
166 +# uncomment and modify the next section if you want to color
167 +# file name depending on their extension
169 +# ext_colors: {
170 +# png: rgb(255, 128, 75)
171 +# rs: yellow
172 +# }
174 +###############################################################
175 +# Max file size for content search
177 +# Bigger files are ignored when searching their content. You
178 +# can specify this size either in ISO units (eg 5GB) or in
179 +# the old binary units (eg 44Kib)
180 +content_search_max_file_size: 10MB
182 +###############################################################
183 +# Max Panels Count
185 +# Change this if you sometimes want to have more than 2 panels
186 +# open
187 +# max_panels_count: 2
189 +###############################################################
190 +# Update work dir
192 +# By default, broot process' work dir is kept in sync with the
193 +# current's panel root. If you want to keep it unchanged,
194 +# uncomment this setting
196 +# update_work_dir: false
198 +###############################################################
199 +# Kitty Keyboard extension
201 +# If you want to use advanced keyboard shortcuts in Kitty
202 +# compatible terminals (Kitty, Wezterm), set this to true.
204 +# This makes it possible to use shortcuts like 'space-n',
205 +# 'ctrl-alt-a-b', 'shift-space', etc.
207 +enable_kitty_keyboard: false
209 +###############################################################
210 +# lines around matching line in filtered preview
212 +# When searching the content of a file, you can have either
213 +# only the matching lines displayed, or some of the surrounding
214 +# ones too.
216 +lines_before_match_in_preview: 1
217 +lines_after_match_in_preview: 1
219 +###############################################################
220 +# transformations before preview
222 +# It's possible to define transformations to apply to some files
223 +# before calling one of the default preview renderers in broot.
224 +# Below are two examples that you may uncomment and adapt:
226 +preview_transformers: [
227 + // # Use mutool to render any PDF file as an image
228 + // # In this example we use placeholders for the input and output files
229 + // {
230 + // input_extensions: [ "pdf" ] // case doesn't matter
231 + // output_extension: png
232 + // mode: image
233 + // command: [ "mutool", "draw", "-w", "1000", "-o", "{output-path}", "{input-path}" ]
234 + // }
236 + // # Use LibreOffice to render Office files as images
237 + // # In this example, {output-dir} is used to specify where LibreOffice must write the result
238 + // {
239 + // input_extensions: [ "xls", "xlsx", "doc", "docx", "ppt", "pptx", "ods", "odt", "odp" ]
240 + // output_extension: png
241 + // mode: image
242 + // command: [
243 + // "libreoffice", "--headless",
244 + // "--convert-to", "png",
245 + // "--outdir", "{output-dir}",
246 + // "{input-path}"
247 + // ]
248 + // }
250 + // # Use jq to beautify JSON
251 + // # In this example, the command refers to neither the input nor the output,
252 + // # so broot pipes them to the stdin and stdout of the jq process
253 + // {
254 + // input_extensions: [ "json" ]
255 + // output_extension: json
256 + // mode: text
257 + // command: [ "jq" ]
258 + // }
261 +###############################################################
262 +# Imports
264 +# While it's possible to have all configuration in one file,
265 +# it's more convenient to split it in several ones.
266 +# Importing also allows to set a condition on the terminal's
267 +# color, which makes it possible to have a different skin
268 +# chosen when your terminal has a light background and when
269 +# it has a light one.
270 +imports: [
272 + # Verbs are better configured in verbs.hjson. But you
273 + # can also add another files for your personal verbs
274 + verbs.hjson
276 + # This file contains the skin to use when the terminal
277 + # is dark (or when this couldn't be determined)
279 + luma: [
280 + dark
281 + unknown
283 + # (un)comment to choose your preferred skin
284 + file: skins/dark-blue.hjson
285 + //file: skins/catppuccin-macchiato.hjson
286 + //file: skins/catppuccin-mocha.hjson
287 + //file: skins/dark-gruvbox.hjson
288 + //file: skins/dark-orange.hjson
289 + //file: skins/solarized-dark.hjson
292 + # This skin is imported when your terminal is light
294 + luma: light
295 + # (un)comment to choose your preferred skin
296 + //file: skins/solarized-light.hjson
297 + file: skins/white.hjson

broot/launcher/bash/br

Added
new file mode 120000
1 +/home/oli/.local/share/broot/launcher/bash/1

broot/launcher/installed-v4

Added
new file mode 100644
2 +This file tells broot the installation of the br function was done.
3 +If there's a problem and you want to install it again run
4 + broot -- install

broot/launcher/nushell/br

Added
new file mode 120000
1 +/home/oli/.local/share/broot/launcher/nushell/6

broot/skins/catppuccin-macchiato.hjson

Added
new file mode 100644
1 +###############################################################
2 +# A skin for a terminal with a dark background
3 +# This skin uses RGB values so won't work for some
4 +# terminals.
5 +#
6 +# Created by Majixed
7 +# Based on the catppuccin-mocha theme by A. Taha Baki <atahabaki@pm.me>
8 +#
9 +# Doc at https://dystroy.org/broot/skins/
10 +###############################################################
12 +skin: {
13 + input: rgb(202, 211, 245) none
14 + # fg:none bg:$surface2
15 + selected_line: none rgb(91, 96, 120)
16 + # fg:$text bg:none
17 + default: rgb(202, 211, 245) none
18 + # fg:$overlay0 bg:none
19 + tree: rgb(110, 115, 141) none
20 + # fg:$sapphire bg:none
21 + parent: rgb(125, 196, 228) none
22 + file: none none
24 +### PERMISSIONS
26 + perm__: rgb(184, 192, 224) none
27 + # $peach
28 + perm_r: rgb(245, 169, 127) none
29 + # $maroon
30 + perm_w: rgb(238, 153, 160) none
31 + # $green
32 + perm_x: rgb(166, 218, 149) none
33 + # $teal
34 + owner: rgb(139, 213, 202) none
35 + # $sky
36 + group: rgb(145, 215, 227) none
38 +### DATE
40 + # $subtext1
41 + dates: rgb(184, 192, 224) none
43 +### DIRECTORY
45 + # $lavender
46 + directory: rgb(183, 189, 248) none Bold
47 + # $green
48 + exe: rgb(166, 218, 149) none
49 + # $yellow
50 + link: rgb(238, 212, 159) none
51 + # $subtext0
52 + pruning: rgb(165, 173, 203) none Italic
54 +### PREVIEW
56 + # fg:$text bg:$mantle
57 + preview_title: rgb(202, 211, 245) rgb(30, 32, 48)
58 + # fg:$text bg:$mantle
59 + preview: rgb(202, 211, 245) rgb(30, 32, 48)
60 + # fg:$overlay0
61 + preview_line_number: rgb(110, 115, 141) none
62 + # fg:$overlay0
63 + preview_separator: rgb(110, 115, 141) none
65 +### MATCH
67 + char_match: rgb(238, 212, 159) rgb(73, 77, 100) Bold Italic
68 + content_match: rgb(238, 212, 159) rgb(73, 77, 100) Bold Italic
69 + preview_match: rgb(238, 212, 159) rgb(73, 77, 100) Bold Italic
71 + # children count
72 + # fg:$yellow bg:none
73 + count: rgb(238, 212, 159) none
74 + sparse: rgb(237, 135, 150) none
75 + content_extract: rgb(237, 135, 150) none Italic
77 +### GIT
79 + git_branch: rgb(245, 169, 127) none
80 + git_insertions: rgb(245, 169, 127) none
81 + git_deletions: rgb(245, 169, 127) none
82 + git_status_current: rgb(245, 169, 127) none
83 + git_status_modified: rgb(245, 169, 127) none
84 + git_status_new: rgb(245, 169, 127) none Bold
85 + git_status_ignored: rgb(245, 169, 127) none
86 + git_status_conflicted: rgb(245, 169, 127) none
87 + git_status_other: rgb(245, 169, 127) none
88 + staging_area_title: rgb(245, 169, 127) none
90 +### FLAG
92 + flag_label: rgb(237, 135, 150) none
93 + flag_value: rgb(237, 135, 150) none Bold
95 +### STATUS
97 + # fg:none #bg:$mantle
98 + status_normal: none rgb(30, 32, 48)
99 + # fg:$red bg:$mantle
100 + status_italic: rgb(237, 135, 150) rgb(30, 32, 48) Italic
101 + # fg:$maroon bg:$mantle
102 + status_bold: rgb(238, 153, 160) rgb(30, 32, 48) Bold
103 + # fg:$maroon bg:$mantle
104 + status_ellipsis: rgb(238, 153, 160) rgb(30, 32, 48) Bold
105 + # fg:$text bg:$red
106 + status_error: rgb(202, 211, 245) rgb(237, 135, 150)
107 + # fg:$maroon bg:$mantle
108 + status_job: rgb(238, 153, 160) rgb(40, 38, 37)
109 + # fg:$maroon bg:$mantle
110 + status_code: rgb(238, 153, 160) rgb(30, 32, 48) Italic
111 + # fg:$maroon bg:$mantle
112 + mode_command_mark: rgb(238, 153, 160) rgb(30, 32, 48) Bold
114 +### HELP
116 + # fg:$text
117 + help_paragraph: rgb(202, 211, 245) none
118 + # fg:$red
119 + help_headers: rgb(237, 135, 150) none Bold
120 + # fg:$peach
121 + help_bold: rgb(245, 169, 127) none Bold
122 + # fg:$yellow
123 + help_italic: rgb(238, 212, 159) none Italic
124 + # fg:green bg:$surface0
125 + help_code: rgb(166, 218, 149) rgb(54, 58, 79)
126 + # fg:$overlay0
127 + help_table_border: rgb(110, 115, 141) none
129 +### HEX
131 + # fg:$text
132 + hex_null: rgb(202, 211, 245) none
133 + # fg:$peach
134 + hex_ascii_graphic: rgb(245, 169, 127) none
135 + # fg:$green
136 + hex_ascii_whitespace: rgb(166, 218, 149) none
137 + # fg: teal
138 + hex_ascii_other: rgb(139, 213, 202) none
139 + # fg: red
140 + hex_non_ascii: rgb(237, 135, 150) none
142 + # fg:$text bg:$red
143 + file_error: rgb(243, 60, 44) none
145 +### PURPOSE
147 + purpose_normal: none none
148 + purpose_italic: rgb(169, 90, 127) none Italic
149 + purpose_bold: rgb(169, 90, 127) none Bold
150 + purpose_ellipsis: none none
152 +### SCROLLBAR
154 + # fg:$surface0
155 + scrollbar_track: rgb(54, 58, 79) none
156 + # fg:$surface1
157 + scrollbar_thumb: rgb(91, 96, 120) none
159 +### GOODTOBAD
161 + good_to_bad_0: rgb(166, 218, 149) none
162 + good_to_bad_1: rgb(139, 213, 202) none
163 + good_to_bad_2: rgb(145, 215, 227) none
164 + good_to_bad_3: rgb(125, 196, 228) none
165 + good_to_bad_4: rgb(138, 173, 244) none
166 + good_to_bad_5: rgb(183, 189, 248) none
167 + good_to_bad_6: rgb(198, 160, 246) none
168 + good_to_bad_7: rgb(245, 169, 127) none
169 + good_to_bad_8: rgb(238, 153, 160) none
170 + good_to_bad_9: rgb(237, 135, 150) none

broot/skins/catppuccin-mocha.hjson

Added
new file mode 100644
1 +###############################################################
2 +# A skin for a terminal with a dark background
3 +# This skin uses RGB values so won't work for some
4 +# terminals.
5 +#
6 +# Created by A. Taha Baki <atahabaki@pm.me>
7 +# Based on the built-in gruvbox theme.
8 +#
9 +# Doc at https://dystroy.org/broot/skins/
10 +###############################################################
12 +skin: {
13 + input: rgb(205, 214, 244) none
14 + # fg:none bg:$surface2
15 + selected_line: none rgb(88, 91, 112)
16 + # fg:$text bg:none
17 + default: rgb(205, 214, 244) none
18 + # fg:$overlay0 bg:none
19 + tree: rgb(108, 112, 134) none
20 + # fg:$sapphire bg:none
21 + parent: rgb(116, 199, 236) none
22 + file: none none
24 +### PERMISSIONS
26 + perm__: rgb(186, 194, 222) none
27 + # $peach
28 + perm_r: rgb(250, 179, 135) none
29 + # $maroon
30 + perm_w: rgb(235, 160, 172) none
31 + # $green
32 + perm_x: rgb(166, 227, 161) none
33 + # $teal
34 + owner: rgb(148, 226, 213) none
35 + # $sky
36 + group: rgb(137, 220, 235) none
38 +### DATE
40 + # $subtext1
41 + dates: rgb(186, 194, 222) none
43 +### DIRECTORY
45 + # $lavender
46 + directory: rgb(180, 190, 254) none Bold
47 + # $green
48 + exe: rgb(166, 227, 161) none
49 + # $yellow
50 + link: rgb(249, 226, 175) none
51 + # $subtext0
52 + pruning: rgb(166, 173, 200) none Italic
54 +### PREVIEW
56 + # fg:$text bg:$mantle
57 + preview_title: rgb(205, 214, 244) rgb(24, 24, 37)
58 + # fg:$text bg:$mantle
59 + preview: rgb(205, 214, 244) rgb(24, 24, 37)
60 + # fg:$overlay0
61 + preview_line_number: rgb(108, 112, 134) none
62 + # fg:$overlay0
63 + preview_separator: rgb(108, 112, 134) none
65 +### MATCH
67 + char_match: rgb(249, 226, 175) rgb(69, 71, 90) Bold Italic
68 + content_match: rgb(249, 226, 175) rgb(69, 71, 90) Bold Italic
69 + preview_match: rgb(249, 226, 175) rgb(69, 71, 90) Bold Italic
71 + # children count
72 + # fg:$yellow bg:none
73 + count: rgb(249, 226, 175) none
74 + sparse: rgb(243, 139, 168) none
75 + content_extract: rgb(243, 139, 168) none Italic
77 +### GIT
79 + git_branch: rgb(250, 179, 135) none
80 + git_insertions: rgb(250, 179, 135) none
81 + git_deletions: rgb(250, 179, 135) none
82 + git_status_current: rgb(250, 179, 135) none
83 + git_status_modified: rgb(250, 179, 135) none
84 + git_status_new: rgb(250, 179, 135) none Bold
85 + git_status_ignored: rgb(250, 179, 135) none
86 + git_status_conflicted: rgb(250, 179, 135) none
87 + git_status_other: rgb(250, 179, 135) none
88 + staging_area_title: rgb(250, 179, 135) none
90 +### FLAG
92 + flag_label: rgb(243, 139, 168) none
93 + flag_value: rgb(243, 139, 168) none Bold
95 +### STATUS
97 + # fg:none #bg:$mantle
98 + status_normal: none rgb(24, 24, 37)
99 + # fg:$red bg:$mantle
100 + status_italic: rgb(243, 139, 168) rgb(24, 24, 37) Italic
101 + # fg:$maroon bg:$mantle
102 + status_bold: rgb(235, 160, 172) rgb(24, 24, 37) Bold
103 + # fg:$maroon bg:$mantle
104 + status_ellipsis: rgb(235, 160, 172) rgb(24, 24, 37) Bold
105 + # fg:$text bg:$red
106 + status_error: rgb(205, 214, 244) rgb(243, 139, 168)
107 + # fg:$maroon bg:$mantle
108 + status_job: rgb(235, 160, 172) rgb(40, 38, 37)
109 + # fg:$maroon bg:$mantle
110 + status_code: rgb(235, 160, 172) rgb(24, 24, 37) Italic
111 + # fg:$maroon bg:$mantle
112 + mode_command_mark: rgb(235, 160, 172) rgb(24, 24, 37) Bold
114 +### HELP
116 + # fg:$text
117 + help_paragraph: rgb(205, 214, 244) none
118 + # fg:$red
119 + help_headers: rgb(243, 139, 168) none Bold
120 + # fg:$peach
121 + help_bold: rgb(250, 179, 135) none Bold
122 + # fg:$yellow
123 + help_italic: rgb(249, 226, 175) none Italic
124 + # fg:green bg:$surface0
125 + help_code: rgb(166, 227, 161) rgb(49, 50, 68)
126 + # fg:$overlay0
127 + help_table_border: rgb(108, 112, 134) none
129 +### HEX
131 + # fg:$text
132 + hex_null: rgb(205, 214, 244) none
133 + # fg:$peach
134 + hex_ascii_graphic: rgb(250, 179, 135) none
135 + # fg:$green
136 + hex_ascii_whitespace: rgb(166, 227, 161) none
137 + # fg: teal
138 + hex_ascii_other: rgb(148, 226, 213) none
139 + # fg: red
140 + hex_non_ascii: rgb(243, 139, 168) none
142 + # fg:$text bg:$red
143 + file_error: rgb(251, 73, 52) none
145 +### PURPOSE
147 + purpose_normal: none none
148 + purpose_italic: rgb(177, 98, 134) none Italic
149 + purpose_bold: rgb(177, 98, 134) none Bold
150 + purpose_ellipsis: none none
152 +### SCROLLBAR
154 + # fg:$surface0
155 + scrollbar_track: rgb(49, 50, 68) none
156 + # fg:$surface1
157 + scrollbar_thumb: rgb(88, 91, 112) none
159 +### GOODTOBAD
161 + good_to_bad_0: rgb(166, 227, 161) none
162 + good_to_bad_1: rgb(148, 226, 213) none
163 + good_to_bad_2: rgb(137, 220, 235) none
164 + good_to_bad_3: rgb(116, 199, 236) none
165 + good_to_bad_4: rgb(137, 180, 250) none
166 + good_to_bad_5: rgb(180, 190, 254) none
167 + good_to_bad_6: rgb(203, 166, 247) none
168 + good_to_bad_7: rgb(250, 179, 135) none
169 + good_to_bad_8: rgb(235, 160, 172) none
170 + good_to_bad_9: rgb(243, 139, 168) none

broot/skins/dark-blue.hjson

Added
new file mode 100644
1 +###############################################################
2 +# A skin for a terminal with a dark background
3 +#
4 +# To create your own skin, copy this file, change the entries
5 +# and import your skin file from the main conf file (look
6 +# for "imports")
7 +#
8 +# Doc at https://dystroy.org/broot/skins/
9 +###############################################################
11 +###############################################################
12 +# Skin
13 +# If you want to change the colors of broot,
14 +# uncomment the following block and start messing
15 +# with the various values.
16 +# A skin entry value is made of two parts separated with a '/':
17 +# The first one is the skin for the active panel.
18 +# The second one, optional, is the skin for non active panels.
19 +# You may find explanations and other skins on
20 +# https://dystroy.org/broot/skins
21 +###############################################################
22 +skin: {
23 + default: gray(22) none / gray(20) none
24 + tree: gray(8) None / gray(4) None
25 + parent: gray(18) None / gray(13) None
26 + file: gray(22) None / gray(15) None
27 + directory: ansi(110) None bold / ansi(110) None
28 + exe: Cyan None
29 + link: Magenta None
30 + pruning: gray(12) None Italic
31 + perm__: gray(5) None
32 + perm_r: ansi(94) None
33 + perm_w: ansi(132) None
34 + perm_x: ansi(65) None
35 + owner: ansi(138) None
36 + group: ansi(131) None
37 + count: ansi(138) gray(4)
38 + dates: ansi(66) None
39 + sparse: ansi(214) None
40 + content_extract: ansi(29) None
41 + content_match: ansi(34) None
42 + device_id_major: ansi(138) None
43 + device_id_sep: ansi(102) None
44 + device_id_minor: ansi(138) None
45 + git_branch: ansi(178) None
46 + git_insertions: ansi(28) None
47 + git_deletions: ansi(160) None
48 + git_status_current: gray(5) None
49 + git_status_modified: ansi(28) None
50 + git_status_new: ansi(94) None bold
51 + git_status_ignored: gray(17) None
52 + git_status_conflicted: ansi(88) None
53 + git_status_other: ansi(88) None
54 + selected_line: None gray(6) / None gray(4)
55 + char_match: Green None
56 + file_error: Red None
57 + flag_label: gray(15) gray(2)
58 + flag_value: ansi(178) gray(2) bold
59 + input: White gray(2) / gray(15) None
60 + status_error: gray(22) ansi(124)
61 + status_job: ansi(220) gray(5)
62 + status_normal: gray(20) gray(4) / gray(2) gray(2)
63 + status_italic: ansi(178) gray(4) / gray(2) gray(2)
64 + status_bold: ansi(178) gray(4) bold / gray(2) gray(2)
65 + status_code: ansi(229) gray(4) / gray(2) gray(2)
66 + status_ellipsis: gray(19) gray(1) / gray(2) gray(2)
67 + purpose_normal: gray(20) gray(2)
68 + purpose_italic: ansi(178) gray(2)
69 + purpose_bold: ansi(178) gray(2) bold
70 + purpose_ellipsis: gray(20) gray(2)
71 + scrollbar_track: gray(7) None / gray(4) None
72 + scrollbar_thumb: gray(22) None / gray(14) None
73 + help_paragraph: gray(20) None
74 + help_bold: ansi(178) None bold
75 + help_italic: ansi(229) None
76 + help_code: gray(21) gray(3)
77 + help_headers: ansi(178) None
78 + help_table_border: ansi(239) None
79 + preview: gray(20) gray(1) / gray(18) gray(2)
80 + preview_title: gray(23) gray(2) / gray(21) gray(2)
81 + preview_line_number: gray(12) gray(3)
82 + preview_separator: gray(5) None
83 + preview_match: None ansi(29)
84 + hex_null: gray(8) None
85 + hex_ascii_graphic: gray(18) None
86 + hex_ascii_whitespace: ansi(143) None
87 + hex_ascii_other: ansi(215) None
88 + hex_non_ascii: ansi(167) None
89 + staging_area_title: gray(22) gray(2) / gray(20) gray(3)
90 + mode_command_mark: gray(5) ansi(204) bold
91 + good_to_bad_0: ansi(28)
92 + good_to_bad_1: ansi(29)
93 + good_to_bad_2: ansi(29)
94 + good_to_bad_3: ansi(29)
95 + good_to_bad_4: ansi(29)
96 + good_to_bad_5: ansi(100)
97 + good_to_bad_6: ansi(136)
98 + good_to_bad_7: ansi(172)
99 + good_to_bad_8: ansi(166)
100 + good_to_bad_9: ansi(196)
103 +###############################################################
104 +# Syntax Theme
106 +# If you want to choose the theme used for preview, uncomment
107 +# one of the following lines:
109 +# syntax_theme: GitHub
110 +# syntax_theme: SolarizedDark
111 +# syntax_theme: SolarizedLight
112 +syntax_theme: MochaDark
113 +# syntax_theme: MochaDark
114 +# syntax_theme: OceanDark
115 +# syntax_theme: OceanLight

broot/skins/dark-gruvbox.hjson

Added
new file mode 100644
1 +###############################################################
2 +# A skin for a terminal with a dark background
3 +# This skin uses RGB values so won't work for some
4 +# terminals.
5 +#
6 +#
7 +# (initially contributed by @basbebe)
8 +#
9 +# Doc at https://dystroy.org/broot/skins/
10 +###############################################################
12 +skin: {
13 + default: rgb(235, 219, 178) none / rgb(189, 174, 147) none
14 + tree: rgb(70, 70, 80) None / rgb(60, 60, 60) None
15 + parent: rgb(235, 219, 178) none / rgb(189, 174, 147) none Italic
16 + file: None None / None None Italic
17 + directory: rgb(131, 165, 152) None Bold / rgb(131, 165, 152) None
18 + exe: rgb(184, 187, 38) None
19 + link: rgb(104, 157, 106) None
20 + pruning: rgb(124, 111, 100) None Italic
21 + perm__: None None
22 + perm_r: rgb(215, 153, 33) None
23 + perm_w: rgb(204, 36, 29) None
24 + perm_x: rgb(152, 151, 26) None
25 + owner: rgb(215, 153, 33) None Bold
26 + group: rgb(215, 153, 33) None
27 + count: rgb(69, 133, 136) rgb(50, 48, 47)
28 + dates: rgb(168, 153, 132) None
29 + sparse: rgb(250, 189,47) None
30 + content_extract: ansi(29) None Italic
31 + content_match: ansi(34) None Bold
32 + git_branch: rgb(251, 241, 199) None
33 + git_insertions: rgb(152, 151, 26) None
34 + git_deletions: rgb(190, 15, 23) None
35 + git_status_current: rgb(60, 56, 54) None
36 + git_status_modified: rgb(152, 151, 26) None
37 + git_status_new: rgb(104, 187, 38) None Bold
38 + git_status_ignored: rgb(213, 196, 161) None
39 + git_status_conflicted: rgb(204, 36, 29) None
40 + git_status_other: rgb(204, 36, 29) None
41 + selected_line: None rgb(60, 56, 54) / None rgb(50, 48, 47)
42 + char_match: rgb(250, 189, 47) None
43 + file_error: rgb(251, 73, 52) None
44 + flag_label: rgb(189, 174, 147) None
45 + flag_value: rgb(211, 134, 155) None Bold
46 + input: rgb(251, 241, 199) None / rgb(189, 174, 147) None Italic
47 + status_error: rgb(213, 196, 161) rgb(204, 36, 29)
48 + status_job: rgb(250, 189, 47) rgb(60, 56, 54)
49 + status_normal: None rgb(40, 38, 37) / None None
50 + status_italic: rgb(211, 134, 155) rgb(40, 38, 37) Italic / None None
51 + status_bold: rgb(211, 134, 155) rgb(40, 38, 37) Bold / None None
52 + status_code: rgb(251, 241, 199) rgb(40, 38, 37) / None None
53 + status_ellipsis: rgb(251, 241, 199) rgb(40, 38, 37) Bold / None None
54 + purpose_normal: None None
55 + purpose_italic: rgb(177, 98, 134) None Italic
56 + purpose_bold: rgb(177, 98, 134) None Bold
57 + purpose_ellipsis: None None
58 + scrollbar_track: rgb(80, 73, 69) None / rgb(50, 48, 47) None
59 + scrollbar_thumb: rgb(213, 196, 161) None / rgb(102, 92, 84) None
60 + help_paragraph: None None
61 + help_bold: rgb(214, 93, 14) None Bold
62 + help_italic: rgb(211, 134, 155) None Italic
63 + help_code: rgb(142, 192, 124) rgb(50, 48, 47)
64 + help_headers: rgb(254, 128, 25) None Bold
65 + help_table_border: rgb(80, 73, 69) None
66 + preview_title: rgb(235, 219, 178) rgb(40, 40, 40) / rgb(189, 174, 147) rgb(40, 40, 40)
67 + preview: rgb(235, 219, 178) rgb(40, 40, 40) / rgb(235, 219, 178) rgb(40, 40, 40)
68 + preview_line_number: rgb(124, 111, 100) None / rgb(124, 111, 100) rgb(40, 40, 40)
69 + preview_separator: rgb(70, 70, 80) None / rgb(60, 60, 60) None
70 + preview_match: None ansi(29) Bold
71 + hex_null: rgb(189, 174, 147) None
72 + hex_ascii_graphic: rgb(213, 196, 161) None
73 + hex_ascii_whitespace: rgb(152, 151, 26) None
74 + hex_ascii_other: rgb(254, 128, 25) None
75 + hex_non_ascii: rgb(214, 93, 14) None
76 + staging_area_title: rgb(235, 219, 178) rgb(40, 40, 40) / rgb(189, 174, 147) rgb(40, 40, 40)
77 + mode_command_mark: gray(5) ansi(204) Bold
78 + good_to_bad_0: ansi(28)
79 + good_to_bad_1: ansi(29)
80 + good_to_bad_2: ansi(29)
81 + good_to_bad_3: ansi(29)
82 + good_to_bad_4: ansi(29)
83 + good_to_bad_5: ansi(100)
84 + good_to_bad_6: ansi(136)
85 + good_to_bad_7: ansi(172)
86 + good_to_bad_8: ansi(166)
87 + good_to_bad_9: ansi(196)

broot/skins/dark-orange.hjson

Added
new file mode 100644
1 +###############################################################
2 +# A skin for a terminal with a dark background
3 +#
4 +# To create your own skin, copy this file, change the entries
5 +# and import your skin file from the main conf file (look
6 +# for "imports")
7 +#
8 +# Doc at https://dystroy.org/broot/skins/
9 +###############################################################
11 +###############################################################
12 +# Skin
13 +# If you want to change the colors of broot,
14 +# uncomment the following bloc and start messing
15 +# with the various values.
16 +# A skin entry value is made of two parts separated with a '/':
17 +# The first one is the skin for the active panel.
18 +# The second one, optional, is the skin for non active panels.
19 +# You may find explanations and other skins on
20 +# https://dystroy.org/broot/skins
21 +###############################################################
22 +skin: {
23 + default: none none / gray(20) none
24 + tree: ansi(94) None / gray(3) None
25 + parent: gray(18) None / gray(13) None
26 + file: gray(20) None / gray(15) None
27 + directory: ansi(208) None Bold / ansi(172) None bold
28 + exe: Cyan None
29 + link: Magenta None
30 + pruning: gray(12) None Italic
31 + perm__: gray(5) None
32 + perm_r: ansi(94) None
33 + perm_w: ansi(132) None
34 + perm_x: ansi(65) None
35 + owner: ansi(138) None
36 + group: ansi(131) None
37 + count: ansi(136) gray(3)
38 + dates: ansi(66) None
39 + sparse: ansi(214) None
40 + content_extract: ansi(29) None
41 + content_match: ansi(34) None
42 + git_branch: ansi(229) None
43 + git_insertions: ansi(28) None
44 + git_deletions: ansi(160) None
45 + git_status_current: gray(5) None
46 + git_status_modified: ansi(28) None
47 + git_status_new: ansi(94) None Bold
48 + git_status_ignored: gray(17) None
49 + git_status_conflicted: ansi(88) None
50 + git_status_other: ansi(88) None
51 + selected_line: None gray(5) / None gray(4)
52 + char_match: Yellow None
53 + file_error: Red None
54 + flag_label: gray(15) None
55 + flag_value: ansi(208) None Bold
56 + input: White None / gray(15) gray(2)
57 + status_error: gray(22) ansi(124)
58 + status_job: ansi(220) gray(5)
59 + status_normal: gray(20) gray(3) / gray(2) gray(2)
60 + status_italic: ansi(208) gray(3) / gray(2) gray(2)
61 + status_bold: ansi(208) gray(3) Bold / gray(2) gray(2)
62 + status_code: ansi(229) gray(3) / gray(2) gray(2)
63 + status_ellipsis: gray(19) gray(1) / gray(2) gray(2)
64 + purpose_normal: gray(20) gray(2)
65 + purpose_italic: ansi(178) gray(2)
66 + purpose_bold: ansi(178) gray(2) Bold
67 + purpose_ellipsis: gray(20) gray(2)
68 + scrollbar_track: gray(7) None / gray(4) None
69 + scrollbar_thumb: gray(22) None / gray(14) None
70 + help_paragraph: gray(20) None
71 + help_bold: ansi(208) None Bold
72 + help_italic: ansi(166) None
73 + help_code: gray(21) gray(3)
74 + help_headers: ansi(208) None
75 + help_table_border: ansi(239) None
76 + preview: gray(20) gray(1) / gray(18) gray(2)
77 + preview_line_number: gray(12) gray(3)
78 + preview_separator: ansi(94) None / gray(3) None
79 + preview_match: None ansi(29)
80 + hex_null: gray(11) None
81 + hex_ascii_graphic: gray(18) None
82 + hex_ascii_whitespace: ansi(143) None
83 + hex_ascii_other: ansi(215) None
84 + hex_non_ascii: ansi(167) None
85 + good_to_bad_0: ansi(28)
86 + good_to_bad_1: ansi(29)
87 + good_to_bad_2: ansi(29)
88 + good_to_bad_3: ansi(29)
89 + good_to_bad_4: ansi(29)
90 + good_to_bad_5: ansi(100)
91 + good_to_bad_6: ansi(136)
92 + good_to_bad_7: ansi(172)
93 + good_to_bad_8: ansi(166)
94 + good_to_bad_9: ansi(196)
98 +###############################################################
99 +# Syntax Theme
101 +# If you want to choose the theme used for preview, uncomment
102 +# one of the following lines:
104 +# syntax_theme: GitHub
105 +# syntax_theme: SolarizedDark
106 +# syntax_theme: SolarizedLight
107 +syntax_theme: SolarizedDark
108 +# syntax_theme: MochaDark
109 +# syntax_theme: OceanDark
110 +# syntax_theme: OceanLight

broot/skins/native-16.hjson

Added
new file mode 100644
1 +###############################################################
2 +# 16 ANSI color theme. Colors in this theme are restricted from
3 +# ANSI color 0 - 15. This will allow the theme to adapt to your
4 +# terminal emulator's theme. Note that, for now, the preview
5 +# mode does not yet support this theme because of syntect not
6 +# having a 16 ansi color theme.
7 +#
8 +# More info at https://jeffkreeftmeijer.com/vim-16-color/
9 +# Doc at https://dystroy.org/broot/skins/
10 +###############################################################
12 +skin: {
13 + directory: ansi(12)
14 + file: ansi(7)
15 + pruning: ansi(8) none italic
16 + selected_line: none ansi(0)
17 + tree: ansi(8)
19 + # Search
20 + char_match: ansi(3) none underlined
21 + parent: ansi(4) none bold
23 + # File properties
24 + exe: ansi(2)
25 + link: ansi(13)
26 + sparse: ansi(12)
28 + # Prompt
29 + input: ansi(6)
31 + # Status bar
32 + status_bold: ansi(7) ansi(8) bold
33 + status_code: ansi(10) ansi(8)
34 + status_ellipsis: ansi(7) ansi(8)
35 + status_error: ansi(7) ansi(8)
36 + status_italic: ansi(7) ansi(8) italic
37 + status_job: ansi(7) ansi(8)
38 + status_normal: ansi(7) ansi(8)
40 + # Flag status
41 + flag_label: ansi(6)
42 + flag_value: ansi(14) none bold
44 + # Background
45 + default: none none
47 + # Scrollbar
48 + scrollbar_track: ansi(0)
49 + scrollbar_thumb: ansi(3)
51 + # Git
52 + git_branch: ansi(13)
53 + git_deletions: ansi(1)
54 + git_insertions: ansi(2)
55 + git_status_conflicted: ansi(1)
56 + git_status_current: ansi(6)
57 + git_status_ignored: ansi(8)
58 + git_status_modified: ansi(3)
59 + git_status_new: ansi(2) none bold
60 + git_status_other: ansi(5)
62 + # Staging area
63 + staging_area_title: ansi(3)
65 + # Documentation
66 + help_bold: ansi(7) none bold
67 + help_code: ansi(4)
68 + help_headers: ansi(3)
69 + help_italic: ansi(7) none italic
70 + help_paragraph: ansi(7)
71 + help_table_border: ansi(8)
73 + # Device column
74 + device_id_major: ansi(5)
75 + device_id_minor: ansi(5)
76 + device_id_sep: ansi(5)
78 + # Counts column
79 + count: ansi(13)
81 + # Dates column
82 + dates: ansi(6)
84 + # Permissions column
85 + group: ansi(3)
86 + owner: ansi(3)
87 + perm__: ansi(8)
88 + perm_r: ansi(3)
89 + perm_w: ansi(1)
90 + perm_x: ansi(2)
92 + # Hex preview
93 + hex_null: ansi(8)
94 + hex_ascii_graphic: ansi(2)
95 + hex_ascii_whitespace: ansi(3)
96 + hex_ascii_other: ansi(4)
97 + hex_non_ascii: ansi(5)
99 + # Preview
100 + # preview: none
101 + # preview_line_number: none
102 + # preview_match: none
103 + # preview_title: none
105 + # Used for displaying errors
106 + file_error: ansi(1)
108 + # Content searches
109 + content_extract: ansi(7)
110 + content_match: ansi(3) none underlined
112 + # Used in status line
113 + purpose_bold: ansi(0) ansi(7) bold
114 + purpose_ellipsis: ansi(0)
115 + purpose_italic: ansi(0) ansi(7) italic
116 + purpose_normal: ansi(0)
118 + # Modal indicator
119 + mode_command_mark: ansi(7) ansi(4)
121 + # File system occupation
122 + good_to_bad_0: ansi(2)
123 + good_to_bad_1: ansi(2)
124 + good_to_bad_2: ansi(2)
125 + good_to_bad_3: ansi(2)
126 + good_to_bad_4: ansi(2)
127 + good_to_bad_5: ansi(1)
128 + good_to_bad_6: ansi(1)
129 + good_to_bad_7: ansi(1)
130 + good_to_bad_8: ansi(1)
131 + good_to_bad_9: ansi(1)

broot/skins/solarized-dark.hjson

Added
new file mode 100644
1 +// contributed by [@danieltrautmann](https://github.com/danieltrautmann)
2 +//
3 +//
4 +// The Solarized Dark skin uses RGB values, so it might not work well with some
5 +// terminals
6 +//
7 +// Doc at https://dystroy.org/broot/skins/
9 +skin: {
10 + default: "rgb(131, 148, 150) rgb(0, 43, 54) / rgb(131, 148, 150) rgb(7, 54, 66)" // base0 base03 / base01 base02
11 + tree: "rgb(88, 110, 117) none" // base01 default
12 + file: "none none" // default default
13 + directory: "rgb(38, 139, 210) none bold" // blue default bold
14 + exe: "rgb(211, 1, 2) none" // red default
15 + link: "rgb(211, 54, 130) none" // magenta default
16 + pruning: "rgb(88, 110, 117) none italic" // base01 default italic
17 + perm__: "rgb(88, 110, 117) none" // base01 default
18 + perm_r: "none none" // default default
19 + perm_w: "none none" // default default
20 + perm_x: "none none" // default default
21 + owner: "rgb(88, 110, 117) none" // base01 default
22 + group: "rgb(88, 110, 117) none" // base01 default
23 + sparse: "none none" // default default
24 + git_branch: "rgb(147, 161, 161) none" // base1 default
25 + git_insertions: "rgb(133, 153, 0) none" // green default
26 + git_deletions: "rgb(211, 1, 2) none" // red default
27 + git_status_current: "none none" // default default
28 + git_status_modified: "rgb(181, 137, 0) none" // yellow default
29 + git_status_new: "rgb(133, 153, 0) none" // green default
30 + git_status_ignored: "rgb(88, 110, 117) none" // base01 default
31 + git_status_conflicted: "rgb(211, 1, 2) none" // red default
32 + git_status_other: "rgb(211, 1, 2) none" // red default
33 + selected_line: "none rgb(7, 54, 66)" // default base02
34 + char_match: "rgb(133, 153, 0) none underlined" // green default underlined
35 + file_error: "rgb(203, 75, 22) none italic" // orange default italic
36 + flag_label: "none none" // default default
37 + flag_value: "rgb(181, 137, 0) none bold" // yellow default bold
38 + input: "none none" // default default
39 + status_error: "rgb(203, 75, 22) rgb(7, 54, 66)" // orange base02
40 + status_job: "rgb(108, 113, 196) rgb(7, 54, 66) bold" // violet base02 bold
41 + status_normal: "none rgb(7, 54, 66)" // default base02
42 + status_italic: "rgb(181, 137, 0) rgb(7, 54, 66)" // yellow base02
43 + status_bold: "rgb(147, 161, 161) rgb(7, 54, 66) bold" // base1 base02 bold
44 + status_code: "rgb(108, 113, 196) rgb(7, 54, 66)" // violet base02
45 + status_ellipsis: "none rgb(7, 54, 66)" // default base02
46 + scrollbar_track: "rgb(7, 54, 66) none" // base02 default
47 + scrollbar_thumb: "none none" // default default
48 + help_paragraph: "none none" // default default
49 + help_bold: "rgb(147, 161, 161) none bold" // base1 default bold
50 + help_italic: "rgb(147, 161, 161) none italic" // base1 default italic
51 + help_code: "rgb(147, 161, 161) rgb(7, 54, 66)" // base1 base02
52 + help_headers: "rgb(181, 137, 0) none" // yellow default
53 + help_table_border: "none none" // default default
54 + preview_title: "gray(20) rgb(0, 43, 54)"
55 + staging_area_title: "gray(22) rgb(0, 43, 54)"
56 + good_to_bad_0: "ansi(28)" // green
57 + good_to_bad_1: "ansi(29)"
58 + good_to_bad_2: "ansi(29)"
59 + good_to_bad_3: "ansi(29)"
60 + good_to_bad_4: "ansi(29)"
61 + good_to_bad_5: "ansi(100)"
62 + good_to_bad_6: "ansi(136)"
63 + good_to_bad_7: "ansi(172)"
64 + good_to_bad_8: "ansi(166)"
65 + good_to_bad_9: "ansi(196)" // red

broot/skins/solarized-light.hjson

Added
new file mode 100644
1 +// contributed by [@danieltrautmann](https://github.com/danieltrautmann)
2 +//
3 +//
4 +// The Solarized Light skin uses RGB values, so it might not work well with some
5 +// terminals
6 +//
7 +// If you prefer to keep the background the same as your terminal background, change
8 +// the "default" entry to
9 +// default: "none none / rgb(147, 161, 161) none"
10 +//
11 +// Doc at https://dystroy.org/broot/skins/
13 +skin: {
14 + // base00 default / base1 base2
15 + default: "rgb(101, 123, 131) none / rgb(147, 161, 161) none"
16 + // base1 default
17 + tree: "rgb(147, 161, 161) none"
18 + // default default
19 + file: "none none"
20 + // blue default bold
21 + directory: "rgb(38, 139, 210) none bold"
22 + // red default
23 + exe: "rgb(211, 1, 2) none"
24 + // magenta default
25 + link: "rgb(211, 54, 130) none"
26 + // base1 default italic
27 + pruning: "rgb(147, 161, 161) none italic"
28 + // base1 default
29 + perm__: "rgb(147, 161, 161) none"
30 + // default default
31 + perm_r: "none none"
32 + // default default
33 + perm_w: "none none"
34 + // default default
35 + perm_x: "none none"
36 + // base1 default
37 + owner: "rgb(147, 161, 161) none"
38 + // base1 default
39 + group: "rgb(147, 161, 161) none"
40 + // default default
41 + sparse: "none none"
42 + // base01 default
43 + git_branch: "rgb(88, 110, 117) none"
44 + // green default
45 + git_insertions: "rgb(133, 153, 0) none"
46 + // red default
47 + git_deletions: "rgb(211, 1, 2) none"
48 + // default default
49 + git_status_current: "none none"
50 + // yellow default
51 + git_status_modified: "rgb(181, 137, 0) none"
52 + // green default
53 + git_status_new: "rgb(133, 153, 0) none"
54 + // base1 default
55 + git_status_ignored: "rgb(147, 161, 161) none"
56 + // red default
57 + git_status_conflicted: "rgb(211, 1, 2) none"
58 + // red default
59 + git_status_other: "rgb(211, 1, 2) none"
60 + // default base2
61 + selected_line: "none rgb(238, 232, 213)"
62 + // green default underlined
63 + char_match: "rgb(133, 153, 0) none underlined"
64 + // orange default italic
65 + file_error: "rgb(203, 75, 22) none italic"
66 + // default default
67 + flag_label: "none none"
68 + // yellow default bold
69 + flag_value: "rgb(181, 137, 0) none bold"
70 + // default default
71 + input: "none none"
72 + // orange base2
73 + status_error: "rgb(203, 75, 22) rgb(238, 232, 213)"
74 + // violet base2 bold
75 + status_job: "rgb(108, 113, 196) rgb(238, 232, 213) bold"
76 + // default base2
77 + status_normal: "none rgb(238, 232, 213)"
78 + // yellow base2
79 + status_italic: "rgb(181, 137, 0) rgb(238, 232, 213)"
80 + // base01 base2 bold
81 + status_bold: "rgb(88, 110, 117) rgb(238, 232, 213) bold"
82 + // violet base2
83 + status_code: "rgb(108, 113, 196) rgb(238, 232, 213)"
84 + // default base2
85 + status_ellipsis: "none rgb(238, 232, 213)"
86 + // base2 default
87 + scrollbar_track: "rgb(238, 232, 213) none"
88 + // default default
89 + scrollbar_thumb: "none none"
90 + // default default
91 + help_paragraph: "none none"
92 + // base01 default bold
93 + help_bold: "rgb(88, 110, 117) none bold"
94 + // base01 default italic
95 + help_italic: "rgb(88, 110, 117) none italic"
96 + // base01 base2
97 + help_code: "rgb(88, 110, 117) rgb(238, 232, 213)"
98 + // yellow default
99 + help_headers: "rgb(181, 137, 0) none"
100 + // default default
101 + help_table_border: "none none"
102 + preview_title: "rgb(147, 161, 161) rgb(238, 232, 213)"
103 + preview: "rgb(101, 123, 131) rgb(253, 246, 227) / rgb(147, 161, 161) rgb(238, 232, 213)"
104 + preview_line_number: "rgb(147, 161, 161) rgb(238, 232, 213)"
105 + preview_separator: "rgb(147, 161, 161) rgb(238, 232, 213)"
106 + preview_match: "None ansi(29)"
107 + staging_area_title: "gray(22) rgb(253, 246, 227)"
108 + good_to_bad_0: ansi(28)
109 + good_to_bad_1: ansi(29)
110 + good_to_bad_2: ansi(29)
111 + good_to_bad_3: ansi(29)
112 + good_to_bad_4: ansi(29)
113 + good_to_bad_5: ansi(100)
114 + good_to_bad_6: ansi(136)
115 + good_to_bad_7: ansi(172)
116 + good_to_bad_8: ansi(166)
117 + good_to_bad_9: ansi(196)

broot/skins/white.hjson

Added
new file mode 100644
1 +###############################################################
2 +# A skin for a terminal with a white background
3 +#
4 +# To create your own skin, copy this file, change the entries
5 +# and import your skin file from the main conf file (look
6 +# for "imports")
7 +#
8 +# Doc at https://dystroy.org/broot/skins/
9 +###############################################################
10 +syntax_theme: base16-ocean.light
12 +skin: {
13 + default: gray(1) None
14 + tree: gray(7) None / gray(18) None
15 + file: gray(3) None / gray(8) None
16 + directory: ansi(25) None Bold / ansi(25) None
17 + exe: ansi(130) None
18 + link: Magenta None
19 + pruning: gray(12) None Italic
20 + perm__: gray(5) None
21 + perm_r: ansi(94) None
22 + perm_w: ansi(132) None
23 + perm_x: ansi(65) None
24 + owner: ansi(138) None
25 + group: ansi(131) None
26 + dates: ansi(66) None
27 + sparse: ansi(214) None
28 + git_branch: ansi(229) None
29 + git_insertions: ansi(28) None
30 + git_deletions: ansi(160) None
31 + git_status_current: gray(5) None
32 + git_status_modified: ansi(28) None
33 + git_status_new: ansi(94) None Bold
34 + git_status_ignored: gray(17) None
35 + git_status_conflicted: ansi(88) None
36 + git_status_other: ansi(88) None
37 + selected_line: None gray(19) / None gray(21)
38 + char_match: ansi(22) None
39 + file_error: Red None
40 + flag_label: gray(9) None
41 + flag_value: ansi(166) None Bold
42 + input: gray(1) None / gray(4) gray(20)
43 + status_error: gray(22) ansi(124)
44 + status_normal: gray(2) gray(20)
45 + status_job: ansi(220) gray(5)
46 + status_italic: ansi(166) gray(20)
47 + status_bold: ansi(166) gray(20)
48 + status_code: ansi(17) gray(20)
49 + status_ellipsis: gray(19) gray(15)
50 + purpose_normal: gray(20) gray(2)
51 + purpose_italic: ansi(178) gray(2)
52 + purpose_bold: ansi(178) gray(2) Bold
53 + purpose_ellipsis: gray(20) gray(2)
54 + scrollbar_track: gray(20) none
55 + scrollbar_thumb: ansi(238) none
56 + help_paragraph: gray(2) none
57 + help_bold: ansi(202) none bold
58 + help_italic: ansi(202) none italic
59 + help_code: gray(5) gray(22)
60 + help_headers: ansi(202) none
61 + help_table_border: ansi(239) None
62 + preview_title: gray(3) None / gray(5) None
63 + preview: gray(5) gray(23) / gray(7) gray(23)
64 + preview_line_number: gray(6) gray(20)
65 + preview_separator: gray(7) None / gray(18) None
66 + preview_match: None ansi(29) Underlined
67 + hex_null: gray(15) None
68 + hex_ascii_graphic: gray(2) None
69 + hex_ascii_whitespace: ansi(143) None
70 + hex_ascii_other: ansi(215) None
71 + hex_non_ascii: ansi(167) None
72 + staging_area_title: gray(8) None / gray(13) None
73 + mode_command_mark: gray(15) ansi(204) Bold
74 + good_to_bad_0: ansi(28)
75 + good_to_bad_1: ansi(29)
76 + good_to_bad_2: ansi(29)
77 + good_to_bad_3: ansi(29)
78 + good_to_bad_4: ansi(29)
79 + good_to_bad_5: ansi(100)
80 + good_to_bad_6: ansi(136)
81 + good_to_bad_7: ansi(172)
82 + good_to_bad_8: ansi(166)
83 + good_to_bad_9: ansi(196)

broot/verbs.hjson

Added
new file mode 100644
1 +###############################################################
2 +# This file contains the verb definitions for broot
3 +#
4 +# Some verbs here are examples and not enabled by default: you
5 +# need to uncomment them if you want to use them.
6 +#
7 +# Documentation at https://dystroy.org/broot/verbs/
8 +###############################################################
10 +verbs: [
12 + # You should customize this standard opening of text files.
13 + # If you edit text files in your terminal (vi, emacs, helix, eg.), then
14 + # you'll find it convenient to change the 'key' from 'ctrl-e' to 'enter'.
15 + #
16 + # If $EDITOR isn't set on your computer, you should either set it using
17 + # something similar to
18 + # export EDITOR=/usr/local/bin/nvim
19 + # or just replace it with your editor of choice in the 'execution'
20 + # pattern.
21 + # If your editor is able to open a file on a specific line, use {line}
22 + # so that you may jump directly at the right line from a preview or
23 + # a content search.
24 + # Examples depending on your favourite editor:
25 + # execution: "nvim +{line} {file}"
26 + # execution: "helix {file}:{line}"
27 + {
28 + invocation: edit
29 + shortcut: e
30 + key: ctrl-e
31 + apply_to: text_file
32 + execution: "$EDITOR {file}"
33 + leave_broot: false
34 + }
36 + # Example 1: launching `tail -n` on the selected file (leaving broot)
37 + # {
38 + # name: tail_lines
39 + # invocation: tl {lines_count}
40 + # execution: "tail -f -n {lines_count} {file}"
41 + # }
43 + # Example 2: creating a new file without leaving broot
44 + # {
45 + # name: touch
46 + # invocation: touch {new_file}
47 + # execution: "touch {directory}/{new_file}"
48 + # leave_broot: false
49 + # }
51 + # A convenient shortcut to create new text files in
52 + # the current directory or below
53 + {
54 + invocation: create {subpath}
55 + execution: "$EDITOR {directory}/{subpath}"
56 + leave_broot: false
57 + }
59 + {
60 + invocation: git_diff
61 + shortcut: gd
62 + leave_broot: false
63 + execution: "git difftool -y {file}"
64 + }
66 + # On ctrl-b, propose the creation of a copy of the selection.
67 + # While this might occasionally be useful, this verb is mostly here
68 + # as an example to demonstrate rare standard groups like {file-stem}
69 + # and {file-dot-extension} and the auto_exec verb property which
70 + # allows verbs to stay unexecuted until you hit enter
71 + {
72 + invocation: "backup {version}"
73 + key: ctrl-b
74 + leave_broot: false
75 + auto_exec: false
76 + execution: "cp -r {file} {parent}/{file-stem}-{version}{file-dot-extension}"
77 + }
79 + # By default, `rm` does the system rm, and completely removes
80 + # the file. If you prefer to have the file moved to the system
81 + # trash, you may use the ':trash' internal with the verb below:
82 + # {
83 + # invocation: "rm"
84 + # internal: "trash"
85 + # leave_broot: false
86 + # }
88 + # This verb lets you launch a terminal on ctrl-T
89 + # (on exit you'll be back in broot)
90 + {
91 + invocation: terminal
92 + key: ctrl-t
93 + execution: "$SHELL"
94 + set_working_dir: true
95 + leave_broot: false
96 + }
98 + # Here's an example of a verb needing the shell capabilities.
99 + # It copies all children of the currently selected directory
100 + # to a destination you type.
101 + # It uses a star, which needs the shell for expansion. That's
102 + # why such verb must have the `from_shell: true` parameter.
103 + # {
104 + # invocation: "cpa {dest}"
105 + # external: "cp -r {directory}/* {dest}"
106 + # from_shell: true
107 + # }
109 + # Here's an example of a shortcut bringing you to your home directory
110 + # {
111 + # invocation: home
112 + # key: ctrl-home
113 + # execution: ":focus ~"
114 + # }
116 + # Here's going to the work-dir root of the current git repository
117 + # {
118 + # invocation: gtr
119 + # execution: ":focus {git-root}"
120 + # }
122 + # A popular set of shortcuts for going up and down:
124 + # {
125 + # key: ctrl-k
126 + # execution: ":line_up"
127 + # }
128 + # {
129 + # key: ctrl-j
130 + # execution: ":line_down"
131 + # }
132 + # {
133 + # key: ctrl-u
134 + # execution: ":page_up"
135 + # }
136 + # {
137 + # key: ctrl-d
138 + # execution: ":page_down"
139 + # }
141 + # If you develop using git, you might like to often switch
142 + # to the git status filter:
143 + # {
144 + # key: alt-g
145 + # execution: ":toggle_git_status"
146 + # }
148 + # You can reproduce the bindings of Norton Commander
149 + # on copying or moving to the other panel:
150 + # {
151 + # key: F5
152 + # external: "cp -r {file} {other-panel-directory}"
153 + # leave_broot: false
154 + # }
155 + # {
156 + # key: F6
157 + # external: "mv {file} {other-panel-directory}"
158 + # leave_broot: false
159 + # }

fedora.symlinks

Modified
71 71 ~/.config/rbw
73 +broot
74 +~/.config/broot
73 76 aerc/binds.conf
74 77 ~/.config/aerc/binds.conf
82 85 unison/unison@.service
83 86 ~/.config/systemd/user/unison@.service
88 +unison/unison@.timer
89 +~/.config/systemd/user/unison@.timer
85 91 pueue
86 92 ~/.config/pueue

neovim/.editorconfig

Modified
32 32 table_separator_style = comma
34 34 #optional keep/never/always/smart
35 -trailing_table_separator = always
35 +trailing_table_separator = smart
37 37 # keep/remove/remove_table_only/remove_string_only
38 38 call_arg_parentheses = remove

neovim/.lsp.settings.lua

Modified
1 1 return {
2 2 LuaLS = {
3 3 Lua = {
4 - diagnostics = { globals = { 'vim', 'prequire', }, },
5 - runtime = { version = 'LuaJIT', },
6 - workspace = {
7 - library = vim.api.nvim_get_runtime_file("",true),
8 - },
4 + diagnostics = { globals = { 'vim', 'prequire' } },
5 + runtime = { version = 'LuaJIT' },
6 + workspace = {},

neovim/README.md

Modified
39 39 # todo
41 +* navic highlights do not fit winbar
42 +* indent line bg overwrites visual selection bg
43 +* fix bg gihlight of treesitter-context
44 +* make highlights more visible when expanding snippets
41 45 * make assignment to map.x fail, e.g. `map.normal = {}`...
42 46 * figure out desirable cmp key maps
43 47 * try loading lsp async for better startup perf
44 -* navic highlights do not fit winbar
45 -* add nu-check to nvim-lint
46 -* add nu lsp
47 -* make highlights more visible when expanding snippets
48 -* cursor restore position on (session?) load jumps one location to somewhere
49 - after correct location
50 48 * check out `vim.snippet`
51 -* use `vim.base64` in wezterm plugin
52 -* integrate language tool?
53 49 * adapt config to respect `vim.g.nerdfont` (std.constants?)
54 50 * Do I want multiple LSPs per buffer?
55 51 In case of markdown and text it seems useful, for code it seems like a
56 52 headache...
53 + But it seems inevitable, because more and more tools use the LSP infrastructure.
54 + For example, grammar checkers like harper or code transform tools like ast-grep
55 +* check out harper-ls
56 +* check out ast-grep
57 57 * flesh out 'const.lua', move to std?
58 58 * nvim spell for camel case words
59 59 * create skeleton-plugin for default file content based on file type

neovim/ftplugin/lua.lua

Modified
2 2 -- Options to add `gf` functionality inside `.lua` files.
3 3 vim.opt_local.include = [[\v<((do|load)file|require)[^''"]*[''"]\zs[^''"]+]]
4 4 vim.opt_local.includeexpr = "substitute(v:fname,'\\.','/','g')"
5 5 for _, path in pairs( vim.api.nvim_list_runtime_paths() ) do
6 - vim.opt_local.path:append( path .. '/lua' )
6 + vim.opt_local.path:append( path .. '/lua' )
7 7 end
8 8 vim.opt_local.suffixesadd:prepend '.lua'
10 +-- i like to mask some lua keywords with cool unicode chars
11 +-- those are defined in 'after/queries/lua/highlights.scm'
9 12 vim.opt_local.conceallevel = 1
10 13 vim.opt_local.concealcursor = 'n'

neovim/lazy-lock.json

Modified
16 16 "heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" },
17 17 "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
18 18 "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
19 + "lsp-progress.nvim": { "branch": "main", "commit": "d5f4d28efe75ce636bfbe271eb45f39689765aab" },
19 20 "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
20 21 "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
21 22 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },

neovim/lua/bugabinga/lsp/init.lua

Modified
15 15 require 'bugabinga.lsp.lightbulb'
17 17 local token_update = function ( lsp_client )
18 - local token = lsp_client.data.token
19 - local buffer = lsp_client.buffer
20 - local client_id = lsp_client.data.client_id
21 - local mutable_variable_highlight = 'MutableVariable'
18 + local token = lsp_client.data.token
19 + local buffer = lsp_client.buffer
20 + local client_id = lsp_client.data.client_id
21 + local mutable_variable_highlight = 'MutableVariable'
23 - if token.type == 'variable' and not token.modifiers.readonly then
24 - vim.lsp.semantic_tokens.highlight_token( token, buffer, client_id, mutable_variable_highlight )
25 - end
23 + if token.type == 'variable' and not token.modifiers.readonly then
24 + vim.lsp.semantic_tokens.highlight_token( token, buffer, client_id, mutable_variable_highlight )
25 + end
27 - --TODO: find more use cases for semantic tokens
28 - --* global variables
29 - --* functions with side effects
30 - --* closures that capture something
27 + --TODO: find more use cases for semantic tokens
28 + --* global variables
29 + --* functions with side effects
30 + --* closures that capture something
33 33 local expand_path = function ( path )
34 - if vim.fn.executable( path ) == 1 then
35 - return vim.fn.exepath( path )
36 - else
37 - return path
38 - end
34 + if vim.fn.executable( path ) == 1 then
35 + return vim.fn.exepath( path )
36 + else
37 + return path
38 + end
41 41 local expand_command = function ( command )
42 - vim.validate { command = { command, { 'string', 'table', }, }, }
42 + vim.validate { command = { command, { 'string', 'table' } } }
44 - if type( command ) == 'table' then
45 - command[1] = expand_path( command[1] )
46 - return command
47 - end
44 + if type( command ) == 'table' then
45 + command[1] = expand_path( command[1] )
46 + return command
47 + end
49 - return expand_path( command )
49 + return expand_path( command )
52 52 local lsp_start = function ( file_type_event )
53 - dbg.print 'trying to start lsp'
54 - local match = file_type_event.match
53 + dbg.print 'trying to start lsp'
54 + local match = file_type_event.match
56 - dbg.print( 'filetypes to ignore', ignored.filetypes, 'current filetype', match )
57 - if vim.iter( ignored.filetypes ):find( match ) then return end
56 + dbg.print( 'filetypes to ignore', ignored.filetypes, 'current filetype', match )
57 + if vim.iter( ignored.filetypes ):find( match ) then return end
59 - local bufnr = file_type_event.buf
60 - local buftype = vim.api.nvim_get_option_value( 'buftype', { buf = bufnr, } )
61 - dbg.print( 'buftypes to ignore', ignored.buftypes, 'current buftype', buftype )
62 - if vim.iter( ignored.buftypes ):find( buftype ) then return end
59 + local bufnr = file_type_event.buf
60 + local buftype = vim.api.nvim_get_option_value( 'buftype', { buf = bufnr } )
61 + dbg.print( 'buftypes to ignore', ignored.buftypes, 'current buftype', buftype )
62 + if vim.iter( ignored.buftypes ):find( buftype ) then return end
64 - local buffer_path = vim.api.nvim_buf_get_name( bufnr )
64 + local buffer_path = vim.api.nvim_buf_get_name( bufnr )
66 - dbg.print( string.format( 'searching lsp client for: match: %s, buffer: %s, path: %s', match, bufnr, buffer_path ) )
66 + dbg.print( string.format( 'searching lsp client for: match: %s, buffer: %s, path: %s', match, bufnr, buffer_path ) )
68 - local potential_client_configs = vim.iter( lsp_client_configs )
69 - :map( function ( config )
70 - vim.validate {
71 - ['config'] = { config, 'table', },
72 - ['config.name'] = { config.name, 'string', },
73 - ['config.filetypes'] = { config.filetypes, { 'string', 'table', }, },
74 - ['config.command'] = { config.command, { 'string', 'table', }, },
75 - ['config.environment'] = { config.environment, 'table', true, },
76 - ['config.root_dir'] = { config.root_dir, 'function', 'string', },
77 - ['config.single_file_support'] = { config.single_file_support, 'boolean', true, },
78 - ['config.settings'] = { config.settings, 'table', true, },
79 - ['config.workspaces'] = { config.workspaces, 'boolean', true, },
80 - ['config.before_init'] = { config.before_init, {'function', 'table'}, true, },
81 - ['config.init_options'] = { config.init_options, 'table', true, },
82 - ['config.capabilities'] = { config.capabilities, 'table', true, },
83 - ['config.custom_start'] = { config.custom_start, 'function', true, },
84 - }
85 - -- normalize scalar values to its vector alternative for easier processing later on
86 - -- this mutates the lsp client configs! careful!
87 - config.command = type( config.command ) == 'string' and { expand_command( config.command ), } or
88 - expand_command( config.command )
89 - config.environment = config.environment or {}
90 - config.filetypes = type( config.filetypes ) == 'string' and { config.filetypes, } or config.filetypes
91 - config.single_file_support = config.single_file_support == nil and false or config.single_file_support
92 - config.workspaces = config.workspaces == nil and false or config.workspaces
93 - config.capabilities = config.capabilities or {}
94 - config.init_options = config.init_options or {}
68 + local potential_client_configs = vim.iter( lsp_client_configs )
69 + :map( function ( config )
70 + vim.validate {
71 + ['config'] = { config, 'table' },
72 + ['config.name'] = { config.name, 'string' },
73 + ['config.filetypes'] = { config.filetypes, { 'string', 'table' } },
74 + ['config.command'] = { config.command, { 'string', 'table' } },
75 + ['config.environment'] = { config.environment, 'table', true },
76 + ['config.root_dir'] = { config.root_dir, 'function', 'string' },
77 + ['config.single_file_support'] = { config.single_file_support, 'boolean', true },
78 + ['config.settings'] = { config.settings, 'table', true },
79 + ['config.workspaces'] = { config.workspaces, 'boolean', true },
80 + ['config.before_init'] = { config.before_init, { 'function', 'table' }, true },
81 + ['config.init_options'] = { config.init_options, 'table', true },
82 + ['config.capabilities'] = { config.capabilities, 'table', true },
83 + ['config.custom_start'] = { config.custom_start, 'function', true },
84 + }
85 + -- normalize scalar values to its vector alternative for easier processing later on
86 + -- this mutates the lsp client configs! careful!
87 + config.command = type( config.command ) == 'string' and { expand_command( config.command ) } or
88 + expand_command( config.command )
89 + config.environment = config.environment or {}
90 + config.filetypes = type( config.filetypes ) == 'string' and { config.filetypes } or config.filetypes
91 + config.single_file_support = config.single_file_support == nil and false or config.single_file_support
92 + config.workspaces = config.workspaces == nil and false or config.workspaces
93 + config.capabilities = config.capabilities or {}
94 + config.init_options = config.init_options or {}
96 - return config
97 - end )
98 - :filter( function ( config )
99 - return vim.iter( config.filetypes ):find( match )
100 - end )
101 - :totable()
96 + return config
97 + end )
98 + :filter( function ( config )
99 + return vim.iter( config.filetypes ):find( match )
100 + end )
101 + :totable()
103 - dbg.print( 'POTENTIAL CLIENTS',
104 - vim.iter( potential_client_configs ):map( function ( config )
105 - return {
106 - name = config.name,
107 - command =
108 - config.command,
109 - }
110 - end )
111 - :totable() )
103 + dbg.print( 'POTENTIAL CLIENTS',
104 + vim.iter( potential_client_configs ):map( function ( config )
105 + return {
106 + name = config.name,
107 + command =
108 + config.command,
110 + end )
111 + :totable() )
113 - if table.is_empty( potential_client_configs ) then
114 - dbg.print( 'found no lsp client for', buffer_path )
115 - return
116 - end
113 + if table.is_empty( potential_client_configs ) then
114 + dbg.print( 'found no lsp client for', buffer_path )
115 + return
116 + end
118 - --NOTE: this is super kool but has the limitation, that only lsp clients
119 - -- configured via my special lsp module are affected.
120 - local project_local_lsp_settings = localrc( '.lsp.settings.lua', 'table' ) or {}
121 - local project_local_workspace_folders = localrc( '.lsp.workspace_folders.lua', 'table' ) or {}
118 + --NOTE: this is super kool but has the limitation, that only lsp clients
119 + -- configured via my special lsp module are affected.
120 + local project_local_lsp_settings = localrc( '.lsp.settings.lua', 'table' ) or {}
121 + local project_local_workspace_folders = localrc( '.lsp.workspace_folders.lua', 'table' ) or {}
123 - -- expand relative workspace paths into lsp.workspaceFolders (name + uri)
124 - for lsp, folders in pairs( project_local_workspace_folders ) do
125 - for idx, path in ipairs( folders ) do
126 - local cwd = vim.uv.cwd()
127 - local abs_path = vim.fs.normalize( vim.fs.joinpath( cwd, path ) )
123 + -- expand relative workspace paths into lsp.workspaceFolders (name + uri)
124 + for lsp, folders in pairs( project_local_workspace_folders ) do
125 + for idx, path in ipairs( folders ) do
126 + local cwd = vim.uv.cwd()
127 + local abs_path = vim.fs.normalize( vim.fs.joinpath( cwd, path ) )
129 - local exists = vim.uv.fs_stat( abs_path )
130 - if not exists or exists.type ~= 'directory' then
131 - vim.error( 'the project local workspace folder ' ..
132 - abs_path .. ' does not exist or is not a directory.' )
133 - end
129 + local exists = vim.uv.fs_stat( abs_path )
130 + if not exists or exists.type ~= 'directory' then
131 + vim.error( 'the project local workspace folder ' ..
132 + abs_path .. ' does not exist or is not a directory.' )
133 + end
135 - project_local_workspace_folders[lsp][idx] = { uri = 'file://' .. abs_path, name = path, }
136 - end
137 - end
135 + project_local_workspace_folders[lsp][idx] = { uri = 'file://' .. abs_path, name = path }
136 + end
137 + end
139 - dbg.print( 'patched project local workspace folders', project_local_workspace_folders )
139 + dbg.print( 'patched project local workspace folders', project_local_workspace_folders )
141 - for _, config in ipairs( potential_client_configs ) do
142 - local path = type( config.command ) == 'table' and config.command[1] or config.command
143 - if vim.fn.executable( path ) ~= 1 then
144 - vim.notify( 'The LSP ' .. config.name .. ' does not seem to be installed!' )
145 - break
146 - end
141 + for _, config in ipairs( potential_client_configs ) do
142 + local path = type( config.command ) == 'table' and config.command[1] or config.command
143 + if vim.fn.executable( path ) ~= 1 then
144 + vim.notify( 'The LSP ' .. config.name .. ' does not seem to be installed!' )
145 + break
146 + end
148 - local capabilities = vim.lsp.protocol.make_client_capabilities()
149 - capabilities = table.extend( 'force', capabilities, config.capabilities )
148 + local capabilities = vim.lsp.protocol.make_client_capabilities()
149 + capabilities = table.extend( 'force', capabilities, config.capabilities )
151 - local settings = config.settings
152 - local settings_override = project_local_lsp_settings[config.name]
153 - if settings_override then
154 - dbg.print( 'overriding settings with project local settings', settings, settings_override )
155 - settings = vim.tbl_deep_extend( 'force', settings, settings_override )
156 - end
151 + local settings = config.settings
152 + local settings_override = project_local_lsp_settings[config.name]
153 + if settings_override then
154 + dbg.print( 'overriding settings with project local settings', settings, settings_override )
155 + settings = vim.tbl_deep_extend( 'force', settings, settings_override )
156 + end
158 158 local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path )
159 - local root_workspace = root_dir and { uri = 'file://' .. root_dir, name = root_dir, } or nil
160 - local workspace_folders = root_workspace and { root_workspace, } or nil
161 - local workspace_folders_local = project_local_workspace_folders[config.name]
162 - if not workspace_folders_local then dbg.print( 'no local workspace folders found for ' .. config.name ) end
163 - if workspace_folders_local and config.workspaces then
164 - dbg.print( 'setting workspace folders to project local workspace folders', workspace_folders_local )
165 - workspace_folders = workspace_folders and
166 - vim.tbl_deep_extend( 'force', workspace_folders, workspace_folders_local ) or workspace_folders_local
167 - end
159 + local root_workspace = root_dir and { uri = 'file://' .. root_dir, name = root_dir } or nil
160 + local workspace_folders = root_workspace and { root_workspace } or nil
161 + local workspace_folders_local = project_local_workspace_folders[config.name]
162 + if not workspace_folders_local then dbg.print( 'no local workspace folders found for ' .. config.name ) end
163 + if workspace_folders_local and config.workspaces then
164 + dbg.print( 'setting workspace folders to project local workspace folders', workspace_folders_local )
165 + workspace_folders = workspace_folders and
166 + vim.tbl_deep_extend( 'force', workspace_folders, workspace_folders_local ) or workspace_folders_local
167 + end
169 - dbg.print( 'starting command:', config.command )
169 + dbg.print( 'starting command:', config.command )
171 - local start_config = {
172 - cmd = config.command,
173 - cmd_cwd = root_dir,
174 - -- cmd_env = config.environment,
175 - detached = false, -- do i want this?
176 - root_dir = root_dir,
177 - workspace_folders = workspace_folders,
178 - capabilities = capabilities,
179 - -- handlers = vim.lsp.handlers,
180 - settings = settings,
181 - -- commands = nil, -- what is this?
182 - init_options = config.init_options,
183 - name = config.name,
184 - -- get_language_id = nil,
185 - -- offset_encoding = nil,
186 - on_error = function ( code, ... ) vim.print( 'LSP ERROR', code, ... ) end,
187 - before_init = config.before_init,
188 - -- on_init = nil, -- should i send workspace/didChangeConfiguration here?
189 - on_exit = function ( code, signal, client_id ) dbg.print( 'LSP CLIENT EXIT', code, signal, client_id ) end,
190 - on_attach = function ( client, attach_bufnr ) dbg.print( 'LSP CLIENT ATTACH', client, attach_bufnr ) end,
191 - trace = dbg.get() and 'on' or 'off',
192 - flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200, },
193 - }
171 + local start_config = {
172 + cmd = config.command,
173 + cmd_cwd = root_dir,
174 + -- cmd_env = config.environment,
175 + detached = false, -- do i want this?
176 + root_dir = root_dir,
177 + workspace_folders = workspace_folders,
178 + capabilities = capabilities,
179 + -- handlers = vim.lsp.handlers,
180 + settings = settings,
181 + -- commands = nil, -- what is this?
182 + init_options = config.init_options,
183 + name = config.name,
184 + -- get_language_id = nil,
185 + -- offset_encoding = nil,
186 + on_error = function ( code, ... ) vim.print( 'LSP ERROR', code, ... ) end,
187 + before_init = config.before_init,
188 + -- on_init = nil, -- should i send workspace/didChangeConfiguration here?
189 + on_exit = function ( code, signal, client_id ) dbg.print( 'LSP CLIENT EXIT', code, signal, client_id ) end,
190 + on_attach = function ( client, attach_bufnr ) dbg.print( 'LSP CLIENT ATTACH', client, attach_bufnr ) end,
191 + trace = dbg.get() and 'on' or 'off',
192 + flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200 },
195 - local lsp_starter = config.custom_start or vim.lsp.start
195 + local lsp_starter = config.custom_start or vim.lsp.start
197 - dbg.print( 'starting lsp', start_config.name, root_dir )
197 + dbg.print( 'starting lsp', start_config.name, root_dir )
199 - lsp_starter( start_config, {
200 - bufnr = bufnr,
201 - -- TODO: reuse if workspaces
202 - -- local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
203 - reuse_client = function ( existing_client, new_config )
204 - dbg.print(
205 - 'lsp reuse client',
206 - existing_client.name,
207 - existing_client.workspace_folders,
208 - new_config.name,
209 - new_config.root_dir
210 - )
199 + lsp_starter( start_config, {
200 + bufnr = bufnr,
201 + -- TODO: reuse if workspaces
202 + -- local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
203 + reuse_client = function ( existing_client, new_config )
204 + dbg.print(
205 + 'lsp reuse client',
206 + existing_client.name,
207 + existing_client.workspace_folders,
208 + new_config.name,
209 + new_config.root_dir
212 - --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder
213 - local same_name = existing_client.name == new_config.name
212 + --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder
213 + local same_name = existing_client.name == new_config.name
215 - local new_root_raw = new_config.root_dir or nil
216 - local existing_root_raw = existing_client.workspace_folders and #existing_client.workspace_folders >= 1 and
217 - existing_client.workspace_folders[1].name or nil
215 + local new_root_raw = new_config.root_dir or nil
216 + local existing_root_raw = existing_client.workspace_folders and #existing_client.workspace_folders >= 1 and
217 + existing_client.workspace_folders[1].name or nil
219 - if not (new_root_raw and existing_root_raw) then return false end
219 + if not (new_root_raw and existing_root_raw) then return false end
221 - local new_root = vim.fs.normalize( new_root_raw )
222 - local existing_root = vim.fs.normalize( existing_root_raw )
223 - local same_root = new_root == existing_root
221 + local new_root = vim.fs.normalize( new_root_raw )
222 + local existing_root = vim.fs.normalize( existing_root_raw )
223 + local same_root = new_root == existing_root
225 - local reuse = same_name and same_root
226 - dbg.print( 'reusing lsp client?', reuse )
227 - return reuse
228 - end,
229 - } )
225 + local reuse = same_name and same_root
226 + dbg.print( 'reusing lsp client?', reuse )
227 + return reuse
228 + end,
229 + } )
231 - dbg.print( 'STARTING LSP CLIENT', config.name )
232 - end
231 + dbg.print( 'STARTING LSP CLIENT', config.name )
232 + end
235 235 local old_formatexpr
239 239 local keybinds = {}
240 240 local add = function ( client_id, keybind_remover )
241 - vim.validate {
242 - client_id = { client_id, 'number', },
243 - keybind_remover = { keybind_remover, 'function', },
244 - }
245 - if not table.contains( keybinds, client_id ) then
246 - keybinds[client_id] = {}
247 - end
248 - table.insert( keybinds[client_id], keybind_remover )
241 + vim.validate {
242 + client_id = { client_id, 'number' },
243 + keybind_remover = { keybind_remover, 'function' },
245 + if not table.contains( keybinds, client_id ) then
246 + keybinds[client_id] = {}
247 + end
248 + table.insert( keybinds[client_id], keybind_remover )
251 251 local lsp_attach = function ( args )
252 - local bufnr = args.buf
253 - local client_id = args.data.client_id
254 - local client = vim.lsp.get_client_by_id( client_id )
255 - if not client then return end
252 + local bufnr = args.buf
253 + local client_id = args.data.client_id
254 + local client = vim.lsp.get_client_by_id( client_id )
255 + if not client then return end
257 - dbg.print( client.server_capabilities )
257 + dbg.print( client.server_capabilities )
259 - if client.server_capabilities.definitionProvider then
260 - old_tagfunc = vim.bo[bufnr].tagfunc
261 - vim.bo[bufnr].tagfunc = 'v:lua.vim.lsp.tagfunc'
262 - end
259 + if client.server_capabilities.definitionProvider then
260 + old_tagfunc = vim.bo[bufnr].tagfunc
261 + vim.bo[bufnr].tagfunc = 'v:lua.vim.lsp.tagfunc'
262 + end
264 - if client.server_capabilities.documentFormattingProvider then
265 - old_formatexpr = vim.bo[bufnr].formatexpr
266 - vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr'
267 - end
264 + if client.server_capabilities.documentFormattingProvider then
265 + old_formatexpr = vim.bo[bufnr].formatexpr
266 + vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr'
267 + end
269 - if client.server_capabilities.completionProvider then
270 - old_omnifunc = vim.bo[bufnr].omnifunc
271 - vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
272 - end
269 + if client.server_capabilities.completionProvider then
270 + old_omnifunc = vim.bo[bufnr].omnifunc
271 + vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
272 + end
274 - if client.server_capabilities.documentSymbolProvider then
275 - local navic_ok, navic = pcall( require, 'nvim-navic' )
276 - if navic_ok then
277 - navic.attach( client, bufnr )
278 - else
279 - vim.notify 'nvim-navic not found. could not attach to lsp client.'
280 - end
281 - local navbuddy_ok, navbuddy = pcall( require, 'nvim-navbuddy' )
282 - if navbuddy_ok then
283 - navbuddy.attach( client, bufnr )
284 - map.normal {
285 - description = 'Open overview of symbols in current buffer',
286 - category = 'lsp',
287 - keys = '<leader>lo',
288 - command = function () navbuddy.open( bufnr ) end,
289 - buffer = bufnr,
290 - }
291 - else
292 - vim.notify 'nvim-navbuddy not found. could not attach to lsp client.'
293 - end
294 - end
274 + if client.server_capabilities.documentHighlightProvider then
275 + -- the timer has application lifetime. no need to close
276 + local delay = 300
277 + local debounced_highlight = defer.debounce_leading( vim.lsp.buf.document_highlight, delay )
278 + local debounced_clear = defer.debounce_leading( vim.lsp.buf.clear_references, delay )
296 - if client.server_capabilities.documentHighlightProvider then
297 - -- the timer has application lifetime. no need to close
298 - local delay = 300
299 - local debounced_highlight = defer.debounce_leading( vim.lsp.buf.document_highlight, delay )
300 - local debounced_clear = defer.debounce_leading( vim.lsp.buf.clear_references, delay )
280 + auto 'document_highlight' {
282 + description = 'Highlight symbol under cursor on hold',
283 + events = 'CursorHold',
284 + buffer = bufnr,
285 + command = debounced_highlight,
286 + },
288 + description = 'Remove highlight from symbol under cursor on move',
289 + events = { 'CursorMoved', 'InsertEnter' },
290 + buffer = bufnr,
291 + command = debounced_clear,
292 + },
294 + end
302 - auto 'document_highlight' {
303 - {
304 - description = 'Highlight symbol under cursor on hold',
305 - events = 'CursorHold',
306 - buffer = bufnr,
307 - command = debounced_highlight,
308 - },
309 - {
310 - description = 'Remove highlight from symbol under cursor on move',
311 - events = { 'CursorMoved', 'InsertEnter', },
312 - buffer = bufnr,
313 - command = debounced_clear,
314 - },
315 - }
316 - end
296 + if client.server_capabilities.inlayHintProvider then
297 + add( client_id, map.normal {
298 + description = 'Toggle inlay hints',
299 + category = 'lsp',
300 + buffer = bufnr,
301 + keys = '<leader>ti',
302 + command = function ()
303 + vim.lsp.inlay_hint.enable( bufnr, nil )
304 + end,
305 + } )
306 + end
318 - if client.server_capabilities.inlayHintProvider then
319 - add( client_id, map.normal {
320 - description = 'Toggle inlay hints',
321 - category = 'lsp',
322 - buffer = bufnr,
323 - keys = '<leader>ti',
324 - command = function ()
325 - vim.lsp.inlay_hint.enable( bufnr, nil )
326 - end,
327 - } )
328 - end
308 + add( client_id, map.normal {
309 + description = 'Show hover documentation above cursor.',
310 + category = 'lsp',
311 + buffer = bufnr,
312 + keys = { 'K', '<leader>lk' },
313 + command = vim.lsp.buf.hover,
314 + } )
330 - add( client_id, map.normal {
331 - description = 'Show hover documentation above cursor.',
332 - category = 'lsp',
333 - buffer = bufnr,
334 - keys = { 'K', '<leader>lk', },
335 - command = vim.lsp.buf.hover,
336 - } )
316 + add( client_id, map.insert {
317 + description = 'Show signature help under cursor.',
318 + category = 'lsp',
319 + buffer = bufnr,
320 + keys = { '<C-h>' },
321 + command = vim.lsp.buf.signature_help,
322 + } )
338 - add( client_id, map.insert {
339 - description = 'Show signature help under cursor.',
340 - category = 'lsp',
341 - buffer = bufnr,
342 - keys = { '<C-h>', },
343 - command = vim.lsp.buf.signature_help,
344 - } )
324 + add( client_id, map.normal {
325 + description = 'Show available code actions on current line.',
326 + category = 'lsp',
327 + buffer = bufnr,
328 + keys = '<leader>la',
329 + command = vim.lsp.buf.code_action,
330 + } )
346 - add( client_id, map.normal {
347 - description = 'Show available code actions on current line.',
348 - category = 'lsp',
349 - buffer = bufnr,
350 - keys = '<leader>la',
351 - command = vim.lsp.buf.code_action,
352 - } )
332 + add( client_id, map.normal {
333 + description = 'Goto to definition of symbol under cursor.',
334 + category = 'lsp',
335 + buffer = bufnr,
336 + keys = '<leader>ld',
337 + command = vim.lsp.buf.definition,
338 + } )
354 - add( client_id, map.normal {
355 - description = 'Goto to definition of symbol under cursor.',
356 - category = 'lsp',
357 - buffer = bufnr,
358 - keys = '<leader>ld',
359 - command = vim.lsp.buf.definition,
360 - } )
340 + add( client_id, map.normal {
341 + description = 'Show implementations of symbol under cursor.',
342 + category = 'lsp',
343 + buffer = bufnr,
344 + keys = '<leader>li',
345 + command = vim.lsp.buf.implementation,
346 + } )
362 - add( client_id, map.normal {
363 - description = 'Show implementations of symbol under cursor.',
364 - category = 'lsp',
365 - buffer = bufnr,
366 - keys = '<leader>li',
367 - command = vim.lsp.buf.implementation,
368 - } )
348 + add( client_id, map.normal {
349 + description = 'Show incoming calls of symbol under cursor.',
350 + category = 'lsp',
351 + buffer = bufnr,
352 + keys = '<leader>lc',
353 + command = vim.lsp.buf.incoming_calls,
354 + } )
370 - add( client_id, map.normal {
371 - description = 'Show incoming calls of symbol under cursor.',
372 - category = 'lsp',
373 - buffer = bufnr,
374 - keys = '<leader>lc',
375 - command = vim.lsp.buf.incoming_calls,
376 - } )
356 + add( client_id, map.normal {
357 + description = 'Show outgoing calls of symbol under cursor.',
358 + category = 'lsp',
359 + buffer = bufnr,
360 + keys = '<leader>lC',
361 + command = vim.lsp.buf.outgoing_calls,
362 + } )
378 - add( client_id, map.normal {
379 - description = 'Show outgoing calls of symbol under cursor.',
380 - category = 'lsp',
381 - buffer = bufnr,
382 - keys = '<leader>lC',
383 - command = vim.lsp.buf.outgoing_calls,
384 - } )
364 + add( client_id, map.normal {
365 + description = 'Show references of symbol under cursor.',
366 + category = 'lsp',
367 + buffer = bufnr,
368 + keys = '<leader>ln',
369 + command = vim.lsp.buf.references,
370 + } )
386 - add( client_id, map.normal {
387 - description = 'Show references of symbol under cursor.',
388 - category = 'lsp',
389 - buffer = bufnr,
390 - keys = '<leader>ln',
391 - command = vim.lsp.buf.references,
392 - } )
394 - add( client_id, map.normal {
395 - description = 'Rename symbol under cursor.',
396 - category = 'lsp',
397 - buffer = bufnr,
398 - keys = { '<f2>', '<leader>lr', },
399 - command = vim.lsp.buf.rename,
400 - } )
372 + add( client_id, map.normal {
373 + description = 'Rename symbol under cursor.',
374 + category = 'lsp',
375 + buffer = bufnr,
376 + keys = { '<f2>', '<leader>lr' },
377 + command = vim.lsp.buf.rename,
378 + } )
403 381 local lsp_detach = function ( args )
404 - dbg.print( 'DETACH LSP', args )
382 + dbg.print( 'DETACH LSP', args )
406 - local bufnr = args.buf
407 - local client_id = args.data.client_id
408 - local client = vim.lsp.get_client_by_id( client_id )
409 - if not client then return end
384 + local bufnr = args.buf
385 + local client_id = args.data.client_id
386 + local client = vim.lsp.get_client_by_id( client_id )
387 + if not client then return end
411 - if client.server_capabilities.definitionProvider then
412 - vim.bo[bufnr].tagfunc = old_tagfunc
413 - end
389 + if client.server_capabilities.definitionProvider then
390 + vim.bo[bufnr].tagfunc = old_tagfunc
391 + end
415 - if client.server_capabilities.documentFormattingProvider then
416 - vim.bo[bufnr].formatexpr = old_formatexpr
417 - end
393 + if client.server_capabilities.documentFormattingProvider then
394 + vim.bo[bufnr].formatexpr = old_formatexpr
395 + end
419 - if client.server_capabilities.completionProvider then
420 - vim.bo[bufnr].omnifunc = old_omnifunc
421 - end
397 + if client.server_capabilities.completionProvider then
398 + vim.bo[bufnr].omnifunc = old_omnifunc
399 + end
423 - if table.contains( keybinds, client_id ) then
424 - for _, keybind_delete in ipairs( keybinds[client_id] ) do
425 - keybind_delete()
426 - end
427 - end
401 + if table.contains( keybinds, client_id ) then
402 + for _, keybind_delete in ipairs( keybinds[client_id] ) do
403 + keybind_delete()
404 + end
405 + end
430 408 auto 'lsp' {
431 - {
432 - description = 'Start or reuse LSP client',
433 - events = 'FileType',
434 - command = lsp_start,
435 - },
436 - {
437 - description = 'Hook: LSP client attached to buffer',
438 - events = 'LspAttach',
439 - command = lsp_attach,
440 - },
441 - {
442 - description = 'Hook: LSP client detached from buffer',
443 - events = 'LspDetach',
444 - command = lsp_detach,
445 - },
446 - {
447 - description = 'Semantic Tokens from the LSP',
448 - events = 'LspTokenUpdate',
449 - command = token_update,
450 - },
410 + description = 'Start or reuse LSP client',
411 + events = 'FileType',
412 + command = lsp_start,
413 + },
415 + description = 'Hook: LSP client attached to buffer',
416 + events = 'LspAttach',
417 + command = lsp_attach,
418 + },
420 + description = 'Hook: LSP client detached from buffer',
421 + events = 'LspDetach',
422 + command = lsp_detach,
423 + },
425 + description = 'Semantic Tokens from the LSP',
426 + events = 'LspTokenUpdate',
427 + command = token_update,
428 + },
453 431 local lsp_info = function ( command )
454 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
455 - local active_clients = vim.lsp.get_clients( all_or_current )
432 + local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
433 + local active_clients = vim.lsp.get_clients( all_or_current )
457 - local infos = vim.iter( active_clients )
458 - :map( function ( client )
459 - local name = client.name
460 - local config = vim.iter( lsp_client_configs ):find( function ( config ) return config.name == name end )
461 - assert( config, ('How did we not find a config for %s ?!?!'):format( name ) )
435 + local infos = vim.iter( active_clients )
436 + :map( function ( client )
437 + local name = client.name
438 + local config = vim.iter( lsp_client_configs ):find( function ( config ) return config.name == name end )
439 + assert( config, ('How did we not find a config for %s ?!?!'):format( name ) )
463 - local full_cmd = table.deep_copy( client.config.cmd )
464 - full_cmd[1] = vim.fn.exepath( full_cmd[1] )
465 - local basic = {
466 - id = client.id,
467 - name = name,
468 - cmd = table.concat( full_cmd, ' ' ),
469 - workspace_folders = vim.iter( client.workspace_folders ):map( function ( w ) return vim.fs.normalize( w.name ) end )
470 - :totable(),
471 - filetypes = table.concat( config.filetypes, ', ' ),
472 - single_file_support = config.single_file_support,
473 - workspaces = config.workspaces,
474 - }
475 - return basic
476 - end )
477 - :totable()
441 + local full_cmd = table.deep_copy( client.config.cmd )
442 + full_cmd[1] = vim.fn.exepath( full_cmd[1] )
443 + local basic = {
444 + id = client.id,
445 + name = name,
446 + cmd = table.concat( full_cmd, ' ' ),
447 + workspace_folders = vim.iter( client.workspace_folders ):map( function ( w ) return vim.fs.normalize( w.name ) end )
448 + :totable(),
449 + filetypes = table.concat( config.filetypes, ', ' ),
450 + single_file_support = config.single_file_support,
451 + workspaces = config.workspaces,
453 + return basic
454 + end )
455 + :totable()
479 - ui.show_tree( infos )
457 + ui.show_tree( infos )
482 460 local lsp_info_extended = function ( command )
483 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
484 - local active_clients = vim.lsp.get_clients( all_or_current )
485 - ui.show_tree( active_clients )
461 + local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
462 + local active_clients = vim.lsp.get_clients( all_or_current )
463 + ui.show_tree( active_clients )
488 466 user_command.LspInfo
489 467 'Shows basic information about running LSP clients.'
490 - { nargs = '?', complete = function () return { 'all', } end, } (
491 - lsp_info
492 - )
468 + { nargs = '?', complete = function () return { 'all' } end } (
469 + lsp_info
494 472 user_command.LspInfoExtended
495 473 'Shows detailed information about running LSP clients.'
496 - { nargs = '?', complete = function () return { 'all', } end, } (
497 - lsp_info_extended
498 - )
474 + { nargs = '?', complete = function () return { 'all' } end } (
475 + lsp_info_extended
500 478 -- TODO: LspStart
501 479 -- TODO: LspStop
502 480 -- TODO: LspRestart ? Maybe good after changing project local settings?
504 482 local completion_icons = {
505 - Class = icon.class,
506 - Color = icon.color,
507 - Constant = icon.constant,
508 - Constructor = icon.constructor,
509 - Enum = icon.enum,
510 - EnumMember = icon.enum_member,
511 - Field = icon.field,
512 - File = icon.file,
513 - Folder = icon.folder,
514 - Function = icon['function'],
515 - Interface = icon.interface,
516 - Keyword = icon.keyword,
517 - Method = icon.method,
518 - Module = icon.module,
519 - Property = icon.property,
520 - Snippet = icon.snippet,
521 - Struct = icon.struct,
522 - Text = icon.text,
523 - Unit = icon.unit,
524 - Value = icon.value,
525 - Variable = icon.variable,
483 + Class = icon.class,
484 + Color = icon.color,
485 + Constant = icon.constant,
486 + Constructor = icon.constructor,
487 + Enum = icon.enum,
488 + EnumMember = icon.enum_member,
489 + Field = icon.field,
490 + File = icon.file,
491 + Folder = icon.folder,
492 + Function = icon['function'],
493 + Interface = icon.interface,
494 + Keyword = icon.keyword,
495 + Method = icon.method,
496 + Module = icon.module,
497 + Property = icon.property,
498 + Snippet = icon.snippet,
499 + Struct = icon.struct,
500 + Text = icon.text,
501 + Unit = icon.unit,
502 + Value = icon.value,
503 + Variable = icon.variable,
528 506 local completion_kinds = vim.lsp.protocol.CompletionItemKind
529 507 for i, kind in ipairs( completion_kinds ) do
530 - completion_kinds[i] = completion_icons[kind] or kind
508 + completion_kinds[i] = completion_icons[kind] or kind
533 511 return setmetatable( _, {} )

neovim/lua/bugabinga/nugu/init.lua

Modified
46 46 local set_group_properties = function ( self, properties )
47 47 vim.validate {
48 - properties = { properties, 'table', },
48 + properties = { properties, 'table' },
49 49 -- • fg (or foreground): color name or "#RRGGBB", see note.
50 - ['properties.fg'] = { properties.fg, 'string', true, },
50 + ['properties.fg'] = { properties.fg, 'string', true },
51 51 -- • bg (or background): color name or "#RRGGBB", see note.
52 - ['properties.bg'] = { properties.bg, 'string', true, },
52 + ['properties.bg'] = { properties.bg, 'string', true },
53 53 -- • sp (or special): color name or "#RRGGBB"
54 - ['properties.sp'] = { properties.sp, 'string', true, },
54 + ['properties.sp'] = { properties.sp, 'string', true },
55 55 -- • blend: integer between 0 and 100
56 - ['properties.blend'] = { properties.blend, 'number', true, },
56 + ['properties.blend'] = { properties.blend, 'number', true },
57 57 -- • bold: boolean
58 - ['properties.bold'] = { properties.bold, 'boolean', true, },
58 + ['properties.bold'] = { properties.bold, 'boolean', true },
59 59 -- • standout: boolean
60 - ['properties.standout'] = { properties.standout, 'boolean', true, },
60 + ['properties.standout'] = { properties.standout, 'boolean', true },
61 61 -- • underline: boolean
62 - ['properties.underline'] = { properties.underline, 'boolean', true, },
62 + ['properties.underline'] = { properties.underline, 'boolean', true },
63 63 -- • undercurl: boolean
64 - ['properties.undercurl'] = { properties.undercurl, 'boolean', true, },
64 + ['properties.undercurl'] = { properties.undercurl, 'boolean', true },
65 65 -- • underdotted: boolean
66 - ['properties.underdotted'] = { properties.underdotted, 'boolean', true, },
66 + ['properties.underdotted'] = { properties.underdotted, 'boolean', true },
67 67 -- • underdashed: boolean
68 - ['properties.underdashed'] = { properties.underdashed, 'boolean', true, },
68 + ['properties.underdashed'] = { properties.underdashed, 'boolean', true },
69 69 -- • strikethrough: boolean
70 - ['properties.strikethrough'] = { properties.strikethrough, 'boolean', true, },
70 + ['properties.strikethrough'] = { properties.strikethrough, 'boolean', true },
71 71 -- • italic: boolean
72 - ['properties.italic'] = { properties.italic, 'boolean', true, },
72 + ['properties.italic'] = { properties.italic, 'boolean', true },
73 73 -- • reverse: boolean
74 - ['properties.reverse'] = { properties.reverse, 'boolean', true, },
74 + ['properties.reverse'] = { properties.reverse, 'boolean', true },
75 75 -- • nocombine: boolean
76 - ['properties.nocombine'] = { properties.nocombine, 'boolean', true, },
76 + ['properties.nocombine'] = { properties.nocombine, 'boolean', true },
77 77 -- • default: Don't override existing definition |:hi-default|
78 - ['properties.default'] = { properties.default, 'boolean', true, },
78 + ['properties.default'] = { properties.default, 'boolean', true },
79 79 -- • ctermfg: Sets foreground of cterm color |ctermfg|
80 - ['properties.ctermfg'] = { properties.ctermfg, 'string', true, },
80 + ['properties.ctermfg'] = { properties.ctermfg, 'string', true },
81 81 -- • ctermbg: Sets background of cterm color |ctermbg|
82 - ['properties.ctermbg'] = { properties.ctermbg, 'string', true, },
82 + ['properties.ctermbg'] = { properties.ctermbg, 'string', true },
83 83 -- • cterm: cterm attribute map, like |highlight-args|. If not set, cterm attributes will match those from the attribute map documented above.
84 - ['properties.cterm'] = { properties.cterm, 'table', true, },
84 + ['properties.cterm'] = { properties.cterm, 'table', true },
85 85 -- • force: if true force update the highlight group when it exists.
86 - ['properties.force'] = { properties.force, 'boolean', true, },
86 + ['properties.force'] = { properties.force, 'boolean', true },
88 88 -- vim.print( 'SET GROUP PROPERTIES', self, properties )
89 89 for key, value in pairs( properties ) do
119 -local _ = setmetatable( { groups = {}, }, {
119 +local _ = setmetatable( { groups = {} }, {
120 120 __index = add_group,
121 121 __newindex = link_group,
124 -_.Debug { fg = ui_normal, bg = debug, bold = true, }
124 +_.Debug { fg = ui_normal, bg = debug, bold = true }
126 -_.Normal { fg = content_normal, bg = content_backdrop, }
127 -_.Comment { fg = content_important_global, }
128 -_.NotifyBackground { bg = ui_backdrop, }
129 -_.LineNr { fg = ui_minor, bg = content_backdrop, }
130 -_.CursorLineNr { fg = ui_focus, bg = ui_backdrop, }
131 -_.Search { bg = content_unfocus, }
132 -_.IncSearch { fg = content_focus, }
133 -_.CurSearch { fg = content_important_global, bg = content_unfocus, }
134 -_.NormalFloat { fg = ui_normal, bg = ui_backdrop, }
135 -_.FloatBorder { fg = _.NormalFloat.bg, bg = _.NormalFloat.bg, }
136 -_.ColorColumn { fg = ui_important_global, bg = _.Normal.bg, }
137 -_.Conceal { fg = content_focus, bg = _.Normal.bg, }
138 -_.Cursor { bg = ui_accent, }
126 +_.Normal { fg = content_normal, bg = content_backdrop }
127 +_.Comment { fg = content_important_global }
128 +_.NotifyBackground { bg = ui_backdrop }
129 +_.LineNr { fg = ui_minor, bg = content_backdrop }
130 +_.CursorLineNr { fg = ui_focus, bg = ui_backdrop }
131 +_.Search { bg = content_unfocus }
132 +_.IncSearch { fg = content_focus }
133 +_.CurSearch { fg = content_important_global, bg = content_unfocus }
134 +_.NormalFloat { fg = ui_normal, bg = ui_backdrop }
135 +_.FloatBorder { fg = _.NormalFloat.bg, bg = _.NormalFloat.bg }
136 +_.ColorColumn { fg = ui_important_global, bg = _.Normal.bg }
137 +_.Conceal { fg = content_focus, bg = _.Normal.bg }
138 +_.Cursor { bg = ui_accent }
139 139 -- _.lCursor = _.Cursor
140 140 -- _.CursorIM = _.Cursor
141 -_.Directory { fg = _.Normal.fg, }
142 -_.DiffAdd { fg = content_focus, }
143 -_.DiffDelete { fg = content_focus, strikethrough = true, }
144 -_.DiffChange { fg = content_important_global, }
145 -_.DiffText { fg = content_normal, bg = content_unfocus, }
141 +_.Directory { fg = _.Normal.fg }
142 +_.DiffAdd { fg = content_focus }
143 +_.DiffDelete { fg = content_focus, strikethrough = true }
144 +_.DiffChange { fg = content_important_global }
145 +_.DiffText { fg = content_normal, bg = content_unfocus }
146 146 _.EndOfBuffer = _.Normal
147 147 -- _.TermCursor = _.Cursor
148 148 -- _.TermCursorNC = _.Cursor
149 -_.ErrorMsg { fg = error, }
150 -_.VertSplit { fg = ui_important_global, bg = _.LineNr.bg, }
149 +_.ErrorMsg { fg = error }
150 +_.VertSplit { fg = ui_important_global, bg = _.LineNr.bg }
151 151 _.Folded = _.Conceal
152 152 _.FoldColumn = _.LineNr
153 153 _.SignColumn = _.LineNr
154 -_.ModeMsg { bold = true, }
154 +_.ModeMsg { bold = true }
155 155 _.MsgArea = _.Normal
156 156 _.MsgSeparator = _.Debug
157 157 _.MoreMsg = _.Normal
158 -_.NonText { fg = content_unfocus, }
158 +_.NonText { fg = content_unfocus }
159 159 _.Whitespace = _.NonText
160 160 _.NormalNC = _.Normal
161 161 _.Pmenu = _.NormalFloat
162 -_.PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = _.Pmenu.bg, bold = true, underline = true, }
163 -_.PmenuSbar { bg = ui_unfocus, }
164 -_.PmenuThumb { bg = ui_minor, }
165 -_.Question { fg = ui_important_local, bold = true, }
162 +_.PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = _.Pmenu.bg, bold = true, underline = true }
163 +_.PmenuSbar { bg = ui_unfocus }
164 +_.PmenuThumb { bg = ui_minor }
165 +_.Question { fg = ui_important_local, bold = true }
166 166 _.QuickFixLine = _.PmenuSel
167 -_.SpecialKey { fg = error, bg = content_unfocus, bold = true, }
168 -_.SpellBad { fg = error, undercurl = true, }
167 +_.SpecialKey { fg = error, bg = content_unfocus, bold = true }
168 +_.SpellBad { fg = error, undercurl = true }
169 169 _.SpellCap = _.SpellBad
170 170 _.SpellLocal = _.SpellBad
171 171 _.SpellRare = _.SpellBad
172 -_.StatusLine { fg = ui_focus, bg = ui_unfocus, }
173 -_.StatusLineNC { fg = ui_normal, bg = ui_unfocus, }
174 -_.Winbar { fg = ui_focus, bg = _.StatusLine.bg, }
175 -_.WinbarNC { fg = ui_minor, bg = _.LineNr.bg, }
176 -_.Title { fg = content_important_global, sp = content_important_global, bold = true, underline = true, }
172 +_.StatusLine { fg = ui_focus, bg = ui_unfocus }
173 +_.StatusLineNC { fg = ui_normal, bg = ui_unfocus }
174 +_.Winbar { fg = ui_focus, bg = _.StatusLine.bg }
175 +_.WinbarNC { fg = ui_minor, bg = _.LineNr.bg }
176 +_.Title { fg = content_important_global, sp = content_important_global, bold = true, underline = true }
177 177 _.TabLine = _.StatusLine
178 -_.TabLineFill { fg = _.TabLine.fg, bg = content_backdrop, }
179 -_.TabLineSel { fg = ui_important_global, bg = ui_unfocus, }
180 -_.Visual { bg = content_unfocus, }
181 -_.VisualNOS { bg = ui_unfocus, }
182 -_.WarningMsg { fg = warning, bold = true, }
178 +_.TabLineFill { fg = _.TabLine.fg, bg = content_backdrop }
179 +_.TabLineSel { fg = ui_important_global, bg = ui_unfocus }
180 +_.Visual { bg = content_unfocus }
181 +_.VisualNOS { bg = ui_unfocus }
182 +_.WarningMsg { fg = warning, bold = true }
183 183 _.WildMenu = _.Debug
185 -_.String { fg = content_important_local, italic = true, }
185 +_.String { fg = content_important_local, italic = true }
186 186 _.Constant = _.String
187 187 _.Character = _.String
188 188 _.Number = _.String
193 193 _.MutableVariable = _.Debug
194 194 _.Function = _.Normal
196 -_.Statement { fg = content_minor, }
196 +_.Statement { fg = content_minor }
197 197 _.Conditional = _.Statement
198 198 _.Repeat = _.Statement
199 199 _.Label = _.Statement
200 200 _.Operator = _.Statement
201 201 _.Keyword = _.Statement
202 -_.Parameter { fg = content_focus, }
202 +_.Parameter { fg = content_focus }
203 203 _.Exception = _.Statement
205 -_.PreProc { fg = content_important_global, bg = content_unfocus, bold = true, }
205 +_.PreProc { fg = content_important_global, bg = content_unfocus, bold = true }
206 206 _.Include = _.PreProc
207 207 _.Define = _.PreProc
208 208 _.Macro = _.PreProc
213 213 _.Structure = _.Statement
214 214 _.Typedef = _.Statement
216 -_.Special { fg = content_normal, italic = true, bold = true, }
216 +_.Special { fg = content_normal, italic = true, bold = true }
217 217 _.SpecialChar = _.Special
218 218 _.Tag = _.Special
219 -_.Delimiter { fg = content_minor, }
219 +_.Delimiter { fg = content_minor }
220 220 _.SpecialComment = _.Special
222 -_.Underlined { sp = content_normal, underline = true, }
223 -_.Bold { bold = true, }
224 -_.Italic { italic = true, }
222 +_.Underlined { sp = content_normal, underline = true }
223 +_.Bold { bold = true }
224 +_.Italic { italic = true }
226 -_.Ignore { fg = _.Normal.bg, bg = _.Normal.bg, }
226 +_.Ignore { fg = _.Normal.bg, bg = _.Normal.bg }
228 -_.Error { fg = error, }
229 -_.Todo { fg = content_important_global, sp = content_important_global, bold = true, underdouble = true, }
230 -_.DiagnosticUnnecessary { fg = ui_focus, }
231 -_.DiagnosticDeprecated { fg = ui_important_global, sp = ui_important_global, strikethrough = true, }
232 -_.DiagnosticError { fg = error, }
233 -_.DiagnosticWarn { fg = warning, }
234 -_.DiagnosticInfo { fg = info, }
235 -_.DiagnosticHint { fg = ui_important_local, }
236 -_.DiagnosticOk { fg = ui_minor, }
228 +_.Error { fg = error }
229 +_.Todo { fg = content_important_global, sp = content_important_global, bold = true, underdouble = true }
230 +_.DiagnosticUnnecessary { fg = ui_focus }
231 +_.DiagnosticDeprecated { fg = ui_important_global, sp = ui_important_global, strikethrough = true }
232 +_.DiagnosticError { fg = error }
233 +_.DiagnosticWarn { fg = warning }
234 +_.DiagnosticInfo { fg = info }
235 +_.DiagnosticHint { fg = ui_important_local }
236 +_.DiagnosticOk { fg = ui_minor }
238 238 _.DiagnosticVirtualTextError = _.DiagnosticError
239 239 _.DiagnosticVirtualTextWarn = _.DiagnosticWarn
240 240 _.DiagnosticVirtualTextInfo = _.DiagnosticInfo
241 241 _.DiagnosticVirtualTextHint = _.DiagnosticHint
242 242 _.DiagnosticVirtualOkHint = _.DiagnosticOk
243 -_.DiagnosticUnderlineError { fg = _.DiagnosticError.fg, sp = _.DiagnosticError.fg, underdouble = true, }
244 -_.DiagnosticUnderlineWarn { fg = _.DiagnosticWarn.fg, sp = _.DiagnosticWarn.fg, underline = true, }
245 -_.DiagnosticUnderlineInfo { fg = _.DiagnosticInfo.fg, sp = _.DiagnosticInfo.fg, underdashed = true, }
246 -_.DiagnosticUnderlineHint { fg = _.DiagnosticHint.fg, sp = _.DiagnosticHint.fg, italic = true, underdotted = true, }
247 -_.DiagnosticUnderlineOk { fg = _.DiagnosticOk.fg, italic = true, }
243 +_.DiagnosticUnderlineError { fg = _.DiagnosticError.fg, sp = _.DiagnosticError.fg, underdouble = true }
244 +_.DiagnosticUnderlineWarn { fg = _.DiagnosticWarn.fg, sp = _.DiagnosticWarn.fg, underline = true }
245 +_.DiagnosticUnderlineInfo { fg = _.DiagnosticInfo.fg, sp = _.DiagnosticInfo.fg, underdashed = true }
246 +_.DiagnosticUnderlineHint { fg = _.DiagnosticHint.fg, sp = _.DiagnosticHint.fg, italic = true, underdotted = true }
247 +_.DiagnosticUnderlineOk { fg = _.DiagnosticOk.fg, italic = true }
248 248 _.DiagnosticSignError = _.DiagnosticError
249 249 _.DiagnosticSignWarn = _.DiagnosticWarn
250 250 _.DiagnosticSignInfo = _.DiagnosticInfo
251 251 _.DiagnosticSignHint = _.DiagnosticHint
252 252 _.DiagnosticSignOk = _.DiagnosticOk
254 -_.LspReferenceText { sp = content_unfocus, underline = true, }
254 +_.LspReferenceText { sp = content_unfocus, underline = true }
255 255 _.LspReferenceRead = _.LspReferenceText
256 256 _.LspReferenceWrite = _.LspReferenceText
257 -_.LspInlayHint { fg = content_minor, bg = _.Normal.bg, }
257 +_.LspInlayHint { fg = content_minor, bg = _.Normal.bg }
259 259 _['@text.literal'] = _.Comment
260 260 _['@text.reference'] = _.Identifier
290 290 _['@label'] = _.Label
291 291 _['@operator'] = _.Operator
292 292 _['@keyword'] = _.Keyword
293 -_['@keyword.return'] { fg = _.Keyword.fg, bg = _.Keyword.bg, underline = true, bold = true, }
293 +_['@keyword.return'] { fg = _.Keyword.fg, bg = _.Keyword.bg, underline = true, bold = true }
294 294 _['@exception'] = _.Exception
295 295 _['@variable'] = _.Identifier
296 296 _['@variable.parameter'] = _.Parameter
325 325 _['@lsp.type.decorator'] = _['@function']
327 327 _.LazyButton = _.NormalFloat
328 -_.LazyButton { sp = _.NormalFloat.fg, bold = true, }
329 -_.LazyButtonActive { fg = ui_focus, sp = _.NormalFloat.fg, bg = ui_important_local, bold = true, }
328 +_.LazyButton { sp = _.NormalFloat.fg, bold = true }
329 +_.LazyButtonActive { fg = ui_focus, sp = _.NormalFloat.fg, bg = ui_important_local, bold = true }
330 330 _.LazyComment = _.Keyword
331 331 _.LazyCommit = _.LazyComment
332 332 _.LazyCommitIssue = _.LazyComment
333 333 _.LazyCommitScope = _.LazyComment
334 -_.LazyCommitScope { italic = true, }
334 +_.LazyCommitScope { italic = true }
335 335 _.LazyCommitType = _.LazyCommitScope
336 -_.LazyDimmed { fg = _.NormalFloat.fg, }
337 -_.LazyDir { fg = _.NormalFloat.fg, }
336 +_.LazyDimmed { fg = _.NormalFloat.fg }
337 +_.LazyDir { fg = _.NormalFloat.fg }
338 338 _.LazyH1 = _.Bold
339 339 _.LazyH2 = _.LazyH1
340 340 _.LazyLocal {}
341 341 _.LazyNoCond = _.WarningMsg
342 342 _.LazyNormal = _.NormalFloat
343 -_.LazyProgressDone { fg = _.Search.bg, bg = _.Cursor.bg, bold = true, }
344 -_.LazyProgressTodo { fg = _.LazyProgressDone.bg, bg = _.LazyProgressDone.fg, bold = true, }
343 +_.LazyProgressDone { fg = _.Search.bg, bg = _.Cursor.bg, bold = true }
344 +_.LazyProgressTodo { fg = _.LazyProgressDone.bg, bg = _.LazyProgressDone.fg, bold = true }
345 345 _.LazyProp = _.LazyComment
346 346 _.LazyReasonCmd = _.NormalFloat
347 347 _.LazyReasonEvent = _.NormalFloat
352 352 _.LazyReasonRuntime = _.NormalFloat
353 353 _.LazyReasonSource = _.NormalFloat
354 354 _.LazyReasonStart = _.NormalFloat
355 -_.LazySpecial { fg = _.ColorColumn.fg, }
355 +_.LazySpecial { fg = _.ColorColumn.fg }
356 356 _.LazyTaskError = _.ErrorMsg
357 357 _.LazyTaskOutput = _.Debug
358 -_.LazyUrl { sp = _.NormalFloat.fg, italic = true, underline = true, }
359 -_.LazyValue { italic = true, }
361 --- _.NoiceCmdline = _.NormalFloat
362 --- _.NoiceCmdlineIcon { fg = ui_accent, }
363 --- _.NoiceCmdlineIconCalculator = _.NoiceCmdlineIcon
364 --- _.NoiceCmdlineIconCmdline = _.NoiceCmdlineIcon
365 --- _.NoiceCmdlineIconFilter = _.NoiceCmdlineIcon
366 --- _.NoiceCmdlineIconHelp = _.NoiceCmdlineIcon
367 --- _.NoiceCmdlineIconIncRename = _.NoiceCmdlineIcon
368 --- _.NoiceCmdlineIconInput = _.NoiceCmdlineIcon
369 --- _.NoiceCmdlineIconLua = _.NoiceCmdlineIcon
370 --- _.NoiceCmdlineIconSearch = _.NoiceCmdlineIcon
371 ---
372 --- _.NoiceCmdlinePopup = _.NormalFloat
373 --- _.NoiceCmdlinePopupBorder = _.FloatBorder
374 --- _.NoiceCmdlinePopupBorderCalculator = _.NoiceCmdlinePopupBorder
375 --- _.NoiceCmdlinePopupBorderCmdline = _.NoiceCmdlinePopupBorder
376 --- _.NoiceCmdlinePopupBorderFilter = _.NoiceCmdlinePopupBorder
377 --- _.NoiceCmdlinePopupBorderHelp = _.NoiceCmdlinePopupBorder
378 --- _.NoiceCmdlinePopupBorderIncRename = _.NoiceCmdlinePopupBorder
379 --- _.NoiceCmdlinePopupBorderInput = _.NoiceCmdlinePopupBorder
380 --- _.NoiceCmdlinePopupBorderLua = _.NoiceCmdlinePopupBorder
381 --- _.NoiceCmdlinePopupBorderSearch = _.NoiceCmdlinePopupBorder
382 --- _.NoiceCmdlinePopupTitle = _.NoiceCmdlinePopup
383 --- _.NoiceCmdlinePrompt = _.NoiceCmdlinePopup
384 --- _.NoiceCompletionItemKindDefault { fg = ui_normal, }
385 --- _.NoiceCompletionItemKindClass = _.NoiceCompletionItemKindDefault
386 --- _.NoiceCompletionItemKindColor = _.NoiceCompletionItemKindDefault
387 --- _.NoiceCompletionItemKindConstant = _.NoiceCompletionItemKindDefault
388 --- _.NoiceCompletionItemKindConstructor = _.NoiceCompletionItemKindDefault
389 --- _.NoiceCompletionItemKindEnum = _.NoiceCompletionItemKindDefault
390 --- _.NoiceCompletionItemKindEnumMember = _.NoiceCompletionItemKindDefault
391 --- _.NoiceCompletionItemKindField = _.NoiceCompletionItemKindDefault
392 --- _.NoiceCompletionItemKindFile = _.NoiceCompletionItemKindDefault
393 --- _.NoiceCompletionItemKindFolder = _.NoiceCompletionItemKindDefault
394 --- _.NoiceCompletionItemKindFunction = _.NoiceCompletionItemKindDefault
395 --- _.NoiceCompletionItemKindInterface = _.NoiceCompletionItemKindDefault
396 --- _.NoiceCompletionItemKindKeyword = _.NoiceCompletionItemKindDefault
397 --- _.NoiceCompletionItemKindMethod = _.NoiceCompletionItemKindDefault
398 --- _.NoiceCompletionItemKindModule = _.NoiceCompletionItemKindDefault
399 --- _.NoiceCompletionItemKindProperty = _.NoiceCompletionItemKindDefault
400 --- _.NoiceCompletionItemKindSnippet = _.NoiceCompletionItemKindDefault
401 --- _.NoiceCompletionItemKindStruct = _.NoiceCompletionItemKindDefault
402 --- _.NoiceCompletionItemKindText = _.NoiceCompletionItemKindDefault
403 --- _.NoiceCompletionItemKindUnit = _.NoiceCompletionItemKindDefault
404 --- _.NoiceCompletionItemKindValue = _.NoiceCompletionItemKindDefault
405 --- _.NoiceCompletionItemKindVariable = _.NoiceCompletionItemKindDefault
406 --- _.NoiceCompletionItemMenu = _.NoiceCompletionItemKindDefault
407 --- _.NoiceCompletionItemWord = _.NoiceCompletionItemKindDefault
408 ---
409 --- _.NoiceConfirm = _.NormalFloat
410 --- _.NoiceConfirmBorder = _.FloatBorder
411 --- _.NoiceFormatConfirm = _.LazyButton
412 --- _.NoiceFormatConfirmDefault = _.LazyButtonActive
413 ---
414 --- _.NoiceCursor = _.Cursor
415 ---
416 --- _.NoiceFormatDate = _.NonText
417 --- _.NoiceFormatEvent = _.NonText
418 --- _.NoiceFormatKind = _.NonText
419 --- _.NoiceFormatLevelDebug { fg = _.Debug.bg, }
420 --- _.NoiceFormatLevelError = _.DiagnosticError
421 --- _.NoiceFormatLevelInfo = _.DiagnosticInfo
422 --- _.NoiceFormatLevelOff { fg = content_minor, }
423 --- _.NoiceFormatLevelTrace = _.DiagnosticHint
424 --- _.NoiceFormatLevelWarn = _.DiagnosticWarn
425 --- _.NoiceFormatProgressDone = _.LazyProgressDone
426 --- _.NoiceFormatProgressTodo = _.LazyProgressTodo
427 --- _.NoiceFormatTitle = _.Title
428 ---
429 --- _.NoiceLspProgressClient = _.Debug
430 --- _.NoiceLspProgressSpinner = _.Debug
431 --- _.NoiceLspProgressTitle = _.Debug
432 ---
433 --- _.NoiceMini = _.DiagnosticInfo
434 ---
435 --- _.NoicePopup = _.NormalFloat
436 --- _.NoicePopupBorder = _.FloatBorder
437 ---
438 --- _.NoicePopupmenu = _.Pmenu
439 --- _.NoicePopupmenuBorder = _.FloatBorder
440 --- _.NoicePopupmenuMatch = _.Bold
441 --- _.NoicePopupmenuSelected = _.PmenuSel
442 ---
443 --- _.NoiceScrollbar = _.PmenuSbar
444 --- _.NoiceScrollbarThumb = _.PmenuThumb
445 ---
446 --- _.NoiceSplit = _.Normal
447 --- _.NoiceSplitBorder = _.FloatBorder
448 --- _.NoiceVirtualText { fg = ui_important_global, bg = ui_unfocus, }
449 --- _.NotifyERRORBorder { fg = _.DiagnosticError.fg, bg = _.FloatBorder.bg, }
450 --- _.NotifyWARNBorder { fg = _.DiagnosticWarn.fg, bg = _.FloatBorder.bg, }
451 --- _.NotifyINFOBorder { fg = _.DiagnosticInfo.fg, bg = _.FloatBorder.bg, }
452 --- _.NotifyDEBUGBorder { fg = _.Debug.bg, bg = _.FloatBorder.bg, }
453 --- _.NotifyTRACEBorder { fg = _.DiagnosticHint.fg, bg = _.FloatBorder.bg, }
454 ---
455 --- _.NotifyERRORIcon { fg = _.DiagnosticError.fg, }
456 --- _.NotifyWARNIcon { fg = _.DiagnosticWarn.fg, }
457 --- _.NotifyINFOIcon { fg = _.DiagnosticInfo.fg, }
458 --- _.NotifyDEBUGIcon { fg = _.Debug.bg, }
459 --- _.NotifyTRACEIcon { fg = _.DiagnosticHint.fg, }
460 ---
461 --- _.NotifyERRORTitle { fg = _.DiagnosticError.fg, }
462 --- _.NotifyWARNTitle { fg = _.DiagnosticWarn.fg, }
463 --- _.NotifyINFOTitle { fg = _.DiagnosticInfo.fg, }
464 --- _.NotifyDEBUGTitle { fg = _.Debug.bg, }
465 --- _.NotifyTRACETitle { fg = _.DiagnosticHint.fg, }
466 ---
467 --- _.NotifyERRORBody = _.NormalFloat
468 --- _.NotifyWARNBody = _.NormalFloat
469 --- _.NotifyINFOBody = _.NormalFloat
470 --- _.NotifyDEBUGBody = _.NormalFloat
471 --- _.NotifyTRACEBody = _.NormalFloat
358 +_.LazyUrl { sp = _.NormalFloat.fg, italic = true, underline = true }
359 +_.LazyValue { italic = true }
473 361 _.TelescopeSelectionCaret = _.PmenuSel
474 362 _.TelescopeSelection = _.PmenuSel
475 -_.TelescopeMultiSelection { fg = content_normal, bg = ui_important_local, }
363 +_.TelescopeMultiSelection { fg = content_normal, bg = ui_important_local }
477 -_.FlashBackdrop { fg = ui_normal, bg = ui_backdrop, }
365 +_.FlashBackdrop { fg = ui_normal, bg = ui_backdrop }
478 366 _.FlashMatch = _.IncSearch
479 367 _.FlashCurrent = _.CurSearch
480 -_.FlashLabel { fg = ui_accent, bg = ui_backdrop, }
368 +_.FlashLabel { fg = ui_accent, bg = ui_backdrop }
482 -_.GitSignsAdd { fg = _.DiffAdd.fg, bg = _.LineNr.bg, }
483 -_.GitSignsChange { fg = _.DiffChange.fg, bg = _.LineNr.bg, }
484 -_.GitSignsDelete { fg = _.DiffDelete.fg, bg = _.LineNr.bg, }
486 -_.GitSignsChangedelete = _.GitSignsChange
487 -_.GitSignsTopdelete = _.GitSignsDelete
488 -_.GitSignsUntracked = _.GitSignsAdd
490 -_.GitSignsAddNr = _.GitSignsAdd
491 -_.GitSignsChangeNr = _.GitSignsChange
492 -_.GitSignsDeleteNr = _.GitSignsDelete
494 -_.GitSignsChangedeleteNr = _.GitSignsChange
495 -_.GitSignsTopdeleteNr = _.GitSignsDelete
496 -_.GitSignsUntrackedNr = _.GitSignsAdd
498 -_.GitSignsAddLn = _.GitSignsAdd
499 -_.GitSignsChangeLn = _.GitSignsChange
500 -_.GitSignsChangedeleteLn = _.GitSignsChange
501 -_.GitSignsUntrackedLn = _.GitSignsAdd
503 -_.GitSignsAddPreview = _.GitSignsAdd
504 -_.GitSignsDeletePreview = _.GitSignsDelete
506 -_.GitSignsCurrentLineBlame = _.NonText
507 -_.GitSignsAddInline = _.GitSignsAdd
508 -_.GitSignsDeleteInline = _.GitSignsDelete
509 -_.GitSignsChangeInline = _.GitSignsChange
511 -_.GitSignsAddLnInline = _.DiffText
512 -_.GitSignsDeleteLnInline = _.DiffText
513 -_.GitSignsChangeLnInline = _.DiffText
515 -_.GitSignsDeleteVirtLn = _.GitSignsDelete
516 -_.GitSignsDeleteVirtLnInLine = _.DiffText
517 -_.GitSignsVirtLnum { fg = _.LineNr.fg, }
519 -_.WhichKey { fg = ui_important_global, }
520 -_.WhichKeyGroup { fg = ui_important_local, }
521 -_.WhichKeySeparator { fg = ui_minor, }
522 -_.WhichKeyDesc { fg = ui_normal, }
370 +_.WhichKey { fg = ui_important_global }
371 +_.WhichKeyGroup { fg = ui_important_local }
372 +_.WhichKeySeparator { fg = ui_minor }
373 +_.WhichKeyDesc { fg = ui_normal }
523 374 _.WhichKeyFloat = _.NormalFloat
524 375 _.WhichKeyBorder = _.FloatBorder
525 376 _.WhichKeyValue = _.Comment
527 378 _.IblIndent = _.Whitespace
528 379 _.IblWhitespace = _.Whitespace
529 -_.IblScope { fg = ui_focus, bg = _.Normal.bg, }
532 -_.MiniStarterCurrent { fg = ui_normal, bg = ui_accent, }
533 -_.MiniStarterFooter = _.Keyword
534 -_.MiniStarterHeader = _.Comment
535 -_.MiniStarterInactive { fg = content_unfocus, }
536 -_.MiniStarterItem = _.Normal
537 -_.MiniStarterItemBullet = _.Whitespace
538 -_.MiniStarterItemPrefix { fg = content_focus, }
539 -_.MiniStarterSection { fg = content_important_global, underline = true, }
540 -_.MiniStarterQuery { fg = content_normal, bg = content_accent, }
542 ---TODO: Oil highlights
380 +_.IblScope { fg = ui_focus, bg = _.Normal.bg }
544 382 return function ()
545 383 preview.setup()

neovim/lua/bugabinga/options/togglers.lua

Modified
33 33 display_name = display_name,
34 34 options = options,
35 35 toggle = toggle,
36 - tostring = toggler_tostring,
36 + tostring = toggler_tostring
43 43 return {
44 44 name = name,
45 45 default = option_value,
46 - alternative = alternative,
46 + alternative = alternative
51 51 table.insert( togglers, make_toggler( display_name, options ) )
54 -add_toggler( icon.spelling, { make_option 'spell', } )
55 -add_toggler( icon.linenumber, { make_option 'number', make_option 'relativenumber', } )
56 -add_toggler( icon.linehighlight, { make_option 'cursorline', } )
57 -add_toggler( icon.virtual, { make_option( 'virtualedit', 'all' ), } )
54 +add_toggler( icon.spelling, { make_option 'spell' } )
55 +add_toggler( icon.linenumber, { make_option 'number', make_option 'relativenumber' } )
56 +add_toggler( icon.linehighlight, { make_option 'cursorline' } )
57 +add_toggler( icon.wrap, { make_option 'wrap' } )
58 +add_toggler( icon.virtual, { make_option( 'virtualedit', 'all' ) } )
59 60 local tostring = function ( self )
60 61 return vim.iter( self )
67 68 return setmetatable( togglers, {
68 - __tostring = tostring,
69 + __tostring = tostring

neovim/lua/bugabinga/plugins/comment.lua

Modified
2 2 return {
3 3 'numToStr/Comment.nvim',
4 4 version = '0.*',
5 5 lazy = false,
6 - keys = {
7 - { 'gc', mode = { 'n', 'v', }, desc = 'Comment toggle linewise', },
8 - { 'gb', mode = { 'n', 'v', }, desc = 'Comment toggle blockwise', },
9 - },
10 - dependencies = {
11 - 'JoosepAlviste/nvim-ts-context-commentstring',
12 - },
13 - opts = function ()
14 - local commentstring_avail, commentstring = pcall( require, 'ts_context_commentstring.integrations.comment_nvim' )
15 - return commentstring_avail and commentstring and { pre_hook = commentstring.create_pre_hook(), } or {}
16 - end,
6 + opts = {},

neovim/lua/bugabinga/plugins/commentstring.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'JoosepAlviste/nvim-ts-context-commentstring',
3 - init = function ()
4 - vim.g.skip_ts_context_commentstring_module = true
5 - end,
6 - opts = { enable_autocmd = false, },
7 -}

neovim/lua/bugabinga/plugins/flash.lua

Modified
4 4 local map = require 'std.map'
6 6 map.normal.visual.operator_pending {
7 7 keys = '<cr>',
8 8 category = 'navigation',
9 9 description = 'Jump to occurence of next chars quickly',
10 - command = function () require 'flash'.jump() end,
10 + command = function () prequire 'flash'.jump() end,
13 +map.normal.visual.operator_pending {
14 + keys = '<s-cr>',
15 + category = 'navigation',
16 + description = 'Jump to occurence of next treesitter node quickly',
17 + command = function () prequire 'flash'.treesitter() end,
19 +-- { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
20 +-- { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
21 +-- { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
22 +-- { "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
13 24 return {
14 25 'folke/flash.nvim',
15 - version = '1.*',
16 - -- event = 'VeryLazy',
26 + version = '2.*',
27 + event = 'VeryLazy',
17 28 opts = {
18 - -- highlight = { backdrop = false, },
19 - -- modes = { char = { highlight = { backdrop = false, }, }, },
29 + highlight = { backdrop = false },
30 + modes = { char = { highlight = { backdrop = false } } },

neovim/lua/bugabinga/plugins/glow.lua

Deleted
deleted file mode 100644
1 -require 'bugabinga.health'.add_dependency
2 -{
3 - name = 'Glow',
4 - name_of_executable = 'glow',
5 -}
7 -local map = require 'std.map'
9 -map.normal {
10 - description = 'Generate markdown preview',
11 - keys = '<leader>gm',
12 - category = 'preview',
13 - command = '<cmd>Glow<cr>',
14 -}
16 -return {
17 - 'ellisonleao/glow.nvim',
18 - cmd = 'Glow',
19 - opts = {
20 - width_ratio = 0.69,
21 - height_ratio = 0.42,
22 - },
23 -}

neovim/lua/bugabinga/plugins/heirline.lua

Modified
10 10 'rebelot/heirline.nvim',
11 11 version = '1.*',
12 - event = 'VeryLazy',
12 + lazy = false,
13 13 dependencies = {
14 + -- FIXME: use my own icons
14 15 'nvim-tree/nvim-web-devicons',
15 - { 'echasnovski/mini.diff', lazy = true, },
16 - { 'SmiteshP/nvim-navic', lazy = true, },
18 17 config = function ()
19 18 local heirline = require 'heirline'
98 97 hl = function ( self )
99 98 local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
100 - return { fg = self.mode_colors[mode], bold = true, }
99 + return { fg = self.mode_colors[mode], bold = true }
103 102 update = {
113 112 init = function ( self )
114 113 local filename = self.filename
115 114 local extension = vim.fn.fnamemodify( filename, ':e' )
116 - self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true, } )
115 + self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true } )
118 117 provider = function ( self )
119 118 return self.icon and (self.icon .. ' ')
168 167 file_icon,
169 - { provider = ' ', },
168 + { provider = ' ' },
170 169 file_name,
171 170 file_flags,
172 - { provider = '%<', }, -- this means that the statusline is cut here when there's not enough space
171 + { provider = '%<' }, -- this means that the statusline is cut here when there's not enough space
175 174 local file_type = {
176 175 provider = function ()
177 - return icon.file .. ' ' .. string.upper( vim.bo.filetype )
176 + return icon.file .. ' ' .. string.lower( vim.bo.filetype )
201 200 provider = function ()
202 201 -- stackoverflow, compute human readable file size
203 202 -- i want to see vim opening a 1EiB file 󰱯
204 - local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E', }
203 + local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' }
205 204 local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
206 205 fsize = (fsize < 0 and 0) or fsize
207 206 if fsize < 1024 then
226 225 condition = conditions.lsp_attached,
227 226 -- FIXME: updates from parent components do not seem to update children,
228 227 -- if those have their own updates?
229 - update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave', },
228 + update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave' },
231 230 provider = function ()
232 231 local names = {}
233 - for _, client in pairs( vim.lsp.get_clients { bufnr = 0, } ) do
232 + for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do
234 233 table.insert( names, client.name )
236 235 return icon.lsp .. ' ' .. table.concat( names, ' ' )
240 - local navic = {
241 - condition = function ()
242 - local ok, navic = pcall( require, 'nvim-navic' )
243 - return ok and navic.is_available()
244 - end,
245 - static = {
246 - -- create a type highlight map
247 - type_hl = {
248 - File = 'Directory',
249 - Module = '@include',
250 - Namespace = '@namespace',
251 - Package = '@include',
252 - Class = '@structure',
253 - Method = '@method',
254 - Property = '@property',
255 - Field = '@field',
256 - Constructor = '@constructor',
257 - Enum = '@field',
258 - Interface = '@type',
259 - Function = '@function',
260 - Variable = '@variable',
261 - Constant = '@constant',
262 - String = '@string',
263 - Number = '@number',
264 - Boolean = '@boolean',
265 - Array = '@field',
266 - Object = '@type',
267 - Key = '@keyword',
268 - Null = '@comment',
269 - EnumMember = '@field',
270 - Struct = '@structure',
271 - Event = '@keyword',
272 - Operator = '@operator',
273 - TypeParameter = '@type',
274 - },
275 - -- bit operation dark magic, see below...
276 - enc = function ( line, col, winnr )
277 - return bit.bor( bit.lshift( line, 16 ), bit.lshift( col, 6 ), winnr )
278 - end,
279 - -- line: 16 bit (65535); col: 10 bit (1023); winnr: 6 bit (63)
280 - dec = function ( c )
281 - local line = bit.rshift( c, 16 )
282 - local col = bit.band( bit.rshift( c, 6 ), 1023 )
283 - local winnr = bit.band( c, 63 )
284 - return line, col, winnr
285 - end,
286 - },
287 - init = function ( self )
288 - local data = require 'nvim-navic'.get_data() or {}
289 - local children = {}
290 - -- create a child for each level
291 - for i, d in ipairs( data ) do
292 - -- encode line and column numbers into a single integer
293 - local pos = self.enc( d.scope.start.line, d.scope.start.character, self.winnr )
294 - local child = {
295 - {
296 - provider = d.icon,
297 - hl = self.type_hl[d.type],
298 - },
299 - {
300 - -- escape `%`s (elixir) and buggy default separators
301 - provider = d.name:gsub( '%%', '%%%%' ):gsub( '%s*->%s*', '' ),
302 - -- highlight icon only or location name as well
303 - hl = self.type_hl[d.type],
305 - on_click = {
306 - -- pass the encoded position through minwid
307 - minwid = pos,
308 - callback = function ( _, minwid )
309 - -- decode
310 - local line, col, winnr = self.dec( minwid )
311 - vim.api.nvim_win_set_cursor( vim.fn.win_getid( winnr ), { line, col, } )
312 - end,
313 - name = 'heirline_navic',
314 - },
315 - },
316 - }
317 - -- add a separator only if needed
318 - if #data > 1 and i < #data then
319 - table.insert( child, {
320 - provider = ' > ',
321 - -- hl = { fg = 'bright_fg', },
322 - } )
323 - end
324 - table.insert( children, child )
325 - end
326 - -- instantiate the new child, overwriting the previous one
327 - self.child = self:new( children, 1 )
328 - end,
329 - -- evaluate the children containing navic components
330 - provider = function ( self )
331 - return self.child:eval()
332 - end,
333 - -- hl = { fg = 'gray', },
334 - update = 'CursorMoved',
335 - }
337 - local diagnostic_enabled = {
338 - init = function ( self )
339 - self.icon = (not vim.diagnostic.is_enabled()) and icon.toggle_off or icon.toggle_on
340 - end,
341 - provider = function ( self )
342 - return icon.diagnostic .. ' ' .. self.icon
343 - end,
344 - }
346 239 local diagnostic = {
347 240 condition = conditions.has_diagnostics,
356 249 init = function ( self )
357 - self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR, } )
358 - self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN, } )
359 - self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT, } )
360 - self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO, } )
250 + self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR } )
251 + self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN } )
252 + self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT } )
253 + self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO } )
363 - update = { 'DiagnosticChanged', 'BufEnter', 'BufLeave', },
256 + update = { 'DiagnosticChanged', 'BufEnter', 'BufLeave' },
366 259 provider = function ( self )
403 296 local svn_get_relative_url = function ()
404 297 -- FIXME: replace with vim.system
405 298 local job = require 'plenary.job'
406 - local relative_url = { '[ERR]', }
299 + local relative_url = { '[ERR]' }
409 302 :new {
410 303 command = 'svn',
411 - args = { 'info', '--show-item', 'relative-url', '--no-newline', },
304 + args = { 'info', '--show-item', 'relative-url', '--no-newline' },
412 305 on_exit = function ( current_job, exit_code )
413 306 if exit_code == 0 then
414 307 relative_url = current_job:result()
515 408 hl = 'Bold',
518 - local togglers = {
519 - provider = function ()
520 - local togglers = require 'bugabinga.options.togglers'
521 - return tostring( togglers )
522 - end,
523 - }
525 411 local macro_recording = {
526 412 condition = function ()
527 413 return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
529 415 provider = icon.macro .. ' ',
530 416 hl = 'PreProc',
531 - utils.surround( { '░▒▓ ', ' ▓▒░', }, nil, {
417 + utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, {
532 418 provider = function ()
533 419 return vim.fn.reg_recording()
545 431 local ok, lazy_status = pcall( require, 'lazy.status' )
546 432 return ok and lazy_status.has_updates()
548 - update = { 'User', pattern = 'LazyUpdate', },
434 + update = { 'User', pattern = 'LazyUpdate' },
549 435 provider = function ()
550 436 return ' ' .. icon.lazy .. ' ' .. require 'lazy.status'.updates() .. ' '
560 - local align = { provider = '%=', }
561 - local space = { provider = ' ', }
446 + local align = { provider = '%=' }
447 + local space = { provider = ' ' }
563 449 local default_statusline = {
564 450 vi_mode,
570 456 align,
571 457 diagnostic,
572 - space,
573 - lsp_active,
574 458 align,
575 - togglers,
576 459 space,
577 460 space,
578 - diagnostic_enabled,
579 - space,
581 462 space,
463 + lsp_active,
464 + space,
582 465 file_encoding,
583 466 space,
584 467 file_format,
607 490 local terminal_statusline = {
609 492 condition = function ()
610 - return conditions.buffer_matches { buftype = { 'terminal', }, }
493 + return conditions.buffer_matches { buftype = { 'terminal' } }
613 - { condition = conditions.is_active, vi_mode, space, },
496 + { condition = conditions.is_active, vi_mode, space },
614 497 file_type,
615 498 space,
616 499 terminal_name,
657 540 condition = function ()
658 - return conditions.buffer_matches { buftype = { 'terminal', }, }
541 + return conditions.buffer_matches { buftype = { 'terminal' } }
661 544 file_type,
667 550 file_name_block,
668 - space,
669 - navic,
788 669 local tab_pages = {
789 - { provider = '%=', },
670 + { provider = '%=' },
790 671 utils.make_tablist( tabpage ),

neovim/lua/bugabinga/plugins/lint.lua

Modified
1 1 --FIXME: own this
2 -local uv = vim.uv or vim.loop
3 2 return {
4 3 'mfussenegger/nvim-lint',
5 4 ft = {
6 5 'lua',
7 6 'sh',
8 - 'nu',
7 + 'systemd',
8 + 'editorconfig',
9 + 'yaml',
10 11 opts = {
11 12 linters_by_ft = {
12 - lua = { 'selene', },
13 - sh = { 'shellcheck', 'dotenv_linter', },
14 - systemd = { 'systemd-analyze', },
13 + lua = { 'selene' },
14 + sh = { 'shellcheck', 'dotenv_linter' },
15 + systemd = { 'systemd-analyze' },
16 + editorconfig = { 'editorconfig-checker' },
17 + yaml = { 'yq' },
16 - linters = { },
19 + linters = {},
18 21 config = function ( _, opts )
19 22 local lint = require 'lint'
21 24 for k, v in pairs( opts.linters ) do
22 25 lint.linters[k] = v
24 - local timer = assert( uv.new_timer() )
27 + ---@diagnostic disable-next-line: undefined-field
28 + local timer = assert( vim.uv.new_timer() )
25 29 local DEBOUNCE_MS = 500
26 - local aug = vim.api.nvim_create_augroup( 'Lint', { clear = true, } )
27 - vim.api.nvim_create_autocmd( { 'BufWritePost', }, {
30 + local aug = vim.api.nvim_create_augroup( 'Lint', { clear = true } )
31 + vim.api.nvim_create_autocmd( { 'BufWritePost' }, {
28 32 group = aug,
29 33 callback = function ()
30 34 local bufnr = vim.api.nvim_get_current_buf()
32 36 timer:start( DEBOUNCE_MS, 0,
33 37 vim.schedule_wrap( function ()
34 38 if vim.api.nvim_buf_is_valid( bufnr ) then
35 - vim.api.nvim_buf_call( bufnr, function () lint.try_lint( nil, { ignore_errors = true, } ) end )
39 + vim.api.nvim_buf_call( bufnr, function () lint.try_lint( nil, { ignore_errors = true } ) end )
37 41 end )

neovim/lua/bugabinga/plugins/navbuddy.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -return {
4 - 'SmiteshP/nvim-navbuddy',
5 - dependencies = {
6 - 'SmiteshP/nvim-navic',
7 - 'MunifTanjim/nui.nvim',
8 - },
9 - opts = {
10 - window = {
11 - border = vim.g.border_style,
12 - },
13 - },
14 -}

neovim/lua/bugabinga/plugins/navic.lua

Deleted
deleted file mode 100644
1 -return { 'SmiteshP/nvim-navic', opts = {}, }

neovim/lua/bugabinga/plugins/neogen.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - description = 'Doc Comment',
5 - category = 'generate',
6 - keys = '<leader>gdd',
7 - command = function () require 'neogen'.generate() end,
8 -}
10 -map.normal {
11 - name = 'Doc Comment for Function',
12 - category = 'generate',
13 - keys = '<leader>gdm',
14 - command = function () require 'neogen'.generate { type = 'func', } end,
15 -}
17 -map.normal {
18 - description = 'Doc Comment for File',
19 - category = 'generate',
20 - keys = '<leader>gdf',
21 - command = function () require 'neogen'.generate { type = 'file', } end,
22 -}
24 -map.normal {
25 - description = 'Doc Comment for Class',
26 - category = 'generate',
27 - keys = '<leader>gdc',
28 - command = function () require 'neogen'.generate { type = 'class', } end,
29 -}
31 -map.normal {
32 - description = 'Doc Comment for Type',
33 - category = 'generate',
34 - keys = '<leader>gdt',
35 - command = function () require 'neogen'.generate { type = 'type', } end,
36 -}
38 -return {
39 - 'danymat/neogen',
40 - dependencies = { 'nvim-treesitter/nvim-treesitter', },
41 - opts = {
42 - snippet_engine = 'luasnip',
43 - },
44 -}

neovim/lua/bugabinga/plugins/nrpattern.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'zegervdv/nrpattern.nvim',
3 - keys = { '<C-a>', '<C-x>', },
4 - config = function ()
5 - local nrpattern = require 'nrpattern'
6 - -- this plugin overrides all its settings if empty map is given
7 - nrpattern.setup()
8 - end,
9 -}

neovim/lua/bugabinga/plugins/nui.lua

Modified
1 -return { 'MunifTanjim/nui.nvim', }
1 +return {
2 + 'MunifTanjim/nui.nvim',
3 +}

neovim/lua/bugabinga/plugins/qf_helper.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - description = 'Grep search for word under cursor',
5 - category = 'search',
6 - keys = 'gw',
7 - command = '<cmd>cclose <bar> Grep <cword><cr>',
8 -}
10 -map.normal {
11 - description = 'Goto next quickfix item',
12 - category = 'navigation',
13 - keys = ']q',
14 - command = '<cmd>QNext<cr>',
15 -}
17 -map.normal {
18 - description = 'Goto previous quickfix item',
19 - category = 'navigation',
20 - keys = '[q',
21 - command = '<cmd>QPrev<cr>',
22 -}
24 -map.normal {
25 - description = 'Toggle open quickfix window',
26 - category = 'navigation',
27 - keys = '<leader>Q',
28 - command = '<cmd>QFToggle!<CR>',
29 -}
31 -map.normal {
32 - description = 'Toggle open loclist window',
33 - category = 'navigation',
34 - keys = '<leader>L',
35 - command = '<cmd>LLToggle!<CR>',
36 -}
38 -return {
39 - 'stevearc/qf_helper.nvim',
40 - ft = 'qf',
41 - cmd = { 'QNext', 'QPrev', 'QFToggle', 'QFOpen', 'LLToggle', },
42 - opts = {
43 - prefer_loclist = false,
44 - },
45 -}

neovim/lua/bugabinga/plugins/schemastore.lua

Deleted
deleted file mode 100644
1 -return { 'b0o/schemastore.nvim', }

neovim/lua/bugabinga/plugins/ssr.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
2 -local user_command = require 'std.user_command'
4 -local open_ssr = function () prequire 'ssr'.open() end
6 -map.normal.visual {
7 - description = 'Open structural search and replace',
8 - category = 'refactoring',
9 - keys = '<leader>rr',
10 - command = open_ssr,
11 -}
13 -user_command.StructuralSearchAndReplace
14 -'Open structural search and replace view' (
15 - open_ssr
16 - )
18 -return {
19 - 'cshuaimin/ssr.nvim',
20 - opts = {
21 - border = vim.g.border_style,
22 - min_width = 69,
23 - min_height = 42,
24 - max_width = 3 * 69,
25 - max_height = 3 * 42,
26 - adjust_window = true,
27 - keymaps = {
28 - close = 'q',
29 - next_match = 'n',
30 - prev_match = 'N',
31 - replace_confirm = '<cr>',
32 - replace_all = '<c-cr>',
33 - },
34 - },
35 -}

neovim/lua/bugabinga/plugins/transparent.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - description = 'Toggle background transparency.',
5 - category = 'ui',
6 - keys = '<leader>tb',
7 - command = '<cmd>TransparentToggle<cr>',
8 -}
10 -return {
11 - 'xiyaowong/transparent.nvim',
12 - cmd = { 'TransparentEnable', 'TransparentDisable', 'TransparentToggle', },
13 - config = true,
14 -}

neovim/lua/bugabinga/plugins/treesitter.lua

Modified
1 1 require 'bugabinga.health'.add_dependency
2 -{ name = 'CMake', name_of_executable = 'cmake', }
3 - { name_of_executable = 'make', }
4 - { name_of_executable = 'zig', }
5 - { name = 'TreeSitter CLI', name_of_executable = 'tree-sitter', }
6 - { name_of_executable = 'tar', }
2 +{ name = 'CMake', name_of_executable = 'cmake' }
3 + { name_of_executable = 'make' }
4 + { name_of_executable = 'zig' }
5 + { name = 'TreeSitter CLI', name_of_executable = 'tree-sitter' }
6 + { name_of_executable = 'tar' }
8 8 return {
9 9 'nvim-treesitter/nvim-treesitter',
10 - -- version = '0.9.*',
11 - -- branch = 'main', -- next gen version
12 10 branch = 'master',
13 11 lazy = false,
14 12 build = function ()
15 - require 'nvim-treesitter.install'.update { with_sync = true, }
13 + require 'nvim-treesitter.install'.update { with_sync = true }
17 15 dependencies = {
18 - -- 'nvim-treesitter/playground',
16 + -- FIXME: move nvim-treesitter modules out into normal config to prepare for main branch
19 17 'nvim-treesitter/nvim-treesitter-textobjects',
20 18 'windwp/nvim-ts-autotag',
21 19 'RRethy/nvim-treesitter-endwise',
22 - 'nvim-treesitter/nvim-treesitter-context',
23 20 'nushell/tree-sitter-nu',
25 22 config = function ()
27 24 local configs = require 'nvim-treesitter.configs'
29 26 install.prefer_git = false
30 - install.compilers = { 'zig cc', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC', }
27 + install.compilers = { 'zig cc', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC' }
32 29 local should_disable = function ( _, bufnr )
33 30 local max_filesize = 5 * 1024 * 1024 --MiB
31 + ---@diagnostic disable-next-line: undefined-field
34 32 local ok, stats = pcall( vim.loop.fs_stat, vim.api.nvim_buf_get_name( bufnr or 0 ) )
35 33 if ok and stats and stats.size > max_filesize then
36 34 return true
41 39 ---@diagnostic disable-next-line: missing-fields
42 40 configs.setup {
43 41 sync_install = false,
44 - ignore_install = { 'oil', },
42 + ignore_install = { 'oil' },
45 43 auto_install = true,
47 - autotag = { enable = true, disable = should_disable, },
48 - endwise = { enable = true, disable = should_disable, },
45 + autotag = { enable = true, disable = should_disable },
46 + endwise = { enable = true, disable = should_disable },
50 48 highlight = {
51 49 enable = true,
57 55 enable = true,
58 56 disable = should_disable,
59 57 keymaps = {
58 + -- FIXME: not too happy with these binds. but i dont feel better ones right now.
60 59 init_selection = '<up>',
61 60 node_incremental = '<up>',
62 61 node_decremental = '<down>',
67 - indent = { enable = true, disable = should_disable, },
66 + indent = { enable = true, disable = should_disable },
69 68 textobjects = {
70 69 select = {
72 71 disable = should_disable,
73 72 lookahead = true,
74 73 keymaps = {
75 - ['af'] = { query = '@call.outer', desc = 'outer function call', },
76 - ['if'] = { query = '@call.inner', desc = 'inner function call', },
74 + ['af'] = { query = '@call.outer', desc = 'outer function call' },
75 + ['if'] = { query = '@call.inner', desc = 'inner function call' },
78 - ['am'] = { query = '@function.outer', desc = 'outer function definition', },
79 - ['im'] = { query = '@function.inner', desc = 'inner function definition', },
77 + ['am'] = { query = '@function.outer', desc = 'outer function definition' },
78 + ['im'] = { query = '@function.inner', desc = 'inner function definition' },
81 - ['ac'] = { query = '@class.outer', desc = 'outer class', },
82 - ['ic'] = { query = '@class.inner', desc = 'inner class', },
80 + ['ai'] = { query = '@conditional.outer', desc = 'outer conditional' },
81 + ['ii'] = { query = '@conditional.inner', desc = 'inner conditional' },
84 - ['ai'] = { query = '@conditional.outer', desc = 'outer conditional', },
85 - ['ii'] = { query = '@conditional.inner', desc = 'inner conditional', },
83 + ['aa'] = { query = '@parameter.outer', desc = 'outer parameter' },
84 + ['ia'] = { query = '@parameter.inner', desc = 'inner parameter' },
87 - ['al'] = { query = '@loop.outer', desc = 'outer loop', },
88 - ['il'] = { query = '@loop.inner', desc = 'inner loop', },
90 - ['aa'] = { query = '@parameter.outer', desc = 'outer parameter', },
91 - ['ia'] = { query = '@parameter.inner', desc = 'inner parameter', },
93 - ['agc'] = { query = '@comment.outer', desc = 'outer comment', },
94 - ['igc'] = { query = '@comment.inner', desc = 'inner comment', },
86 + ['ac'] = { query = '@comment.outer', desc = 'outer comment' },
87 + ['ic'] = { query = '@comment.inner', desc = 'inner comment' },
96 89 selection_modes = {
97 90 ['@parameter.outer'] = 'v',
107 100 disable = should_disable,
108 101 set_jumps = true,
109 102 goto_next = {
110 - [']f'] = { query = '@call.outer', desc = 'Goto next function call', },
111 - [']m'] = { query = '@function.outer', desc = 'Goto next function definition', },
112 - [']c'] = { query = '@class.outer', desc = 'Goto next class', },
113 - [']o'] = { query = '@conditional.outer', desc = 'Goto next conditional', },
114 - [']p'] = { query = '@parameter.outer', desc = 'Goto next parameter', },
103 + [']m'] = { query = '@function.outer', desc = 'Goto next function definition' },
116 105 goto_previous = {
117 - ['[f'] = { query = '@call.outer', desc = 'Goto previous function call', },
118 - ['[m'] = { query = '@function.outer', desc = 'Goto previous function definition', },
119 - ['[c'] = { query = '@class.outer', desc = 'goto previous class', },
120 - ['[o'] = { query = '@conditional.outer', desc = 'Goto previous conditional', },
121 - ['[p'] = { query = '@parameter.outer', desc = 'Goto previous parameter', },
106 + ['[m'] = { query = '@function.outer', desc = 'Goto previous function definition' },
127 - require 'treesitter-context'.setup {
128 - enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
129 - disable = should_disable,
130 - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
131 - min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
132 - line_numbers = true,
133 - multiline_threshold = 10, -- Maximum number of lines to show for a single context
134 - trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
135 - mode = 'topline', -- Line used to calculate context. Choices: 'cursor', 'topline'
136 - -- Separator between context and content. Should be a single character string, like '-'.
137 - -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
138 - separator = '-',
139 - zindex = 20, -- The Z-index of the context window
140 - on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
141 - }

neovim/lua/bugabinga/plugins/zen.lua

Modified
10 10 return {
11 11 'folke/zen-mode.nvim',
12 12 cmd = 'ZenMode',
13 - dependencies = { { 'folke/twilight.nvim', opts = { dimming = { inactive = true, }, }, }, },
13 + dependencies = { { 'folke/twilight.nvim', opts = { dimming = { inactive = false, }, }, }, },
14 14 opts = {
15 - --FIXME: this does not work, because on win32 there is no base64 binary
16 - plugins = { wezterm = { enabled = true, font = '+4', }, },
15 + plugins = { wezterm = { enabled = true, font = '+2', }, },
17 16 window = {
18 17 width = 0.69,
19 18 backdrop = 0.42,

neovim/lua/std/defer.lua

Modified
3 3 -- taken from https://gist.github.com/runiq/31aa5c4bf00f8e0843cd267880117201
5 5 local _ = {}
7 7 ---Validates args for `throttle()` and `debounce()`.
8 -local function td_validate(fn, ms)
9 - vim.validate{
10 - fn = { fn, 'f' },
11 - ms = {
12 - ms,
13 - function(ms)
14 - return type(ms) == 'number' and ms > 0
15 - end,
16 - "number > 0",
17 - },
18 - }
8 +local function td_validate( fn, ms )
9 + vim.validate {
10 + fn = { fn, 'f' },
11 + ms = {
12 + ms,
13 + function ( ms )
14 + return type( ms ) == 'number' and ms > 0
15 + end,
16 + 'number > 0',
17 + },
18 + }
21 21 --- Throttles a function on the leading edge. Automatically `schedule_wrap()`s.
22 22 --@param timeout (number) Timeout in ms
23 23 --@returns (function, timer) throttled function and timer. Remember to call
24 24 ---`timer:close()` at the end or you will leak memory!
25 -function _.throttle_leading(fn, ms)
26 - td_validate(fn, ms)
27 - local timer = vim.loop.new_timer()
28 - local running = false
25 +function _.throttle_leading( fn, ms )
26 + td_validate( fn, ms )
27 + local timer = vim.loop.new_timer()
28 + local running = false
30 - local function wrapped_fn(...)
31 - if not running then
32 - timer:start(ms, 0, function()
33 - running = false
34 - end)
35 - running = true
36 - pcall(vim.schedule_wrap(fn), select(1, ...))
37 - end
38 - end
39 - return wrapped_fn, timer
30 + local function wrapped_fn( ... )
31 + if not running then
32 + timer:start( ms, 0, function ()
33 + running = false
34 + end )
35 + running = true
36 + pcall( vim.schedule_wrap( fn ), select( 1, ... ) )
37 + end
38 + end
39 + return wrapped_fn, timer
42 42 --- Throttles a function on the trailing edge. Automatically
48 48 ---call to `fn` within the timeframe. Default: Use arguments of the first call.
49 49 --@returns (function, timer) Throttled function and timer. Remember to call
50 50 ---`timer:close()` at the end or you will leak memory!
51 -function _.throttle_trailing(fn, ms, last)
52 - td_validate(fn, ms)
53 - local timer = vim.loop.new_timer()
54 - local running = false
51 +function _.throttle_trailing( fn, ms, last )
52 + td_validate( fn, ms )
53 + local timer = vim.loop.new_timer()
54 + local running = false
56 - local wrapped_fn
57 - if not last then
58 - function wrapped_fn(...)
59 - if not running then
60 - local argv = {...}
61 - local argc = select('#', ...)
56 + local wrapped_fn
57 + if not last then
58 + function wrapped_fn( ... )
59 + if not running then
60 + local argv = { ... }
61 + local argc = select( '#', ... )
63 - timer:start(ms, 0, function()
64 - running = false
65 - pcall(vim.schedule_wrap(fn), unpack(argv, 1, argc))
66 - end)
67 - running = true
68 - end
69 - end
70 - else
71 - local argv, argc
72 - function wrapped_fn(...)
73 - argv = {...}
74 - argc = select('#', ...)
63 + timer:start( ms, 0, function ()
64 + running = false
65 + pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
66 + end )
67 + running = true
68 + end
69 + end
70 + else
71 + local argv, argc
72 + function wrapped_fn( ... )
73 + argv = { ... }
74 + argc = select( '#', ... )
76 - if not running then
77 - timer:start(ms, 0, function()
78 - running = false
79 - pcall(vim.schedule_wrap(fn), unpack(argv, 1, argc))
80 - end)
81 - running = true
82 - end
83 - end
84 - end
85 - return wrapped_fn, timer
76 + if not running then
77 + timer:start( ms, 0, function ()
78 + running = false
79 + pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
80 + end )
81 + running = true
82 + end
83 + end
84 + end
85 + return wrapped_fn, timer
88 88 --- Debounces a function on the leading edge. Automatically `schedule_wrap()`s.
91 91 --@param timeout (number) Timeout in ms
92 92 --@returns (function, timer) Debounced function and timer. Remember to call
93 93 ---`timer:close()` at the end or you will leak memory!
94 -function _.debounce_leading(fn, ms)
95 - td_validate(fn, ms)
96 - local timer = vim.loop.new_timer()
97 - local running = false
94 +function _.debounce_leading( fn, ms )
95 + td_validate( fn, ms )
96 + local timer = vim.loop.new_timer()
97 + local running = false
99 - local function wrapped_fn(...)
100 - timer:start(ms, 0, function()
101 - running = false
102 - end)
99 + local function wrapped_fn( ... )
100 + timer:start( ms, 0, function ()
101 + running = false
102 + end )
104 - if not running then
105 - running = true
106 - pcall(vim.schedule_wrap(fn), select(1, ...))
107 - end
108 - end
109 - return wrapped_fn, timer
104 + if not running then
105 + running = true
106 + pcall( vim.schedule_wrap( fn ), select( 1, ... ) )
107 + end
108 + end
109 + return wrapped_fn, timer
112 112 --- Debounces a function on the trailing edge. Automatically
118 118 ---call to `fn` within the timeframe. Default: Use arguments of the last call.
119 119 --@returns (function, timer) Debounced function and timer. Remember to call
120 120 ---`timer:close()` at the end or you will leak memory!
121 -function _.debounce_trailing(fn, ms, first)
122 - td_validate(fn, ms)
123 - local timer = vim.loop.new_timer()
124 - local wrapped_fn
121 +function _.debounce_trailing( fn, ms, first )
122 + td_validate( fn, ms )
123 + local timer = vim.loop.new_timer()
124 + local wrapped_fn
126 - if not first then
127 - function wrapped_fn(...)
128 - local argv = {...}
129 - local argc = select('#', ...)
126 + if not first then
127 + function wrapped_fn( ... )
128 + local argv = { ... }
129 + local argc = select( '#', ... )
131 - timer:start(ms, 0, function()
132 - pcall(vim.schedule_wrap(fn), unpack(argv, 1, argc))
133 - end)
134 - end
135 - else
136 - local argv, argc
137 - function wrapped_fn(...)
138 - argv = argv or {...}
139 - argc = argc or select('#', ...)
131 + timer:start( ms, 0, function ()
132 + pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
133 + end )
134 + end
135 + else
136 + local argv, argc
137 + function wrapped_fn( ... )
138 + argv = argv or { ... }
139 + argc = argc or select( '#', ... )
141 - timer:start(ms, 0, function()
142 - pcall(vim.schedule_wrap(fn), unpack(argv, 1, argc))
143 - end)
144 - end
145 - end
146 - return wrapped_fn, timer
141 + timer:start( ms, 0, function ()
142 + pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
143 + end )
144 + end
145 + end
146 + return wrapped_fn, timer
149 149 --- Test deferment methods (`{throttle,debounce}_{leading,trailing}()`).
152 152 --@param ms (number, optional) Timeout in ms, default 2000.
153 153 --@param firstlast (bool, optional) Whether to use the 'other' fn call
154 154 ---strategy.
155 -function _.test_defer(bouncer, ms, firstlast)
156 - local bouncers = {
157 - tl = _.throttle_leading,
158 - tt = _.throttle_trailing,
159 - dl = _.debounce_leading,
160 - dt = _.debounce_trailing,
161 - }
155 +function _.test_defer( bouncer, ms, firstlast )
156 + local bouncers = {
157 + tl = _.throttle_leading,
158 + tt = _.throttle_trailing,
159 + dl = _.debounce_leading,
160 + dt = _.debounce_trailing,
163 - local timeout = ms or 2000
163 + local timeout = ms or 2000
165 - local bounced = bouncers[bouncer](
166 - function(i) vim.cmd('echom "' .. bouncer .. ': ' .. i .. '"') end,
167 - timeout,
168 - firstlast
169 - )
165 + local bounced = bouncers[bouncer](
166 + function ( i ) vim.cmd( 'echom "' .. bouncer .. ': ' .. i .. '"' ) end,
167 + timeout,
168 + firstlast
171 - for i, _ in ipairs{1,2,3,4,5} do
172 - bounced(i)
173 - vim.schedule(function () vim.cmd('echom ' .. i) end)
174 - vim.fn.call("wait", {1000, "v:false"})
175 - end
171 + for i, _ in ipairs { 1, 2, 3, 4, 5 } do
172 + bounced( i )
173 + vim.schedule( function () vim.cmd( 'echom ' .. i ) end )
174 + vim.fn.call( 'wait', { 1000, 'v:false' } )
175 + end
178 178 return _

neovim/lua/std/icon.lua

Modified
108 108 virtual = '󰢔',
109 109 visual = '󰒉',
110 110 warn = '󰱯',
111 + wrap = '󰖶'

neovim/lua/std/timeago.lua

Modified
2 2 --- credit goes to https://github.com/f-person/lua-timeago
3 3 local _ = {}
5 5 local words = {
6 - justnow = 'just now',
7 - minute = {singular = 'a minute ago', plural = 'minutes ago'},
8 - hour = {singular = 'an hour ago', plural = 'hours ago'},
9 - day = {singular = 'a day ago', plural = 'days ago'},
10 - week = {singular = 'a week ago', plural = 'weeks ago'},
11 - month = {singular = 'a month ago', plural = 'months ago'},
12 - year = {singular = 'a year ago', plural = 'years ago'}
6 + justnow = 'now',
7 + minute = { singular = '1 mi', plural = 'mis', },
8 + hour = { singular = '1 hr', plural = 'hrs', },
9 + day = { singular = '1 dy', plural = 'dys', },
10 + week = { singular = '1 wk', plural = 'wks', },
11 + month = { singular = '1 mo', plural = 'mos', },
12 + year = { singular = '1 yr', plural = 'yrs', },
15 15 ---@param num number
16 16 ---@return number
17 -local function round(num) return math.floor(num + 0.5) end
17 +local function round( num ) return math.floor( num + 0.5 ) end
19 19 ---@param time osdate
20 20 ---@return string
21 -function _.format(time)
22 - local now = os.time()
23 - local diff_seconds = os.difftime(now, time)
24 - if diff_seconds < 45 then return words.justnow end
21 +function _.format( time )
22 + local now = os.time()
23 + local diff_seconds = os.difftime( now, time )
24 + if diff_seconds < 45 then return words.justnow end
26 - local diff_minutes = diff_seconds / 60
27 - if diff_minutes < 1.5 then return words.minute.singular end
28 - if diff_minutes < 59.5 then
29 - return round(diff_minutes) .. ' ' .. words.minute.plural
30 - end
26 + local diff_minutes = diff_seconds / 60
27 + if diff_minutes < 1.5 then return words.minute.singular end
28 + if diff_minutes < 59.5 then
29 + return round( diff_minutes ) .. ' ' .. words.minute.plural
30 + end
32 - local diff_hours = diff_minutes / 60
33 - if diff_hours < 1.5 then return words.hour.singular end
34 - if diff_hours < 23.5 then
35 - return round(diff_hours) .. ' ' .. words.hour.plural
36 - end
32 + local diff_hours = diff_minutes / 60
33 + if diff_hours < 1.5 then return words.hour.singular end
34 + if diff_hours < 23.5 then
35 + return round( diff_hours ) .. ' ' .. words.hour.plural
36 + end
38 - local diff_days = diff_hours / 24
39 - if diff_days < 1.5 then return words.day.singular end
40 - if diff_days < 7.5 then
41 - return round(diff_days) .. ' ' .. words.day.plural
42 - end
38 + local diff_days = diff_hours / 24
39 + if diff_days < 1.5 then return words.day.singular end
40 + if diff_days < 7.5 then
41 + return round( diff_days ) .. ' ' .. words.day.plural
42 + end
44 - local diff_weeks = diff_days / 7
45 - if diff_weeks < 1.5 then return words.week.singular end
46 - if diff_weeks < 4.5 then
47 - return round(diff_weeks) .. ' ' .. words.week.plural
48 - end
44 + local diff_weeks = diff_days / 7
45 + if diff_weeks < 1.5 then return words.week.singular end
46 + if diff_weeks < 4.5 then
47 + return round( diff_weeks ) .. ' ' .. words.week.plural
48 + end
50 - local diff_months = diff_days / 30
51 - if diff_months < 1.5 then return words.month.singular end
52 - if diff_months < 11.5 then
53 - return round(diff_months) .. ' ' .. words.month.plural
54 - end
50 + local diff_months = diff_days / 30
51 + if diff_months < 1.5 then return words.month.singular end
52 + if diff_months < 11.5 then
53 + return round( diff_months ) .. ' ' .. words.month.plural
54 + end
56 - local diff_years = diff_days / 365.25
57 - if diff_years < 1.5 then return words.year.singular end
58 - return round(diff_years) .. ' ' .. words.year.plural
56 + local diff_years = diff_days / 365.25
57 + if diff_years < 1.5 then return words.year.singular end
58 + return round( diff_years ) .. ' ' .. words.year.plural
61 61 return _

nushell/login.nu

Modified
7 7 use start.nu
8 8 use timer.nu
9 9 use dwnld.nu
10 +use packages.nu
11 +use fedora_bootstrip.nu
11 13 if $env.WIN32 {
12 14 use refreshenv.nu *

nushell/scripts/direnv.nu

Modified
1 +def expand-home [] {
2 + let p = $in
3 + if ( $p =~ '~') {
4 + return ($p | path expand)
5 + }
6 + return $p
7 +}
1 9 def direnv [] {
5 13 code: r#'
6 14 open .env
7 15 | lines
8 - | parse --regex '\s*(?P<k>.+?)\s*=\s*?(?P<v>.+)?\s*'
9 - | reduce --fold {} {|x, acc| $acc | upsert $x.k $x.v}
16 + | parse --regex '\s*(?P<key>.+?)\s*=\s*?(?P<value>.+)?\s*'
17 + | reduce --fold {} { | entry, acc|
18 + $acc | upsert $entry.key ( $entry.value | str trim | expand-home )
19 + }
10 20 | load-env

nushell/scripts/fedora_bootstrip.nu

Added
new file mode 100755
1 +# Installs my most used packages on fedora.
2 +# This mainly means devel packages for rust tools or tools in the repos.
3 +export def main [
4 + --gui # install gui stuff
5 +] {
7 + # building c/c++
8 + sudo dnf groupinstall "Development Tools" "Development Libraries"
10 + # deps of some rust crates i like to build
11 + sudo dnf install fontconfig-devel freetype-devel libX11-xcb libX11-devel libstdc++-static libstdc++-devel alsa-lib-devel libspatialaudio-devel pipewire-devel systemd-devel libseat-devel cairo-gobject-devel pango-devel libdisplay-info-devel libinput-devel mesa-libgbm-devel openssl-devel wayland-devel pipewire-devel pango-devel mesa-libgbm-devel libxkbcommon-devel libseat-devel libspatialaudio-devel
13 + # these seem to be deps of the openssl-sys crates build system
14 + sudo dnf install perl-File-Compare perl-File-Copy perl-FindBin perl-IPC-Cmd
16 + # my stuff
17 + sudo dnf install aerc llvm clang cmake unison rustup neovim mold java-latest-openjdk-devel java-latest-openjdk-src perl-Image-ExifTool
19 + # gui stuff
20 + if $gui {
21 + sudo dnf install gnome-tweaks zathura zathura-pdf-mudpf
22 + }

nushell/scripts/packages.nu

Added
new file mode 100644
1 +export def main [
2 + --clear-cache
3 + --cache = "~/.cache/packages"
4 + --packages = "~/Tools/packages.csv"
5 + --prefix = "~/Tools"
6 +] {
7 + check_dependencies
8 + let prefix = $prefix | path expand
9 + let packages = $packages | path expand
10 + let packages = open --raw $packages | from csv --separator ';' --comment '#' --trim all
11 + let cache = $cache | path expand
12 + if $clear_cache {
13 + rm --recursive --trash --interactive-once $cache
14 + return
15 + }
16 + mkdir $cache
18 + print $"Downloading packages..."
19 + let $packages_file = mktemp --suffix _packages.txt --tmpdir XXX
20 + $packages | get url | save --force $packages_file
21 + run-external dlm '--maxConcurrentDownloads' 4 '--inputFile' $packages_file '--outputDir' $cache
23 + $packages | each { |package|
25 + # pipe through url parse for validation
26 + let base = $package.url | url parse | get path | path basename
27 + let cached = $cache | path join $base
29 + print $"Installing ($package.name)"
30 + if ($cached | is-archive) {
31 + print $"Decompressing ($package.name)..."
32 + run-external ouch decompress '--quiet' $cached '--dir' $prefix
33 + } else {
34 + error make {
35 + msg: $"The package ($package.name) does not seem to be an archive."
36 + }
37 + }
39 + print $"TODO: Symlinks"
40 + }
43 +def is-archive [] {
44 + [ .zip .tar.gz .tar.bz2 .tar.xz .7z ] | any { |ext| $in | str ends-with $ext }
47 +def remove-archive-extension [] {
48 + let uri = $in
49 + [ .zip .tar.gz .tar.bz2 .tar.xz .7z ] | reduce --fold $uri { |ext, acc|
50 + $acc | str replace $ext ''
51 + } | str trim
54 +def check_dependencies [] {
55 + let missing = [ ouch dlm ] | any { which $in | is-empty }
56 + if $missing {
57 + error make {
58 + msg: 'Some dependency is missing!'
59 + }
60 + }

tools/fedora_bootstrip.nu

Deleted
deleted file mode 100755
1 -#!/usr/bin/env nu
3 -# building c/c++
4 -sudo dnf groupinstall "Development Tools" "Development Libraries"
6 -# deps of some rust crates i like to build
7 -sudo dnf install fontconfig-devel freetype-devel libX11-xcb libX11-devel libstdc++-static libstdc++-devel alsa-lib-devel libspatialaudio-devel pipewire-devel systemd-devel libseat-devel cairo-gobject-devel pango-devel libdisplay-info-devel libinput-devel mesa-libgbm-devel openssl-devel wayland-devel pipewire-devel pango-devel mesa-libgbm-devel libxkbcommon-devel libseat-devel libspatialaudio-devel
9 -# these seem to be deps of the openssl-sys crates build system
10 -sudo dnf install perl-File-Compare perl-File-Copy perl-FindBin perl-IPC-Cmd
12 -# my stuff
13 -sudo dnf install aerc llvm clang cmake unison rustup neovim mold java-latest-openjdk-devel java-latest-openjdk-src gnome-tweaks nasm

tools/tools.csv

Modified
7 7 cargo-cache
8 8 cargo-update;cargo-install-update
9 9 choose
10 +czkawka_cli
10 11 du-dust; dust
11 12 dotenv-linter
13 +dupimg
15 +emplace
13 16 eza; eza; --features vendored-openssl,vendored-libgit2
14 17 fend
15 18 fd-find;fd
37 40 mdcat
38 41 mdsh
39 42 monolith
43 +names
40 44 # netscanner
41 45 neovide;neovide; --git https://github.com/neovide/neovide
42 46 nu;nu; --locked
51 55 ripgrep;rg
53 57 rust-parallel
58 +rversions
55 60 skim;sk
56 61 sbyte
63 68 tokei
64 69 topgrade
71 +tsdl
72 +ttyper
66 73 unison-fsmonitor
67 74 # ugdb
69 76 vivid
77 +wthrr
70 78 yazi-cli;ya; --locked
71 79 yazi-fm;yazi; --locked
72 80 zoxide

wezterm/bugabinga/code_font.lua

Added
new file mode 100644
1 +local wez = require 'wezterm'
3 +return {
4 + random = function ()
5 + local font_names = {}
6 + local nerdfonts = io.open( wez.config_dir .. '/bugabinga/code_fonts', 'r' )
7 + if nerdfonts then
8 + for font_name in nerdfonts:lines() do
9 + if not font_name:match '^#.*' then
10 + table.insert( font_names, font_name )
11 + end
12 + end
13 + local random_font = font_names[math.random( #font_names )]
14 + return wez.font( random_font )
15 + end
16 + return wez.font 'JetBrains Mono'
17 + end,

wezterm/bugabinga/code_fonts

Added
new file mode 100644
1 +Anonymous Pro
2 +Anonymous Pro Minus
3 +Aurulent Sans Mono
4 +AverageMono
5 +BPmono
6 +BigBlue TerminalPlus
7 +Bitstream Vera Sans Mono
8 +Bront
9 +CMU Typewriter Text
10 +CPMono_v07
11 +CamingoCode
12 +Cascadia Code
13 +Code New Roman
14 +CodingFontTobi
15 +Consola Mono
16 +Courier Prime Code
17 +Cousine
18 +Crisp
19 +Cutive Mono
20 +D2Coding
21 +DejaVu Sans Mono
22 +Dina ttf 10px
23 +Droid Sans Mono
24 +Edlo
25 +Envy Code R
26 +Fantasque Sans Mono
27 +Fira Code
28 +Fira Mono
29 +Fixedsys Excelsior 3.01
30 +FreeMono
31 +Geist Mono
32 +Generic Mono II
33 +GohuFont
34 +Hack
35 +Hasklig
36 +Hermit
37 +# IBM Plex Math
38 +IBM Plex Mono
39 +# IBM Plex Sans
40 +# IBM Plex Sans Condensed
41 +# IBM Plex Serif
42 +Inconsolata
43 +Inconsolata LGC
44 +Inconsolata-dz
45 +Inconsolata-g
46 +Intel One Mono
47 +Iosevka
48 +Iosevka Slab
49 +JetBrains Mono
50 +JetBrains Mono NL
51 +Kawkab Mono
52 +Latin Modern Mono Light
53 +Lekton
54 +Liberation Mono
55 +Lilex
56 +Linux Libertine Mono
57 +Luculent
58 +Luxi Mono
59 +M+ 1m
60 +M+ 1mn
61 +M+ 2m
62 +Martian Mono
63 +Mensch
64 +Meslo LG M DZ
65 +Metrickal
66 +Monaspace Argon Var
67 +Monaspace Krypton Var
68 +Monaspace Neon Var
69 +Monaspace Radon Var
70 +Monaspace Xenon Var
71 +MonoSpatial
72 +Monoid
73 +Monospace
74 +MonospaceTypewriter
75 +MonteCarlo Fixed 12
76 +NanumGothic_Coding
77 +Nimbus Mono
78 +NotCourierSans
79 +Office Code Pro
80 +Office Code Pro D
81 +Oxygen Mono
82 +PT Mono
83 +Panic Sans
84 +PixelCarnageMonoTT
85 +Pointfree
86 +ProFontWindows
87 +ProggyCleanTT
88 +ProggyCleanTTSZ
89 +ProggySmallTT
90 +ProggySquareTT
91 +ProggySquareTTSZ
92 +ProggyTinyTT
93 +ProggyTinyTTSZ
94 +Rec Mono Casual
95 +Rec Mono Linear
96 +Roboto Mono
97 +SV Basic Manual
98 +Share Tech Mono
99 +Share-TechMonoTrue
100 +SmallTypeWriting
101 +Source Code Pro
102 +Sudo
103 +Symbols Nerd Font
104 +Symbols Nerd Font Mono
105 +TeX Gyre Cursor
106 +Terminus
107 +Ubuntu Mono
108 +Verily Serif Mono
109 +Victor Mono
110 +Whois
111 +agave
112 +iA Writer Mono V
113 +monoOne
114 +monofur
115 +mononoki
116 +saxMono

wezterm/bugabinga/hosts/NB-00718.lua

Modified
1 -local wez = require 'wezterm'
1 +local code_font = require 'bugabinga.code_font'
3 2 return function ( cfg )
4 3 cfg.default_domain = 'WSL:Fedora'
5 4 cfg.default_mux_server_domain = 'WSL:Fedora'
6 5 cfg.default_prog = { 'powershell', '-NoLogo', }
8 7 cfg.font_size = 13
9 - cfg.font = wez.font 'IBM Plex Mono'
8 + cfg.font = code_font.random();
11 10 cfg.window_decorations = 'TITLE | RESIZE'

wezterm/bugabinga/hosts/fedora.lua

Modified
1 -local nerd_font = require 'bugabinga.nerd_font'
1 +local code_font = require 'bugabinga.code_font'
3 3 return function ( cfg )
4 - cfg.font = nerd_font.random();
4 + cfg.font = code_font.random();
6 6 cfg.background = {

wezterm/bugabinga/hosts/x230.lua

Modified
1 -local nerd_font = require 'bugabinga.nerd_font'
1 +local code_font = require 'bugabinga.code_font'
3 3 return function(cfg)
4 - cfg.font = nerd_font.random();
4 + cfg.font = code_font.random();
5 5 end

wezterm/bugabinga/launch.lua

Modified
27 27 args = { 'eva', },
28 28 cwd = wez.home_dir,
30 + {
31 + label = 'Weather',
32 + args = { 'wthrr' },
33 + cwd = wez.home_dir,
34 + },
35 + {
36 + label = 'Status',
37 + args = { 'nu', '-c', 'loop {clear; macchina --current-shell --interface wlp3s0; sleep 5sec}', },
38 + cwd = wez.home_dir,
39 + },
31 41 label = 'Units',
32 42 args = { 'fend', },

wezterm/bugabinga/nerd_font.lua

Deleted
deleted file mode 100644
1 -local wez = require 'wezterm'
3 -return {
4 - random = function ()
5 - local font_names = {}
6 - local nerdfonts = io.open( wez.config_dir .. '/bugabinga/nerdfonts', 'r' )
7 - if nerdfonts then
8 - for font_name in nerdfonts:lines() do
9 - if not font_name:match '^#.*' then
10 - table.insert( font_names, font_name )
11 - end
12 - end
13 - local random_font = font_names[math.random( #font_names )]
14 - return wez.font( random_font )
15 - end
16 - return wez.font 'JetBrains Mono'
17 - end,
18 -}

wezterm/bugabinga/nerdfonts

Deleted
deleted file mode 100644
1 -Bitstream Vera Sans Mono
2 -# Terminus
3 -Anonymous Pro
4 -Aurulent Sans Mono
5 -# BigBlueTerminalPlus
6 -Cascadia Code
7 -Cousine
8 -D2Coding
9 -DejaVu Sans Mono
10 -Droid Sans Mono
11 -Envy Code R
12 -Fantasque Sans Mono
13 -# FiraCode
14 -GeistMono
15 -Hack
16 -Hasklig
17 -Hermit
18 -# IBM 3270
19 -IBM Plex Mono
20 -# Inconsolata
21 -Intel One Mono
22 -JetBrainsMono
23 -Lekton
24 -# Liberation Mono
25 -Lilex
26 -MartianMono
27 -Monaspace Argon Var
28 -Monaspace Krypton Var
29 -Monaspace Neon Var
30 -Monofur
31 -Monoid
32 -Mononoki
33 -Rec Mono Casual
34 -Rec Mono Linear
35 -RobotoMono
36 -Share Tech Mono
37 -Source Code Pro
38 -VictorMono
39 -iA Writer Mono V

x230.symlinks

Modified
56 56 ~/.config/rbw
58 +broot
59 +~/.config/broot
59 62 ~/.config/zed
64 67 unison/unison@.service
65 68 ~/.config/systemd/user/unison@.service
70 +unison/unison@.timer
71 +~/.config/systemd/user/unison@.timer
67 73 hypr
68 74 ~/.config/hypr
76 +pueue
77 +~/.config/pueue
79 +pueue/pueued.service
80 +~/.config/systemd/user/pueued.service