repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

d4fde2a12c211cf6e35dc36f2fa531127caaa20c

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (21)

+8 / −1309 text lines · 1 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately

Diff layout

helix/themes/gpt-dark.toml

Deleted
deleted file mode 100644

+0 / −22 text lines

1inherits = "base16_default_dark"
2
3"ui.virtual.ruler" = { bg = "base01" }
4"comment" = { fg = "base03", modifiers = ["italic", "bold"] }
5
6[palette]
7base00 = "#181818" # Default Background
8base01 = "#282828" # Lighter Background (Used for status bars, line number and folding marks)
9base02 = "#383838" # Selection Background
10base03 = "#585858" # Comments, Invisibles, Line Highlighting
11base04 = "#b8b8b8" # Dark Foreground (Used for status bars)
12base05 = "#d8d8d8" # Default Foreground, Caret, Delimiters, Operators
13base06 = "#e8e8e8" # Light Foreground (Not often used)
14base07 = "#f8f8f8" # Light Background (Not often used)
15base08 = "#ab4642" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
16base09 = "#dc9656" # Integers, Boolean, Constants, XML Attributes, Markup Link Url
17base0A = "#f7ca88" # Classes, Markup Bold, Search Text Background
18base0B = "#a1b56c" # Strings, Inherited Class, Markup Code, Diff Inserted
19base0C = "#86c1b9" # Support, Regular Expressions, Escape Characters, Markup Quotes
20base0D = "#7cafc2" # Functions, Methods, Attribute IDs, Headings
21base0E = "#ba8baf" # Keywords, Storage, Selector, Markup Italic, Diff Changed
22base0F = "#a16946" # Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>

helix/themes/gpt-light.toml

Deleted
deleted file mode 100644

+0 / −22 text lines

1inherits = "base16_default_light"
2
3"ui.virtual.ruler" = { bg = "base01" }
4"comment" = { fg = "base03", modifiers = ["italic", "bold"] }
5
6[palette]
7base00 = "#f2f2f2" # Default Background
8base01 = "#dcdcdc" # Lighter Background (Used for status bars, line number and folding marks)
9base02 = "#c2c2c2" # Selection Background
10base03 = "#8a8a8a" # Comments, Invisibles, Line Highlighting
11base04 = "#2e2e2e" # Dark Foreground (Used for status bars)
12base05 = "#1a1a1a" # Default Foreground, Caret, Delimiters, Operators
13base06 = "#050505" # Light Foreground (Not often used)
14base07 = "#000000" # Light Background (Not often used)
15base08 = "#8c3532" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
16base09 = "#b45f31" # Integers, Boolean, Constants, XML Attributes, Markup Link Url
17base0A = "#b88e36" # Classes, Markup Bold, Search Text Background
18base0B = "#6c782e" # Strings, Inherited Class, Markup Code, Diff Inserted
19base0C = "#4d7474" # Support, Regular Expressions, Escape Characters, Markup Quotes
20base0D = "#4b6988" # Functions, Methods, Attribute IDs, Headings
21base0E = "#6c5b7b" # Keywords, Storage, Selector, Markup Italic, Diff Changed
22base0F = "#5c4343" # Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>

helix/themes/gpt.toml

Deleted
deleted file mode 100644

+0 / −21 text lines

1inherits = "base16_terminal"
2
3[palette]
4black = "#252525"
5white = "#ffffff"
6
7gray = "#555555"
8red = "#a55f5f"
9green = "#5f875f"
10yellow = "#af875f"
11blue = "#5f87af"
12magenta = "#875faf"
13cyan = "#5f8787"
15light-gray = "#b0b0b0"
16light-red = "#ff8700"
17light-green = "#87af5f"
18light-yellow = "#ffd700"
19light-blue = "#87afd7"
20light-magenta = "#d70087"
21light-cyan = "#87d7d7"

neovim/init.lua

Modified

+0 / −5 text lines

88-- ▀▀▀ █ █ ██ █
99-- ▀ ▀
11-- enable lua bytecode caching
12vim.loader.enable()
1411-- setup debug mode
1512-- require 'std.debug'.toggle()
17-- vim.g.did_load_filetypes = 1
1914vim.cmd.colorscheme 'nugu'
2116---create special global, that serves as a more graceful alternative to `require`

neovim/lazy-lock.json

Modified

+0 / −3 text lines

1414 "dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
1515 "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
1616 "flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" },
17 "gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
1817 "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
1918 "heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" },
2019 "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
3837 "nvim-navbuddy": { "branch": "master", "commit": "f22bac988f2dd073601d75ba39ea5636ab6e38cb" },
3938 "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
4039 "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
41 "nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
4240 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
4341 "nvim-tree.lua": { "branch": "master", "commit": "d41b4ca013ed89e41b9c0ecbdae5f1633e42f7fa" },
4442 "nvim-treesitter": { "branch": "master", "commit": "6a3c6a42a6e24414bdf337b05a84a0ea013dd155" },
5957 "speedtyper.nvim": { "branch": "main", "commit": "d73b3d2bdd574dd9c2e39e3558a4fe26f081d885" },
6058 "ssr.nvim": { "branch": "main", "commit": "7c95cfa5836508f08ae833a4b31d2ed265560f64" },
6159 "substitute.nvim": { "branch": "main", "commit": "97f49d16f8eea7967d41db4f657dd63af53eeba1" },
62 "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" },
6360 "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
6461 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
6562 "telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },

