repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

07febe59bcbca58dbfe32ead746c31fab74474fc

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (65)

.github/workflows/devskim.yml

Added
new file mode 100644
1 +# This workflow uses actions that are not certified by GitHub.
2 +# They are provided by a third-party and are governed by
3 +# separate terms of service, privacy policy, and support
4 +# documentation.
6 +name: DevSkim
8 +on:
9 + push:
10 + branches: [ "trunk" ]
11 + pull_request:
12 + branches: [ "trunk" ]
13 + schedule:
14 + - cron: '28 3 * * 0'
16 +jobs:
17 + lint:
18 + name: DevSkim
19 + runs-on: ubuntu-20.04
20 + permissions:
21 + actions: read
22 + contents: read
23 + security-events: write
24 + steps:
25 + - name: Checkout code
26 + uses: actions/checkout@v3
28 + - name: Run DevSkim scanner
29 + uses: microsoft/DevSkim-Action@v1
31 + - name: Upload DevSkim scan results to GitHub Security tab
32 + uses: github/codeql-action/upload-sarif@v2
33 + with:
34 + sarif_file: devskim-results.sarif

.github/workflows/semgrep.yml

Added
new file mode 100644
1 +# This workflow uses actions that are not certified by GitHub.
2 +# They are provided by a third-party and are governed by
3 +# separate terms of service, privacy policy, and support
4 +# documentation.
6 +# This workflow file requires a free account on Semgrep.dev to
7 +# manage rules, file ignores, notifications, and more.
8 +#
9 +# See https://semgrep.dev/docs
11 +name: Semgrep
13 +on:
14 + push:
15 + branches: [ "trunk" ]
16 + pull_request:
17 + # The branches below must be a subset of the branches above
18 + branches: [ "trunk" ]
19 + schedule:
20 + - cron: '23 9 * * 0'
22 +permissions:
23 + contents: read
25 +jobs:
26 + semgrep:
27 + permissions:
28 + contents: read # for actions/checkout to fetch code
29 + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
30 + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
31 + name: Scan
32 + runs-on: ubuntu-latest
33 + steps:
34 + # Checkout project source
35 + - uses: actions/checkout@v3
37 + # Scan code using project's configuration on https://semgrep.dev/manage
38 + - uses: returntocorp/semgrep-action@fcd5ab7459e8d91cb1777481980d1b18b4fc6735
39 + with:
40 + publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
41 + publishDeployment: ${{ secrets.SEMGREP_DEPLOYMENT_ID }}
42 + generateSarif: "1"
44 + # Upload SARIF file generated in previous step
45 + - name: Upload SARIF file
46 + uses: github/codeql-action/upload-sarif@v2
47 + with:
48 + sarif_file: semgrep.sarif
49 + if: always()

README.md

Modified
1 -# bugabingas personal dotfiles, 33rd attempt
1 +# bugabinga neovim config
3 -Shared configuration files between some Linux and some Windows hosts.
3 +neovim configuration is scripting.
4 +scripting with lua + neovim api is programming.
5 -## bootstrapping a new host
6 +## project structure
7 -1. Install git
8 -1. Install a JDK
9 -1. `git clone git@github.com:bugabinga/dotfiles`
10 -1. `cd dotfiles`
11 -1. `java bootstripper.java`
8 +init.lua
9 +: main entry point
11 +lua/std
12 +: standard lib. can only depend on itself and neovim apis.
14 +lua/bugabinga
15 +: config modules. in aggregation, defines all of the config. can depend on itself, std and plugins.
17 +lua/bugabinga/plugins
18 +: third party plugins and their config glue integrating it into the config.
20 +colors/nugu
21 +: color theme
23 +ftplugin
24 +: file type specific config
13 -> Pay attention to already existing symlinks!
26 +----------
15 -## windows
28 +# ai poem
17 -Initial setup on windows is a little more sophisticated, because I am used to a developers environment.
30 +I am the bone of my code, bugs are my body and exceptions are my blood.
31 +I have created over a thousand bugs, unknown to testers, nor known to debuggers.
32 +Have withstood pain to create many programs, yet those hands will never hold a working program.
33 +So as I pray, Unlimited Bug Works.
19 -1. Enable Developer Mode, so that it is allowed to make symlinks without admin permissions.
20 -1. Install Build Tools with C++ Option (for Rust and cargo tools)
21 -1. Install Git without internal SSH
22 -1. Start ssh-agent service
23 -1. Enable `UTF-8` in regional settings
35 +~ Shirou Emiya
25 -## rough goals
37 +---------
27 -- minimal amount of dependencies
28 - This helps in setting up new host.
29 - But it is really hard to achieve when hosts are allowed to be Windows and Linux AND [OpenBSD] ...
30 - The current state is a compromise reached after some experimentation.
31 -- editing and applying configs is "natural"
32 - Natural in this context is to mean: as if there was no dotfiles repository used for sharing.
33 - This is achieved by sym-linking the files from the dotfiles repository into their normal locations.
34 - So when it comes time to edit a config file, you can stay blissfully unaware of the dotfiles repository.
39 +# todo
36 -## handling per host differences
38 -There are two classes of differences in configurations between platforms (specifically Linux and Windows in my case).
40 -### differing locations of config files
42 -For example, [NeoVim] stores its configuration at `~/.config/nvim` in Linux and at `~/AppData/Roaming/nvim` in Windows.
43 -In order to handle theses differences each host gets its own symlink file with the naming pattern `(hostname).symlinks`.
44 -The format of this file is:
46 -```txt
47 -path to configuration file/directory relative to dotfiles root
48 -absolute path of symlink on host
49 -```
51 -Each symlink path pair is to be delimited by a newline.
52 -Example:
54 -```txt
55 -neovim
56 -~/.config/nvim
58 -foo/bar.conf
59 -~/.config/foobar.conf
60 -```
62 -This file will be parsed by [bootstripper] in order to create those symlinks.
64 -### differing values in configuration files
66 -Most often, these come down to different paths of stuff, that get referred to in config files.
67 -For example, [topgrade], an abstraction over a bunch of package managers and updaters, might want to know the location of your git repositories, so it can pull them for you.
68 -Some programs, e.g. [NeoVim], have rich configuration languages that are powerful enough for you to resolve those differences with conditionals.
69 -However some programs, e.g. [topgrade], offer only declarative configuration languages, which make it impossible to resolve this problem in the config.
70 -I tried solving this problem with some kind of a templating engine.
71 -But I quickly gave up on that, because it was too annoying to manage.
72 -Specifically, editing configuration stopped being "natural", meaning you cannot simply open and edit the file at the location you expect the config to be anymore.
73 -This natural flow is the reason symlinks are used.
74 -With templating in the mix, an intermediary step is necessary, between editing and applying config.
75 -Too much work.
76 -Instead, I use the `(hostname).symlink` files to resolve such cases.
77 -That means, that config files are completely independent per host, and as such some duplication of configuration occurs.
78 -A tradeoff well worth it in my opinion.
80 -## WIP:secrets
82 -Secrets are encrypted and saved as file into the `tresor` folder.
83 -The name of these file is a random UUID, which I map to their original purpose somewhere else.
84 -Those secret files are decrypted either by [bootstripper] or on demand in my scripts.
86 -## the trouble with bootstrapping dotfiles
88 -Most of my previous attempts at managing my configuration files failed because it is tricky to share them between Windows and Unix systems.
89 -If all my hosts were Unix(y), I would write a POSIX shell script and be done with it.
90 -But that does not work for Windows.
92 -Since I find it important to be able to setup my configuration files on any fresh new host, it is important to have as few dependencies as possible.
93 -However, with Windows in the mix, this is pretty hard, so I settled on a compromise: JDK.
95 -Things I tried in the past to solve this problem:
97 -- dotfiles managers (e.g. [chezmoi])
98 - > too much work
99 -- writing a bootstrap/installer with [cosmopolitan]
100 - > extremely cool tech. unfortunately I am not a C programmer so I struggled a lot.
101 - > also, the resulting binary rewrites itself on first run. How do I keep a file version controlled that is allowed to change on first use, but should not result in a new modification...?
102 - > furthermore, managing the [cosmopolitan] toolchain for windows made extra work.
103 -- use POSIX shell for Unix, use PowerShell for Windows
104 - > too much work. maintaining the same program in 2 different languages ... depressing not because you have to write twice, but because you have to test twice.
105 -- Pretend Windows is Unix by only interfacing with it through [WSL].
106 - > Windows is not Unix. [WSL] is cute, even useful for cross-compilation and testing. But when I am on Windows I want to use Windows, when I am on Linux I want to use Linux. Fighting the platform constantly is too tiring.
108 -Things I have not tried (yet?):
110 -- Use a language with a pleasant cross-compile story ([golang], [Rust], [ziglang]) and version control a binary for those platforms I care about.
111 -- Use [PowerShell Core] and maybe a script per platform to install it. This could be nice if [PowerShell Core] would replace [PowerShell Windows] and it was my main shell.
113 -[NeoVim]: https://neovim.io/
114 -[topgrade]: https://github.com/r-darwish/topgrade
115 -[bootstripper]: https://github.com/bugabinga/dotfiles/blob/trunk/bootstripper.java
116 -[chezmoi]: https://github.com/twpayne/chezmoi
117 -[golang]: https://golang.org/
118 -[Rust]: https://www.rust-lang.org/
119 -[ziglang]: https://ziglang.org/
120 -[WSL]: https://docs.microsoft.com/en-us/windows/wsl/about
121 -[PowerShell Core]: https://github.com/PowerShell/PowerShell
122 -[PowerShell Windows]: https://de.wikipedia.org/wiki/PowerShell
123 -[OpenBSD]: https://www.openbsd.org/
124 -[cosmopolitan]: https://github.com/jart/cosmopolitan
41 +* kill lush
42 +* write plugin to parse lsp settings locally and apply them
43 +* is there a use case for a plugin that parses local plugin configuration overrides?
44 +* kill custom lsp stuff in favor of lspconfig and try neoconf + nvim-java
45 +* does status bar fail to display if lsp fails to load?
46 +* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc
47 +* use gen.ai to generate docs
48 +* learn marks and refactor mark.lua
49 +* use ltex-ls for markdown, code comments and commit messages
50 +* create a floating window that shows plugins, that have commands, as reminder
51 +* setup DAP
52 +* add nu-check to nvim-lint
53 +* create facade over vim.api.nvim_create_user_command
54 +* create skeleton-plugin for default file content based on file type
55 +* add support for Java multi line string in autopairs
56 +* nvim spell for camel case words

env.nu