neovim/lua/bugabinga/plugins/auto-dark-mode.lua

Deleted
deleted file mode 100644

+0 / −16 text lines

1return {
2 'f-person/auto-dark-mode.nvim',
3 dev = true,
4 lazy = false,
5 opts = {
6 -- interval of 0 freezes neovim on quit
7 -- update_interval = 0,
8 update_interval = 5000,
9 set_dark_mode = function ()
10 vim.opt.background = 'dark'
11 end,
12 set_light_mode = function ()
13 vim.opt.background = 'light'
14 end,
15 },
16}

neovim/lua/bugabinga/plugins/dressing.lua

Deleted
deleted file mode 100644

+0 / −69 text lines

1--FIXME: own this. is vim.ui.open shim still necessary?
2return {
3 "stevearc/dressing.nvim",
4 lazy = false,
5 opts = {
6 input = {
7 insert_only = false,
8 -- relative = "editor",
9 win_options = {
10 sidescrolloff = 4,
11 },
12 get_config = function()
13 if vim.api.nvim_win_get_width(0) < 50 then
14 return {
15 relative = "editor",
16 }
17 end
18 end,
19 },
20 select = {
21 backend = { "telescope", "builtin", "fzf_lua" },
22 },
23 },
24 config = function(_, opts)
25 require("dressing").setup(opts)
27 -- Shim for vim.ui.open
28 if vim.ui.open then
29 return
30 end
32 ---Copied from vim.ui.open in Neovim 0.10+
33 ---@param path string
34 ---@return nil|string[] cmd
35 ---@return nil|string error
36 local function get_open_cmd(path)
37 if vim.fn.has("mac") == 1 then
38 return { "open", path }
39 elseif vim.fn.has("win32") == 1 then
40 if vim.fn.executable("rundll32") == 1 then
41 return { "rundll32", "url.dll,FileProtocolHandler", path }
42 else
43 return nil, "rundll32 not found"
44 end
45 elseif vim.fn.executable("wslview") == 1 then
46 return { "wslview", path }
47 elseif vim.fn.executable("xdg-open") == 1 then
48 return { "xdg-open", path }
49 else
50 return nil, "no handler found"
51 end
52 end
54 vim.ui.open = function(path)
55 local is_uri = path:match("%w+:")
56 if not is_uri then
57 path = vim.fn.expand(path)
58 end
59 local cmd, err = get_open_cmd(path)
60 if not cmd or err then
61 return nil, err
62 end
63 local jid = vim.fn.jobstart(cmd, { detach = true })
64 if jid <= 0 then
65 return nil, "Failed to start job"
66 end
67 end
68 end,
69}

neovim/lua/bugabinga/plugins/fidget.lua

Deleted
deleted file mode 100644

+0 / −20 text lines

1local debug = require 'std.dbg'
2
3return {
4 'j-hui/fidget.nvim',
5 version = '1.*',
6 event = 'LspAttach',
7 opts = {
8 progress = {
9 poll_rate = 500, -- How and when to poll for progress messages
10 suppress_on_insert = true, -- Suppress new messages while in insert mode
11 lsp = {
12 log_handler = debug.get(), -- Log `$/progress` handler invocations (for debugging)
13 },
14 },
15 notification = {
16 filter = debug.get() and vim.log.levels.DEBUG or vim.log.levels.INFO,
17 override_vim_notify = true, -- Automatically override vim.notify() with Fidget
18 },
19 },
20}

neovim/lua/bugabinga/plugins/gitsigns.lua

Deleted
deleted file mode 100644

+0 / −164 text lines

1local map = require("std.map")
2
3return {
4 "lewis6991/gitsigns.nvim",
5 version = "0.*",
6 event = vim.g.FILE_LOADED_EVENTS,
7 opts = {
8 signs = {
9 add = { text = "│" },
10 change = { text = "│" },
11 delete = { text = "_" },
12 topdelete = { text = "‾" },
13 changedelete = { text = "~" },
14 untracked = { text = "┆" },
15 },
16 preview_config = {
17 border = vim.g.border_style,
18 },
19 current_line_blame = true,
20 current_line_blame_opts = {
21 ignore_whitespace = true,
22 },
23 current_line_blame_formatter = "<author>(<author_time:%d.%m.%Y>): <summary>",
24 on_attach = function(bufnr)
25 local gitsigns = require("gitsigns")
27 map.normal({
28 description = "Goto next hunk",
29 category = "git",
30 keys = "]h",
31 buffer = bufnr,
32 command = gitsigns.next_hunk,
33 })
35 map.normal({
36 description = "Goto previous hunk",
37 category = "git",
38 keys = "[h",
39 buffer = bufnr,
40 command = gitsigns.prev_hunk,
41 })
43 map.normal({
44 description = "Stage hunk",
45 category = "git",
46 keys = "<leader>hs",
47 buffer = bufnr,
48 command = gitsigns.stage_hunk,
49 })
51 map.visual_select({
52 description = "Stage hunk",
53 category = "git",
54 keys = "<leader>hs",
55 buffer = bufnr,
56 command = function()
57 gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
58 end,
59 })
61 map.normal({
62 description = "Reset hunk",
63 category = "git",
64 keys = "<leader>hr",
65 buffer = bufnr,
66 command = gitsigns.reset_hunk,
67 })
69 map.visual_select({
70 description = "Reset hunk",
71 category = "git",
72 keys = "<leader>hr",
73 buffer = bufnr,
74 command = function()
75 gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
76 end,
77 })
79 map.normal({
80 description = "Undo stage hunk",
81 category = "git",
82 keys = "<leader>hu",
83 buffer = bufnr,
84 command = gitsigns.undo_stage_hunk,
85 })
87 map.normal({
88 description = "Stage buffer",
89 category = "git",
90 keys = "<leader>hS",
91 buffer = bufnr,
92 command = gitsigns.stage_buffer,
93 })
95 map.normal({
96 description = "Reset buffer",
97 category = "git",
98 keys = "<leader>hR",
99 buffer = bufnr,
100 command = gitsigns.reset_buffer,
101 })
103 map.normal({
104 description = "Preview hunk",
105 category = "git",
106 keys = "<leader>hp",
107 buffer = bufnr,
108 command = gitsigns.preview_hunk,
109 })
111 map.normal({
112 description = "Blame line",
113 category = "git",
114 keys = "<leader>hb",
115 buffer = bufnr,
116 command = function()
117 gitsigns.blame_line({ full = true })
118 end,
119 })
121 map.normal({
122 description = "Diff this",
123 category = "git",
124 keys = "<leader>hd",
125 buffer = bufnr,
126 command = gitsigns.diffthis,
127 })
129 map.normal({
130 description = "Diff this ~",
131 category = "git",
132 keys = "<leader>hD",
133 buffer = bufnr,
134 command = function()
135 gitsigns.diffthis("~")
136 end,
137 })
139 map.normal({
140 description = "Toggle current line blame",
141 category = "git",
142 keys = "<leader>tb",
143 buffer = bufnr,
144 command = gitsigns.toggle_current_line_blame,
145 })
147 map.normal({
148 description = "Toggle removed lines",
149 category = "git",
150 keys = "<leader>tr",
151 buffer = bufnr,
152 command = gitsigns.toggle_deleted,
153 })
155 map.operator_pending.visual({
156 description = "select hunk",
157 category = "git",
158 keys = "ih",
159 buffer = bufnr,
160 command = ":<C-U>Gitsigns select_hunk<CR>",
161 })
162 end,
163 },
164}

neovim/lua/bugabinga/plugins/heirline.lua

Deleted
deleted file mode 100644

+0 / −817 text lines