Added
new file mode 100644
1 +# GLOBAL VARIABLES
3 +$env.WIN32 = ( $nu.os-info.name =~ "windows" )
4 +$env.NURC_DIR = ( $nu.config-path | path expand | path dirname )
5 +$env.DOTFILES = ( $env.NURC_DIR | path join ".." | path expand )
6 +$env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }
7 +$env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }
9 +if ($env | get -i TERM_PROGRAM) == WezTerm {
10 + $env.TERM = "wezterm"
11 + if not $env.WIN32 {
12 + $env.TERMCAP = ~./termcap/w/wezterm
13 + }
16 +# theme for ls and other programs, that use LS_COLORS
17 +$env.LS_COLORS = (try { vivid generate alabaster_dark | into string } catch {""})
19 +# Specifies how environment variables are:
20 +# - converted from a string to a value on Nushell startup (from_string)
21 +# - converted from a value back to a string when running external commands (to_string)
22 +# Note: The conversions happen *after* config.nu is loaded
23 +$env.ENV_CONVERSIONS = {
24 + "PATH": {
25 + from_string: { |s| $s | split row (char esep) }
26 + to_string: { |v| $v | str join (char esep) }
27 + }
28 + "Path": {
29 + from_string: { |s| $s | split row (char esep) }
30 + to_string: { |v| $v | str join (char esep) }
31 + }
34 +# Directories to search for scripts when calling source or use
35 +$env.NU_LIB_DIRS = [
36 + ($nu.config-path | path dirname | path join 'modules'),
37 + ($nu.config-path | path dirname | path join 'completions')
40 +if $env.WIN32 {
41 + # TODO: insert scoop cargo path here
42 + # $env.CARGO_HOME = ( '~/.cargo' | path expand )
43 + $env.Path = ( $env.Path | prepend '' )
44 +} else {
45 + $env.CARGO_HOME = ( '~/.cargo' | path expand )
46 + $env.PATH = ( $env.PATH | prepend ( $env.CARGO_HOME | path join 'bin') )
47 + $env.PATH = ( $env.PATH | prepend ( '~/.local/bin'| path expand ) )

lua/bugabinga/plugins/heirline.lua

Added
new file mode 100644
1 +---@diagnostic disable: param-type-mismatch
2 +local icon = require 'std.icon'
3 +local auto = require 'std.auto'
4 +local ignored = require 'std.ignored'
6 +local NEW_FILE = '~untitled~'
8 +return {
9 + {
10 + 'rebelot/heirline.nvim',
11 + tag = 'v1.0.3',
12 + event = 'BufEnter',
13 + dependencies = {
14 + 'nvim-tree/nvim-web-devicons',
15 + 'lewis6991/gitsigns.nvim',
16 + },
17 + config = function ()
18 + local heirline = require 'heirline'
19 + local conditions = require 'heirline.conditions'
20 + local utils = require 'heirline.utils'
22 + local nugu = require 'bugabinga.nugu.palette'
23 + heirline.load_colors( nugu )
25 + auto 'reload_heirline_colors' {
26 + description = 'Reload dark/light nugu colors for Heirline',
27 + events = 'ColorScheme',
28 + command = function () utils.on_colorscheme( nugu ) end,
29 + }
31 + local vi_mode = {
32 + init = function ( self )
33 + self.mode = vim.fn.mode( 1 ) -- :h mode()
34 + end,
36 + static = {
37 + mode_names = {
38 + n = icon.normal,
39 + no = icon.normal .. '?',
40 + nov = icon.normal .. '?',
41 + noV = icon.normal .. '?',
42 + ['no\22'] = icon.normal .. '?',
43 + niI = icon.normal .. 'i',
44 + niR = icon.normal .. 'r',
45 + niV = icon.normal .. 'v',
46 + nt = icon.normal .. 't',
47 + v = icon.visual,
48 + vs = icon.visual .. 's',
49 + V = icon.visual .. '_',
50 + Vs = icon.visual .. 's',
51 + ['\22'] = '^' .. icon.visual,
52 + ['\22s'] = '^' .. icon.visual,
53 + s = icon.select,
54 + S = icon.select .. '_',
55 + ['\19'] = '^' .. icon.select,
56 + i = icon.insert,
57 + ic = icon.insert .. 'c',
58 + ix = icon.insert .. 'x',
59 + R = icon.replace,
60 + Rc = icon.replace .. 'c',
61 + Rx = icon.replace .. 'x',
62 + Rv = icon.replace .. 'v',
63 + Rvc = icon.replace .. 'v',
64 + Rvx = icon.replace .. 'v',
65 + c = icon.command,
66 + cv = icon.command .. 'x',
67 + r = icon.pending,
68 + rm = icon.pending .. 'm',
69 + ['r?'] = icon.pending .. '?',
70 + ['!'] = icon.exclaim,
71 + t = icon.terminal,
72 + },
73 + mode_colors = {
74 + n = 'ui_normal',
75 + i = 'ui_accent',
76 + v = 'ui_important_global',
77 + V = 'ui_important_global',
78 + ['\22'] = 'ui_important_global',
79 + c = 'ui_important_global',
80 + s = 'ui_important_global',
81 + S = 'ui_important_global',
82 + ['\19'] = 'ui_important_global',
83 + R = 'ui_important_global',
84 + r = 'ui_important_global',
85 + ['!'] = 'ui_important_global',
86 + t = 'ui_important_global',
87 + },
88 + },
90 + provider = function ( self )
91 + local mode_name = self.mode_names[self.mode]
92 + return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) '
93 + end,
95 + hl = function ( self )
96 + local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
97 + return { fg = self.mode_colors[mode], bold = true, }
98 + end,
100 + update = {
101 + 'ModeChanged',
102 + pattern = '*:*',
103 + callback = vim.schedule_wrap( function () vim.cmd.redrawstatus() end ),
104 + },
107 + local file_icon = {
108 + init = function ( self )
109 + local filename = self.filename
110 + local extension = vim.fn.fnamemodify( filename, ':e' )
111 + self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true, } )
112 + end,
113 + provider = function ( self )
114 + return self.icon and (self.icon .. ' ')
115 + end,
116 + hl = 'DefaultIcon',
119 + local file_name = {
120 + init = function ( self )
121 + self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) )
122 + if self.lfilename == '' then self.lfilename = NEW_FILE end
123 + end,
125 + flexible = 2,
128 + provider = function ( self )
129 + return self.lfilename
130 + end,
131 + },
133 + provider = function ( self )
134 + return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) )
135 + end,
136 + },
139 + local file_flags = {
141 + condition = function ()
142 + return vim.bo.modified
143 + end,
144 + provider = string.format( ' %s ', icon.modified ),
145 + hl = 'Comment',
146 + },
148 + condition = function ()
149 + return not vim.bo.modifiable or vim.bo.readonly
150 + end,
151 + provider = string.format( ' %s ', icon.lock ),
152 + hl = 'ErrorMsg',
153 + },
156 + local file_name_block = {
157 + init = function ( self )
158 + self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )
159 + end,
161 + file_icon,
162 + { provider = ' ', },
163 + file_name,
164 + file_flags,
165 + { provider = '%<', }, -- this means that the statusline is cut here when there's not enough space
168 + local file_type = {
169 + provider = function ()
170 + return icon.file .. ' ' .. string.upper( vim.bo.filetype )
171 + end,
174 + local file_encoding = {
175 + provider = function ()
176 + local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc'
177 + return enc ~= 'utf-8' and enc:upper()
178 + end,
181 + local file_format = {
182 + static = {
183 + dos = icon.newline .. icon.carriage_return,
184 + unix = icon.newline,
185 + mac = icon.carriage_return,
186 + },
187 + provider = function ( self )
188 + local fileformat = vim.bo.fileformat
189 + return self[fileformat]
190 + end,
193 + local file_size = {
194 + provider = function ()
195 + -- stackoverflow, compute human readable file size
196 + -- i want to see vim opening a 1EiB file 󰱯
197 + local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E', }
198 + local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
199 + fsize = (fsize < 0 and 0) or fsize
200 + if fsize < 1024 then
201 + return fsize .. suffix[1]
202 + end
203 + local i = math.floor( (math.log( fsize ) / math.log( 1024 )) )
204 + return string.format( '%.2g%s', fsize / math.pow( 1024, i ), suffix[i + 1] )
205 + end,
208 + local file_last_modified = {
209 + provider = function ()
210 + local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )
211 + if ftime > 0 then
212 + local timeago = require 'std.timeago'
213 + return timeago.format( ftime )
214 + end
215 + end,
218 + local lsp_active = {
219 + condition = conditions.lsp_attached,
220 + -- FIXME: updates from parent components do not seem to update children,
221 + -- if those have their own updates?
222 + update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave', },
224 + provider = function ()
225 + local names = {}
226 + for _, client in pairs( vim.lsp.get_clients { bufnr = 0, } ) do
227 + table.insert( names, client.name )
228 + end
229 + return icon.lsp .. ' ' .. table.concat( names, ' ' )
230 + end,
233 + local diagnostic_enabled = {
234 + init = function ( self )
235 + self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on
236 + end,
237 + provider = function ( self )
238 + return icon.diagnostic .. ' ' .. self.icon
239 + end,
242 + local diagnostic = {
243 + condition = conditions.has_diagnostics,
245 + static = {
246 + error_icon = icon.error,
247 + warn_icon = icon.warn,
248 + info_icon = icon.info,
249 + hint_icon = icon.hint,
250 + },
252 + init = function ( self )
253 + self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR, } )
254 + self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN, } )
255 + self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT, } )
256 + self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO, } )
257 + end,
259 + update = { 'DiagnosticChanged', 'BufEnter', },
262 + provider = function ( self )
263 + -- 0 is just another output, we can decide to print it or not!
264 + return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ')
265 + end,
266 + hl = 'DiagnosticError',
267 + },
269 + provider = function ( self )
270 + return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ')
271 + end,
272 + hl = 'DiagnosticWarn',
273 + },
275 + provider = function ( self )
276 + return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ')
277 + end,
278 + hl = 'DiagnosticInfo',
279 + },
281 + provider = function ( self )
282 + return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints)
283 + end,
284 + hl = 'DiagnosticHint',
285 + },
288 + local is_svn_repo = function ()
289 + local svn_dir = vim.fs.find( '.svn', {
290 + upward = true,
291 + stop = vim.uv.os_homedir(),
292 + path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ),
293 + type = 'directory',
294 + } )
296 + return not vim.tbl_isempty( svn_dir )
297 + end
299 + local svn_get_relative_url = function ()
300 + -- FIXME: replace with vim.system
301 + local job = require 'plenary.job'
302 + local relative_url = { '[ERR]', }
304 + job:new {
305 + command = 'svn',
306 + args = { 'info', '--show-item', 'relative-url', '--no-newline', },
307 + on_exit = function ( current_job, exit_code )
308 + if exit_code == 0 then relative_url = current_job:result() end
309 + end,
310 + }:sync()
312 + return relative_url[1]
313 + end
315 + local svn = {
316 + condition = is_svn_repo,
318 + update = 'BufEnter',
320 + init = function ( self )
321 + self.relative_url = svn_get_relative_url()
322 + end,
325 + provider = function ( self )
326 + return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url
327 + end,
328 + },
332 + local git = {
333 + condition = conditions.is_git_repo,
335 + init = function ( self )
336 + self.status_dict = vim.b.gitsigns_status_dict
337 + end,
340 + provider = function ( self )
341 + return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.head .. ' '
342 + end,
343 + },
345 + provider = function ( self )
346 + local count = self.status_dict.added or 0
347 + return count > 0 and (icon.diff_add .. ' ' .. count .. ' ')
348 + end,
349 + hl = 'DiffAdd',
350 + },
352 + provider = function ( self )
353 + local count = self.status_dict.removed or 0
354 + return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ')
355 + end,
356 + hl = 'DiffDelete',
357 + },
359 + provider = function ( self )
360 + local count = self.status_dict.changed or 0
361 + return count > 0 and (icon.diff_change .. ' ' .. count .. ' ')
362 + end,
363 + hl = 'DiffChange',
364 + },
367 + local work_dir = {
368 + init = function ( self )
369 + self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' '
370 + self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )
371 + end,
373 + flexible = 1,
376 + provider = function ( self )
377 + return self.icon .. self.cwd
378 + end,
379 + },
381 + provider = function ( self )
382 + local cwd = vim.fn.pathshorten( self.cwd )
383 + return self.icon .. cwd
384 + end,
385 + },
387 + provider = '',
388 + },
391 + local help_file_name = {
392 + condition = function ()
393 + return vim.bo.filetype == 'help'
394 + end,
395 + provider = function ()
396 + local filename = vim.api.nvim_buf_get_name( 0 )
397 + return vim.fn.fnamemodify( filename, ':t' )
398 + end,
399 + hl = 'Question',
402 + local terminal_name = {
403 + provider = function ()
404 + local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
405 + local basename = vim.fs.basename( name )
406 + return icon.terminal .. ' ' .. (basename or 'noname')
407 + end,
408 + hl = 'Bold',
411 + local togglers = {
412 + provider = function ()
413 + local togglers = require 'bugabinga.options.togglers'
414 + return tostring( togglers )
415 + end,
418 + local macro_recording = {
419 + condition = function ()
420 + return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
421 + end,
422 + provider = icon.macro .. ' ',
423 + hl = 'PreProc',
424 + utils.surround( { '░▒▓ ', ' ▓▒░', }, nil, {
425 + provider = function ()
426 + return vim.fn.reg_recording()
427 + end,
428 + hl = 'Bold',
429 + } ),
430 + update = {
431 + 'RecordingEnter',
432 + 'RecordingLeave',
433 + },
436 + local lazy = {
437 + condition = function ()
438 + local ok, lazy_status = pcall( require, 'lazy.status' )
439 + return ok and lazy_status.has_updates()
440 + end,
441 + update = { 'User', pattern = 'LazyUpdate', },
442 + provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status'.updates() .. ' ' end,
443 + on_click = {
444 + callback = function () require 'lazy'.update() end,
445 + name = 'update_plugins',
446 + },
449 + local align = { provider = '%=', }
450 + local space = { provider = ' ', }
452 + local default_statusline = {
453 + vi_mode, macro_recording, align,
454 + work_dir, space, git, svn, align,
455 + diagnostic_enabled, space, diagnostic, space, lsp_active, align,
456 + togglers, align,
457 + lazy, space, file_encoding, space, file_format, space, file_type, space, file_size, space, file_last_modified,
460 + local special_statusline = {
461 + condition = function ()
462 + return conditions.buffer_matches {
463 + buftype = ignored.buftypes,
464 + filetype = ignored.filetypes,
466 + end,
468 + file_type,
469 + space,
470 + help_file_name,
471 + align,
474 + local terminal_statusline = {
476 + condition = function ()
477 + return conditions.buffer_matches { buftype = { 'terminal', }, }
478 + end,
480 + { condition = conditions.is_active, vi_mode, space, },
481 + file_type,
482 + space,
483 + terminal_name,
484 + align,
487 + local inactive_statusline = {
488 + condition = conditions.is_not_active,
489 + file_type,
490 + space,
491 + file_name,
492 + align,
495 + local statuslines = {
496 + hl = function ()
497 + if conditions.is_active() then
498 + return 'StatusLine'
499 + else
500 + return 'StatusLineNC'
501 + end
502 + end,
504 + fallthrough = false,
506 + special_statusline,
507 + terminal_statusline,
508 + inactive_statusline,
509 + default_statusline,
512 + local winbars = {
513 + hl = function ()
514 + if conditions.is_active() then
515 + return 'Winbar'
516 + else
517 + return 'WinbarNC'
518 + end
519 + end,
521 + fallthrough = false,
524 + condition = function ()
525 + return conditions.buffer_matches { buftype = { 'terminal', }, }
526 + end,
528 + file_type,
529 + space,
530 + terminal_name,
531 + },
533 + file_name_block,
536 + local tabline_buffer_number = {
537 + provider = function ( self )
538 + return '(' .. tostring( self.bufnr ) .. ')'
539 + end,
540 + hl = function ( self )
541 + if self.is_active then
542 + return { fg = utils.get_highlight 'TabLineSel'.fg, }
543 + elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
544 + return { fg = utils.get_highlight 'StatusLineNc'.fg, }
545 + else
546 + return { fg = utils.get_highlight 'TabLine'.fg, }
547 + end
548 + end,
551 + local tabline_file_name = {
552 + provider = function ( self )
553 + local name = self.file_name
554 + return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
555 + end,
556 + hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end,
559 + local tabline_file_flags = {
561 + condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end,
562 + provider = icon.modified .. ' ',
563 + },
565 + condition = function ( self )
566 + return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or
567 + vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } )
568 + end,
569 + provider = function ( self )
570 + if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then
571 + return icon.terminal
572 + else
573 + return icon.lock
574 + end
575 + end,
576 + },
577 + hl = 'Bold',
580 + local tabline_file_name_block = {
581 + init = function ( self )
582 + self.file_name = vim.api.nvim_buf_get_name( self.bufnr )
583 + end,
585 + hl = function ( self )
586 + if self.is_active then
587 + return 'TabLineSel'
588 + elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
589 + return { fg = utils.get_highlight 'StatusLineNc'.fg, }
590 + else
591 + return 'TabLine'
592 + end
593 + end,
595 + on_click = {
596 + callback = function ( _, minwid, _, button )
597 + if button == 'm' then --m = middle click
598 + vim.schedule( function ()
599 + vim.api.nvim_buf_delete( minwid, { force = false, } )
600 + vim.cmd.redrawtabline()
601 + end )
602 + else
603 + vim.api.nvim_win_set_buf( 0, minwid )
604 + end
605 + end,
606 + minwid = function ( self ) return self.bufnr end,
607 + name = 'heirline_tabline_buffer_callback',
608 + },
610 + file_icon,
611 + { provider = ' ', },
612 + tabline_file_name,
613 + tabline_buffer_number,
614 + tabline_file_flags,
617 + local tabline_buffer_block = utils.surround(
619 + ' ' .. icon.slant_left,
620 + icon.slant_right .. ' ',
621 + },
622 + function ( self )
623 + if self.is_active then
624 + return utils.get_highlight 'TabLine'.bg
625 + else
626 + return utils.get_highlight 'TabLineFill'.bg
627 + end
628 + end,
629 + { tabline_file_name_block, }
632 + local buffer_line = utils.make_buflist(
633 + tabline_buffer_block,
634 + { provider = icon.arrow_left .. ' ', hl = 'TabLine', },
635 + { provider = ' ' .. icon.arrow_right, hl = 'TabLine', }
638 + local tabpage = {
639 + provider = function ( self )
640 + return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
641 + end,
642 + hl = function ( self )
643 + if self.is_active then
644 + return 'TabLineSel'
645 + else
646 + return 'TabLine'
647 + end
648 + end,
651 + local tab_pages = {
652 + { provider = '%=', },
653 + utils.make_tablist( tabpage ),
656 + local tabline = { buffer_line, tab_pages, }
658 + -- local statuscolumn = {}
660 + heirline.setup {
661 + statusline = statuslines,
662 + winbar = winbars,
663 + tabline = tabline,
664 + -- statuscolumn = statuscolumn,
666 + opts = {
667 + colors = nugu,
668 + disable_winbar_cb = function ( args )
669 + return conditions.buffer_matches(
671 + buftype = ignored.buftypes,
672 + filetype = ignored.filetypes,
673 + },
674 + args.buf )
675 + end,
676 + },
678 + end,
679 + },

neovim/.editorconfig

Modified
17 17 max_line_length = 120
19 19 # optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
20 -# in neovim the value 'auto' is not a valid option, please use 'unset'
20 +# in neovim the value 'auto' is not a valid option, please use 'unset'
21 21 end_of_line = lf
23 23 # none/ comma / semicolon / only_kv_colon
24 24 table_separator_style = comma
26 26 #optional keep/never/always/smart
27 -trailing_table_separator = keep
27 +trailing_table_separator = always
29 29 # keep/remove/remove_table_only/remove_string_only
30 30 call_arg_parentheses = remove
105 105 # [line space]
107 107 # The following configuration supports four expressions
108 -# keep
109 -# fixed(n)
108 +# keep
109 +# fixed(n)
110 110 # min(n)
111 111 # max(n)
112 112 # for eg. min(2)

neovim/README.md

Modified
39 39 # todo
41 +* replace nugu with nugu_fresh
42 +* write plugin to parse lsp settings locally and apply them
43 +* is there a use case for a plugin that parses local plugin configuration overrides?
44 +* kill custom lsp stuff in favor of lspconfig and try neoconf + nvim-java
45 +* does status bar fail to display if lsp fails to load?
41 46 * pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc
42 47 * use gen.ai to generate docs
43 48 * learn marks and refactor mark.lua
44 49 * use ltex-ls for markdown, code comments and commit messages
50 +* create a floating window that shows plugins, that have commands, as reminder
45 51 * setup DAP
46 52 * add nu-check to nvim-lint
47 53 * create facade over vim.api.nvim_create_user_command
48 -* create skelleton-plugin for default file content based on file type
49 -* add support for Java mutliline string in autopairs
50 -* nvim spell for camelcase words
54 +* create skeleton-plugin for default file content based on file type
55 +* add support for Java multi line string in autopairs
56 +* nvim spell for camel case words

neovim/colors/nugu_fresh.lua

Added
new file mode 100644
1 +--- bugabingas color theme `nugu` for neovim
3 +-- Reset all highlights if another colorscheme was previously set
4 +if vim.g.colors_name ~= nil then vim.cmd [[ highlight clear ]] end
6 +-- follow convention for others to be able to query current colorscheme
7 +vim.g.colors_name = 'nugu_fresh'
9 +local palette = {
10 + debug = { light = '#3dd45d', dark = '#3dd45d', },
11 + error = { light = '#740523', dark = '#f27a9a', },
12 + info = { light = '#4187a7', dark = '#e7f0f3', },
13 + warning = { light = '#a7802d', dark = '#f1e8d6', },
15 + content_normal = { light = '#494949', dark = '#cfcfcf', },
16 + content_backdrop = { light = '#e3e3e3', dark = '#131313', },
17 + content_accent = { light = '#800080', dark = '#800080', },
18 + content_minor = { light = '#878787', dark = '#727272', },
19 + content_focus = { light = '#646464', dark = '#a5bdb6', },
20 + content_unfocus = { light = '#c9c9c9', dark = '#3f4543', },
21 + content_important_global = { light = '#48256e', dark = '#8e58cc', },
22 + content_important_local = { light = '#643398', dark = '#7a3bc3', },
24 + ui_normal = { light = '#929292', dark = '#e2e2e2', },
25 + ui_backdrop = { light = '#f9f9f9', dark = '#000000', },
26 + ui_accent = { light = '#d43dd4', dark = '#7a067a', },
27 + ui_minor = { light = '#d0d0d0', dark = '#424242', },
28 + ui_focus = { light = '#646464', dark = '#788984', },
29 + ui_unfocus = { light = '#c9c9c9', dark = '#121212', },
30 + ui_important_global = { light = '#9170b5', dark = '#5f368d', },
31 + ui_important_local = { light = '#ae95c8', dark = '#4c2b72', },
34 +local function choose( variants )
35 + ---@diagnostic disable-next-line: undefined-field
36 + if vim.opt.background:get() == 'dark' then
37 + return variants.dark
38 + else
39 + return variants.light
40 + end
41 +end
43 +local debug = choose( palette.debug )
44 +local error = choose( palette.error )
45 +local info = choose( palette.info )
46 +local warning = choose( palette.warning )
48 +local content_normal = choose( palette.content_normal )
49 +local content_backdrop = choose( palette.content_backdrop )
50 +local content_accent = choose( palette.content_accent )
51 +local content_minor = choose( palette.content_minor )
52 +local content_focus = choose( palette.content_focus )
53 +local content_unfocus = choose( palette.content_unfocus )
54 +local content_important_global = choose( palette.content_important_global )
55 +local content_important_local = choose( palette.content_important_local )
57 +local ui_normal = choose( palette.ui_normal )
58 +local ui_backdrop = choose( palette.ui_backdrop )
59 +local ui_accent = choose( palette.ui_accent )
60 +local ui_minor = choose( palette.ui_minor )
61 +local ui_focus = choose( palette.ui_focus )
62 +local ui_unfocus = choose( palette.ui_unfocus )
63 +local ui_important_global = choose( palette.ui_important_global )
64 +local ui_important_local = choose( palette.ui_important_local )
66 +vim.g.terminal_color_0 = ui_backdrop -- black
67 +vim.g.terminal_color_1 = content_accent -- maroon
68 +vim.g.terminal_color_2 = info -- green
69 +vim.g.terminal_color_3 = ui_focus -- olive
70 +vim.g.terminal_color_4 = content_important_local -- navy
71 +vim.g.terminal_color_5 = content_important_global -- purple
72 +vim.g.terminal_color_6 = ui_focus -- teal
73 +vim.g.terminal_color_7 = content_normal -- silver
75 +vim.g.terminal_color_8 = ui_minor -- grey
76 +vim.g.terminal_color_9 = error -- red
77 +vim.g.terminal_color_10 = info -- lime
78 +vim.g.terminal_color_11 = content_focus -- yellow
79 +vim.g.terminal_color_12 = ui_important_local -- blue
80 +vim.g.terminal_color_13 = ui_accent -- fuchsia
81 +vim.g.terminal_color_14 = ui_important_global -- aqua
82 +vim.g.terminal_color_15 = ui_normal -- white
84 +local set_group_properties = function ( self, properties )
85 + vim.validate {
86 + properties = { properties, 'table', },
87 + -- • fg (or foreground): color name or "#RRGGBB", see note.
88 + ['properties.fg'] = { properties.fg, 'string', true, },
89 + -- • bg (or background): color name or "#RRGGBB", see note.
90 + ['properties.bg'] = { properties.bg, 'string', true, },
91 + -- • sp (or special): color name or "#RRGGBB"
92 + ['properties.sp'] = { properties.sp, 'string', true, },
93 + -- • blend: integer between 0 and 100
94 + ['properties.blend'] = { properties.blend, 'number', true, },
95 + -- • bold: boolean
96 + ['properties.bold'] = { properties.bold, 'boolean', true, },
97 + -- • standout: boolean
98 + ['properties.standout'] = { properties.standout, 'boolean', true, },
99 + -- • underline: boolean
100 + ['properties.underline'] = { properties.underline, 'boolean', true, },
101 + -- • undercurl: boolean
102 + ['properties.undercurl'] = { properties.undercurl, 'boolean', true, },
103 + -- • underdotted: boolean
104 + ['properties.underdotted'] = { properties.underdotted, 'boolean', true, },
105 + -- • underdashed: boolean
106 + ['properties.underdashed'] = { properties.underdashed, 'boolean', true, },
107 + -- • strikethrough: boolean
108 + ['properties.strikethrough'] = { properties.strikethrough, 'boolean', true, },
109 + -- • italic: boolean
110 + ['properties.italic'] = { properties.italic, 'boolean', true, },
111 + -- • reverse: boolean
112 + ['properties.reverse'] = { properties.reverse, 'boolean', true, },
113 + -- • nocombine: boolean
114 + ['properties.nocombine'] = { properties.nocombine, 'boolean', true, },
115 + -- • default: Don't override existing definition |:hi-default|
116 + ['properties.default'] = { properties.default, 'boolean', true, },
117 + -- • ctermfg: Sets foreground of cterm color |ctermfg|
118 + ['properties.ctermfg'] = { properties.ctermfg, 'string', true, },
119 + -- • ctermbg: Sets background of cterm color |ctermbg|
120 + ['properties.ctermbg'] = { properties.ctermbg, 'string', true, },
121 + -- • cterm: cterm attribute map, like |highlight-args|. If not set, cterm attributes will match those from the attribute map documented above.
122 + ['properties.cterm'] = { properties.cterm, 'table', true, },
123 + -- • force: if true force update the highlight group when it exists.
124 + ['properties.force'] = { properties.force, 'boolean', true, },
126 + -- vim.print( 'SET GROUP PROPERTIES', self, properties )
127 + for key, value in pairs( properties ) do
128 + self[key] = value
129 + end
130 +end
132 +local new_group = function ()
133 + return setmetatable( {}, {
134 + __call = set_group_properties,
135 + } )
136 +end
138 +local add_group = function ( self, key )
139 + if not self.groups[key] then
140 + self.groups[key] = new_group()
141 + end
142 + return self.groups[key]
143 +end
145 +local link_group = function ( self, key, value )
146 + -- vim.print( 'linking group', self, key, value )
147 + local group = add_group( self, key )
148 + for name, link_group in pairs( self.groups ) do
149 + if link_group == value then
150 + -- vim.print( 'found group to link ' .. name .. ' to ' .. key )
151 + group.link = name
152 + return group
153 + end
154 + end
155 +end
157 +local _ = setmetatable( { groups = {}, }, {
158 + __index = add_group,
159 + __newindex = link_group,
160 +} )
162 +_.Debug { fg = ui_normal, bg = debug, bold = true, }
163 +_.Normal { fg = content_normal, bg = content_backdrop, }
164 +_.NotifyBackground { bg = ui_backdrop, }
165 +_.Comment { fg = content_important_global, }
166 +_.LineNr { fg = ui_minor, bg = content_backdrop, }
167 +_.CursorLineNr { fg = ui_focus, bg = ui_backdrop, }
168 +_.Search { bg = content_unfocus, }
169 +_.IncSearch { fg = content_focus, }
170 +_.CurSearch { fg = content_normal, bg = content_important_global, }
171 +_.NormalFloat { fg = ui_normal, bg = ui_backdrop, }
172 +_.FloatBorder { fg = _.NormalFloat.bg, bg = _.NormalFloat.bg, }
173 +_.ColorColumn { fg = ui_important_global, bg = _.Normal.bg, }
174 +_.Conceal { fg = content_focus, bg = _.Normal.bg, }
175 +_.Cursor { bg = ui_accent, }
176 +-- _.lCursor = _.Cursor
177 +-- _.CursorIM = _.Cursor
178 +_.Directory { fg = _.Normal.fg, }
179 +_.DiffAdd { fg = content_focus, }
180 +_.DiffDelete { fg = content_focus, strikethrough = true, }
181 +_.DiffChange { fg = content_important_global, }
182 +_.DiffText { fg = content_normal, bg = content_important_local, }
183 +_.EndOfBuffer = _.Normal
184 +-- _.TermCursor = _.Cursor
185 +-- _.TermCursorNC = _.Cursor
186 +_.ErrorMsg { fg = error, }
187 +_.VertSplit { fg = ui_important_global, bg = _.LineNr.bg, }
188 +_.Folded = _.Conceal
189 +_.FoldColumn = _.LineNr
190 +_.SignColumn = _.LineNr
191 +_.ModeMsg { bold = true, }
192 +_.MsgArea = _.Normal
193 +_.MsgSeparator = _.Debug
194 +_.MoreMsg = _.Normal
195 +_.NonText { fg = content_unfocus, }
196 +_.Whitespace = _.NonText
197 +_.NormalNC = _.Normal
198 +_.Pmenu = _.NormalFloat
199 +_.PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = _.Pmenu.bg, bold = true, underline = true, }
200 +_.PmenuSbar { bg = ui_unfocus, }
201 +_.PmenuThumb { bg = ui_minor, }
202 +_.Question { fg = ui_important_local, bold = true, }
203 +_.QuickFixLine = _.PmenuSel
204 +_.SpecialKey { fg = error, bg = content_unfocus, bold = true, }
205 +_.SpellBad { fg = error, undercurl = true, }
206 +_.SpellCap = _.SpellBad
207 +_.SpellLocal = _.SpellBad
208 +_.SpellRare = _.SpellBad
209 +_.StatusLine { fg = ui_focus, bg = ui_unfocus, }
210 +_.StatusLineNC { fg = ui_normal, bg = ui_unfocus, }
211 +_.Winbar { fg = ui_focus, bg = _.StatusLine.bg, }
212 +_.WinbarNC { fg = ui_minor, bg = _.LineNr.bg, }
213 +_.Title { fg = content_important_global, sp = content_important_global, bold = true, underline = true, }
214 +_.TabLine = _.StatusLine
215 +_.TabLineFill { fg = _.TabLine.fg, bg = content_backdrop, }
216 +_.TabLineSel { fg = ui_important_global, bg = ui_unfocus, }
217 +_.Visual { bg = content_unfocus, }
218 +_.VisualNOS { bg = ui_unfocus, }
219 +_.WarningMsg { fg = warning, bold = true, }
220 +_.WildMenu = _.Debug
222 +_.String { fg = content_important_local, italic = true, }
223 +_.Constant = _.String
224 +_.Character = _.String
225 +_.Number = _.String
226 +_.Boolean = _.String
227 +_.Float = _.String
229 +_.Identifier = _.Normal
230 +_.MutableVariable = _.Debug
231 +_.Function = _.Normal
233 +_.Statement { fg = content_minor, }
234 +_.Conditional = _.Statement
235 +_.Repeat = _.Statement
236 +_.Label = _.Statement
237 +_.Operator = _.Statement
238 +_.Keyword = _.Statement
239 +_.Exception = _.Statement
241 +_.PreProc { fg = content_important_global, bg = content_unfocus, bold = true, }
242 +_.Include = _.PreProc
243 +_.Define = _.PreProc
244 +_.Macro = _.PreProc
245 +_.PreCondit = _.PreProc
247 +_.Type = _.Statement
248 +_.StorageClass = _.Statement
249 +_.Structure = _.Statement
250 +_.Typedef = _.Statement
252 +_.Special { fg = content_normal, italic = true, bold = true, }
253 +_.SpecialChar = _.Special
254 +_.Tag = _.Special
255 +_.Delimiter { fg = content_minor, }
256 +_.SpecialComment = _.Special
258 +_.Underlined { sp = content_normal, underline = true, }
259 +_.Bold { bold = true, }
260 +_.Italic { italic = true, }
262 +_.Ignore { fg = _.Normal.bg, bg = _.Normal.bg, }
264 +_.Error { fg = error, }
265 +_.Todo { fg = content_important_global, sp = content_important_global, bold = true, underdouble = true, }
266 +_.DiagnosticUnnecessary { fg = ui_focus, }
267 +_.DiagnosticDeprecated { fg = ui_important_global, sp = ui_important_global, strikethrough = true, }
268 +_.DiagnosticError { fg = error, }
269 +_.DiagnosticWarn { fg = warning, }
270 +_.DiagnosticInfo { fg = info, }
271 +_.DiagnosticHint { fg = ui_important_local, }
272 +_.DiagnosticOk { fg = ui_minor, }
274 +_.DiagnosticVirtualTextError = _.DiagnosticError
275 +_.DiagnosticVirtualTextWarn = _.DiagnosticWarn
276 +_.DiagnosticVirtualTextInfo = _.DiagnosticInfo
277 +_.DiagnosticVirtualTextHint = _.DiagnosticHint
278 +_.DiagnosticVirtualOkHint = _.DiagnosticOk
279 +_.DiagnosticUnderlineError { fg = _.DiagnosticError.fg, sp = _.DiagnosticError.fg, underdouble = true, }
280 +_.DiagnosticUnderlineWarn { fg = _.DiagnosticWarn.fg, sp = _.DiagnosticWarn.fg, underline = true, }
281 +_.DiagnosticUnderlineInfo { fg = _.DiagnosticInfo.fg, sp = _.DiagnosticInfo.fg, underdashed = true, }
282 +_.DiagnosticUnderlineHint { fg = _.DiagnosticHint.fg, sp = _.DiagnosticHint.fg, italic = true, underdotted = true, }
283 +_.DiagnosticUnderlineOk { fg = _.DiagnosticOk.fg, italic = true, }
284 +_.DiagnosticSignError = _.DiagnosticError
285 +_.DiagnosticSignWarn = _.DiagnosticWarn
286 +_.DiagnosticSignInfo = _.DiagnosticInfo
287 +_.DiagnosticSignHint = _.DiagnosticHint
288 +_.DiagnosticSignOk = _.DiagnosticOk
290 +_.LspReferenceText { sp = content_unfocus, underline = true, }
291 +_.LspReferenceRead = _.LspReferenceText
292 +_.LspReferenceWrite = _.LspReferenceText
293 +_.LspInlayHint { fg = content_minor, bg = _.Normal.bg, }
295 +_['@text.literal'] = _.Comment
296 +_['@text.reference'] = _.Identifier
297 +_['@text.title'] = _.Title
298 +_['@text.underline'] = _.Underlined
299 +_['@text.todo'] = _.Todo
300 +_['@comment'] = _.Comment
301 +_['@punctuation'] = _.Delimiter
302 +_['@constant'] = _.Constant
303 +_['@constant.builtin'] = _.Special
304 +_['@constant.macro'] = _.Define
305 +_['@define'] = _.Define
306 +_['@macro'] = _.Macro
307 +_['@string'] = _.String
308 +_['@string.escape'] = _.SpecialChar
309 +_['@string.special'] = _.SpecialChar
310 +_['@character'] = _.Character
311 +_['@character.special'] = _.SpecialChar
312 +_['@number'] = _.Number
313 +_['@boolean'] = _.Boolean
314 +_['@float'] = _.Float
315 +_['@function'] = _.Function
316 +_['@function.builtin'] = _.Special
317 +_['@function.macro'] = _.Macro
318 +_['@parameter'] = _.Identifier
319 +_['@method'] = _.Function
320 +_['@field'] = _.Identifier
321 +_['@property'] = _.Identifier
322 +_['@constructor'] = _.Special
323 +_['@conditional'] = _.Conditional
324 +_['@repeat'] = _.Repeat
325 +_['@label'] = _.Label
326 +_['@operator'] = _.Operator
327 +_['@keyword'] = _.Keyword
328 +_['@keyword.return'] { fg = _.Keyword.fg, bg = _.Keyword.bg, underline = true, bold = true, }
329 +_['@exception'] = _.Exception
330 +_['@variable'] = _.Identifier
331 +_['@type'] = _.Type
332 +_['@type.definition'] = _.Typedef
333 +_['@storageclass'] = _.StorageClass
334 +_['@structure'] = _.Structure
335 +_['@namespace'] = _.Identifier
336 +_['@include'] = _.Include
337 +_['@preproc'] = _.PreProc
338 +_['@debug'] = _.Debug
339 +_['@tag'] = _.Tag
341 +_['@lsp.type.namespace'] = _['@namespace']
342 +_['@lsp.type.type'] = _['@type']
343 +_['@lsp.type.class'] = _['@type']
344 +_['@lsp.type.enum'] = _['@type']
345 +_['@lsp.type.interface'] = _['@type']
346 +_['@lsp.type.struct'] = _['@structure']
347 +_['@lsp.type.parameter'] = _['@parameter']
348 +_['@lsp.type.variable'] = _['@variable']
349 +_['@lsp.type.property'] = _['@property']
350 +_['@lsp.type.enumMember'] = _['@constant']
351 +_['@lsp.type.function'] = _['@function']
352 +_['@lsp.type.method'] = _['@method']
353 +_['@lsp.type.macro'] = _['@macro']
354 +_['@lsp.type.decorator'] = _['@function']
356 +_.LazyButton = _.NormalFloat
357 +_.LazyButton { sp = _.NormalFloat.fg, bold = true, }
358 +_.LazyButtonActive { fg = ui_focus, sp = _.NormalFloat.fg, bg = ui_important_local, bold = true, }
359 +_.LazyComment = _.Keyword
360 +_.LazyCommit = _.LazyComment
361 +_.LazyCommitIssue = _.LazyComment
362 +_.LazyCommitScope = _.LazyComment
363 +_.LazyCommitScope { italic = true, }
364 +_.LazyCommitType = _.LazyCommitScope
365 +_.LazyDimmed { fg = _.NormalFloat.fg, }
366 +_.LazyDir { fg = _.NormalFloat.fg, }
367 +_.LazyH1 = _.Bold
368 +_.LazyH2 = _.LazyH1
369 +_.LazyLocal {}
370 +_.LazyNoCond = _.WarningMsg
371 +_.LazyNormal = _.NormalFloat
372 +_.LazyProgressDone { fg = _.Search.bg, bg = _.Cursor.bg, bold = true, }
373 +_.LazyProgressTodo { fg = _.LazyProgressDone.bg, bg = _.LazyProgressDone.fg, bold = true, }
374 +_.LazyProp = _.LazyComment
375 +_.LazyReasonCmd = _.NormalFloat
376 +_.LazyReasonEvent = _.NormalFloat
377 +_.LazyReasonFt = _.NormalFloat
378 +_.LazyReasonImport = _.NormalFloat
379 +_.LazyReasonKeys = _.NormalFloat
380 +_.LazyReasonPlugin = _.NormalFloat
381 +_.LazyReasonRuntime = _.NormalFloat
382 +_.LazyReasonSource = _.NormalFloat
383 +_.LazyReasonStart = _.NormalFloat
384 +_.LazySpecial { fg = _.ColorColumn.fg, }
385 +_.LazyTaskError = _.ErrorMsg
386 +_.LazyTaskOutput = _.Debug
387 +_.LazyUrl { sp = _.NormalFloat.fg, italic = true, underline = true, }
388 +_.LazyValue { italic = true, }
390 +-- _.NoiceCmdline = _.NormalFloat
391 +-- _.NoiceCmdlineIcon { fg = ui_accent, }
392 +-- _.NoiceCmdlineIconCalculator = _.NoiceCmdlineIcon
393 +-- _.NoiceCmdlineIconCmdline = _.NoiceCmdlineIcon
394 +-- _.NoiceCmdlineIconFilter = _.NoiceCmdlineIcon
395 +-- _.NoiceCmdlineIconHelp = _.NoiceCmdlineIcon
396 +-- _.NoiceCmdlineIconIncRename = _.NoiceCmdlineIcon
397 +-- _.NoiceCmdlineIconInput = _.NoiceCmdlineIcon
398 +-- _.NoiceCmdlineIconLua = _.NoiceCmdlineIcon
399 +-- _.NoiceCmdlineIconSearch = _.NoiceCmdlineIcon
401 +-- _.NoiceCmdlinePopup = _.NormalFloat
402 +-- _.NoiceCmdlinePopupBorder = _.FloatBorder
403 +-- _.NoiceCmdlinePopupBorderCalculator = _.NoiceCmdlinePopupBorder
404 +-- _.NoiceCmdlinePopupBorderCmdline = _.NoiceCmdlinePopupBorder
405 +-- _.NoiceCmdlinePopupBorderFilter = _.NoiceCmdlinePopupBorder
406 +-- _.NoiceCmdlinePopupBorderHelp = _.NoiceCmdlinePopupBorder
407 +-- _.NoiceCmdlinePopupBorderIncRename = _.NoiceCmdlinePopupBorder
408 +-- _.NoiceCmdlinePopupBorderInput = _.NoiceCmdlinePopupBorder
409 +-- _.NoiceCmdlinePopupBorderLua = _.NoiceCmdlinePopupBorder
410 +-- _.NoiceCmdlinePopupBorderSearch = _.NoiceCmdlinePopupBorder
411 +-- _.NoiceCmdlinePopupTitle = _.NoiceCmdlinePopup
412 +-- _.NoiceCmdlinePrompt = _.NoiceCmdlinePopup
413 +-- _.NoiceCompletionItemKindDefault { fg = ui_normal, }
414 +-- _.NoiceCompletionItemKindClass = _.NoiceCompletionItemKindDefault
415 +-- _.NoiceCompletionItemKindColor = _.NoiceCompletionItemKindDefault
416 +-- _.NoiceCompletionItemKindConstant = _.NoiceCompletionItemKindDefault
417 +-- _.NoiceCompletionItemKindConstructor = _.NoiceCompletionItemKindDefault
418 +-- _.NoiceCompletionItemKindEnum = _.NoiceCompletionItemKindDefault
419 +-- _.NoiceCompletionItemKindEnumMember = _.NoiceCompletionItemKindDefault
420 +-- _.NoiceCompletionItemKindField = _.NoiceCompletionItemKindDefault
421 +-- _.NoiceCompletionItemKindFile = _.NoiceCompletionItemKindDefault
422 +-- _.NoiceCompletionItemKindFolder = _.NoiceCompletionItemKindDefault
423 +-- _.NoiceCompletionItemKindFunction = _.NoiceCompletionItemKindDefault
424 +-- _.NoiceCompletionItemKindInterface = _.NoiceCompletionItemKindDefault
425 +-- _.NoiceCompletionItemKindKeyword = _.NoiceCompletionItemKindDefault
426 +-- _.NoiceCompletionItemKindMethod = _.NoiceCompletionItemKindDefault
427 +-- _.NoiceCompletionItemKindModule = _.NoiceCompletionItemKindDefault
428 +-- _.NoiceCompletionItemKindProperty = _.NoiceCompletionItemKindDefault
429 +-- _.NoiceCompletionItemKindSnippet = _.NoiceCompletionItemKindDefault
430 +-- _.NoiceCompletionItemKindStruct = _.NoiceCompletionItemKindDefault
431 +-- _.NoiceCompletionItemKindText = _.NoiceCompletionItemKindDefault
432 +-- _.NoiceCompletionItemKindUnit = _.NoiceCompletionItemKindDefault
433 +-- _.NoiceCompletionItemKindValue = _.NoiceCompletionItemKindDefault
434 +-- _.NoiceCompletionItemKindVariable = _.NoiceCompletionItemKindDefault
435 +-- _.NoiceCompletionItemMenu = _.NoiceCompletionItemKindDefault
436 +-- _.NoiceCompletionItemWord = _.NoiceCompletionItemKindDefault
438 +-- _.NoiceConfirm = _.NormalFloat
439 +-- _.NoiceConfirmBorder = _.FloatBorder
440 +-- _.NoiceFormatConfirm = _.LazyButton
441 +-- _.NoiceFormatConfirmDefault = _.LazyButtonActive
443 +-- _.NoiceCursor = _.Cursor
445 +-- _.NoiceFormatDate = _.NonText
446 +-- _.NoiceFormatEvent = _.NonText
447 +-- _.NoiceFormatKind = _.NonText
448 +-- _.NoiceFormatLevelDebug { fg = _.Debug.bg, }
449 +-- _.NoiceFormatLevelError = _.DiagnosticError
450 +-- _.NoiceFormatLevelInfo = _.DiagnosticInfo
451 +-- _.NoiceFormatLevelOff { fg = content_minor, }
452 +-- _.NoiceFormatLevelTrace = _.DiagnosticHint
453 +-- _.NoiceFormatLevelWarn = _.DiagnosticWarn
454 +-- _.NoiceFormatProgressDone = _.LazyProgressDone
455 +-- _.NoiceFormatProgressTodo = _.LazyProgressTodo
456 +-- _.NoiceFormatTitle = _.Title
458 +-- _.NoiceLspProgressClient = _.Debug
459 +-- _.NoiceLspProgressSpinner = _.Debug
460 +-- _.NoiceLspProgressTitle = _.Debug
462 +-- _.NoiceMini = _.DiagnosticInfo
464 +-- _.NoicePopup = _.NormalFloat
465 +-- _.NoicePopupBorder = _.FloatBorder
467 +-- _.NoicePopupmenu = _.Pmenu
468 +-- _.NoicePopupmenuBorder = _.FloatBorder
469 +-- _.NoicePopupmenuMatch = _.Bold
470 +-- _.NoicePopupmenuSelected = _.PmenuSel
472 +-- _.NoiceScrollbar = _.PmenuSbar
473 +-- _.NoiceScrollbarThumb = _.PmenuThumb
475 +-- _.NoiceSplit = _.Normal
476 +-- _.NoiceSplitBorder = _.FloatBorder
477 +-- _.NoiceVirtualText { fg = ui_important_global, bg = ui_unfocus, }
478 +-- _.NotifyERRORBorder { fg = _.DiagnosticError.fg, bg = _.FloatBorder.bg, }
479 +-- _.NotifyWARNBorder { fg = _.DiagnosticWarn.fg, bg = _.FloatBorder.bg, }
480 +-- _.NotifyINFOBorder { fg = _.DiagnosticInfo.fg, bg = _.FloatBorder.bg, }
481 +-- _.NotifyDEBUGBorder { fg = _.Debug.bg, bg = _.FloatBorder.bg, }
482 +-- _.NotifyTRACEBorder { fg = _.DiagnosticHint.fg, bg = _.FloatBorder.bg, }
484 +-- _.NotifyERRORIcon { fg = _.DiagnosticError.fg, }
485 +-- _.NotifyWARNIcon { fg = _.DiagnosticWarn.fg, }
486 +-- _.NotifyINFOIcon { fg = _.DiagnosticInfo.fg, }
487 +-- _.NotifyDEBUGIcon { fg = _.Debug.bg, }
488 +-- _.NotifyTRACEIcon { fg = _.DiagnosticHint.fg, }
490 +-- _.NotifyERRORTitle { fg = _.DiagnosticError.fg, }
491 +-- _.NotifyWARNTitle { fg = _.DiagnosticWarn.fg, }
492 +-- _.NotifyINFOTitle { fg = _.DiagnosticInfo.fg, }
493 +-- _.NotifyDEBUGTitle { fg = _.Debug.bg, }
494 +-- _.NotifyTRACETitle { fg = _.DiagnosticHint.fg, }
496 +-- _.NotifyERRORBody = _.NormalFloat
497 +-- _.NotifyWARNBody = _.NormalFloat
498 +-- _.NotifyINFOBody = _.NormalFloat
499 +-- _.NotifyDEBUGBody = _.NormalFloat
500 +-- _.NotifyTRACEBody = _.NormalFloat
502 +_.TelescopeSelectionCaret = _.PmenuSel
503 +_.TelescopeSelection = _.PmenuSel
504 +_.TelescopeMultiSelection { fg = content_normal, bg = ui_important_local, }
506 +_.FlashBackdrop {}
507 +_.FlashMatch = _.IncSearch
508 +_.FlashCurrent = _.CurSearch
509 +_.FlashLabel { fg = ui_accent, bg = ui_backdrop, }
511 +_.GitSignsAdd { fg = _.DiffAdd.fg, bg = _.LineNr.bg, }
512 +_.GitSignsChange { fg = _.DiffChange.fg, bg = _.LineNr.bg, }
513 +_.GitSignsDelete { fg = _.DiffDelete.fg, bg = _.LineNr.bg, }
515 +_.GitSignsChangedelete = _.GitSignsChange
516 +_.GitSignsTopdelete = _.GitSignsDelete
517 +_.GitSignsUntracked = _.GitSignsAdd
519 +_.GitSignsAddNr = _.GitSignsAdd
520 +_.GitSignsChangeNr = _.GitSignsChange
521 +_.GitSignsDeleteNr = _.GitSignsDelete
523 +_.GitSignsChangedeleteNr = _.GitSignsChange
524 +_.GitSignsTopdeleteNr = _.GitSignsDelete
525 +_.GitSignsUntrackedNr = _.GitSignsAdd
527 +_.GitSignsAddLn = _.GitSignsAdd
528 +_.GitSignsChangeLn = _.GitSignsChange
529 +_.GitSignsChangedeleteLn = _.GitSignsChange
530 +_.GitSignsUntrackedLn = _.GitSignsAdd
532 +_.GitSignsAddPreview = _.GitSignsAdd
533 +_.GitSignsDeletePreview = _.GitSignsDelete
535 +_.GitSignsCurrentLineBlame = _.NonText
536 +_.GitSignsAddInline = _.GitSignsAdd
537 +_.GitSignsDeleteInline = _.GitSignsDelete
538 +_.GitSignsChangeInline = _.GitSignsChange
540 +_.GitSignsAddLnInline = _.DiffText
541 +_.GitSignsDeleteLnInline = _.DiffText
542 +_.GitSignsChangeLnInline = _.DiffText
544 +_.GitSignsDeleteVirtLn = _.GitSignsDelete
545 +_.GitSignsDeleteVirtLnInLine = _.DiffText
546 +_.GitSignsVirtLnum { fg = _.LineNr.fg, }
548 +_.WhichKey { fg = ui_important_global, }
549 +_.WhichKeyGroup { fg = ui_important_local, }
550 +_.WhichKeySeparator { fg = ui_minor, }
551 +_.WhichKeyDesc { fg = ui_normal, }
552 +_.WhichKeyFloat = _.NormalFloat
553 +_.WhichKeyBorder = _.FloatBorder
554 +_.WhichKeyValue = _.Comment
556 +_.IblIndent = _.Whitespace
557 +_.IblWhitespace = _.Whitespace
558 +_.IblScope { fg = ui_focus, bg = _.Normal.bg, }
560 +_.Hlargs { fg = content_important_local, }
562 +_.MiniStarterCurrent { fg = ui_normal, bg = ui_accent, }
563 +_.MiniStarterFooter = _.Keyword
564 +_.MiniStarterHeader = _.Comment
565 +_.MiniStarterInactive { fg = content_unfocus, }
566 +_.MiniStarterItem = _.Normal
567 +_.MiniStarterItemBullet = _.Whitespace
568 +_.MiniStarterItemPrefix { fg = content_focus, }
569 +_.MiniStarterSection { fg = content_important_global, underline = true, }
570 +_.MiniStarterQuery { fg = content_normal, bg = content_accent, }
572 +--TODO: Oil highlights
574 +for name, group in pairs( _.groups ) do
575 + local namespace = 0
576 + -- vim.print( namespace, name, group )
577 + vim.api.nvim_set_hl( namespace, name, group )
578 +end
580 +-- vim.print( 'ALL HIGHLIGHTS', _ )

neovim/init.lua

Modified
9 9 -- ▀ ▀
11 11 -- setup debug mode
12 --- local debug = require 'std.debug'
13 --- debug.toggle()
12 +-- require 'std.debug'.toggle()
14 +vim.cmd.colorscheme 'nugu_fresh'
15 16 local ok, loaded
37 38 -- setup lsp clients
38 39 ok, loaded = pcall( require, 'bugabinga.lsp' )
39 40 if not ok then vim.print( 'error while loading lsp', loaded ) end

neovim/lazy-lock.json

Modified
2 - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
3 - "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
2 + "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
4 3 "actions-preview.nvim": { "branch": "master", "commit": "5072b1b1065a6b22bdd46b5c21780a91d6a08071" },
5 4 "auto-dark-mode.nvim": { "branch": "master", "commit": "e328dc463d238cb7d690fb4daf068eba732a5a14" },
6 5 "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" },
7 - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
8 - "cmp-emoji": { "branch": "main", "commit": "0acd702358230abeb6576769f7116e766bca28a0" },
9 - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
10 - "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" },
11 - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
12 - "cmp-omni": { "branch": "main", "commit": "4ef610bbd85a5ee4e97e09450c0daecbdc60de86" },
13 - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
14 - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
15 6 "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
16 - "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
7 + "dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
8 + "fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
17 9 "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
18 - "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
19 - "gen.nvim": { "branch": "main", "commit": "85a739cea06148a56d52f26b01d63de6671ce4ce" },
20 - "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
10 + "gen.nvim": { "branch": "main", "commit": "2cb643b1a827bcdfc665a37d5f8174249d2d5bf5" },
11 + "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
21 12 "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
22 13 "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" },
23 14 "hlargs.nvim": { "branch": "main", "commit": "0f2dbf02ff948e8fc8ebe07b215f3174a12bbe3c" },
15 + "hyper.nvim": { "branch": "main", "commit": "b84fb39e703b1dd487d20c4faf028ee51374c88b" },
24 16 "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
25 17 "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
26 - "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
27 - "lush.nvim": { "branch": "main", "commit": "2e8d34e748642621d761a65e3c2a198154b914e8" },
18 + "lush.nvim": { "branch": "main", "commit": "bc12f010b34cfeefac35720656eb777753b165d9" },
28 19 "mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" },
29 - "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
20 + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
30 21 "mini.align": { "branch": "main", "commit": "f845218c5fea89e49074e48270dc5e1b9511a0f9" },
31 22 "mini.bracketed": { "branch": "main", "commit": "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" },
32 23 "mini.colors": { "branch": "main", "commit": "f64963332f7fcb45c8dfcc243f682a9a0fb9935d" },
33 24 "mini.starter": { "branch": "main", "commit": "ce222a5b6de50a9963c1eb62aa16ec6d5efca7ee" },
34 25 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
35 - "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" },
36 26 "neogen": { "branch": "main", "commit": "b95347a588401a755eadd17482edc1662876bd58" },
37 27 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
38 - "nui.nvim": { "branch": "main", "commit": "756c59f46057cd2d43619cd3a6d4e01b2aa60295" },
28 + "nui.nvim": { "branch": "main", "commit": "3dc46d725f7b94bee5117c0a699b57b1902b5d65" },
39 29 "nvim-autopairs": { "branch": "master", "commit": "c6139ca0d5ad7af129ea6c89cb4c56093f2c034a" },
40 - "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
41 30 "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
42 31 "nvim-genghis": { "branch": "main", "commit": "8613fc1b43db6cc761733b3630eabff9e86296f7" },
43 32 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
44 33 "nvim-jdtls": { "branch": "master", "commit": "a4746791876166dc146eae573a1b49d24a6652e7" },
45 34 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
35 + "nvim-lsp-file-operations": { "branch": "master", "commit": "223aca86b737dc66e9c51ebcda8788a8d9cc6cf2" },
36 + "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" },
37 + "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
46 38 "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
47 39 "nvim-spectre": { "branch": "master", "commit": "e7db8ebca7fd0a604027ebf85acee52f6642c91c" },
48 40 "nvim-surround": { "branch": "main", "commit": "84a26afce16cffa7e3322cfa80a42cddf60616eb" },
49 - "nvim-tree.lua": { "branch": "master", "commit": "041dbd18f440207ad161503a384e7c82d575db66" },
50 - "nvim-treesitter": { "branch": "master", "commit": "488bec03254207b1dd071be8cb1fb78434b6e777" },
51 - "nvim-treesitter-textobjects": { "branch": "master", "commit": "b7a0bfa3e93697ca5b61b15df633404bf8f45883" },
41 + "nvim-tree.lua": { "branch": "master", "commit": "707b24af91a1d05823099ed8c5450796290466ba" },
42 + "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
43 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" },
52 44 "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
53 45 "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
54 - "nvim-web-devicons": { "branch": "master", "commit": "75df79feb02d5e0ec114e447453775d4d291ea03" },
46 + "nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" },
55 47 "nvim-window": { "branch": "main", "commit": "e7f5d60eeec8ff37af7be4c9a99f65edf67fc574" },
56 - "oil.nvim": { "branch": "master", "commit": "18dfd2458dc741fea683357a17aaa95870b25a3c" },
57 - "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
48 + "oil.nvim": { "branch": "master", "commit": "32e18df30f937e02135398c270b72a4d24b40120" },
49 + "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
58 50 "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
59 51 "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
60 - "schemastore.nvim": { "branch": "main", "commit": "b788bde023f9fbc2eb86e89d32c0bf98a60ae406" },
61 - "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" },
52 + "schemastore.nvim": { "branch": "main", "commit": "4d798fd5b692c8fce77268aba8f6f926b0c9f835" },
53 + "specs.nvim": { "branch": "main", "commit": "e929006d3f6bb8e43f03e13ac364c67236eb5299" },
62 54 "speedtyper.nvim": { "branch": "main", "commit": "2d158eed4c753995b0501a3a7a72464fbb213e3d" },
63 55 "ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
64 56 "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },
65 - "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
66 57 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
67 58 "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
68 59 "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
69 - "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
70 - "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
60 + "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
61 + "todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },
71 62 "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
72 63 "tree-sitter-nu": { "branch": "main", "commit": "c5b7816043992b1cdc1462a889bc74dc08576fa6" },
73 64 "treesj": { "branch": "main", "commit": "60e27280030f9cd8dfb6ceb335922c6ff76682cc" },
74 65 "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
75 66 "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
76 - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
67 + "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" },
77 68 "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }

neovim/lua/bugabinga/diagnostic.lua

Modified
70 70 sign { name = 'DiagnosticSignHint', text = diagnostic_icons.hint }
71 71 sign { name = 'DiagnosticSignInfo', text = diagnostic_icons.info }
73 +-- TODO: move to togglers
73 74 map.normal {
74 75 description = 'Toggle diagnostics',
75 76 category = 'diagnostic',

neovim/lua/bugabinga/lazy.lua

Modified
1 -local win32 = vim.loop.os_uname().sysname:match'Win'
1 +local win32 = vim.loop.os_uname().sysname:match 'Win'
2 2 local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
3 -if not vim.loop.fs_stat(lazypath) then
3 +if not vim.loop.fs_stat( lazypath ) then
4 4 vim.fn.system {
5 5 'git',
6 6 'clone',
10 10 lazypath,
13 -vim.opt.rtp:prepend(lazypath)
13 +vim.opt.rtp:prepend( lazypath )
15 15 -- prevents lazy from setting up its highlights.
16 16 -- those will be setup manually later.
17 -require('lazy.view.colors').did_setup = true
17 +require 'lazy.view.colors'.did_setup = true
19 19 local lazy = require 'lazy'
20 -local icon = require'std.icon'
20 +local icon = require 'std.icon'
22 -lazy.setup('bugabinga.plugins', {
22 +lazy.setup( 'bugabinga.plugins', {
23 23 defaults = {
24 24 lazy = true,
25 25 -- version = '*',
27 27 install = {
28 28 missing = true,
29 - colorscheme = { 'nugu', 'quiet' },
29 + colorscheme = { 'nugu_fresh', 'quiet', },
31 31 checker = {
32 32 enabled = not win32,
33 33 notify = false,
35 35 ui = {
36 - size = { width = 0.69 , heigth = 0.69 },
36 + size = { width = 0.69, heigth = 0.69, },
37 37 border = vim.g.border_style,
38 38 icons = {
39 39 lazy = icon.lazy,
44 44 custom_keys = {
45 - ["<localleader>l"] = function(plugin)
46 - require("lazy.util").float_term("gitui", {
45 + ['<localleader>l'] = function ( plugin )
46 + require 'lazy.util'.float_term( 'gitui', {
47 47 cwd = plugin.dir,
48 - })
48 + } )
50 - ["<localleader>t"] = function(plugin)
51 - require("lazy.util").float_term(nil, {
50 + ['<localleader>t'] = function ( plugin )
51 + require 'lazy.util'.float_term( nil, {
52 52 cwd = plugin.dir,
53 - })
53 + } )
56 - change_detection = { notify = false },
56 + change_detection = { notify = false, },
57 57 performance = {
58 58 rtp = {
59 59 disabled_plugins = {
84 84 dev = {
85 85 fallback = true,
86 - patterns = { 'bugabinga' },
87 - path = win32 and 'W:/' or '~/Workspace'
86 + patterns = { 'bugabinga', },
87 + path = win32 and 'W:/' or '~/Workspace',
89 -})
89 +} )
91 91 local map = require 'std.map'
93 93 local lazy_cmds = vim.iter {
94 - { 'Show', '' , lazy.show } ,
95 - { 'Install', 'i', lazy.install },
96 - { 'Update', 'u', lazy.update },
97 - { 'Sync', 's', lazy.sync },
98 - { 'Clean', 'x', lazy.clean },
99 - { 'Check', 'c', lazy.check },
100 - { 'Log', 'l', lazy.log },
101 - { 'Restore', 'r', lazy.restore },
102 - { 'Profile', 'p', lazy.profile },
103 - { 'Debug', 'd', lazy.debug },
94 + { 'Show', '', lazy.show, },
95 + { 'Install', 'i', lazy.install, },
96 + { 'Update', 'u', lazy.update, },
97 + { 'Sync', 's', lazy.sync, },
98 + { 'Clean', 'x', lazy.clean, },
99 + { 'Check', 'c', lazy.check, },
100 + { 'Log', 'l', lazy.log, },
101 + { 'Restore', 'r', lazy.restore, },
102 + { 'Profile', 'p', lazy.profile, },
103 + { 'Debug', 'd', lazy.debug, },
106 106 local base_key = '<leader>z'
108 -lazy_cmds:each(function(cmd)
108 +lazy_cmds:each( function ( cmd )
109 109 map.normal {
110 110 name = cmd[1] .. ' plugins',
111 111 category = 'plugins',
112 112 keys = base_key .. cmd[2],
113 113 command = cmd[3],
115 -end)
115 +end )

neovim/lua/bugabinga/lsp/clients/archlinux.lua

Deleted
deleted file mode 100644
1 -local project = require'std.project'
3 -return {
4 - name = 'pkgbuild-language-server',
5 - command = 'pkgbuild-language-server',
6 - filetypes = { 'PKGBUILD' },
7 - root_dir = project.find_vcs_project_root,
8 - single_file_support = true,
9 - workspaces = false,
10 -}

neovim/lua/bugabinga/lsp/clients/init.lua

Modified
1 1 return {
2 - require'bugabinga.lsp.clients.java',
3 - require'bugabinga.lsp.clients.lua',
4 - require'bugabinga.lsp.clients.json',
5 - require'bugabinga.lsp.clients.archlinux',
6 - require'bugabinga.lsp.clients.asm',
7 - require'bugabinga.lsp.clients.bash',
8 - require'bugabinga.lsp.clients.c',
9 - require'bugabinga.lsp.clients.graphviz',
10 - require'bugabinga.lsp.clients.markdown',
11 - require'bugabinga.lsp.clients.rust',
12 - require'bugabinga.lsp.clients.toml',
13 - require'bugabinga.lsp.clients.vim',
14 - require'bugabinga.lsp.clients.xml',
15 - require'bugabinga.lsp.clients.zig',
2 + require 'bugabinga.lsp.clients.java',
3 + require 'bugabinga.lsp.clients.lua',
4 + require 'bugabinga.lsp.clients.json',
5 + require 'bugabinga.lsp.clients.asm',
6 + require 'bugabinga.lsp.clients.bash',
7 + require 'bugabinga.lsp.clients.c',
8 + require 'bugabinga.lsp.clients.graphviz',
9 + require 'bugabinga.lsp.clients.markdown',
10 + require 'bugabinga.lsp.clients.nu',
11 + require 'bugabinga.lsp.clients.rust',
12 + require 'bugabinga.lsp.clients.toml',
13 + require 'bugabinga.lsp.clients.vim',
14 + require 'bugabinga.lsp.clients.xml',
15 + require 'bugabinga.lsp.clients.zig',

neovim/lua/bugabinga/lsp/clients/java.lua

Modified
1 1 local table = require 'std.table'
2 2 local project = require 'std.project'
3 3 local auto = require 'std.auto'
4 -local map = require'std.map'
4 +local map = require 'std.map'
6 6 local create_shared_config_path = function ( base_path, syntax_server )
7 7 local os_config
54 54 local create_jdtls_command = function ( syntax_server )
55 55 local mason_registry = require 'mason-registry'
56 - local jdtls_package_path = mason_registry.get_package('jdtls'):get_install_path()
56 + local jdtls_package_path = mason_registry.get_package 'jdtls':get_install_path()
57 57 local shared_config_path = create_shared_config_path( jdtls_package_path, syntax_server )
58 58 local launcher_jar = find_launcher_jar( jdtls_package_path )
59 59 local data_dir = create_data_dir()
94 94 local jdk17 = {
95 95 name = 'JavaSE-17',
97 - local jdk19 = {
98 - name = 'JavaSE-19',
99 - }
100 97 local jdk21 = {
101 98 name = 'JavaSE-21',
104 - if host == 'pop-os' then
105 - jdk11.path = '/usr/lib/jvm/java-11-openjdk-amd64'
106 - jdk17.path = '/usr/lib/jvm/java-17-openjdk-amd64'
107 - jdk19.path = '/usr/lib/jvm/java-19-openjdk-amd64'
108 - jdk21.path = '/home/oli/.jdks/openjdk-21'
101 + if host == 'velma' then
102 + jdk11.path = '/usr/lib64/jvm/java-11-openjdk-11'
103 + jdk17.path = '/usr/lib64/jvm/java-17-openjdk-17'
104 + jdk21.path = '/usr/lib64/jvm/java-21-openjdk-21'
109 105 elseif host == 'NB-00718' then
110 106 jdk11.path = 'C:/Users/okr/scoop/apps/openjdk11'
111 107 jdk17.path = 'C:/Users/okr/scoop/apps/openjdk17'
112 - jdk19.path = 'C:/Users/okr/scoop/apps/openjdk19'
113 108 jdk21.path = 'C:/Users/okr/scoop/apps/openjdk21'
115 110 vim.notify 'missing jdk paths in java settings for lsp'
118 - return { jdk11, jdk17, jdk19, jdk21 }
113 + return { jdk11, jdk17, jdk21 }
121 116 local java_settings = {
221 216 description = 'Extract Variable',
222 217 category = 'jdlts',
223 218 keys = '<leader>ljv',
224 - command = function() jdtls.extract_variable(true) end,
219 + command = function () jdtls.extract_variable( true ) end,
227 222 map.visual {
228 223 description = 'Extract Constant',
229 224 category = 'jdlts',
230 225 keys = '<leader>ljc',
231 - command = function() jdtls.extract_constant(true) end,
226 + command = function () jdtls.extract_constant( true ) end,
234 229 map.visual {
235 230 description = 'Extract Method',
236 231 category = 'jdlts',
237 232 keys = '<leader>ljm',
238 - command = function() jdtls.extract_method(true) end,
233 + command = function () jdtls.extract_method( true ) end,
241 236 auto 'refresh_codelens' {

neovim/lua/bugabinga/lsp/clients/lua.lua

Modified
4 4 local project = require 'std.project'
6 6 return {
7 7 name = 'LuaLS',
8 8 filetypes = 'lua',
9 9 command = 'lua-language-server',
10 - root_dir = project.find_lua_project_root ,
10 + root_dir = project.find_lua_project_root,
11 11 single_file_support = true,
12 12 workspaces = true,
13 13 settings = {
14 14 Lua = {
15 15 addonManager = { enable = false },
16 - completion = { callSnippet = 'Both', postfix = '.' },
16 + completion = { callSnippet = 'Disable', postfix = '.' },
17 17 diagnostics = { globals = { 'vim' }, workspaceRate = 50 },
18 18 hint = { enable = true, setType = true },
19 19 telemetry = { enable = false },
18 18 workspace = { checkThirdParty = false, }
21 - before_init = require 'neodev.lsp'.before_init,

neovim/lua/bugabinga/lsp/clients/nu.lua

Added
new file mode 100644
1 +local project = require 'std.project'
3 +return {
4 + name = 'nulsp',
5 + command = { 'nu', '--lsp' },
6 + filetypes = { 'nu' },
7 + root_dir = project.find_project_root,
8 + single_file_support = true,
9 + workspaces = false,

neovim/lua/bugabinga/lsp/clients/zig.lua

Modified
1 -local project = require'std.project'
1 +local project = require 'std.project'
3 3 return {
4 4 name = 'zls',
5 - command = 'zls',
5 + command = 'zls',
6 6 filetypes = { 'zig', 'zir' },
7 7 root_dir = project.find_zig_project_root,
8 8 single_file_support = true,

neovim/lua/bugabinga/lsp/init.lua

Modified
38 38 local expand_command = function ( command )
39 - vim.validate { command = { command, { 'string', 'table' } } }
41 - debug.print( 'expanding command', command )
39 + vim.validate { command = { command, { 'string', 'table', }, }, }
43 41 if type( command ) == 'table' then
44 42 command[1] = expand_path( command[1] )
51 49 local lsp_start = function ( file_type_event )
50 + debug.print 'trying to start lsp'
52 51 local match = file_type_event.match
54 53 local matches_to_ignore = ignored.filetypes
55 - debug.print( 'filetypes to ignore', ignored.filetypes)
56 - if vim.iter( ignored.filetypes):find( match ) then return end
54 + debug.print( 'filetypes to ignore', ignored.filetypes, 'current filetype', match )
55 + if vim.iter( ignored.filetypes ):find( match ) then return end
58 57 local bufnr = file_type_event.buf
59 - local buftype = vim.api.nvim_get_option_value( 'buftype', { buf = bufnr } )
60 - if vim.iter(ignored.buftypes):find(buftype) then return end
58 + local buftype = vim.api.nvim_get_option_value( 'buftype', { buf = bufnr, } )
59 + debug.print( 'buftypes to ignore', ignored.buftypes, 'current buftype', buftype )
60 + if vim.iter( ignored.buftypes ):find( buftype ) then return end
62 62 local buffer_path = vim.api.nvim_buf_get_name( bufnr )
66 66 local potential_client_configs = vim.iter( lsp_client_configs )
67 67 :map( function ( config )
68 68 vim.validate {
69 - ['config'] = { config, 'table' },
70 - ['config.name'] = { config.name, 'string' },
71 - ['config.filetypes'] = { config.filetypes, { 'string', 'table' } },
72 - ['config.command'] = { config.command, { 'string', 'table' } },
73 - ['config.environment'] = { config.environment, 'table', true },
74 - ['config.root_dir'] = { config.root_dir, 'function', 'string' },
75 - ['config.single_file_support'] = { config.single_file_support, 'boolean', true },
76 - ['config.settings'] = { config.settings, 'table', true },
77 - ['config.workspaces'] = { config.workspaces, 'boolean', true },
78 - ['config.before_init'] = { config.before_init, 'function', true },
79 - ['config.init_options'] = { config.init_options, 'table', true },
80 - ['config.capabilities'] = { config.capabilities, 'table', true },
81 - ['config.custom_start'] = { config.custom_start, 'function', true },
69 + ['config'] = { config, 'table', },
70 + ['config.name'] = { config.name, 'string', },
71 + ['config.filetypes'] = { config.filetypes, { 'string', 'table', }, },
72 + ['config.command'] = { config.command, { 'string', 'table', }, },
73 + ['config.environment'] = { config.environment, 'table', true, },
74 + ['config.root_dir'] = { config.root_dir, 'function', 'string', },
75 + ['config.single_file_support'] = { config.single_file_support, 'boolean', true, },
76 + ['config.settings'] = { config.settings, 'table', true, },
77 + ['config.workspaces'] = { config.workspaces, 'boolean', true, },
78 + ['config.before_init'] = { config.before_init, 'function', true, },
79 + ['config.init_options'] = { config.init_options, 'table', true, },
80 + ['config.capabilities'] = { config.capabilities, 'table', true, },
81 + ['config.custom_start'] = { config.custom_start, 'function', true, },
83 83 -- normalize scalar values to its vector alternative for easier processing later on
84 84 -- this mutates the lsp client configs! careful!
85 - config.command = type( config.command ) == 'string' and { expand_command( config.command ) } or
85 + config.command = type( config.command ) == 'string' and { expand_command( config.command ), } or
86 86 expand_command( config.command )
87 87 config.environment = config.environment or {}
88 - config.filetypes = type( config.filetypes ) == 'string' and { config.filetypes } or config.filetypes
88 + config.filetypes = type( config.filetypes ) == 'string' and { config.filetypes, } or config.filetypes
89 89 config.single_file_support = config.single_file_support == nil and false or config.single_file_support
90 90 config.workspaces = config.workspaces == nil and false or config.workspaces
91 91 config.capabilities = config.capabilities or {}
99 99 :totable()
101 101 debug.print( 'POTENTIAL CLIENTS',
102 - vim.iter( potential_client_configs ):map( function ( config ) return { name = config.name, command = config.command } end )
103 - :totable() )
102 + vim.iter( potential_client_configs ):map( function ( config )
103 + return {
104 + name = config.name,
105 + command =
106 + config.command,
108 + end )
109 + :totable() )
105 111 if table.is_empty( potential_client_configs ) then
106 112 debug.print( 'found no lsp client for', buffer_path )
115 121 for _, config in ipairs( potential_client_configs ) do
116 122 local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path )
117 123 local capabilities = vim.lsp.protocol.make_client_capabilities()
118 - local cmp_capabilities = require 'cmp_nvim_lsp'.default_capabilities()
119 - capabilities = table.extend( 'force', capabilities, cmp_capabilities, config.capabilities )
120 - debug.print( 'lsp capabilities', capabilities, config.capabilities, cmp_capabilities )
124 + capabilities = table.extend( 'force', capabilities, config.capabilities )
122 126 debug.print( 'starting command:', config.command )
141 145 on_exit = function ( code, signal, client_id ) vim.print( 'LSP CLIENT EXIT', code, signal, client_id ) end,
142 146 on_attach = function ( client, bufnr ) debug.print( 'LSP CLIENT ATTACH', client, bufnr ) end,
143 147 trace = 'off',
144 - flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200 },
148 + flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200, },
145 149 root_dir = root_dir,
184 - debug.print( 'ATTACHING LSP CLIENT', client_id )
188 + debug.print( 'ATTACHING LSP CLIENT', config.name )
219 223 vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
226 + if client.server_capabilities.documentSymbolProvider then
227 + local ok, navic = pcall( require, 'nvim-navic' )
228 + if ok then
229 + vim.notify 'navic ready'
230 + navic.attach( client, bufnr )
231 + else
232 + vim.notify 'nvim-navic not found. could not attach to lsp client.'
233 + end
234 + local ok, navbuddy = pcall( require, 'nvim-navbuddy' )
235 + if ok then
236 + vim.notify 'navbuddy ready'
237 + navbuddy.attach( client, bufnr )
238 + else
239 + vim.notify 'nvim-navbuddy not found. could not attach to lsp client.'
240 + end
241 + end
222 243 if client.server_capabilities.documentHighlightProvider then
223 244 -- the timer has application lifetime. no need to close
224 245 local delay = 300
236 257 description = 'Remove highlight from symbol under cursor on move',
237 - events = { 'CursorMoved', 'InsertEnter' },
258 + events = { 'CursorMoved', 'InsertEnter', },
238 259 buffer = bufnr,
239 260 command = debounced_clear,
240 - }
261 + },
257 278 description = 'Show hover documentation above cursor.',
258 279 category = 'lsp',
259 280 buffer = bufnr,
260 - keys = { 'K', '<leader>lk' },
281 + keys = { 'K', '<leader>lk', },
261 282 command = vim.lsp.buf.hover,
321 342 description = 'Rename symbol under cursor.',
322 343 category = 'lsp',
323 344 buffer = bufnr,
324 - keys = { '<f2>', '<leader>ln' },
345 + keys = { '<f2>', '<leader>ln', },
325 346 command = vim.lsp.buf.rename,
373 394 description = 'Semantic Tokens from the LSP',
374 395 events = 'LspTokenUpdate',
375 396 command = token_update,
376 - }
397 + },
379 400 local lsp_info = function ( command )
380 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
401 + local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
381 402 local active_clients = vim.lsp.get_clients( all_or_current )
383 404 local infos = vim.iter( active_clients )
408 429 local lsp_info_extended = function ( command )
409 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
430 + local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0, }
410 431 local active_clients = vim.lsp.get_clients( all_or_current )
411 432 ui.show_tree( active_clients )
414 435 user_command( 'LspInfo', lsp_info, {
415 436 nargs = '?',
416 - complete = function () return { 'all' } end,
437 + complete = function () return { 'all', } end,
417 438 desc = 'Shows basic information about running LSP clients.',
420 441 user_command( 'LspInfoExtended', lsp_info_extended, {
421 442 nargs = '?',
422 - complete = function () return { 'all' } end,
443 + complete = function () return { 'all', } end,
423 444 desc = 'Shows detailed information about running LSP clients.',
426 ---TODO: lsp restart, lsp exit
447 +-- TODO: lsp restart, lsp exit
449 +-- TODO: move to std.icons.lua
450 +local completion_icons = {
451 + Class = ' ',
452 + Color = ' ',
453 + Constant = ' ',
454 + Constructor = ' ',
455 + Enum = ' ',
456 + EnumMember = ' ',
457 + Field = '󰄶 ',
458 + File = ' ',
459 + Folder = ' ',
460 + Function = ' ',
461 + Interface = '󰜰',
462 + Keyword = '󰌆 ',
463 + Method = 'ƒ ',
464 + Module = '󰏗 ',
465 + Property = ' ',
466 + Snippet = '󰘍 ',
467 + Struct = ' ',
468 + Text = ' ',
469 + Unit = ' ',
470 + Value = '󰎠 ',
471 + Variable = ' ',
474 +local completion_kinds = vim.lsp.protocol.CompletionItemKind
475 +for i, kind in ipairs( completion_kinds ) do
476 + completion_kinds[i] = completion_icons[kind] or kind
477 +end
428 479 return setmetatable( _, {} )

neovim/lua/bugabinga/lsp/lightbulb.lua

Modified
3 3 --VSCode-like lightbulb.
4 4 --Implementation inspired from https://github.com/nvimdev/lspsaga.nvim/blob/c9b17bc7dc694bdbeb3788a583518073a30a6de2/lua/lspsaga/codeaction/lightbulb.lua
6 6 local lb_name = 'mariasolos/lightbulb'
7 7 local lb_namespace = vim.api.nvim_create_namespace( lb_name )
8 -local lb_icon = require 'std.icon'.hint
8 +local lb_icon = require 'std.icon'.hint
9 9 local lb_group = vim.api.nvim_create_augroup( lb_name, { clear = true } )
10 10 local code_action_method = vim.lsp.protocol.Methods.textDocument_codeAction
11 11 local timer = vim.uv.new_timer()

neovim/lua/bugabinga/nugu/init.lua

Modified
92 92 Whitespace { NonText },
93 93 NormalNC { Normal },
94 94 Pmenu { NormalFloat },
95 - PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = Pemnu.bg, gui = 'bold underline' },
95 + PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = Pmenu.bg, gui = 'bold underline' },
96 96 PmenuSbar { bg = ui_unfocus },
97 97 PmenuThumb { bg = ui_minor },
98 98 Question { fg = ui_important_local, gui = 'bold' },
276 276 LazyCommitScope { LazyComment, gui = 'italic' },
277 277 LazyCommitType { LazyCommitScope },
278 278 LazyDimmed { fg = NormalFloat.fg },
279 - LazyDir { N.fgormalFloat },
279 + LazyDir { fg = NormalFloat.fg },
280 280 LazyH1 { Bold },
281 281 LazyH2 { LazyH1 },
282 282 LazyLocal {},
471 471 IblScope { fg = ui_focus, bg = Normal.bg },
473 473 Hlargs { fg = content_important_local },
474 475 MiniStarterCurrent { fg = ui_accent.readable(), bg = ui_accent }, -- current item.
475 476 MiniStarterFooter { Keyword }, -- footer units.
476 477 MiniStarterHeader { Comment }, -- header units.

neovim/lua/bugabinga/options/behaviour.lua

Modified
1 +local debug = require 'std.debug'
1 2 local auto = require 'std.auto'
3 4 -- How many milliseconds must pass before neovim decides I was "idle"
6 7 vim.opt.timeoutlen = 250
8 9 -- wrap line movements, when start/end is reached
9 -vim.opt.whichwrap:append'<'
10 -vim.opt.whichwrap:append'>'
11 -vim.opt.whichwrap:append'['
12 -vim.opt.whichwrap:append']'
13 -vim.opt.whichwrap:append'h'
14 -vim.opt.whichwrap:append'l'
10 +vim.opt.whichwrap:append '<'
11 +vim.opt.whichwrap:append '>'
12 +vim.opt.whichwrap:append '['
13 +vim.opt.whichwrap:append ']'
14 +vim.opt.whichwrap:append 'h'
15 +vim.opt.whichwrap:append 'l'
16 17 -- Tabs and Spaces, i like 'em 2 spaces wide
17 18 -- only insert spaces for tabs if language configuration explicitly declares so
27 28 vim.opt.wrap = false
29 30 -- do not keep distance to borders while scrolling
30 -vim.opt.scrolloff = 999
31 -vim.opt.sidescrolloff = 999
31 +vim.opt.scrolloff = 0
32 +vim.opt.sidescrolloff = 0
33 34 -- try to guess indentation based on context
34 35 vim.opt.smartindent = true
99 100 if table.contains( ignored.filetypes, filetype ) then return end
100 101 local buftype = vim.api.nvim_buf_get_option( buffer, 'buftype' )
101 102 if table.contains( ignored.buftypes, buftype ) then return end
102 - local root = vim.fs.normalize(project.find_root_by_filetype( file, filetype ))
103 - local cwd = vim.fs.normalize(vim.uv.cwd())
103 + local root = vim.fs.normalize( project.find_root_by_filetype( file, filetype ) )
104 + local cwd = vim.fs.normalize( vim.uv.cwd() )
104 105 if root and cwd ~= root then
105 106 vim.uv.chdir( root )
106 107 vim.notify( 'Changed root directory to ' .. root .. ' from ' .. cwd )
107 - -- vim.print( buffer, file, vim.inspect( filetype ), vim.inspect( buftype ) )
108 + debug.print( buffer, file, vim.inspect( filetype ), vim.inspect( buftype ) )

neovim/lua/bugabinga/options/keymaps.lua

Modified
6 6 keys = '<space>',
7 7 command = '<nop>',
10 9 vim.g.mapleader = ' '
11 10 vim.g.maplocalleader = ' '
13 --- disable default ENTER binding
14 -map {
15 - keys = '<enter>',
16 - command = '<nop>',
19 12 -- insert newline under or above in normal mode
20 13 map.normal {
21 14 description = 'Insert newline under cursor',
22 15 category = 'editing',
23 - keys = '<C-enter>',
16 + keys = '<leader>o',
24 17 command = function ()
25 18 local current_buffer = 0
26 19 local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1]
33 26 map.normal {
34 27 description = 'Insert newline above cursor',
35 28 category = 'editing',
36 - keys = '<C-S-enter>',
29 + keys = '<leader>O',
37 30 command = function ()
38 31 local current_buffer = 0
39 32 local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1] - 1
40 33 local strict_indexing = false
41 34 local newline = { '' }
42 36 vim.api.nvim_buf_set_lines( current_buffer, current_line, current_line, strict_indexing, newline )
101 95 command = function () return vim.fn.pumvisible() == 1 and '<C-n>' or '<tab>' end,
98 +--TODO make global
99 +local win32 = vim.loop.os_uname().sysname:match 'Win'
100 +local wsl2 = vim.loop.os_uname().release:match 'WSL2'
104 102 local function open_link_under_cursor()
105 103 ---@diagnostic disable-next-line: missing-parameter
106 104 local file_under_cursor = vim.fn.expand '<cfile>'
109 107 if file_under_cursor and file_under_cursor:match '%a+://.+' then
110 108 vim.system(
111 109 ---@diagnostic disable-next-line: assign-type-mismatch
112 - { 'firefox', file_under_cursor },
110 + (win32 or wsl2) and { 'cmd.exe', '/C', 'start', 'msedge', file_under_cursor }
111 + or { 'firefox', file_under_cursor },
113 112 { text = true },
114 113 function ( completed )
115 114 if completed.code == 0 then
116 - vim.notify( 'Openend ' .. file_under_cursor )
115 + vim.schedule( function () vim.notify( 'Opened ' .. file_under_cursor ) end )
118 117 error( 'Failed to open ' .. file_under_cursor .. ' because: ' .. completed.stderr )
121 + else
122 + vim.notify 'Found no url under cursor !'
190 191 vim.lsp.buf.format { async = false }
192 193 -- TODO: run makeprg
193 - vim.cmd [[silent make]]
194 + -- vim.cmd [[silent make]]
195 196 -- save
196 197 vim.cmd [[wa]]

neovim/lua/bugabinga/options/ui.lua

Modified
96 96 vim.opt.shortmess:append 'c'
97 97 -- hide vim intro screen
98 98 vim.opt.shortmess:append 'I'
99 +-- truncate messages at end
100 +vim.opt.shortmess:append 't'
100 102 -- show cmd window to prevent jitter ui
101 103 vim.opt.cmdheight = 1

neovim/lua/bugabinga/plugins/autopairs.lua

Modified
3 3 local ignored = require 'std.ignored'
5 5 return {
6 6 'windwp/nvim-autopairs',
7 7 event = 'InsertEnter',
8 - dependencies = {
9 - 'hrsh7th/nvim-cmp'
8 + opts = {
9 + disable_filetype = ignored.filetypes,
11 - config = function ()
12 - local autopairs = require 'nvim-autopairs'
13 - autopairs.setup {
14 - disable_filetype = ignored.filetypes,
15 - }
16 - local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
17 - local cmp = require 'cmp'
18 - cmp.event:on(
19 - 'confirm_done',
20 - cmp_autopairs.on_confirm_done()
21 - )
22 - end

neovim/lua/bugabinga/plugins/cmp.lua

Deleted
deleted file mode 100644
1 ----@diagnostic disable: missing-fields
3 -return {
4 - 'hrsh7th/nvim-cmp',
5 - event = 'InsertEnter',
6 - dependencies = {
7 - 'hrsh7th/cmp-buffer',
8 - 'hrsh7th/cmp-nvim-lsp',
9 - 'hrsh7th/cmp-path',
10 - 'hrsh7th/cmp-nvim-lsp-document-symbol',
11 - 'hrsh7th/cmp-nvim-lsp-signature-help',
12 - 'hrsh7th/cmp-emoji',
13 - { 'L3MON4D3/LuaSnip', version = '2.*', build = 'make install_jsregexp' },
14 - 'saadparwaiz1/cmp_luasnip',
15 - 'rafamadriz/friendly-snippets',
16 - 'onsails/lspkind.nvim',
17 - },
18 - config = function ()
19 - local cmp = require 'cmp'
20 - local luasnip = require 'luasnip'
21 - local lspkind = require 'lspkind'
23 - require 'luasnip.loaders.from_vscode'.lazy_load()
25 - cmp.setup {
26 - performance = {
27 - debounce = 150,
28 - throttle = 300,
29 - fetching_timeout = 400,
30 - },
31 - completion = {
32 - autocomplete = false,
33 - completeopt = 'menu,menuone,preview,noselect',
34 - },
35 - window = {
36 - completion = cmp.config.window.bordered(),
37 - documentation = cmp.config.window.bordered(),
38 - },
39 - experimental = {
40 - ghost_text = true,
41 - },
42 - formatting = {
43 - format = lspkind.cmp_format {
44 - mode = 'symbol',
45 - maxwidth = 75,
46 - ellipsis_char = '…',
47 - with_text = true,
48 - menu = {
49 - nvim_lsp_signature_help = '[sig]',
50 - nvim_lsp = '[lsp]',
51 - nvim_lsp_document_symbol = '[sym]',
52 - luasnip = '[snip]',
53 - path = '[path]',
54 - emoji = '[emo]',
55 - buffer = '[buf]',
56 - }
57 - },
58 - },
59 - -- experimental = { ghost_text = true, },
60 - preselect = cmp.PreselectMode.None,
61 - snippet = { expand = function ( args ) luasnip.lsp_expand( args.body ) end },
62 - mapping = {
63 - ['<c-p>'] = cmp.mapping.select_prev_item(),
64 - ['<c-n>'] = cmp.mapping.select_next_item(),
65 - ['<c-k>'] = cmp.mapping.select_prev_item(),
66 - ['<c-j>'] = cmp.mapping.select_next_item(),
67 - ['<tab>'] = cmp.mapping( function ( fallback )
68 - if cmp.visible() then
69 - cmp.select_next_item()
70 - elseif luasnip.expand_or_locally_jumpable() then
71 - luasnip.expand_or_jump()
72 - else
73 - fallback()
74 - end
75 - end, { 'i', 's' } ),
76 - ['<s-tab>'] = cmp.mapping( function ( fallback )
77 - if cmp.visible() then
78 - cmp.select_prev_item()
79 - elseif luasnip.locally_jumpable( -1 ) then
80 - luasnip.jump( -1 )
81 - else
82 - fallback()
83 - end
84 - end, { 'i', 's' } ),
85 - ['<c-b>'] = cmp.mapping.scroll_docs( -2 ),
86 - ['<c-f>'] = cmp.mapping.scroll_docs( 2 ),
87 - ['<c-u>'] = cmp.mapping.scroll_docs( -4 ),
88 - ['<c-d>'] = cmp.mapping.scroll_docs( 4 ),
89 - ['<c-space>'] = cmp.mapping.complete {},
90 - ['<esc>'] = cmp.mapping.abort(),
91 - ['<cr>'] = cmp.mapping.confirm {
92 - behaviour = cmp.ConfirmBehavior.Replace,
93 - select = true,
94 - }
95 - },
96 - sources = cmp.config.sources {
97 - { name = 'nvim_lsp_signature_help' },
98 - { name = 'nvim_lsp' },
99 - { name = 'nvim_lsp_document_symbol' },
100 - { name = 'luasnip' },
101 - { name = 'path' },
102 - { name = 'emoji' },
103 - { name = 'buffer', keyword_length = 3 },
104 - }
105 - }
107 - cmp.setup.filetype( 'gitcommit', {
108 - sources = cmp.config.sources {
109 - { name = 'git' },
110 - },
111 - {
112 - { name = 'buffer' },
113 - { name = 'path' },
114 - }
115 - } )
116 - end,

neovim/lua/bugabinga/plugins/comment.lua

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

neovim/lua/bugabinga/plugins/dressing.lua

Modified
1 1 return {
2 2 'stevearc/dressing.nvim',
3 - opts = {}
3 + lazy = false,
4 + opts = {},

neovim/lua/bugabinga/plugins/fidget.lua

Added
new file mode 100644
1 +local debug = require 'std.debug'
3 +return {
4 + 'j-hui/fidget.nvim',
5 + version = '1.4.0',
6 + lazy = false,
7 + opts = {
8 + progress = {
9 + suppress_on_insert = false, -- Suppress new messages while in insert mode
10 + lsp = {
11 + log_handler = debug.get, -- Log `$/progress` handler invocations (for debugging)
12 + },
13 + },
14 + notification = {
15 + filter = debug.get and vim.log.levels.DEBUG,
16 + override_vim_notify = true, -- Automatically override vim.notify() with Fidget
17 + },
18 + },

neovim/lua/bugabinga/plugins/flash.lua

Modified
1 1 return {
2 2 'folke/flash.nvim',
3 + tag = 'v1.18.2',
3 4 event = 'VeryLazy',
4 5 opts = {
5 - highlight = { backdrop = false },
6 - modes = { char = { highlight = { backdrop = false, } },
6 + highlight = { backdrop = false, },
7 + modes = { char = { highlight = { backdrop = false, }, },
9 10 keys = {
11 12 '<cr>',
12 - mode = { 'n', 'x', 'o' },
13 + mode = { 'n', 'x', 'o', },
13 14 function () require 'flash'.jump() end,
14 15 desc = 'Flash',
17 18 '<s-cr>',
18 - mode = { 'n', 'o', 'x' },
19 + mode = { 'n', 'o', 'x', },
19 20 function () require 'flash'.treesitter() end,
20 21 desc =
21 - 'Flash Treesitter'
22 + 'Flash Treesitter',

neovim/lua/bugabinga/plugins/genghis.lua

Modified
17 17 dependencies = {
18 18 'stevearc/dressing.nvim',
19 - 'hrsh7th/nvim-cmp',
20 - 'hrsh7th/cmp-omni',
22 20 config = function ()
23 - require 'genghis' -- no setup needed
24 - local cmp = require 'cmp'
25 - cmp.setup.filetype(
26 - 'DressingInput',
27 - ---@diagnostic disable-next-line: missing-fields
28 - {
29 - sources = cmp.config.sources { { name = 'omni' } }
30 - }
31 - )
21 + local genghis = require 'genghis' -- no setup needed
22 + local keymap = vim.keymap.set
23 + keymap( 'n', '<leader>yp', genghis.copyFilepath )
24 + keymap( 'n', '<leader>yn', genghis.copyFilename )
25 + keymap( 'n', '<leader>cx', genghis.chmodx )
26 + keymap( 'n', '<leader>rf', genghis.renameFile )
27 + keymap( 'n', '<leader>mf', genghis.moveAndRenameFile )
28 + keymap( 'n', '<leader>mc', genghis.moveToFolderInCwd )
29 + keymap( 'n', '<leader>nf', genghis.createNewFile )
30 + keymap( 'n', '<leader>yf', genghis.duplicateFile )
31 + keymap( 'n', '<leader>df', genghis.trashFile )
32 + keymap( 'x', '<leader>x', genghis.moveSelectionToNewFile )
32 33 end,

neovim/lua/bugabinga/plugins/gitsigns.lua

Modified
2 2 local map = require 'std.map'
4 4 return {
5 5 'lewis6991/gitsigns.nvim',
6 + tag = 'v0.7',
6 7 event = 'VeryLazy',
7 8 opts = {
8 9 signs = {
9 - add = { text = '│' },
10 - change = { text = '│' },
11 - delete = { text = '_' },
12 - topdelete = { text = '‾' },
13 - changedelete = { text = '~' },
14 - untracked = { text = '┆' },
10 + add = { text = '│', },
11 + change = { text = '│', },
12 + delete = { text = '_', },
13 + topdelete = { text = '‾', },
14 + changedelete = { text = '~', },
15 + untracked = { text = '┆', },
16 17 preview_config = {
17 18 border = vim.g.border_style,
52 53 category = 'git',
53 54 keys = '<leader>hs',
54 55 buffer = bufnr,
55 - command = function () gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
56 + command = function () gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v', } end,
58 59 map.normal {
68 69 category = 'git',
69 70 keys = '<leader>hr',
70 71 buffer = bufnr,
71 - command = function () gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
72 + command = function () gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v', } end,
74 75 map.normal {
108 109 category = 'git',
109 110 keys = '<leader>hb',
110 111 buffer = bufnr,
111 - command = function () gitsigns.blame_line { full = true } end,
112 + command = function () gitsigns.blame_line { full = true, } end,
114 115 map.normal {
148 149 category = 'git',
149 150 keys = 'ih',
150 151 buffer = bufnr,
151 - command = ':<C-U>Gitsigns select_hunk<CR>'
152 + command = ':<C-U>Gitsigns select_hunk<CR>',
154 - }
155 + },

neovim/lua/bugabinga/plugins/heirline.lua

Modified
3 3 ---@diagnostic disable: param-type-mismatch
4 4 local icon = require 'std.icon'
5 5 local auto = require 'std.auto'
6 6 local ignored = require 'std.ignored'
8 -local NEW_FILE = '~new~'
8 +local NEW_FILE = '~untitled~'
10 10 return {
12 12 'rebelot/heirline.nvim',
13 + tag = 'v1.0.3',
13 14 event = 'BufEnter',
14 15 dependencies = {
15 16 'nvim-tree/nvim-web-devicons',
16 17 'lewis6991/gitsigns.nvim',
18 + 'SmiteshP/nvim-navic',
18 20 config = function ()
19 21 local heirline = require 'heirline'
27 29 command = function () utils.on_colorscheme( nugu ) end,
30 - local vi_mode = {
32 + local vi_mode = {
31 33 init = function ( self )
32 34 self.mode = vim.fn.mode( 1 ) -- :h mode()
83 85 r = 'ui_important_global',
84 86 ['!'] = 'ui_important_global',
85 87 t = 'ui_important_global',
86 - }
88 + },
89 91 provider = function ( self )
94 96 hl = function ( self )
95 97 local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
96 - return { fg = self.mode_colors[mode], bold = true }
98 + return { fg = self.mode_colors[mode], bold = true, }
99 101 update = {
106 - local file_icon = {
108 + local file_icon = {
107 109 init = function ( self )
108 110 local filename = self.filename
109 111 local extension = vim.fn.fnamemodify( filename, ':e' )
110 - self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true } )
112 + self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true, } )
112 114 provider = function ( self )
113 115 return self.icon and (self.icon .. ' ')
115 117 hl = 'DefaultIcon',
118 - local file_name = {
120 + local file_name = {
119 121 init = function ( self )
120 122 self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) )
121 123 if self.lfilename == '' then self.lfilename = NEW_FILE end
138 - local file_flags = {
140 + local file_flags = {
140 142 condition = function ()
141 143 return vim.bo.modified
155 - local file_name_block = {
157 + local file_name_block = {
156 158 init = function ( self )
157 159 self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )
160 162 file_icon,
161 - { provider = ' ' },
163 + { provider = ' ', },
162 164 file_name,
163 165 file_flags,
164 - { provider = '%<' } -- this means that the statusline is cut here when there's not enough space
166 + { provider = '%<', }, -- this means that the statusline is cut here when there's not enough space
167 - local file_type = {
169 + local file_type = {
168 170 provider = function ()
169 171 return icon.file .. ' ' .. string.upper( vim.bo.filetype )
173 - local file_encoding = {
175 + local file_encoding = {
174 176 provider = function ()
175 177 local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc'
176 178 return enc ~= 'utf-8' and enc:upper()
180 - local file_format = {
182 + local file_format = {
181 183 static = {
182 184 dos = icon.newline .. icon.carriage_return,
183 185 unix = icon.newline,
186 188 provider = function ( self )
187 189 local fileformat = vim.bo.fileformat
188 190 return self[fileformat]
189 - end
191 + end,
192 - local file_size = {
194 + local file_size = {
193 195 provider = function ()
194 196 -- stackoverflow, compute human readable file size
195 197 -- i want to see vim opening a 1EiB file 󰱯
196 - local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' }
198 + local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E', }
197 199 local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
198 200 fsize = (fsize < 0 and 0) or fsize
199 201 if fsize < 1024 then
207 - local file_last_modified = {
209 + local file_last_modified = {
208 210 provider = function ()
209 211 local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )
210 212 if ftime > 0 then
217 - local lsp_active = {
219 + local lsp_active = {
218 220 condition = conditions.lsp_attached,
219 - update = { 'LspAttach', 'LspDetach', 'BufEnter' },
221 + -- FIXME: updates from parent components do not seem to update children,
222 + -- if those have their own updates?
223 + update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave', },
221 225 provider = function ()
222 226 local names = {}
223 - for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do
227 + for _, client in pairs( vim.lsp.get_clients { bufnr = 0, } ) do
224 228 table.insert( names, client.name )
226 230 return icon.lsp .. ' ' .. table.concat( names, ' ' )
230 - local diagnostic_enabled = {
234 + local navic = {
235 + condition = function () return require 'nvim-navic'.is_available() end,
236 + static = {
237 + -- create a type highlight map
238 + type_hl = {
239 + File = 'Directory',
240 + Module = '@include',
241 + Namespace = '@namespace',
242 + Package = '@include',
243 + Class = '@structure',
244 + Method = '@method',
245 + Property = '@property',
246 + Field = '@field',
247 + Constructor = '@constructor',
248 + Enum = '@field',
249 + Interface = '@type',
250 + Function = '@function',
251 + Variable = '@variable',
252 + Constant = '@constant',
253 + String = '@string',
254 + Number = '@number',
255 + Boolean = '@boolean',
256 + Array = '@field',
257 + Object = '@type',
258 + Key = '@keyword',
259 + Null = '@comment',
260 + EnumMember = '@field',
261 + Struct = '@structure',
262 + Event = '@keyword',
263 + Operator = '@operator',
264 + TypeParameter = '@type',
265 + },
266 + -- bit operation dark magic, see below...
267 + enc = function ( line, col, winnr )
268 + return bit.bor( bit.lshift( line, 16 ), bit.lshift( col, 6 ), winnr )
269 + end,
270 + -- line: 16 bit (65535); col: 10 bit (1023); winnr: 6 bit (63)
271 + dec = function ( c )
272 + local line = bit.rshift( c, 16 )
273 + local col = bit.band( bit.rshift( c, 6 ), 1023 )
274 + local winnr = bit.band( c, 63 )
275 + return line, col, winnr
276 + end,
277 + },
278 + init = function ( self )
279 + local data = require 'nvim-navic'.get_data() or {}
280 + local children = {}
281 + -- create a child for each level
282 + for i, d in ipairs( data ) do
283 + -- encode line and column numbers into a single integer
284 + local pos = self.enc( d.scope.start.line, d.scope.start.character, self.winnr )
285 + local child = {
287 + provider = d.icon,
288 + hl = self.type_hl[d.type],
289 + },
291 + -- escape `%`s (elixir) and buggy default separators
292 + provider = d.name:gsub( '%%', '%%%%' ):gsub( '%s*->%s*', '' ),
293 + -- highlight icon only or location name as well
294 + hl = self.type_hl[d.type],
296 + on_click = {
297 + -- pass the encoded position through minwid
298 + minwid = pos,
299 + callback = function ( _, minwid )
300 + -- decode
301 + local line, col, winnr = self.dec( minwid )
302 + vim.api.nvim_win_set_cursor( vim.fn.win_getid( winnr ), { line, col, } )
303 + end,
304 + name = 'heirline_navic',
305 + },
306 + },
308 + -- add a separator only if needed
309 + if #data > 1 and i < #data then
310 + table.insert( child, {
311 + provider = ' > ',
312 + -- hl = { fg = 'bright_fg', },
313 + } )
314 + end
315 + table.insert( children, child )
316 + end
317 + -- instantiate the new child, overwriting the previous one
318 + self.child = self:new( children, 1 )
319 + end,
320 + -- evaluate the children containing navic components
321 + provider = function ( self )
322 + return self.child:eval()
323 + end,
324 + -- hl = { fg = 'gray', },
325 + update = 'CursorMoved',
328 + local diagnostic_enabled = {
231 329 init = function ( self )
232 330 self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on
239 - local diagnostic = {
337 + local diagnostic = {
240 338 condition = conditions.has_diagnostics,
242 340 static = {
249 347 init = function ( self )
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 } )
348 + self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR, } )
349 + self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN, } )
350 + self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT, } )
351 + self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO, } )
256 - update = { 'DiagnosticChanged', 'BufEnter' },
354 + update = { 'DiagnosticChanged', 'BufEnter', 'BufLeave', },
259 357 provider = function ( self )
285 - local is_svn_repo = function ()
383 + local is_svn_repo = function ()
286 384 local svn_dir = vim.fs.find( '.svn', {
287 385 upward = true,
288 386 stop = vim.uv.os_homedir(),
293 391 return not vim.tbl_isempty( svn_dir )
296 - local svn_get_relative_url = function ()
394 + local svn_get_relative_url = function ()
297 395 -- FIXME: replace with vim.system
298 396 local job = require 'plenary.job'
299 - local relative_url = { '[ERR]' }
397 + local relative_url = { '[ERR]', }
301 399 job:new {
302 400 command = 'svn',
303 - args = { 'info', '--show-item', 'relative-url', '--no-newline' },
401 + args = { 'info', '--show-item', 'relative-url', '--no-newline', },
304 402 on_exit = function ( current_job, exit_code )
305 403 if exit_code == 0 then relative_url = current_job:result() end
309 407 return relative_url[1]
312 - local svn = {
410 + local svn = {
313 411 condition = is_svn_repo,
315 413 update = 'BufEnter',
329 - local git = {
427 + local git = {
330 428 condition = conditions.is_git_repo,
332 430 init = function ( self )
364 - local work_dir = {
462 + local work_dir = {
365 463 init = function ( self )
366 464 self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' '
367 465 self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )
384 482 provider = '',
385 - }
483 + },
388 - local help_file_name = {
486 + local help_file_name = {
389 487 condition = function ()
390 488 return vim.bo.filetype == 'help'
396 494 hl = 'Question',
399 - local terminal_name = {
497 + local terminal_name = {
400 498 provider = function ()
401 499 local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
402 500 local basename = vim.fs.basename( name )
405 503 hl = 'Bold',
408 - local togglers = {
506 + local togglers = {
409 507 provider = function ()
410 508 local togglers = require 'bugabinga.options.togglers'
411 509 return tostring( togglers )
415 - local macro_recording = {
513 + local macro_recording = {
416 514 condition = function ()
417 515 return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
419 517 provider = icon.macro .. ' ',
420 518 hl = 'PreProc',
421 - utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, {
519 + utils.surround( { '░▒▓ ', ' ▓▒░', }, nil, {
422 520 provider = function ()
423 521 return vim.fn.reg_recording()
427 525 update = {
428 526 'RecordingEnter',
429 527 'RecordingLeave',
430 - }
528 + },
433 - local lazy = {
531 + local lazy = {
434 532 condition = function ()
435 533 local ok, lazy_status = pcall( require, 'lazy.status' )
436 534 return ok and lazy_status.has_updates()
438 - update = { 'User', pattern = 'LazyUpdate' },
536 + update = { 'User', pattern = 'LazyUpdate', },
439 537 provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status'.updates() .. ' ' end,
440 538 on_click = {
441 539 callback = function () require 'lazy'.update() end,
446 - local align = { provider = '%=' }
447 - local space = { provider = ' ' }
544 + local align = { provider = '%=', }
545 + local space = { provider = ' ', }
449 - local default_statusline = {
450 - vi_mode, macro_recording, align,
451 - work_dir, space, git, svn, align,
452 - diagnostic_enabled, space, diagnostic, space, lsp_active, align,
453 - togglers, align,
454 - lazy, space, file_encoding, space, file_format, space, file_type, space, file_size, space, file_last_modified,
547 + local default_statusline = {
548 + vi_mode, macro_recording, work_dir, space, git, svn, align,
549 + diagnostic, space, lsp_active, align,
550 + togglers, space, space, diagnostic_enabled, space, lazy, space,
551 + file_encoding, space, file_format, space, file_type, space, file_size, space, file_last_modified,
457 - local special_statusline = {
554 + local special_statusline = {
458 555 condition = function ()
459 556 return conditions.buffer_matches {
460 557 buftype = ignored.buftypes,
465 562 file_type,
466 563 space,
467 564 help_file_name,
468 - align
565 + align,
471 - local terminal_statusline = {
568 + local terminal_statusline = {
473 570 condition = function ()
474 - return conditions.buffer_matches { buftype = { 'terminal' } }
571 + return conditions.buffer_matches { buftype = { 'terminal', }, }
477 - { condition = conditions.is_active, vi_mode, space },
574 + { condition = conditions.is_active, vi_mode, space, },
478 575 file_type,
479 576 space,
480 577 terminal_name,
481 578 align,
484 - local inactive_statusline = {
581 + local inactive_statusline = {
485 582 condition = conditions.is_not_active,
486 583 file_type,
487 584 space,
489 586 align,
492 - local statuslines = {
589 + local statuslines = {
493 590 hl = function ()
494 591 if conditions.is_active() then
495 592 return 'StatusLine'
506 603 default_statusline,
509 - local winbars = {
606 + local winbars = {
510 607 hl = function ()
511 608 if conditions.is_active() then
512 609 return 'Winbar'
521 618 condition = function ()
522 - return conditions.buffer_matches { buftype = { 'terminal' } }
619 + return conditions.buffer_matches { buftype = { 'terminal', }, }
525 622 file_type,
527 624 terminal_name,
530 - file_name_block,
531 - }
533 - local tabline_buffer_number = {
534 - provider = function ( self )
535 - return '(' .. tostring( self.bufnr ) .. ')'
536 - end,
537 - hl = function ( self )
538 - if self.is_active then
539 - return { fg = utils.get_highlight 'TabLineSel'.fg }
540 - elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
541 - return { fg = 'ui_normal' }
542 - else
543 - return { fg = utils.get_highlight 'TabLine'.fg }
544 - end
545 - end,
546 - }
548 - local tabline_file_name = {
549 - provider = function ( self )
550 - local name = self.file_name
551 - return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
552 - end,
553 - hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true } end,
554 - }
556 - local tabline_file_flags = {
558 - condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr } ) end,
559 - provider = icon.modified .. ' ',
628 + file_name_block,
629 + space,
630 + navic,
561 - {
562 - condition = function ( self )
563 - return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr } ) or
564 - vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr } )
565 - end,
566 - provider = function ( self )
567 - if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr } ) == 'terminal' then
568 - return icon.terminal
569 - else
570 - return icon.lock
571 - end
572 - end,
573 - },
574 - hl = 'Bold',
577 - local tabline_file_name_block = {
578 - init = function ( self )
579 - self.file_name = vim.api.nvim_buf_get_name( self.bufnr )
580 - end,
634 + -- local tabline_buffer_number = {
635 + -- provider = function ( self )
636 + -- return '(' .. tostring( self.bufnr ) .. ')'
637 + -- end,
638 + -- hl = function ( self )
639 + -- if self.is_active then
640 + -- return { fg = utils.get_highlight 'TabLineSel'.fg, }
641 + -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
642 + -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
643 + -- else
644 + -- return { fg = utils.get_highlight 'TabLine'.fg, }
645 + -- end
646 + -- end,
647 + -- }
582 - hl = function ( self )
583 - if self.is_active then
584 - return 'TabLineSel'
585 - elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
586 - return { fg = 'ui_normal' }
587 - else
588 - return 'TabLine'
589 - end
590 - end,
649 + -- local tabline_file_name = {
650 + -- provider = function ( self )
651 + -- local name = self.file_name
652 + -- return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
653 + -- end,
654 + -- hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end,
655 + -- }
592 - on_click = {
593 - callback = function ( _, minwid, _, button )
594 - if button == 'm' then --m = middle click
595 - vim.schedule( function ()
596 - vim.api.nvim_buf_delete( minwid, { force = false } )
597 - vim.cmd.redrawtabline()
598 - end )
599 - else
600 - vim.api.nvim_win_set_buf( 0, minwid )
601 - end
602 - end,
603 - minwid = function ( self ) return self.bufnr end,
604 - name = 'heirline_tabline_buffer_callback',
605 - },
657 + -- local tabline_file_flags = {
658 + -- {
659 + -- condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end,
660 + -- provider = icon.modified .. ' ',
661 + -- },
662 + -- {
663 + -- condition = function ( self )
664 + -- return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or
665 + -- vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } )
666 + -- end,
667 + -- provider = function ( self )
668 + -- if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then
669 + -- return icon.terminal
670 + -- else
671 + -- return icon.lock
672 + -- end
673 + -- end,
674 + -- },
675 + -- hl = 'Bold',
676 + -- }
607 - file_icon,
608 - { provider = ' ' },
609 - tabline_file_name,
610 - tabline_buffer_number,
611 - tabline_file_flags,
612 - }
678 + -- local tabline_file_name_block = {
679 + -- init = function ( self )
680 + -- self.file_name = vim.api.nvim_buf_get_name( self.bufnr )
681 + -- end,
682 + --
683 + -- hl = function ( self )
684 + -- if self.is_active then
685 + -- return 'TabLineSel'
686 + -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
687 + -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
688 + -- else
689 + -- return 'TabLine'
690 + -- end
691 + -- end,
692 + --
693 + -- on_click = {
694 + -- callback = function ( _, minwid, _, button )
695 + -- if button == 'm' then --m = middle click
696 + -- vim.schedule( function ()
697 + -- vim.api.nvim_buf_delete( minwid, { force = false, } )
698 + -- vim.cmd.redrawtabline()
699 + -- end )
700 + -- else
701 + -- vim.api.nvim_win_set_buf( 0, minwid )
702 + -- end
703 + -- end,
704 + -- minwid = function ( self ) return self.bufnr end,
705 + -- name = 'heirline_tabline_buffer_callback',
706 + -- },
707 + --
708 + -- file_icon,
709 + -- { provider = ' ', },
710 + -- tabline_file_name,
711 + -- tabline_buffer_number,
712 + -- tabline_file_flags,
713 + -- }
614 - local tabline_buffer_block = utils.surround(
615 - {
616 - ' ' .. icon.slant_left,
617 - icon.slant_right .. ' ',
618 - },
619 - function ( self )
620 - if self.is_active then
621 - return utils.get_highlight 'TabLineSel'.bg
622 - else
623 - return utils.get_highlight 'TabLine'.bg
624 - end
625 - end,
626 - { tabline_file_name_block }
627 - )
715 + -- local tabline_buffer_block = utils.surround(
716 + -- {
717 + -- ' ' .. icon.slant_left,
718 + -- icon.slant_right .. ' ',
719 + -- },
720 + -- function ( self )
721 + -- if self.is_active then
722 + -- return utils.get_highlight 'TabLine'.bg
723 + -- else
724 + -- return utils.get_highlight 'TabLineFill'.bg
725 + -- end
726 + -- end,
727 + -- { tabline_file_name_block, }
728 + -- )
629 - local buffer_line = utils.make_buflist(
630 - tabline_buffer_block,
631 - { provider = icon.arrow_left .. ' ', hl = 'TabLineFill' },
632 - { provider = ' ' .. icon.arrow_right, hl = 'TabLineFill' }
633 - )
730 + -- local buffer_line = utils.make_buflist(
731 + -- tabline_buffer_block,
732 + -- { provider = icon.arrow_left .. ' ', hl = 'TabLine', },
733 + -- { provider = ' ' .. icon.arrow_right, hl = 'TabLine', }
734 + -- )
635 - local tabpage = {
736 + local tabpage = {
636 737 provider = function ( self )
637 738 return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
639 740 hl = function ( self )
640 - if not self.is_active then
641 - return 'TabLine'
642 - else
741 + if self.is_active then
643 742 return 'TabLineSel'
743 + else
744 + return 'TabLine'
648 - local tab_pages = {
649 - { provider = '%=' },
749 + local tab_pages = {
750 + { provider = '%=', },
650 751 utils.make_tablist( tabpage ),
653 - local tabline = { buffer_line, tab_pages }
754 + -- local tabline = { buffer_line, tab_pages, }
655 756 -- local statuscolumn = {}
657 758 heirline.setup {
658 759 statusline = statuslines,
659 760 winbar = winbars,
660 - tabline = tabline,
761 + tabline = tab_pages,
762 + -- tabline = tabline,
661 763 -- statuscolumn = statuscolumn,
663 765 opts = {

neovim/lua/bugabinga/plugins/hlargs.lua

Modified
1 1 return {
2 - 'm-demare/hlargs.nvim',
3 - event = 'BufRead',
4 - opts = {
5 - paint_arg_declarations = true,
6 - paint_arg_usages = true,
7 - paint_catch_blocks = {
8 - declarations = true,
9 - usages = true,
10 - },
11 - extras = { named_parameter = true },
12 - excluded_argnames = {
13 - declarations = {},
14 - usages = { lua = {} },
15 - },
16 - },
17 - dependencies = {
18 - 'nvim-treesitter/nvim-treesitter'
19 - },
2 + 'm-demare/hlargs.nvim',
3 + event = { 'BufRead', 'BufLeave', 'BufEnter', 'SessionLoadPost', },
4 + opts = {
5 + -- highlight = { 'Hlargs', },
6 + paint_arg_declarations = true,
7 + paint_arg_usages = true,
8 + paint_catch_blocks = {
9 + declarations = true,
10 + usages = true,
11 + },
12 + extras = { named_parameter = true, },
13 + excluded_argnames = {
14 + declarations = {},
15 + usages = { lua = {}, },
16 + },
17 + },
18 + dependencies = {
19 + 'nvim-treesitter/nvim-treesitter',
20 + },

neovim/lua/bugabinga/plugins/hyper.lua

Added
new file mode 100644
1 +return {
2 + 'wet-sandwich/hyper.nvim',
3 + tag = '0.1.0',
4 + dependencies = {
5 + 'nvim-lua/plenary.nvim',
6 + },
7 + cmd = 'Hyper',
8 +}

neovim/lua/bugabinga/plugins/indent_blankline.lua

Modified
1 -local icon = require'std.icon'
1 +local icon = require 'std.icon'
3 3 return {
4 4 'lukas-reineke/indent-blankline.nvim',
5 + tag = 'v3.5.3',
5 6 main = 'ibl',
6 - event = { 'BufReadPost', 'BufNew' },
7 + event = { 'BufReadPost', 'BufNew', },
7 8 config = function ()
8 9 local ibl = require 'ibl'

neovim/lua/bugabinga/plugins/lush.lua

Modified
1 1 return {
3 3 'rktjmp/lush.nvim',
4 + -- tag = 'v2.0.1',
5 + -- we rely on injects.sym for better treesitter support
4 6 branch = 'main',
5 7 lazy = false,
6 8 priority = 1000,
7 9 config = function ()
8 - vim.cmd.colorscheme 'nugu'
10 + -- disabled to find theming issues with heirline
11 + -- vim.cmd.colorscheme 'nugu'
9 12 end,

neovim/lua/bugabinga/plugins/mason.lua

Modified
1 1 return {
2 - "williamboman/mason.nvim",
3 - cmd = { 'Mason', 'MasonUpdate', 'MasonInstall', 'MasonUninstall', 'MasonUninstallAll', 'MasonLog' },
2 + 'williamboman/mason.nvim',
3 + tag = 'v1.10.0',
4 + cmd = { 'Mason', 'MasonUpdate', 'MasonInstall', 'MasonUninstall', 'MasonUninstallAll', 'MasonLog', },
4 5 opts = {
5 6 ui = {
6 7 border = vim.g.border_style,
7 8 width = 0.69,
8 9 height = 0.69,
9 - }
10 + },
11 12 dependencies = {
13 14 'WhoIsSethDaniel/mason-tool-installer.nvim',
14 15 lazy = false,
15 - cmd = { "MasonToolsInstall", "MasonToolsInstallSync", "MasonToolsUpdate", "MasonToolsUpdateSync", "MasonToolsClean" },
16 + cmd = { 'MasonToolsInstall', 'MasonToolsInstallSync', 'MasonToolsUpdate', 'MasonToolsUpdateSync', 'MasonToolsClean', },
16 17 opts = {
17 18 ensure_installed = {
18 19 'lua-language-server',
25 26 'lemminx',
26 27 'marksman',
28 - }
29 - }
30 - }
29 + },
30 + },
31 + },

neovim/lua/bugabinga/plugins/navic.lua

Added
new file mode 100644
1 +return {
2 + 'SmiteshP/nvim-navic',
3 + opts = {
5 + }
6 +}

neovim/lua/bugabinga/plugins/neodev.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'folke/neodev.nvim',
3 - opts = {
4 - lspconfig = false,
5 - },
6 -}

neovim/lua/bugabinga/plugins/persistence.lua

Modified
1 -local map = require'std.map'
1 +local map = require 'std.map'
3 3 return {
4 4 'folke/persistence.nvim',
5 - event = "BufReadPre",
6 - opts = { },
7 - config = function(_, opts)
8 - local persistence = require'persistence'
9 - persistence.setup(opts)
5 + tag = 'v2.0.0',
6 + event = 'BufReadPre',
7 + opts = {},
8 + config = function ( _, opts )
9 + local persistence = require 'persistence'
10 + persistence.setup( opts )
11 12 map.normal {
12 13 description = 'Restore session for current directory',
13 14 category = 'history',
14 15 keys = '<F4>',
15 - command = function() persistence.load() end,
16 + command = function () persistence.load() end,
18 19 map.normal {
19 20 description = 'Restore last session',
20 21 category = 'history',
21 22 keys = '<F4><F4>',
22 - command = function() persistence.load{last= true} end,
23 + command = function () persistence.load { last = true, } end,
25 25 end,

neovim/lua/bugabinga/plugins/specs.lua

Modified
1 -local map = require'std.map'
2 -local ignored = require'std.ignored'
1 +local map = require 'std.map'
2 +local ignored = require 'std.ignored'
4 -return {{
5 - 'edluffy/specs.nvim',
6 - keys = { '<leader><leader>', '<leader><leader><leader>' },
7 - config = function()
8 - local specs = require'specs'
4 +return { {
5 + 'KevinSilvester/specs.nvim',
6 + keys = { '<leader><leader>', '<leader><leader><leader>' },
7 + config = function ()
8 + local specs = require 'specs'
10 - specs.setup{
11 - show_jumps = true,
12 - min_jump = 30,
13 - popup = {
14 - delay_ms = 10, -- delay before popup displays
15 - inc_ms = 10, -- time increments used for fade/resize effects
16 - blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
17 - width = 10,
18 - winhl = "Cursor",
19 - fader = specs.exp_fader,
20 - resizer = specs.shrink_resizer
21 - },
22 - ignore_filetypes = ignored.filetypes_kv,
23 - ignore_buftypes = ignored.buftypes_kv,
24 - }
10 + specs.setup {
11 + show_jumps = true,
12 + min_jump = 30,
13 + popup = {
14 + delay_ms = 10, -- delay before popup displays
15 + inc_ms = 10, -- time increments used for fade/resize effects
16 + blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
17 + width = 10,
18 + winhl = 'Cursor',
19 + fader = specs.exp_fader,
20 + resizer = specs.shrink_resizer
21 + },
22 + ignore_filetypes = ignored.filetypes_kv,
23 + ignore_buftypes = ignored.buftypes_kv,
24 + }
26 - map.normal {
27 - description = 'Find cursor!',
28 - category = 'fun',
29 - keys = '<leader><leader>',
30 - command = specs.show_specs,
31 - }
26 + map.normal {
27 + description = 'Find cursor!',
28 + category = 'fun',
29 + keys = '<leader><leader>',
30 + command = specs.show_specs,
31 + }
33 - map.normal {
33 + map.normal {
34 34 description = 'Find cursor, for real!',
35 - category = 'fun',
36 - keys = '<leader><leader><leader>',
37 - command = function()
38 - specs.show_specs{ width = 69, delay_ms = 69, inc_ms = 42}
35 + category = 'fun',
36 + keys = '<leader><leader><leader>',
37 + command = function ()
38 + specs.show_specs { width = 69, delay_ms = 69, inc_ms = 42 }
39 39 end,
41 - end,
42 -}}
41 + end,
42 +} }

neovim/lua/bugabinga/plugins/starter.lua

Modified
52 52 pattern = 'LazyVimStarted',
53 53 once = true,
54 54 command = vim.schedule_wrap( function ()
55 - startuptime = require 'lazy'.stats().startuptime
56 - starter.refresh()
55 + if vim.bo.filetype == "starter" then
56 + startuptime = require 'lazy'.stats().startuptime
57 + starter.refresh()
58 + end
57 59 end ),

neovim/lua/bugabinga/plugins/symbols-outline.lua

Modified
1 1 return {
2 - 'simrat39/symbols-outline.nvim',
3 - cmd = 'SymbolsOutline',
4 - opts = {},
2 + 'SmiteshP/nvim-navbuddy',
3 + cmd = 'NavBuddy',
4 + dependencies = {
5 + 'SmiteshP/nvim-navic',
6 + 'MunifTanjim/nui.nvim',
7 + },
8 + opts = {
9 + window = {
10 + border = vim.g.border_style,
11 + },
12 + },

neovim/lua/bugabinga/plugins/telescope.lua

Modified
5 5 require 'bugabinga.health'.add_dependency
7 7 name = 'ripgrep',
8 - name_of_executable = 'rg'
8 + name_of_executable = 'rg',
11 11 name = 'find-fd',
12 - name_of_executable = 'fd'
12 + name_of_executable = 'fd',
15 15 return {
16 16 'nvim-telescope/telescope.nvim',
17 - branch = '0.1.x',
17 + tag = '0.1.6',
18 18 cmd = 'Telescope',
19 19 event = 'VeryLazy',
20 20 dependencies = {
30 30 local actions = require 'telescope.actions'
31 31 local themes = require 'telescope.themes'
33 - local ivy = themes.get_ivy { hidden = true, layout_config = { preview_width = 0.69 } }
34 - local dropdown = themes.get_dropdown { layout_config = { width = 0.69 } }
35 - local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69 } }
33 + local ivy = themes.get_ivy { hidden = true, layout_config = { preview_width = 0.69, }, }
34 + local dropdown = themes.get_dropdown { layout_config = { width = 0.69, }, }
35 + local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69, }, }
37 37 telescope.setup {
38 38 defaults = {
39 - path_display = { 'truncate' },
39 + path_display = { 'truncate', },
40 40 sorting_strategy = 'ascending',
41 41 layout_config = {
42 - horizontal = { prompt_position = 'bottom', preview_width = 0.69 },
43 - vertical = { mirror = false },
42 + horizontal = { prompt_position = 'bottom', preview_width = 0.69, },
43 + vertical = { mirror = false, },
44 44 width = 0.69,
45 45 height = 0.42,
46 46 preview_cutoff = 124,
69 69 ['<c-p>'] = actions.move_selection_previous,
70 70 ['<c-s>'] = actions.file_split,
72 - n = { q = actions.close },
72 + n = { q = actions.close, },
75 75 pickers = {
83 83 buffers = cursor,
85 85 extensions = {
86 - ['ui-select'] = { cursor },
87 - zoxide = { prompt_title = 'Navigate deez nuts!' },
86 + ['ui-select'] = { cursor, },
87 + zoxide = { prompt_title = 'Navigate deez nuts!', },

neovim/lua/bugabinga/plugins/todo-comments.lua

Modified
1 1 return {
2 2 'folke/todo-comments.nvim',
3 - dependencies = { 'nvim-lua/plenary.nvim' },
3 + tag = 'v1.1.0',
4 + dependencies = { 'nvim-lua/plenary.nvim', },
4 5 event = 'BufReadPost',
5 6 opts = {},

neovim/lua/bugabinga/plugins/toggleterm.lua

Modified
9 9 name_of_executable = 'mdcat',
12 - name_of_executable = 'dot'
12 + name_of_executable = 'dot',
15 15 return {
16 16 'akinsho/toggleterm.nvim',
17 + tag = 'v2.10.0',
17 18 keys = {
18 19 '<F7>',
19 20 '<F8>',
48 49 toggleterm.setup( opts )
50 51 local set_terminal_keymaps = function ()
51 - local local_to_buffer = { buffer = 0 }
52 + local local_to_buffer = { buffer = 0, }
52 53 map.terminal {
53 54 description = 'Quit insert mode',
54 55 category = 'terminal',
69 70 description = 'Open vertical Terminal',
70 71 category = 'terminal',
71 72 keys = '<F8>',
72 - command = '<CMD>exe v:count1 . "ToggleTerm size=60 direction=vertical"<CR>'
73 + command = '<CMD>exe v:count1 . "ToggleTerm size=60 direction=vertical"<CR>',
75 76 map.normal {
76 77 description = 'Open horizontal Terminal',
77 78 category = 'terminal',
78 79 keys = '<F9>',
79 - command = '<CMD>exe v:count1 . "ToggleTerm size=20 direction=horizontal"<CR>'
80 + command = '<CMD>exe v:count1 . "ToggleTerm size=20 direction=horizontal"<CR>',
82 83 local Terminal = require 'toggleterm.terminal'.Terminal
99 100 command = toggle_gitui,
102 - vim.api.nvim_create_user_command( 'Gitui', toggle_gitui, { desc = 'Toggle Gitui' } )
103 - end
103 + vim.api.nvim_create_user_command( 'Gitui', toggle_gitui, { desc = 'Toggle Gitui', } )
104 + end,

neovim/lua/bugabinga/plugins/tree.lua

Modified
2 2 local map = require 'std.map'
4 4 return {
5 5 'nvim-tree/nvim-tree.lua',
6 + version = 'v1.0',
7 + lazy = false,
6 8 cmd = 'NvimTreeOpen',
7 9 keys = '<leader>e',
10 + dependencies = {
11 + 'nvim-tree/nvim-web-devicons',
12 + 'antosha417/nvim-lsp-file-operations',
13 + },
8 14 init = function ()
9 15 -- disable netrw at the very start of your init.lua
10 16 vim.g.loaded_netrw = 1
25 31 dotfiles = false,
34 + require 'lsp-file-operations'.setup()
29 36 map.normal {
30 37 description = 'Toggle Tree File Explorer',

neovim/lua/bugabinga/plugins/treesitter.lua

Modified
3 3 local map = require 'std.map'
5 5 require 'bugabinga.health'.add_dependency
7 7 name = 'CMake',
8 - name_of_executable = 'cmake'
9 -}
11 - name_of_executable = 'make'
14 - name_of_executable = 'zig'
17 - name = 'TreeSitter CLI',
18 - name_of_executable = 'tree-sitter'
21 - name_of_executable = 'tar'
8 + name_of_executable = 'cmake',
10 + {
11 + name_of_executable = 'make',
12 + }
13 + {
14 + name_of_executable = 'zig',
15 + }
16 + {
17 + name = 'TreeSitter CLI',
18 + name_of_executable = 'tree-sitter',
19 + }
20 + {
21 + name_of_executable = 'tar',
22 + }
24 24 return {
25 25 'nvim-treesitter/nvim-treesitter',
26 - branch = 'master',
27 - event = { 'BufReadPre', 'BufNewFile' },
26 + tag = 'v0.9.2',
27 + -- branch = 'master',
28 + event = { 'BufReadPre', 'BufNewFile', },
28 29 build = function ()
29 - require 'nvim-treesitter.install'.update { with_sync = true }
30 + require 'nvim-treesitter.install'.update { with_sync = true, }
31 32 dependencies = {
32 33 'windwp/nvim-ts-autotag',
38 39 local parsers = require 'nvim-treesitter.parsers'
40 41 install.prefer_git = false
41 - install.compilers = { 'zig', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC' }
42 + install.compilers = { 'zig', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC', }
43 44 ---@diagnostic disable-next-line: missing-fields
44 45 configs.setup {
70 71 'zig',
73 - ignore_install = { 'oil' },
74 + ignore_install = { 'oil', },
75 76 auto_install = true,
77 - autotag = { enable = true },
78 + autotag = { enable = true, },
79 80 highlight = {
80 81 enable = true,
101 - indent = { enable = true },
102 + indent = { enable = true, },
103 104 playground = {
104 105 enable = true,
124 125 enable = true,
125 126 lookahead = true,
126 127 keymaps = {
127 - ['af'] = { query = '@call.outer', desc = 'outer function call' },
128 - ['if'] = { query = '@call.inner', desc = 'inner function call' },
128 + ['af'] = { query = '@call.outer', desc = 'outer function call', },
129 + ['if'] = { query = '@call.inner', desc = 'inner function call', },
130 - ['am'] = { query = '@function.outer', desc = 'outer function definition' },
131 - ['im'] = { query = '@function.inner', desc = 'inner function definition' },
131 + ['am'] = { query = '@function.outer', desc = 'outer function definition', },
132 + ['im'] = { query = '@function.inner', desc = 'inner function definition', },
133 - ['aa'] = { query = '@assignment.outer', desc = 'outer assignment' },
134 - ['ia'] = { query = '@assignment.inner', desc = 'inner assignment' },
134 + ['aa'] = { query = '@assignment.outer', desc = 'outer assignment', },
135 + ['ia'] = { query = '@assignment.inner', desc = 'inner assignment', },
136 137 -- l overwrites builtin. i have no good idea for better binding. use ia instead.
137 138 -- ['la'] = { query = '@assignment.lhs', desc = 'left hand side of assignment'},
138 139 -- ['ra'] = { query = '@assignment.rhs', desc = 'right hand side of assignment'},
140 - ['ac'] = { query = '@class.outer', desc = 'outer class' },
141 - ['ic'] = { query = '@class.inner', desc = 'inner class' },
141 + ['ac'] = { query = '@class.outer', desc = 'outer class', },
142 + ['ic'] = { query = '@class.inner', desc = 'inner class', },
143 - ['ao'] = { query = '@conditional.outer', desc = 'outer conditional' },
144 - ['io'] = { query = '@conditional.inner', desc = 'inner conditional' },
144 + ['ao'] = { query = '@conditional.outer', desc = 'outer conditional', },
145 + ['io'] = { query = '@conditional.inner', desc = 'inner conditional', },
146 - ['al'] = { query = '@loop.outer', desc = 'outer loop' },
147 - ['il'] = { query = '@loop.inner', desc = 'inner loop' },
147 + ['al'] = { query = '@loop.outer', desc = 'outer loop', },
148 + ['il'] = { query = '@loop.inner', desc = 'inner loop', },
149 150 -- this overwrites the built-in 'paragraph' object
150 - ['ap'] = { query = '@parameter.outer', desc = 'outer parameter' },
151 - ['ip'] = { query = '@parameter.inner', desc = 'inner parameter' },
151 + ['ap'] = { query = '@parameter.outer', desc = 'outer parameter', },
152 + ['ip'] = { query = '@parameter.inner', desc = 'inner parameter', },
153 - ['at'] = { query = '@comment.outer', desc = 'outer comment' },
154 + ['at'] = { query = '@comment.outer', desc = 'outer comment', },
155 - ['as'] = { query = '@scope', query_group = 'locals', desc = 'language scope' },
156 + ['as'] = { query = '@scope', query_group = 'locals', desc = 'language scope', },
157 158 selection_modes = {
158 159 ['@parameter.outer'] = 'v',
166 167 swap = {
167 168 enable = true,
168 169 swap_next = {
169 - ['<leader>spn'] = { query = '@parameter.inner', desc = 'Swap parameter with next' },
170 + ['<leader>spn'] = { query = '@parameter.inner', desc = 'Swap parameter with next', },
171 172 swap_previous = {
172 - ['<leader>spp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous' },
173 + ['<leader>spp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous', },
178 179 border = vim.g.border_style,
179 180 floating_preview_opts = {},
180 181 peek_definition_code = {
181 - ['<leader>lpf'] = { query = '@function.outer', desc = 'Peek definition of outer function.' },
182 - ['<leader>lpc'] = { query = '@class.outer', desc = 'Peek definition of outer class.' },
182 + ['<leader>lpf'] = { query = '@function.outer', desc = 'Peek definition of outer function.', },
183 + ['<leader>lpc'] = { query = '@class.outer', desc = 'Peek definition of outer class.', },
187 188 enable = true,
188 189 set_jumps = true,
189 190 goto_next = {
190 - [']f'] = { query = '@call.outer', desc = 'Goto next function call' },
191 - [']m'] = { query = '@fucntion.outer', desc = 'Goto next function definition' },
192 - [']c'] = { query = '@class.outer', desc = 'Goto next class' },
193 - [']o'] = { query = '@conditional.outer', desc = 'Goto next conditional' },
194 - [']p'] = { query = '@parameter.outer', desc = 'Goto next parameter' },
191 + [']f'] = { query = '@call.outer', desc = 'Goto next function call', },
192 + [']m'] = { query = '@fucntion.outer', desc = 'Goto next function definition', },
193 + [']c'] = { query = '@class.outer', desc = 'Goto next class', },
194 + [']o'] = { query = '@conditional.outer', desc = 'Goto next conditional', },
195 + [']p'] = { query = '@parameter.outer', desc = 'Goto next parameter', },
196 197 goto_previous = {
197 - ['[f'] = { query = '@call.outer', desc = 'Goto previous function call' },
198 - ['[m'] = { query = '@function.outer', desc = 'Goto previous function definition' },
199 - ['[c'] = { query = '@class.outer', desc = 'goto previous class' },
200 - ['[o'] = { query = '@conditional.outer', desc = 'Goto previous conditional' },
201 - ['[p'] = { query = '@parameter.outer', desc = 'Goto previous parameter' },
202 - }
198 + ['[f'] = { query = '@call.outer', desc = 'Goto previous function call', },
199 + ['[m'] = { query = '@function.outer', desc = 'Goto previous function definition', },
200 + ['[c'] = { query = '@class.outer', desc = 'goto previous class', },
201 + ['[o'] = { query = '@conditional.outer', desc = 'Goto previous conditional', },
202 + ['[p'] = { query = '@parameter.outer', desc = 'Goto previous parameter', },
203 + },
204 - }
205 + },
207 208 ---@diagnostic disable-next-line: inject-field
208 209 parsers.get_parser_configs().just = {
209 210 install_info = {
210 211 url = 'https://github.com/IndianBoy42/tree-sitter-just', -- local path or git repo
211 - files = { 'src/parser.c', 'src/scanner.cc' },
212 + files = { 'src/parser.c', 'src/scanner.cc', },
212 213 branch = 'main',
214 - maintainers = { '@IndianBoy42' },
215 + maintainers = { '@IndianBoy42', },

neovim/lua/bugabinga/plugins/treesj.lua

Modified
1 -local map = require'std.map'
1 +local map = require 'std.map'
3 3 return {
4 - 'Wansmer/treesj',
5 - keys = '<C-j>',
6 - dependencies = { 'nvim-treesitter/nvim-treesitter' },
7 - config = function()
8 - local treesj = require'treesj'
4 + 'Wansmer/treesj',
5 + keys = '<C-j>',
6 + dependencies = { 'nvim-treesitter/nvim-treesitter' },
7 + opts = {
8 + use_default_keymaps = false,
9 + },
10 + config = function ( _, opts )
11 + local treesj = require 'treesj'
12 + treesj.setup( opts )
10 - treesj.setup {
11 - use_default_keymaps = false,
12 - }
14 + map.normal {
15 + description = 'Toggle Tree Join/Split',
16 + category = 'editing',
17 + -- WARN: <C-j> produces the same keycode as <C-enter> on some terminals
18 + keys = '<C-j>',
19 + command = treesj.toggle,
20 + }
21 + end,
14 - map.normal {
15 - description = 'Toggle Tree Join/Split',
16 - category = 'editing',
17 - keys = '<C-j>',
18 - command = treesj.toggle,
19 - }
20 - end,
21 -}

neovim/lua/bugabinga/plugins/virt-column.lua

Modified
3 3 local ignored = require 'std.ignored'
5 5 return {
7 7 'lukas-reineke/virt-column.nvim',
8 - event = { 'BufReadPost', 'BufNew' },
8 + tag = 'v2.0.2',
9 + event = { 'BufReadPost', 'BufNew', },
9 10 opts = {
10 11 -- FIXME: I have visual redrawing bugs right now.
11 12 enabled = false,
12 - char = { '░', '▒', '▓' },
13 + char = { '░', '▒', '▓', },
13 14 exclude = {
14 15 filetypes = ignored.filetypes,
15 16 buftypes = ignored.buftypes,
16 - }
17 + },

neovim/lua/bugabinga/plugins/whichkey.lua

Modified
3 3 local ignored = require 'std.ignored'
4 4 local icon = require 'std.icon'
6 6 return {
7 7 'folke/which-key.nvim',
8 + tag = 'v1.6.0',
8 9 event = 'VeryLazy',
9 10 init = function ()
10 11 vim.o.timeout = true
24 25 border = vim.g.border_style,
25 26 winblend = vim.o.winblend,
27 - layout = { align = 'center' },
28 + layout = { align = 'center', },
28 29 disable = {
29 30 buftypes = ignored.buftypes,
30 - }
31 + },
32 33 config = function ( _, opts )
33 34 local wk = require 'which-key'
39 40 -- use category as prefix?
40 41 wk.register {
41 42 ['<leader>'] = {
42 - m = { name = 'mark', _ = 'which_key_ignore' },
43 - h = { name = 'hunk', _ = 'which_key_ignore' },
44 - l = { name = 'lsp', _ = 'which_key_ignore' },
45 - r = { name = 'refactor', _ = 'which_key_ignore' },
43 + m = { name = 'mark', _ = 'which_key_ignore', },
44 + h = { name = 'hunk', _ = 'which_key_ignore', },
45 + l = { name = 'lsp', _ = 'which_key_ignore', },
46 + r = { name = 'refactor', _ = 'which_key_ignore', },
46 47 s = {
47 48 name = 'swap',
48 49 _ = 'which_key_ignore',
50 - p = { name = 'parameter', _ = 'which_key_ignore' },
51 + p = { name = 'parameter', _ = 'which_key_ignore', },
53 54 t = {
54 55 name = 'toggle',
55 56 _ = 'which_key_ignore',
57 - o = { name = 'options', _ = 'which_key_ignore' },
58 - }
58 + o = { name = 'options', _ = 'which_key_ignore', },
59 + },
60 - z = { name = 'lazy', _ = 'which_key_ignore' },
61 - [' '] = { name = 'fun', _ = 'which_key_ignore' },
62 - }
61 + z = { name = 'lazy', _ = 'which_key_ignore', },
62 + [' '] = { name = 'fun', _ = 'which_key_ignore', },
63 + },
64 - end
65 + end,

neovim/lua/bugabinga/ui.lua

Modified
1 -local display = require 'std.display'
3 1 local NuiPopup = require 'nui.popup'
4 2 local NuiText = require 'nui.text'
5 3 local NuiLine = require 'nui.line'
30 28 show_tree = function ( tree )
31 29 local popup = get_nui_popup()
32 30 local bufnr = popup.bufnr
33 - local text, _ = display( tree )
31 + local text = vim.inspect( tree )
35 33 local line_number = 1
36 - for line in text:gmatch '[^\r\n]+' do
34 + local namespace = -1
35 + for line in text:gmatch '[^\r\n]+' do
37 36 local nui_line = NuiLine()
38 37 nui_line:append( NuiText( line, 'NormalFloat' ) )
39 - nui_line:render( bufnr, -1, line_number )
39 + nui_line:render( bufnr, namespace, line_number )
40 40 line_number = line_number + 1

neovim/lua/std/debug.lua

Modified
6 6 return vim.g.bugabinga_debug_mode
9 -local function print_debug( ... )
9 +local function print_debug( message, ... )
10 10 if is_debug_mode() then
11 - vim.print( ... )
11 + -- TODO: pipe messages into custom debug buffer and file
12 + vim.print( message, ... )
15 16 local function toggle_debug_mode()
16 17 vim.g.bugabinga_debug_mode = not vim.g.bugabinga_debug_mode
17 - vim.notify( 'Toggled debug mode to ' .. tostring(is_debug_mode()) )
18 + vim.notify( 'Toggled debug mode to ' .. tostring( is_debug_mode() ) )
20 -vim.api.nvim_create_user_command( 'Debug', toggle_debug_mode ,{})
21 +vim.api.nvim_create_user_command( 'Debug', toggle_debug_mode, {} )
22 23 return {
23 24 print = print_debug,

neovim/lua/std/display.lua

Deleted
deleted file mode 100644
1 -local icon = require'std.icon'
2 -local table = require'std.table'
4 -local function display(value)
5 - if value == nil then
6 - return 'nil', 'Special'
7 - end
9 - local value_type = type(value)
11 - if value_type == 'string' then
12 - return icon.quot_left .. ' ' .. value .. ' ' .. icon.quot_right, 'String'
13 - end
15 - if value_type == 'number' then
16 - return icon.hash .. ' ' .. tostring(value), 'Number'
17 - end
19 - if value_type == 'boolean' then
20 - local mark = value and icon.checkbox_mark or icon.checkbox_unmark
21 - return mark, 'Boolean'
22 - end
24 - if value_type == 'userdata' then
25 - local ud = icon.user .. icon.data
26 - return ud .. ' ' .. tostring(value), 'Identifier'
27 - end
29 - if value_type == 'thread' then
30 - local thread = icon.thread
31 - return thread .. ' ' .. tostring(value), 'Identifier'
32 - end
34 - if value_type == 'function' then
35 - local fn = icon['function']
36 - return fn .. ' ' .. tostring(value), 'Function'
37 - end
39 - if value_type == 'table' then
40 - return table.deep_concat(value, {render_value = display}), 'Identifier'
41 - end
42 -end
44 -return display

neovim/lua/std/icon.lua

Modified
6 6 arrow_right = '',
7 7 branch = '',
8 8 carriage_return = '␍',
9 - checkbox_mark = '',
9 + checkbox_mark = '',
10 10 checkbox_unmark = '',
11 11 command = '󰘳',
12 - close = '',
12 + close = '',
13 13 block = '█',
14 14 data = '',
15 15 diagnostic = '⊙',
26 26 global = '󱥔',
27 27 group = '',
28 28 hash = '',
29 - hint = '󰊪',
29 + hint = '',
30 30 info = '󰩖',
31 31 insert = '',
32 32 lazy = '󰄻',
41 41 normal = 'Ν',
42 42 pending = '',
43 43 precedes = '❮',
44 - quot_left = '󰝗',
45 - quot_right = '󰉾',
44 + quot_left = '"',
45 + quot_right = '"',
46 46 replace = '',
47 47 select = '󰒉',
48 48 space = '·',

neovim/lua/std/ignored.lua

Modified
21 21 local buftypes = {
22 - '',
23 22 'acwrite',
24 23 'help',
25 24 'neotree',

neovim/lua/std/map.lua

Modified
32 32 local bind = function ( self, map )
33 33 vim.validate {
34 - map = { map, 'table' },
35 - ['map.keys'] = { map.keys, { 'string', 'table' } },
36 - ['map.command'] = { map.command, { 'function', 'string' } },
34 + map = { map, 'table', },
35 + ['map.keys'] = { map.keys, { 'string', 'table', }, },
36 + ['map.command'] = { map.command, { 'function', 'string', }, },
39 39 local keys = map.keys
50 50 desc = map.description,
53 - if vim.tbl_isempty( self.mode ) then self.mode[1] = available_modes.normal_visual_select_operator_pending end
53 + if vim.tbl_isempty( self.modes ) then self.modes[1] = available_modes.normal_visual_select_operator_pending end
55 55 if type( keys ) == 'table' then
56 56 for _, key in ipairs( keys ) do
57 - vim.keymap.set( self.mode, key, command, options )
57 + vim.keymap.set( self.modes, key, command, options )
59 59 else
60 - vim.keymap.set( self.mode, keys, command, options )
60 + vim.keymap.set( self.modes, keys, command, options )
63 - self.mode = {}
63 + self.modes = {}
65 65 return function ()
66 - local delete_options = options.buffer and { buffer = options.buffer } or {}
66 + local delete_options = options.buffer and { buffer = options.buffer, } or {}
67 67 if type( keys ) == 'table' then
68 68 for _, key in ipairs( keys ) do
69 - vim.keymap.del( self.mode, key, delete_options )
69 + vim.keymap.del( self.modes, key, delete_options )
71 71 else
72 - vim.keymap.del( self.mode, keys, delete_options )
72 + vim.keymap.del( self.modes, keys, delete_options )
77 77 local add_mode = function ( self, key )
78 78 local new_mode = available_modes[key]
79 79 if new_mode == nil then error( 'unknown keymap mode requested: ' .. key ) end
80 - if not self.mode[new_mode] then
81 - table.insert( self.mode, new_mode )
80 + if not self.modes[new_mode] then
81 + table.insert( self.modes, new_mode )
83 83 return self
86 86 --- @overload fun(map:table): function
87 87 local map = setmetatable(
89 - mode = {},
89 + modes = {},
92 92 __index = add_mode,

neovim/lua/std/project.lua

Modified
9 9 local cache = {}
10 10 local hasher = vim.fn.sha256
11 11 local markers_to_string = function ( markers )
12 - return table.deep_concat( markers, {
13 - prefix = '',
14 - suffix = '',
15 - row_delimiter = '',
16 - key_value_delimiter = '',
17 - fill = '',
18 - newline = '',
19 - } )
12 + return vim.inspect( markers )
21 14 local create_hash = function ( path, markers )
22 15 local path_hash = hasher( path )
39 32 --- number of max loop iterations when searching for markers
40 33 local MAX_TRAVERSAL_COUNT = 100
35 +--- the weight of a project marker, when the likelyhood is low
36 +local MAYBE = 1
37 +--- the weight of a project marker, when the likelyhood is high
38 +local LIKELY = 2
39 +--- the weight of a project marker, when the likelyhood is 100%
40 +local DEFINITLY = 3
42 42 --- Determines the path to a root directory, starting from the given path.
43 43 -- Markers have a name and weight.
44 44 -- Each name is checked for existence in all directories up to the root.
56 56 -- local project = require'std.project'
57 57 -- local current_buffer = vim.api.nvim_buf_get_name(0)
58 58 -- local markers = {
59 --- { name = ".git", weight = 1 },
60 --- { name = "README", weight = 2 },
61 --- { naem = "Makefile", weight = 3 },
59 +-- { name = ".git", weight = MAYEB },
60 +-- { name = "README", weight = LIKELY },
61 +-- { naem = "Makefile", weight = DEFINITLY },
63 63 -- local root = project.find_root(current_buffer, markers, vim.uv.os_homedir())
64 64 -- print(root) -- /home/user/workspace/some_project
71 71 ---@return string? # Directory, that contains the `markers` and lies on the path from `path` to `stop`.
72 72 local function find_root( path, markers, stop )
73 73 validate {
74 - path = { path, 'string', true },
75 - markers = { markers, 'table' },
76 - stop = { stop, 'string', true },
74 + path = { path, 'string', true, },
75 + markers = { markers, 'table', },
76 + stop = { stop, 'string', true, },
79 79 path = path or dirname( vim.api.nvim_buf_get_name( 0 ) )
88 88 local cache_hit = cache_get( path, markers )
89 89 if cache_hit then
90 - -- vim.print("CACHE HIT", cache_hit)
90 + debug.print( 'CACHE HIT', cache_hit )
91 91 return cache_hit
135 135 local project_root = nil
136 136 local max_likelyhood = 0
137 137 -- the project root is most likely the directory with the highest marker count
138 - -- and lowest distance to current buffer.
138 + -- and highest distance to current buffer.
139 139 -- because if there are markers further away from the buffer than other markers,
140 140 -- then it is most likely a nested project structure (multi-module).
141 141 -- in those cases we are looking for the root project folder, instead the nearest
142 142 -- child project root folder.
143 143 for _, score in ipairs( directory_scores ) do
144 - local likelihood = score.marker_count + 1 / score.distance_to_buffer_file
144 + local likelihood = score.marker_count + score.distance_to_buffer_file
145 145 if likelihood > max_likelyhood then
146 146 max_likelyhood = likelihood
147 147 project_root = score.path
162 162 local function find_project_root( path, markers )
163 163 -- define some language-independent markers
164 164 local default_markers = {
165 - { name = '.git', weight = 1 },
166 - { name = '.gitignore', weight = 1 },
167 - { name = '.svn', weight = 1 },
168 - { name = 'justfile', weight = 1 },
169 - { name = 'Jenkinsfile', weight = 1 },
170 - { name = '.editorconfig', weight = 1 },
171 - { name = 'LICENSE', weight = 1 },
172 - { name = 'LICENSE.md', weight = 1 },
173 - { name = 'LICENSE.txt', weight = 1 },
174 - { name = 'COPYING', weight = 1 },
175 - { name = 'README', weight = 1 },
176 - { name = 'README.md', weight = 1 },
177 - { name = 'Makefile', weight = 1 },
178 - { name = 'flake.nix', weight = 1 },
179 - { name = 'flake.nix', weight = 1 },
165 + { name = '.git', weight = LIKELY, },
166 + { name = '.gitignore', weight = LIKELY, },
167 + { name = '.svn', weight = LIKELY, },
168 + { name = 'justfile', weight = LIKELY, },
169 + { name = 'Jenkinsfile', weight = MAYBE, },
170 + { name = '.editorconfig', weight = MAYBE, },
171 + { name = 'LICENSE', weight = MAYBE, },
172 + { name = 'LICENSE.md', weight = MAYBE, },
173 + { name = 'LICENSE.txt', weight = MAYBE, },
174 + { name = 'COPYING', weight = MAYBE, },
175 + { name = 'README', weight = MAYBE, },
176 + { name = 'README.md', weight = MAYBE, },
177 + { name = 'Makefile', weight = LIKELY, },
178 + { name = 'flake.nix', weight = MAYBE, },
179 + { name = 'flake.nix', weight = MAYBE, },
180 + { name = '.project_model', weight = DEFINITLY, },
182 183 markers = markers or {}
190 191 local function find_java_project_root( path )
191 192 local java_markers = {
192 - { name = '.idea', weight = 2 },
193 - { name = '.classpath', weight = 2 },
194 - { name = '.settings', weight = 2 },
195 - { name = '.project', weight = 2 },
196 - { name = 'target', weight = 2 },
197 - { name = 'pom.xml', weight = 2 },
198 - { name = 'mvnw', weight = 3 },
199 - { name = '.mvn', weight = 3 },
200 - { name = 'mvnw.cmd', weight = 3 },
201 - { name = 'build.gradle', weight = 2 },
202 - { name = 'gradle.properties', weight = 3 },
203 - { name = 'settings.gradle', weight = 3 },
204 - { name = 'gradlew', weight = 3 },
205 - { name = 'gradlew.bat', weight = 3 },
193 + { name = '.idea', weight = LIKELY, },
194 + { name = '.classpath', weight = LIKELY, },
195 + { name = '.settings', weight = LIKELY, },
196 + { name = '.project', weight = LIKELY, },
197 + { name = 'target', weight = LIKELY, },
198 + { name = 'pom.xml', weight = LIKELY, },
199 + { name = 'mvnw', weight = DEFINITLY, },
200 + { name = '.mvn', weight = DEFINITLY, },
201 + { name = 'mvnw.cmd', weight = DEFINITLY, },
202 + { name = 'build.gradle', weight = DEFINITLY, },
203 + { name = 'gradle.properties', weight = DEFINITLY, },
204 + { name = 'settings.gradle', weight = DEFINITLY, },
205 + { name = 'gradlew', weight = DEFINITLY, },
206 + { name = 'gradlew.bat', weight = DEFINITLY, },
207 208 return find_root( path, java_markers )
210 211 local lua_markers = {
211 - { name = '.luarc.json', weight = 1 },
212 - { name = '.luarc.jsonc', weight = 1 },
213 - { name = '.luacheckrc', weight = 1 },
214 - { name = '.stylua.toml', weight = 1 },
215 - { name = 'stylua.toml', weight = 1 },
216 - { name = 'selene.toml', weight = 1 },
217 - { name = 'selene.yml', weight = 1 },
218 - { name = 'neovim.yml', weight = 1 },
219 - { name = 'lua', weight = 1 },
212 + { name = '.luarc.json', weight = MAYBE, },
213 + { name = '.luarc.jsonc', weight = MAYBE, },
214 + { name = '.luacheckrc', weight = MAYBE, },
215 + { name = '.stylua.toml', weight = MAYBE, },
216 + { name = 'stylua.toml', weight = MAYBE, },
217 + { name = 'selene.toml', weight = MAYBE, },
218 + { name = 'selene.yml', weight = MAYBE, },
219 + { name = 'neovim.yml', weight = MAYBE, },
220 + { name = 'lua', weight = MAYBE, },
222 223 local find_lua_project_root = function ( path )
226 227 local zig_markers = {
227 - { name = 'build.zig', weight = 3 },
228 - { name = 'zls.build.json', weight = 3 },
229 - { name = 'zig-cache', weight = 1 },
230 - { name = 'zig-out', weight = 1 },
228 + { name = 'build.zig', weight = DEFINITLY, },
229 + { name = 'zls.build.json', weight = DEFINITLY, },
230 + { name = 'zig-cache', weight = MAYBE, },
231 + { name = 'zig-out', weight = MAYBE, },
233 234 local find_zig_project_root = function ( path )
237 238 local find_rust_project_root = function ( path )
238 239 local markers = {
239 - { name = 'Cargo.toml', weight = 3 },
240 + { name = 'Cargo.toml', weight = DEFINITLY, },
241 242 local cargo_crate_dir = find_root( path, markers )
242 243 if cargo_crate_dir == nil then return nil end
251 252 vim.fs.joinpath( cargo_crate_dir, 'Cargo.toml' ),
254 - local result = vim.system( cmd, { text = true } ):wait()
255 + local result = vim.system( cmd, { text = true, } ):wait()
255 256 local cargo_workspace_root
257 258 if result.code == 0 then
279 280 return rooter and rooter( path ) or fallback_rooter( path )
283 +--- @return table parsed configuration as could be found in the `.project_model` file in the root directory. Empty otherwise.
284 +local parse_project_configuration = function ()
285 +end
282 287 return {
283 288 find_root = find_root,
284 289 find_root_by_filetype = find_root_by_filetype,

neovim/lua/std/table/deep_concat.lua

Deleted
deleted file mode 100644
1 -return function( some_table, options)
2 - options = options or {}
4 - vim.validate{
5 - some_table = { some_table, 'table'},
6 - [ 'options.prefix' ] = {options.prefix, 'string', true},
7 - [ 'options.suffix' ] = {options.suffix, 'string', true},
8 - [ 'options.fill' ] = {options.fill, 'string', true},
9 - [ 'options.key_value_delimiter' ] = {options.key_value_delimiter, 'string', true},
10 - [ 'options.row_delimiter' ] = {options.row_delimiter, 'string', true},
11 - [ 'options.newline' ] = {options.newline, 'string', true},
12 - [ 'options.render_key' ] = {options.render_key, 'function', true},
13 - [ 'options.render_value' ] = {options.render_value, 'function', true},
14 - }
16 - local prefix = options.prefix or '⎨'
17 - local suffix = options.suffix or '⎬'
18 - local key_value_delimiter = options.key_value_delimiter or ' ≔ '
19 - local row_delimiter = options.row_delimiter or ','
20 - local fill = options.fill or ' '
21 - local newline = options.newline or '\n'
22 - local render_key = options.render_key or function(key) return type(key) == 'number' and ('['..key..']') or key end
23 - local render_value = options.render_value or function(value) return tostring(value):gsub('\n','') end
24 - local string_builder = {}
25 - local append = function(thing) table.insert(string_builder, thing) end
27 - local function deep_concat_table (tbl, level)
28 - level = level or 0
29 - if newline then append(fill:rep(level)) end
30 - append(prefix)
31 - append(newline)
32 - for key, value in pairs(tbl) do
33 - local next_level = level + 1
34 - if newline then append(fill:rep(next_level)) end
35 - append(render_key(key))
36 - append(key_value_delimiter)
37 - if type(value) == 'table' then
38 - if vim.tbl_isempty(value) then
39 - append(prefix)
40 - append(suffix)
41 - elseif vim.tbl_count(value) == 1 then
42 - append(prefix)
43 - append(fill)
44 - -- single iteration for loop to get key name
45 - for k,v in pairs(value) do
46 - append(render_key(k))
47 - append(key_value_delimiter)
48 - append(render_value(v))
49 - end
50 - append(fill)
51 - append(suffix)
52 - else
53 - append(newline)
54 - deep_concat_table(value, next_level)
55 - end
56 - else
57 - append(render_value(value))
58 - end
59 - append(row_delimiter)
60 - append(newline)
61 - end
62 - append(newline)
63 - if newline then append(fill:rep(level)) end
64 - append (suffix)
65 - end
66 - deep_concat_table(some_table)
67 - return table.concat(string_builder)
68 -end

neovim/lua/std/table/init.lua

Modified
1 1 --- Facade over various table functions in lua, neovim and some of my own.
2 2 return {
3 - deep_concat = require'std.table.deep_concat',
4 - deep_copy = require'std.table.deep_copy',
5 - join = require'std.table.join',
3 + deep_copy = require 'std.table.deep_copy',
4 + join = require 'std.table.join',
7 - add_reverse_lookup = vim.tbl_add_reverse_lookup,
8 - contains = vim.tbl_contains,
6 + add_reverse_lookup = vim.tbl_add_reverse_lookup,
7 + contains = vim.tbl_contains,
9 8 count = vim.tbl_count,
10 9 deep_extend = vim.tbl_deep_extend,
11 10 extend = vim.tbl_extend,

neovim/neovim/lua/bugabinga/plugins/lush.lua

Added
new file mode 100644
1 +return {
2 + {
3 + 'rktjmp/lush.nvim',
4 + -- tag = 'v2.0.1',
5 + -- we rely on injects.sym for better treesitter support
6 + branch = 'main',
7 + -- lazy = false,
8 + -- priority = 1000,
9 + config = function ()
10 + -- disabled to find theming issues with heirline
11 + -- vim.cmd.colorscheme 'nugu'
12 + end,
13 + },

neovim/spell/nerd.utf-8.add

Modified
19 19 insoft
20 20 KKG5
21 21 KKG6
22 +lspconfig
23 +neoconf
24 +lsp
25 +autopairs
26 +cterm/!

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

Modified

Previous version contains binary or non-UTF-8 data.

Current version contains binary or non-UTF-8 data.

nushell/env.nu

Modified
6 6 $env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }
7 7 $env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }
9 +if not (which nvim | is-empty) {
10 + $env.EDITOR = 'nvim'
11 + $env.GIT_EDITOR = 'nvim'
14 +if not (which neovide | is-empty) {
15 + $env.VISUAL = 'neovide'
9 18 if ($env | get -i TERM_PROGRAM) == WezTerm {
10 19 $env.TERM = "wezterm"
11 20 if not $env.WIN32 {