1---@diagnostic disable: param-type-mismatch
2local icon = require("std.icon")
3local auto = require("std.auto")
4local ignored = require("std.ignored")
5
6local NEW_FILE = "~untitled~"
7
8return {
9 {
10 "rebelot/heirline.nvim",
11 version = "1.*",
12 event = "VeryLazy",
13 dependencies = {
14 "nvim-tree/nvim-web-devicons",
15 { "lewis6991/gitsigns.nvim", lazy = true },
16 { "SmiteshP/nvim-navic", lazy = true },
17 },
18 config = function()
19 local heirline = require("heirline")
20 local conditions = require("heirline.conditions")
21 local utils = require("heirline.utils")
23 local nugu = require("bugabinga.nugu.palette")
24 heirline.load_colors(nugu)
26 auto("reload_heirline_colors")({
27 description = "Reload dark/light nugu colors for Heirline",
28 events = "ColorScheme",
29 command = function()
30 utils.on_colorscheme(nugu)
31 end,
32 })
34 local vi_mode = {
35 init = function(self)
36 self.mode = vim.fn.mode(1) -- :h mode()
37 end,
39 static = {
40 mode_names = {
41 n = icon.normal,
42 no = icon.normal .. "?",
43 nov = icon.normal .. "?",
44 noV = icon.normal .. "?",
45 ["no\22"] = icon.normal .. "?",
46 niI = icon.normal .. "i",
47 niR = icon.normal .. "r",
48 niV = icon.normal .. "v",
49 nt = icon.normal .. "t",
50 v = icon.visual,
51 vs = icon.visual .. "s",
52 V = icon.visual .. "_",
53 Vs = icon.visual .. "s",
54 ["\22"] = "^" .. icon.visual,
55 ["\22s"] = "^" .. icon.visual,
56 s = icon.select,
57 S = icon.select .. "_",
58 ["\19"] = "^" .. icon.select,
59 i = icon.insert,
60 ic = icon.insert .. "c",
61 ix = icon.insert .. "x",
62 R = icon.replace,
63 Rc = icon.replace .. "c",
64 Rx = icon.replace .. "x",
65 Rv = icon.replace .. "v",
66 Rvc = icon.replace .. "v",
67 Rvx = icon.replace .. "v",
68 c = icon.command,
69 cv = icon.command .. "x",
70 r = icon.pending,
71 rm = icon.pending .. "m",
72 ["r?"] = icon.pending .. "?",
73 ["!"] = icon.exclaim,
74 t = icon.terminal,
75 },
76 mode_colors = {
77 n = "ui_normal",
78 i = "ui_accent",
79 v = "ui_important_global",
80 V = "ui_important_global",
81 ["\22"] = "ui_important_global",
82 c = "ui_important_global",
83 s = "ui_important_global",
84 S = "ui_important_global",
85 ["\19"] = "ui_important_global",
86 R = "ui_important_global",
87 r = "ui_important_global",
88 ["!"] = "ui_important_global",
89 t = "ui_important_global",
90 },
91 },
93 provider = function(self)
94 local mode_name = self.mode_names[self.mode]
95 return " " .. icon.vim .. " %3(" .. mode_name .. "%) "
96 end,
98 hl = function(self)
99 local mode = self.mode:sub(1, 1) -- get only the first mode character
100 return { fg = self.mode_colors[mode], bold = true }
101 end,
103 update = {
104 "ModeChanged",
105 pattern = "*:*",
106 callback = vim.schedule_wrap(function()
107 vim.cmd.redrawstatus()
108 end),
109 },
110 }
112 local file_icon = {
113 init = function(self)
114 local filename = self.filename
115 local extension = vim.fn.fnamemodify(filename, ":e")
116 self.icon = require("nvim-web-devicons").get_icon_color(filename, extension, { default = true })
117 end,
118 provider = function(self)
119 return self.icon and (self.icon .. " ")
120 end,
121 hl = "DefaultIcon",
122 }
124 local file_name = {
125 init = function(self)
126 self.lfilename = vim.fs.normalize(vim.fn.fnamemodify(self.filename, ":."))
127 if self.lfilename == "" then
128 self.lfilename = NEW_FILE
129 end
130 end,
132 flexible = 2,
134 {
135 provider = function(self)
136 return self.lfilename
137 end,
138 },
139 {
140 provider = function(self)
141 return vim.fs.normalize(vim.fn.pathshorten(self.lfilename))
142 end,
143 },
144 }
146 local file_flags = {
147 {
148 condition = function()
149 return vim.bo.modified
150 end,
151 provider = string.format(" %s ", icon.modified),
152 hl = "Comment",
153 },
154 {
155 condition = function()
156 return not vim.bo.modifiable or vim.bo.readonly
157 end,
158 provider = string.format(" %s ", icon.lock),
159 hl = "ErrorMsg",
160 },
161 }
163 local file_name_block = {
164 init = function(self)
165 self.filename = vim.fs.normalize(vim.api.nvim_buf_get_name(0))
166 end,
168 file_icon,
169 { provider = " " },
170 file_name,
171 file_flags,
172 { provider = "%<" }, -- this means that the statusline is cut here when there's not enough space
173 }
175 local file_type = {
176 provider = function()
177 return icon.file .. " " .. string.upper(vim.bo.filetype)
178 end,
179 }
181 local file_encoding = {
182 provider = function()
183 local enc = (vim.bo.fenc ~= "" and vim.bo.fenc) or vim.o.enc -- :h 'enc'
184 return enc ~= "utf-8" and enc:upper()
185 end,
186 }
188 local file_format = {
189 static = {
190 dos = icon.newline .. icon.carriage_return,
191 unix = icon.newline,
192 mac = icon.carriage_return,
193 },
194 provider = function(self)
195 local fileformat = vim.bo.fileformat
196 return self[fileformat]
197 end,
198 }
200 local file_size = {
201 provider = function()
202 -- stackoverflow, compute human readable file size
203 -- i want to see vim opening a 1EiB file 󰱯
204 local suffix = { "b", "k", "M", "G", "T", "P", "E" }
205 local fsize = vim.fn.getfsize(vim.api.nvim_buf_get_name(0))
206 fsize = (fsize < 0 and 0) or fsize
207 if fsize < 1024 then
208 return fsize .. suffix[1]
209 end
210 local i = math.floor((math.log(fsize) / math.log(1024)))
211 return string.format("%.2g%s", fsize / math.pow(1024, i), suffix[i + 1])
212 end,
213 }
215 local file_last_modified = {
216 provider = function()
217 local ftime = vim.fn.getftime(vim.api.nvim_buf_get_name(0))
218 if ftime > 0 then
219 local timeago = require("std.timeago")
220 return timeago.format(ftime)
221 end
222 end,
223 }
225 local lsp_active = {
226 -- condition = conditions.lsp_attached,
227 condition = function() vim.lsp.buf_is_attached() end,
228 -- FIXME: updates from parent components do not seem to update children,
229 -- if those have their own updates?
230 update = { "LspAttach", "LspDetach", "BufEnter", "BufLeave" },
232 provider = function()
233 local names = {}
234 for _, client in pairs(vim.lsp.get_clients({ bufnr = 0 })) do
235 table.insert(names, client.name)
236 end
237 return icon.lsp .. " " .. table.concat(names, " ")
238 end,
239 }
241 local navic = {
242 condition = function()
243 local ok, navic = pcall(require, "nvim-navic")
244 return ok and navic.is_available()
245 end,
246 static = {
247 -- create a type highlight map
248 type_hl = {
249 File = "Directory",
250 Module = "@include",
251 Namespace = "@namespace",
252 Package = "@include",
253 Class = "@structure",
254 Method = "@method",
255 Property = "@property",
256 Field = "@field",
257 Constructor = "@constructor",
258 Enum = "@field",
259 Interface = "@type",
260 Function = "@function",
261 Variable = "@variable",
262 Constant = "@constant",
263 String = "@string",
264 Number = "@number",
265 Boolean = "@boolean",
266 Array = "@field",
267 Object = "@type",
268 Key = "@keyword",
269 Null = "@comment",
270 EnumMember = "@field",
271 Struct = "@structure",
272 Event = "@keyword",
273 Operator = "@operator",
274 TypeParameter = "@type",
275 },
276 -- bit operation dark magic, see below...
277 enc = function(line, col, winnr)
278 return bit.bor(bit.lshift(line, 16), bit.lshift(col, 6), winnr)
279 end,
280 -- line: 16 bit (65535); col: 10 bit (1023); winnr: 6 bit (63)
281 dec = function(c)
282 local line = bit.rshift(c, 16)
283 local col = bit.band(bit.rshift(c, 6), 1023)
284 local winnr = bit.band(c, 63)
285 return line, col, winnr
286 end,
287 },
288 init = function(self)
289 local data = require("nvim-navic").get_data() or {}
290 local children = {}
291 -- create a child for each level
292 for i, d in ipairs(data) do
293 -- encode line and column numbers into a single integer
294 local pos = self.enc(d.scope.start.line, d.scope.start.character, self.winnr)
295 local child = {
296 {
297 provider = d.icon,
298 hl = self.type_hl[d.type],
299 },
300 {
301 -- escape `%`s (elixir) and buggy default separators
302 provider = d.name:gsub("%%", "%%%%"):gsub("%s*->%s*", ""),
303 -- highlight icon only or location name as well
304 hl = self.type_hl[d.type],
306 on_click = {
307 -- pass the encoded position through minwid
308 minwid = pos,
309 callback = function(_, minwid)
310 -- decode
311 local line, col, winnr = self.dec(minwid)
312 vim.api.nvim_win_set_cursor(vim.fn.win_getid(winnr), { line, col })
313 end,
314 name = "heirline_navic",
315 },
316 },
317 }
318 -- add a separator only if needed
319 if #data > 1 and i < #data then
320 table.insert(child, {
321 provider = " > ",
322 -- hl = { fg = 'bright_fg', },
323 })
324 end
325 table.insert(children, child)
326 end
327 -- instantiate the new child, overwriting the previous one
328 self.child = self:new(children, 1)
329 end,
330 -- evaluate the children containing navic components
331 provider = function(self)
332 return self.child:eval()
333 end,
334 -- hl = { fg = 'gray', },
335 update = "CursorMoved",
336 }
338 local diagnostic_enabled = {
339 init = function(self)
340 self.icon = (not vim.diagnostic.is_enabled()) and icon.toggle_off or icon.toggle_on
341 end,
342 provider = function(self)
343 return icon.diagnostic .. " " .. self.icon
344 end,
345 }
347 local diagnostic = {
348 condition = conditions.has_diagnostics,
350 static = {
351 error_icon = icon.error,
352 warn_icon = icon.warn,
353 info_icon = icon.info,
354 hint_icon = icon.hint,
355 },
357 init = function(self)
358 self.errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
359 self.warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
360 self.hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
361 self.info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
362 end,
364 update = { "DiagnosticChanged", "BufEnter", "BufLeave" },
366 {
367 provider = function(self)
368 -- 0 is just another output, we can decide to print it or not!
369 return self.errors > 0 and (self.error_icon .. " " .. self.errors .. " ")
370 end,
371 hl = "DiagnosticError",
372 },
373 {
374 provider = function(self)
375 return self.warnings > 0 and (self.warn_icon .. " " .. self.warnings .. " ")
376 end,
377 hl = "DiagnosticWarn",
378 },
379 {
380 provider = function(self)
381 return self.info > 0 and (self.info_icon .. " " .. self.info .. " ")
382 end,
383 hl = "DiagnosticInfo",
384 },
385 {
386 provider = function(self)
387 return self.hints > 0 and (self.hint_icon .. " " .. self.hints)
388 end,
389 hl = "DiagnosticHint",
390 },
391 }
393 local is_svn_repo = function()
394 local svn_dir = vim.fs.find(".svn", {
395 upward = true,
396 stop = vim.uv.os_homedir(),
397 path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)),
398 type = "directory",
399 })
401 return not vim.tbl_isempty(svn_dir)
402 end
404 local svn_get_relative_url = function()
405 -- FIXME: replace with vim.system
406 local job = require("plenary.job")
407 local relative_url = { "[ERR]" }
409 job
410 :new({
411 command = "svn",
412 args = { "info", "--show-item", "relative-url", "--no-newline" },
413 on_exit = function(current_job, exit_code)
414 if exit_code == 0 then
415 relative_url = current_job:result()
416 end
417 end,
418 })
419 :sync()
421 return relative_url[1]
422 end
424 local svn = {
425 condition = is_svn_repo,
427 update = "BufEnter",
429 init = function(self)
430 self.relative_url = svn_get_relative_url()
431 end,
433 {
434 provider = function(self)
435 return icon.subversion .. " " .. icon.branch .. " " .. self.relative_url
436 end,
437 },
438 }
440 local git = {
441 condition = conditions.is_git_repo,
443 init = function(self)
444 self.status_dict = vim.b.gitsigns_status_dict
445 end,
447 {
448 provider = function(self)
449 return icon.git .. " " .. icon.branch .. " " .. self.status_dict.head .. " "
450 end,
451 },
452 {
453 provider = function(self)
454 local count = self.status_dict.added or 0
455 return count > 0 and (icon.diff_add .. " " .. count .. " ")
456 end,
457 hl = "DiffAdd",
458 },
459 {
460 provider = function(self)
461 local count = self.status_dict.removed or 0
462 return count > 0 and (icon.diff_remove .. " " .. count .. " ")
463 end,
464 hl = "DiffDelete",
465 },
466 {
467 provider = function(self)
468 local count = self.status_dict.changed or 0
469 return count > 0 and (icon.diff_change .. " " .. count .. " ")
470 end,
471 hl = "DiffChange",
472 },
473 }
475 local work_dir = {
476 init = function(self)
477 self.icon = (vim.fn.haslocaldir(0) == 1 and icon["local"] or "") .. " " .. icon.global .. " "
478 self.cwd = vim.fs.normalize(vim.uv.cwd()):gsub(vim.fs.normalize(vim.uv.os_homedir()), "~")
479 end,
481 flexible = 1,
483 {
484 provider = function(self)
485 return self.icon .. self.cwd
486 end,
487 },
488 {
489 provider = function(self)
490 local cwd = vim.fn.pathshorten(self.cwd)
491 return self.icon .. cwd
492 end,
493 },
494 {
495 provider = "",
496 },
497 }
499 local help_file_name = {
500 condition = function()
501 return vim.bo.filetype == "help"
502 end,
503 provider = function()
504 local filename = vim.api.nvim_buf_get_name(0)
505 return vim.fn.fnamemodify(filename, ":t")
506 end,
507 hl = "Question",
508 }
510 local terminal_name = {
511 provider = function()
512 local name, _ = vim.api.nvim_buf_get_name(0):gsub(".*:", "")
513 local basename = vim.fs.basename(name)
514 return icon.terminal .. " " .. (basename or "noname")
515 end,
516 hl = "Bold",
517 }
519 local togglers = {
520 provider = function()
521 local togglers = require("bugabinga.options.togglers")
522 return tostring(togglers)
523 end,
524 }
526 local macro_recording = {
527 condition = function()
528 return vim.fn.reg_recording() ~= "" and vim.o.cmdheight == 0
529 end,
530 provider = icon.macro .. " ",
531 hl = "PreProc",
532 utils.surround({ "░▒▓ ", " ▓▒░" }, nil, {
533 provider = function()
534 return vim.fn.reg_recording()
535 end,
536 hl = "Bold",
537 }),
538 update = {
539 "RecordingEnter",
540 "RecordingLeave",
541 },
542 }
544 local lazy = {
545 condition = function()
546 local ok, lazy_status = pcall(require, "lazy.status")
547 return ok and lazy_status.has_updates()
548 end,
549 update = { "User", pattern = "LazyUpdate" },
550 provider = function()
551 return " " .. icon.lazy .. " " .. require("lazy.status").updates() .. " "
552 end,
553 on_click = {
554 callback = function()
555 require("lazy").update()
556 end,
557 name = "update_plugins",
558 },
559 }
561 local align = { provider = "%=" }
562 local space = { provider = " " }
564 local default_statusline = {
565 vi_mode,
566 macro_recording,
567 work_dir,
568 space,
569 git,
570 svn,
571 align,
572 diagnostic,
573 space,
574 lsp_active,
575 align,
576 togglers,
577 space,
578 space,
579 diagnostic_enabled,
580 space,
581 lazy,
582 space,
583 file_encoding,
584 space,
585 file_format,
586 space,
587 file_type,
588 space,
589 file_size,
590 space,
591 file_last_modified,
592 }
594 local special_statusline = {
595 condition = function()
596 return conditions.buffer_matches({
597 buftype = ignored.buftypes,
598 filetype = ignored.filetypes,
599 })
600 end,
602 file_type,
603 space,
604 help_file_name,
605 align,
606 }
608 local terminal_statusline = {
610 condition = function()
611 return conditions.buffer_matches({ buftype = { "terminal" } })
612 end,
614 { condition = conditions.is_active, vi_mode, space },
615 file_type,
616 space,
617 terminal_name,
618 align,
619 }
621 local inactive_statusline = {
622 condition = conditions.is_not_active,
623 file_type,
624 space,
625 file_name,
626 align,
627 }
629 local statuslines = {
630 hl = function()
631 if conditions.is_active() then
632 return "StatusLine"
633 else
634 return "StatusLineNC"
635 end
636 end,
638 fallthrough = false,
640 special_statusline,
641 terminal_statusline,
642 inactive_statusline,
643 default_statusline,
644 }
646 local winbars = {
647 hl = function()
648 if conditions.is_active() then
649 return "Winbar"
650 else
651 return "WinbarNC"
652 end
653 end,
655 fallthrough = false,
657 {
658 condition = function()
659 return conditions.buffer_matches({ buftype = { "terminal" } })
660 end,
662 file_type,
663 space,
664 terminal_name,
665 },
667 {
668 file_name_block,
669 space,
670 navic,
671 },
672 }
674 -- local tabline_buffer_number = {
675 -- provider = function ( self )
676 -- return '(' .. tostring( self.bufnr ) .. ')'
677 -- end,
678 -- hl = function ( self )
679 -- if self.is_active then
680 -- return { fg = utils.get_highlight 'TabLineSel'.fg, }
681 -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
682 -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
683 -- else
684 -- return { fg = utils.get_highlight 'TabLine'.fg, }
685 -- end
686 -- end,
687 -- }
689 -- local tabline_file_name = {
690 -- provider = function ( self )
691 -- local name = self.file_name
692 -- return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
693 -- end,
694 -- hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end,
695 -- }
697 -- local tabline_file_flags = {
698 -- {
699 -- condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end,
700 -- provider = icon.modified .. ' ',
701 -- },
702 -- {
703 -- condition = function ( self )
704 -- return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or
705 -- vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } )
706 -- end,
707 -- provider = function ( self )
708 -- if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then
709 -- return icon.terminal
710 -- else
711 -- return icon.lock
712 -- end
713 -- end,
714 -- },
715 -- hl = 'Bold',
716 -- }
718 -- local tabline_file_name_block = {
719 -- init = function ( self )
720 -- self.file_name = vim.api.nvim_buf_get_name( self.bufnr )
721 -- end,
722 --
723 -- hl = function ( self )
724 -- if self.is_active then
725 -- return 'TabLineSel'
726 -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
727 -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
728 -- else
729 -- return 'TabLine'
730 -- end
731 -- end,
732 --
733 -- on_click = {
734 -- callback = function ( _, minwid, _, button )
735 -- if button == 'm' then --m = middle click
736 -- vim.schedule( function ()
737 -- vim.api.nvim_buf_delete( minwid, { force = false, } )
738 -- vim.cmd.redrawtabline()
739 -- end )
740 -- else
741 -- vim.api.nvim_win_set_buf( 0, minwid )
742 -- end
743 -- end,
744 -- minwid = function ( self ) return self.bufnr end,
745 -- name = 'heirline_tabline_buffer_callback',
746 -- },
747 --
748 -- file_icon,
749 -- { provider = ' ', },
750 -- tabline_file_name,
751 -- tabline_buffer_number,
752 -- tabline_file_flags,
753 -- }
755 -- local tabline_buffer_block = utils.surround(
756 -- {
757 -- ' ' .. icon.slant_left,
758 -- icon.slant_right .. ' ',
759 -- },
760 -- function ( self )
761 -- if self.is_active then
762 -- return utils.get_highlight 'TabLine'.bg
763 -- else
764 -- return utils.get_highlight 'TabLineFill'.bg
765 -- end
766 -- end,
767 -- { tabline_file_name_block, }
768 -- )
770 -- local buffer_line = utils.make_buflist(
771 -- tabline_buffer_block,
772 -- { provider = icon.arrow_left .. ' ', hl = 'TabLine', },
773 -- { provider = ' ' .. icon.arrow_right, hl = 'TabLine', }
774 -- )
776 local tabpage = {
777 provider = function(self)
778 return "%" .. self.tabnr .. "T " .. self.tabpage .. " %T"
779 end,
780 hl = function(self)
781 if self.is_active then
782 return "TabLineSel"
783 else
784 return "TabLine"
785 end
786 end,
787 }
789 local tab_pages = {
790 { provider = "%=" },
791 utils.make_tablist(tabpage),
792 }
794 -- local tabline = { buffer_line, tab_pages, }
796 -- local statuscolumn = {}
798 heirline.setup({
799 statusline = statuslines,
800 winbar = winbars,
801 tabline = tab_pages,
802 -- tabline = tabline,
803 -- statuscolumn = statuscolumn,
805 opts = {
806 colors = nugu,
807 disable_winbar_cb = function(args)
808 return conditions.buffer_matches({
809 buftype = ignored.buftypes,
810 filetype = ignored.filetypes,
811 }, args.buf)
812 end,
813 },
814 })
815 end,
816 },
817}

neovim/lua/bugabinga/plugins/lazydev.lua

Modified

+4 / −0 text lines

44 ft = 'lua', -- only load on lua files
55 opts = {
66 library = {
7 'lazy.nvim',
78 -- See the configuration section for more details
89 -- Load luvit types when the `vim.uv` word is found
910 { path = 'luvit-meta/library', words = { 'vim%.uv', }, },
11 -- Load the wezterm types when the `wezterm` module is required
12 -- Needs `justinsgithub/wezterm-types` to be installed
13 { path = 'wezterm-types', mods = { 'wezterm', }, },
1014 },
1115 },
1216 },

neovim/lua/bugabinga/plugins/pair-ls.lua

Deleted
deleted file mode 100644

+0 / −11 text lines

1return {
2 'stevearc/pair-ls.nvim',
3 cmd = { 'Pair', 'PairConnect', },
4 opts = {
5 cmd = { 'pair-ls', 'lsp', },
6 -- cmd = { "pair-ls", "lsp", "-port", "8080" },
7 -- cmd = { "pair-ls", "lsp", "-port", "8081" },
8 -- cmd = { "pair-ls", "lsp", "-signal", "wss://localhost:8080" },
9 -- cmd = { "pair-ls", "lsp", "-forward", "wss://localhost:8080" },
10 },
11}

neovim/lua/bugabinga/plugins/spectre.lua

Deleted
deleted file mode 100644

+0 / −83 text lines

1local map = require 'std.map'
2
3require 'bugabinga.health'.add_dependency
4{
5 name_of_executable = 'rg',
6}
7
8map.normal {
9 description = 'Search and replace',
10 category = 'search',
11 keys = '<leader>rs',
12 command = function () require 'spectre'.open() end,
13}
15map.normal {
16 description = 'Search current word',
17 category = 'search',
18 keys = '<leader>rw',
19 command = function () require 'spectre'.open_visual { select_word = true, } end,
20}
22map.visual {
23 description = 'Search current word',
24 category = 'search',
25 keys = '<leader>rw',
26 command = function () require 'spectre'.open_visual() end,
27}
29map.normal {
30 description = 'Search on current file',
31 category = 'search',
32 keys = '<leader>rf',
33 command = function () require 'spectre'.open_file_search { select_word = true, } end,
34}
36return {
37 'nvim-pack/nvim-spectre',
38 cmd = 'Spectre',
39 dependencies = {
40 'nvim-lua/plenary.nvim',
41 'nvim-tree/nvim-web-devicons',
42 },
43 opts = {
44 live_update = true,
45 default = { replace = { cmd = 'oxi', }, },
46 },
47 build = function ( plugin_spec )
48 local sysname = vim.uv.os_uname().sysname
50 local copy_cmd = {}
51 if sysname == 'Darwin' then
52 copy_cmd = { 'cp', 'target/release/libspectre_oxi.dylib', '../lua/spectre_oxi.so', }
53 elseif sysname == 'Linux' then
54 copy_cmd = { 'cp', 'target/release/libspectre_oxi.so', '../lua/spectre_oxi.so', }
55 elseif sysname == 'Windows_NT' then
56 copy_cmd = { 'cp', 'target/release/libspectre_oxi.dll', '../lua/spectre_oxi.dll', }
57 else
58 error 'unsupported os'
59 end
61 local spectre_oxi_dir = vim.fs.joinpath( plugin_spec.dir, 'spectre_oxi' )
63 local cargo_build_proc = vim.system(
64 { 'cargo', 'build', '--release', },
65 { text = true, cwd = spectre_oxi_dir, }
66 ):wait()
67 if cargo_build_proc.code ~= 0 then error( cargo_build_proc.stderr ) end
69 local cp_proc = vim.system(
70 copy_cmd,
71 { text = true, cwd = spectre_oxi_dir, }
72 ):wait()
73 if cp_proc.code ~= 0 then error( cp_proc.stderr ) end
75 local rm_proc = vim.system(
76 { 'rm', '-r', '-f', 'target', },
77 { text = true, cwd = spectre_oxi_dir, }
78 ):wait()
79 if rm_proc.code ~= 0 then error( rm_proc.stderr ) end
81 vim.print 'Building oxi done'
82 end,
83}

neovim/lua/bugabinga/plugins/startuptime.lua

Deleted
deleted file mode 100644

+0 / −5 text lines

1-- TODO: rewrite this in lua?
2return {
3 'dstein64/vim-startuptime',
4 cmd = 'StartupTime',
5}

neovim/lua/bugabinga/plugins/sudo.lua

Deleted
deleted file mode 100644

+0 / −1 text lines

1return { 'lambdalisue/suda.vim', cmd = { 'SudaRead', 'SudaWrite', }, }

neovim/lua/bugabinga/plugins/tint.lua

Deleted
deleted file mode 100644

+0 / −5 text lines

1return {
2 'levouh/tint.nvim',
3 event = { 'WinNew', 'SessionLoadPost', },
4 opts = {},
5}

neovim/lua/bugabinga/plugins/tree.lua

Deleted
deleted file mode 100644

+0 / −44 text lines

1local map = require 'std.map'
2
3map.normal {
4 description = 'Toggle Tree File Explorer',
5 category = 'explorer',
6 keys = '<leader>e',
7 command = function () require 'nvim-tree.api'.tree.toggle() end,
8}
9
10return {
11 'nvim-tree/nvim-tree.lua',
12 version = '1.*',
13 -- docs do not recommend to lazy load, but it does load slowly on win32!
14 -- lazy = false,
15 cmd = 'NvimTreeOpen',
16 dependencies = {
17 'nvim-tree/nvim-web-devicons',
18 'antosha417/nvim-lsp-file-operations',
19 },
20 init = function ()
21 -- disable netrw at the very start of your init.lua
22 vim.g.loaded_netrw = 1
23 vim.g.loaded_netrwPlugin = 1
25 -- set termguicolors to enable highlight groups
26 vim.opt.termguicolors = true
27 end,
28 opts = {
29 sort_by = 'case_sensitive',
30 view = {
31 width = 69,
32 },
33 renderer = {
34 group_empty = true,
35 },
36 filters = {
37 dotfiles = false,
38 },
39 },
40 config = function ( _, opts )
41 require 'nvim-tree'.setup( opts )
42 require 'lsp-file-operations'.setup()
43 end,
44}

neovim/spell/nerd.utf-8.add

Modified

+1 / −0 text lines

6464sinnfrei
6565Asciidoc
6666AsciidocFX
67GraalVM

neovim/spell/nerd.utf-8.add.spl

Modified

Binary size (old → new): 927 → 957 bytes.

nushell/env.nu

Modified

+1 / −0 text lines

1212 $env.GIT_EDITOR = 'nvim'
1516if not (which neovide | is-empty) {
1617 $env.VISUAL = 'neovide'

tools/tools.csv

Modified

+2 / −1 text lines

2828lychee;lychee; --locked --no-default-features --features rustls-tls,email-check
2929mask
3030macchina
31markdown-oxide; markdown-oxide; --locked --git https://github.com/Feel-ix-343/markdown-oxide.git
3132mdbook
3233mdcat
3334mdsh
4445selene;selene; --no-default-features
4546starship
4647stylua;stylua; --features lua52
47taplo-cli;taplo
48taplo-cli;taplo; --locked --features lsp
4849tealdeer;tldr
4950tokei
5051tre