dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Reviews Compare Notes Search Review guide CI runs Merge branch 'trunk' of https://github.com/bugabinga/dotfiles into trunk
07febe59bcbca58dbfe32ead746c31fab74474fc
Oliver Jan Krylow <oliver@bugabinga.net > · 17 Mar 2024
unsigned
Browse files Compare with HEAD
Changed files (65) +2355 / −1028 text lines · all files grouped into 32 bars · 1 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately
Diff layout Auto Unified Split
.github/workflows/devskim.yml Added new file mode 100644+34 / −0 text lines
10 + branches : [ "trunk" ]12 + branches : [ "trunk" ]19 + runs-on : ubuntu-20.04 23 + security-events : write 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 34 + sarif_file : devskim-results.sarif .github/workflows/semgrep.yml Added new file mode 100644+49 / −0 text lines
15 + branches : [ "trunk" ]18 + branches : [ "trunk" ]29 + security-events : write 32 + runs-on : ubuntu-latest 35 + - uses : actions/checkout@v3 38 + - uses : returntocorp/semgrep-action@fcd5ab7459e8d91cb1777481980d1b18b4fc6735 40 + publishToken : ${{ secrets.SEMGREP_APP_TOKEN }} 41 + publishDeployment : ${{ secrets.SEMGREP_DEPLOYMENT_ID }} 45 + - name : Upload SARIF file 46 + uses : github/codeql-action/upload-sarif@v2 48 + sarif_file : semgrep.sarif +46 / −114 text lines
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 9 - 1. `git clone git@github.com:bugabinga/dotfiles`11 - 1. `java bootstripper.java`12 + : standard lib. can only depend on itself and neovim apis.15 + : config modules. in aggregation, defines all of the config. can depend on itself, std and plugins.18 + : third party plugins and their config glue integrating it into the config.24 + : file type specific config13 - > Pay attention to already existing symlinks!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 SSH22 - 1. Start ssh-agent service23 - 1. Enable `UTF-8` in regional settings27 - - minimal amount of dependencies28 - 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.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:47 - path to configuration file/directory relative to dotfiles root48 - absolute path of symlink on host51 - Each symlink path pair is to be delimited by a newline.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.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.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])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 Windows104 - > 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/topgrade115 - [bootstripper ]: https://github.com/bugabinga/dotfiles/blob/trunk/bootstripper.java116 - [chezmoi ]: https://github.com/twpayne/chezmoi117 - [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/about121 - [PowerShell Core ]: https://github.com/PowerShell/PowerShell122 - [PowerShell Windows ]: https://de.wikipedia.org/wiki/PowerShell123 - [OpenBSD ]: https://www.openbsd.org/124 - [cosmopolitan ]: https://github.com/jart/cosmopolitan42 + * write plugin to parse lsp settings locally and apply them43 + * 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-java45 + * 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/vimpreviewpandoc47 + * use gen.ai to generate docs48 + * learn marks and refactor mark.lua49 + * use ltex-ls for markdown, code comments and commit messages50 + * create a floating window that shows plugins, that have commands, as reminder52 + * add nu-check to nvim-lint53 + * create facade over vim.api.nvim_create_user_command54 + * create skeleton-plugin for default file content based on file type55 + * add support for Java multi line string in autopairs56 + * nvim spell for camel case wordsnew file mode 100644+48 / −0 text lines
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" 12 + $env.TERMCAP = ~./termcap/w/wezterm17 + $env.LS_COLORS = (try { vivid generate alabaster_dark | into string } catch {"" })23 + $env.ENV_CONVERSIONS = {25 + from_string: { |s| $s | split row (char esep) }26 + to_string: { |v| $v | str join (char esep) }29 + from_string: { |s| $s | split row (char esep) }30 + to_string: { |v| $v | str join (char esep) }36 + ($nu.config-path | path dirname | path join 'modules' ),37 + ($nu.config-path | path dirname | path join 'completions' )43 + $env.Path = ( $env.Path | prepend '' )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+680 / −0 text lines
2 + local icon = require 'std.icon' 3 + local auto = require 'std.auto' 4 + local ignored = require 'std.ignored' 6 + local NEW_FILE = '~untitled~' 10 + 'rebelot/heirline.nvim' ,14 + 'nvim-tree/nvim-web-devicons' ,15 + 'lewis6991/gitsigns.nvim' ,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 ,32 + init = function ( self )33 + self.mode = vim.fn.mode( 1 ) 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' ,48 + vs = icon.visual .. 's' ,49 + V = icon.visual .. '_' ,50 + Vs = icon.visual .. 's' ,51 + ['\22' ] = '^' .. icon.visual,52 + ['\22s' ] = '^' .. icon.visual,54 + S = icon.select .. '_' ,55 + ['\19' ] = '^' .. icon.select,57 + ic = icon.insert .. 'c' ,58 + ix = icon.insert .. 'x' ,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' ,66 + cv = icon.command .. 'x' ,68 + rm = icon.pending .. 'm' ,69 + ['r?' ] = icon.pending .. '?' ,70 + ['!' ] = icon.exclaim,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' ,90 + provider = function ( self )91 + local mode_name = self.mode_names[self.mode]92 + return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) ' 95 + hl = function ( self )96 + local mode = self.mode:sub( 1 , 1 ) 97 + return { fg = self.mode_colors[mode], bold = true , }103 + callback = vim.schedule_wrap( function () vim.cmd.redrawstatus() end ),108 + init = function ( self )109 + local filename = self.filename110 + local extension = vim.fn.fnamemodify( filename, ':e' )111 + self.icon = require 'nvim-web-devicons' .get_icon_color( filename, extension, { default = true , } )113 + provider = function ( self )114 + return self.icon and (self.icon .. ' ' )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 128 + provider = function ( self )129 + return self.lfilename133 + provider = function ( self )134 + return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) )139 + local file_flags = {141 + condition = function ()142 + return vim.bo.modified144 + provider = string .format ( ' %s ' , icon.modified ),148 + condition = function ()149 + return not vim.bo.modifiable or vim.bo.readonly151 + provider = string .format ( ' %s ' , icon.lock ),156 + local file_name_block = {157 + init = function ( self )158 + self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )162 + { provider = ' ' , },165 + { provider = '%<' , }, 169 + provider = function ()170 + return icon.file .. ' ' .. string .upper ( vim.bo.filetype )174 + local file_encoding = {175 + provider = function ()176 + local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc 177 + return enc ~= 'utf-8' and enc:upper()181 + local file_format = {183 + dos = icon.newline .. icon.carriage_return,184 + unix = icon.newline,185 + mac = icon.carriage_return,187 + provider = function ( self )188 + local fileformat = vim.bo.fileformat189 + return self[fileformat]194 + provider = function ()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 fsize200 + if fsize < 1024 then 201 + return fsize .. suffix[1 ]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 ] )208 + local file_last_modified = {209 + provider = function ()210 + local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )212 + local timeago = require 'std.timeago' 213 + return timeago.format( ftime )218 + local lsp_active = {219 + condition = conditions.lsp_attached,222 + update = { 'LspAttach' , 'LspDetach' , 'BufEnter' , 'BufLeave' , },224 + provider = function ()226 + for _, client in pairs ( vim.lsp.get_clients { bufnr = 0 , } ) do 227 + table .insert ( names, client.name )229 + return icon.lsp .. ' ' .. table .concat ( names, ' ' )233 + local diagnostic_enabled = {234 + init = function ( self )235 + self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on237 + provider = function ( self )238 + return icon.diagnostic .. ' ' .. self.icon242 + local diagnostic = {243 + condition = conditions.has_diagnostics,246 + error_icon = icon.error,247 + warn_icon = icon.warn,248 + info_icon = icon.info,249 + hint_icon = icon.hint,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, } )259 + update = { 'DiagnosticChanged' , 'BufEnter' , },262 + provider = function ( self )264 + return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ' )266 + hl = 'DiagnosticError' ,269 + provider = function ( self )270 + return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ' )272 + hl = 'DiagnosticWarn' ,275 + provider = function ( self )276 + return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ' )278 + hl = 'DiagnosticInfo' ,281 + provider = function ( self )282 + return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints)284 + hl = 'DiagnosticHint' ,288 + local is_svn_repo = function ()289 + local svn_dir = vim.fs.find( '.svn' , {291 + stop = vim.uv.os_homedir(),292 + path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ),296 + return not vim.tbl_isempty( svn_dir )299 + local svn_get_relative_url = function ()301 + local job = require 'plenary.job' 302 + local relative_url = { '[ERR]' , }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 312 + return relative_url[1 ]316 + condition = is_svn_repo,318 + update = 'BufEnter' ,320 + init = function ( self )321 + self.relative_url = svn_get_relative_url()325 + provider = function ( self )326 + return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url333 + condition = conditions.is_git_repo,335 + init = function ( self )336 + self.status_dict = vim.b.gitsigns_status_dict340 + provider = function ( self )341 + return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.head .. ' ' 345 + provider = function ( self )346 + local count = self.status_dict.added or 0 347 + return count > 0 and (icon.diff_add .. ' ' .. count .. ' ' )352 + provider = function ( self )353 + local count = self.status_dict.removed or 0 354 + return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ' )359 + provider = function ( self )360 + local count = self.status_dict.changed or 0 361 + return count > 0 and (icon.diff_change .. ' ' .. count .. ' ' )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() ), '~' )376 + provider = function ( self )377 + return self.icon .. self.cwd381 + provider = function ( self )382 + local cwd = vim.fn.pathshorten( self.cwd )383 + return self.icon .. cwd391 + local help_file_name = {392 + condition = function ()393 + return vim.bo.filetype == 'help' 395 + provider = function ()396 + local filename = vim.api.nvim_buf_get_name( 0 )397 + return vim.fn.fnamemodify( filename, ':t' )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' )412 + provider = function ()413 + local togglers = require 'bugabinga.options.togglers' 414 + return tostring ( togglers )418 + local macro_recording = {419 + condition = function ()420 + return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0 422 + provider = icon.macro .. ' ' ,424 + utils.surround( { '░▒▓ ' , ' ▓▒░' , }, nil , {425 + provider = function ()426 + return vim.fn.reg_recording()437 + condition = function ()438 + local ok, lazy_status = pcall ( require , 'lazy.status' )439 + return ok and lazy_status.has_updates()441 + update = { 'User' , pattern = 'LazyUpdate' , },442 + provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status' .updates() .. ' ' end ,444 + callback = function () require 'lazy' .update() end ,445 + name = 'update_plugins' ,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,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,474 + local terminal_statusline = {476 + condition = function ()477 + return conditions.buffer_matches { buftype = { 'terminal' , }, }480 + { condition = conditions.is_active, vi_mode, space, },487 + local inactive_statusline = {488 + condition = conditions.is_not_active,495 + local statuslines = {497 + if conditions.is_active() then 500 + return 'StatusLineNC' 504 + fallthrough = false ,507 + terminal_statusline,508 + inactive_statusline,514 + if conditions.is_active() then 521 + fallthrough = false ,524 + condition = function ()525 + return conditions.buffer_matches { buftype = { 'terminal' , }, }536 + local tabline_buffer_number = {537 + provider = function ( self )538 + return '(' .. tostring ( self.bufnr ) .. ')' 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, }546 + return { fg = utils.get_highlight 'TabLine' .fg, }551 + local tabline_file_name = {552 + provider = function ( self )553 + local name = self.file_name554 + return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )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 .. ' ' ,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, } )569 + provider = function ( self )570 + if vim.api.nvim_get_option_value( 'buftype' , { buf = self.bufnr, } ) == 'terminal' then 571 + return icon.terminal580 + local tabline_file_name_block = {581 + init = function ( self )582 + self.file_name = vim.api.nvim_buf_get_name( self.bufnr )585 + hl = function ( self )586 + if self.is_active then 588 + elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then 589 + return { fg = utils.get_highlight 'StatusLineNc' .fg, }596 + callback = function ( _, minwid, _, button )597 + if button == 'm' then 598 + vim.schedule( function ()599 + vim.api.nvim_buf_delete( minwid, { force = false , } )600 + vim.cmd.redrawtabline()603 + vim.api.nvim_win_set_buf( 0 , minwid )606 + minwid = function ( self ) return self.bufnr end ,607 + name = 'heirline_tabline_buffer_callback' ,611 + { provider = ' ' , },613 + tabline_buffer_number,617 + local tabline_buffer_block = utils.surround(619 + ' ' .. icon.slant_left,620 + icon.slant_right .. ' ' ,623 + if self.is_active then 624 + return utils.get_highlight 'TabLine' .bg626 + return utils.get_highlight 'TabLineFill' .bg629 + { 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' , }639 + provider = function ( self )640 + return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T' 642 + hl = function ( self )643 + if self.is_active then 652 + { provider = '%=' , },653 + utils.make_tablist( tabpage ),656 + local tabline = { buffer_line, tab_pages, }661 + statusline = statuslines,668 + disable_winbar_cb = function ( args )669 + return conditions.buffer_matches(671 + buftype = ignored.buftypes,672 + filetype = ignored.filetypes,neovim/.editorconfig Modified +4 / −4 text lines
17 17 max_line_length = 120 max_line_length = 120 21 21 end_of_line = lf end_of_line = lf 24 24 table_separator_style = comma table_separator_style = comma 27 - trailing_table_separator = keep 27 + trailing_table_separator = always 30 30 call_arg_parentheses = remove call_arg_parentheses = remove +9 / −3 text lines
41 + * replace nugu with nugu_fresh42 + * write plugin to parse lsp settings locally and apply them43 + * 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-java45 + * 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* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc42 47 * use gen.ai to generate docs* use gen.ai to generate docs43 48 * learn marks and refactor mark.lua* learn marks and refactor mark.lua44 49 * use ltex-ls for markdown, code comments and commit messages* use ltex-ls for markdown, code comments and commit messages
50 + * create a floating window that shows plugins, that have commands, as reminder45 51 * setup DAP* setup DAP46 52 * add nu-check to nvim-lint* add nu-check to nvim-lint47 53 * create facade over vim.api.nvim_create_user_command* create facade over vim.api.nvim_create_user_command48 - * create skelleton -plugin for default file content based on file type49 - * add support for Java mutliline string in autopairs50 - * nvim spell for camelcase words54 + * create skeleton -plugin for default file content based on file type55 + * add support for Java multi line string in autopairs56 + * nvim spell for camel case wordsneovim/colors/nugu_fresh.lua Added new file mode 100644+580 / −0 text lines
4 + if vim.g.colors_name ~= nil then vim.cmd [[ highlight clear ]] end 7 + vim.g.colors_name = 'nugu_fresh' 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 )36 + if vim.opt.background:get() == 'dark' then 39 + return variants.light43 + 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 67 + vim.g.terminal_color_1 = content_accent 68 + vim.g.terminal_color_2 = info 69 + vim.g.terminal_color_3 = ui_focus 70 + vim.g.terminal_color_4 = content_important_local 71 + vim.g.terminal_color_5 = content_important_global 72 + vim.g.terminal_color_6 = ui_focus 73 + vim.g.terminal_color_7 = content_normal 75 + vim.g.terminal_color_8 = ui_minor 76 + vim.g.terminal_color_9 = error 77 + vim.g.terminal_color_10 = info 78 + vim.g.terminal_color_11 = content_focus 79 + vim.g.terminal_color_12 = ui_important_local 80 + vim.g.terminal_color_13 = ui_accent 81 + vim.g.terminal_color_14 = ui_important_global 82 + vim.g.terminal_color_15 = ui_normal 84 + local set_group_properties = function ( self, properties )86 + properties = { properties, 'table' , },88 + ['properties.fg' ] = { properties.fg, 'string' , true , },90 + ['properties.bg' ] = { properties.bg, 'string' , true , },92 + ['properties.sp' ] = { properties.sp, 'string' , true , },94 + ['properties.blend' ] = { properties.blend, 'number' , true , },96 + ['properties.bold' ] = { properties.bold, 'boolean' , true , },98 + ['properties.standout' ] = { properties.standout, 'boolean' , true , },100 + ['properties.underline' ] = { properties.underline, 'boolean' , true , },102 + ['properties.undercurl' ] = { properties.undercurl, 'boolean' , true , },104 + ['properties.underdotted' ] = { properties.underdotted, 'boolean' , true , },106 + ['properties.underdashed' ] = { properties.underdashed, 'boolean' , true , },108 + ['properties.strikethrough' ] = { properties.strikethrough, 'boolean' , true , },110 + ['properties.italic' ] = { properties.italic, 'boolean' , true , },112 + ['properties.reverse' ] = { properties.reverse, 'boolean' , true , },114 + ['properties.nocombine' ] = { properties.nocombine, 'boolean' , true , },116 + ['properties.default' ] = { properties.default, 'boolean' , true , },118 + ['properties.ctermfg' ] = { properties.ctermfg, 'string' , true , },120 + ['properties.ctermbg' ] = { properties.ctermbg, 'string' , true , },122 + ['properties.cterm' ] = { properties.cterm, 'table' , true , },124 + ['properties.force' ] = { properties.force, 'boolean' , true , },127 + for key, value in pairs ( properties ) do 132 + local new_group = function ()133 + return setmetatable ( {}, {134 + __call = set_group_properties,138 + local add_group = function ( self, key )139 + if not self.groups[key] then 140 + self.groups[key] = new_group()142 + return self.groups[key]145 + local link_group = function ( 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 157 + local _ = setmetatable ( { groups = {}, }, {158 + __index = add_group,159 + __newindex = link_group,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, }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 = _.Normal186 + _.ErrorMsg { fg = error , }187 + _.VertSplit { fg = ui_important_global, bg = _.LineNr.bg, }189 + _.FoldColumn = _.LineNr190 + _.SignColumn = _.LineNr191 + _.ModeMsg { bold = true , }193 + _.MsgSeparator = _.Debug195 + _.NonText { fg = content_unfocus, }196 + _.Whitespace = _.NonText197 + _.NormalNC = _.Normal198 + _.Pmenu = _.NormalFloat199 + _.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 = _.PmenuSel204 + _.SpecialKey { fg = error , bg = content_unfocus, bold = true , }205 + _.SpellBad { fg = error , undercurl = true , }206 + _.SpellCap = _.SpellBad207 + _.SpellLocal = _.SpellBad208 + _.SpellRare = _.SpellBad209 + _.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 = _.StatusLine215 + _.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 , }222 + _.String { fg = content_important_local, italic = true , }223 + _.Constant = _.String224 + _.Character = _.String229 + _.Identifier = _.Normal230 + _.MutableVariable = _.Debug231 + _.Function = _.Normal233 + _.Statement { fg = content_minor, }234 + _.Conditional = _.Statement235 + _.Repeat = _.Statement236 + _.Label = _.Statement237 + _.Operator = _.Statement238 + _.Keyword = _.Statement239 + _.Exception = _.Statement241 + _.PreProc { fg = content_important_global, bg = content_unfocus, bold = true , }242 + _.Include = _.PreProc245 + _.PreCondit = _.PreProc248 + _.StorageClass = _.Statement249 + _.Structure = _.Statement250 + _.Typedef = _.Statement252 + _.Special { fg = content_normal, italic = true , bold = true , }253 + _.SpecialChar = _.Special255 + _.Delimiter { fg = content_minor, }256 + _.SpecialComment = _.Special258 + _.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 = _.DiagnosticError275 + _.DiagnosticVirtualTextWarn = _.DiagnosticWarn276 + _.DiagnosticVirtualTextInfo = _.DiagnosticInfo277 + _.DiagnosticVirtualTextHint = _.DiagnosticHint278 + _.DiagnosticVirtualOkHint = _.DiagnosticOk279 + _.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 = _.DiagnosticError285 + _.DiagnosticSignWarn = _.DiagnosticWarn286 + _.DiagnosticSignInfo = _.DiagnosticInfo287 + _.DiagnosticSignHint = _.DiagnosticHint288 + _.DiagnosticSignOk = _.DiagnosticOk290 + _.LspReferenceText { sp = content_unfocus, underline = true , }291 + _.LspReferenceRead = _.LspReferenceText292 + _.LspReferenceWrite = _.LspReferenceText293 + _.LspInlayHint { fg = content_minor, bg = _.Normal.bg, }295 + _['@text.literal' ] = _.Comment296 + _['@text.reference' ] = _.Identifier297 + _['@text.title' ] = _.Title298 + _['@text.underline' ] = _.Underlined299 + _['@text.todo' ] = _.Todo300 + _['@comment' ] = _.Comment301 + _['@punctuation' ] = _.Delimiter302 + _['@constant' ] = _.Constant303 + _['@constant.builtin' ] = _.Special304 + _['@constant.macro' ] = _.Define305 + _['@define' ] = _.Define306 + _['@macro' ] = _.Macro307 + _['@string' ] = _.String308 + _['@string.escape' ] = _.SpecialChar309 + _['@string.special' ] = _.SpecialChar310 + _['@character' ] = _.Character311 + _['@character.special' ] = _.SpecialChar312 + _['@number' ] = _.Number313 + _['@boolean' ] = _.Boolean314 + _['@float' ] = _.Float315 + _['@function' ] = _.Function316 + _['@function.builtin' ] = _.Special317 + _['@function.macro' ] = _.Macro318 + _['@parameter' ] = _.Identifier319 + _['@method' ] = _.Function320 + _['@field' ] = _.Identifier321 + _['@property' ] = _.Identifier322 + _['@constructor' ] = _.Special323 + _['@conditional' ] = _.Conditional324 + _['@repeat' ] = _.Repeat325 + _['@label' ] = _.Label326 + _['@operator' ] = _.Operator327 + _['@keyword' ] = _.Keyword328 + _['@keyword.return' ] { fg = _.Keyword.fg, bg = _.Keyword.bg, underline = true , bold = true , }329 + _['@exception' ] = _.Exception330 + _['@variable' ] = _.Identifier332 + _['@type.definition' ] = _.Typedef333 + _['@storageclass' ] = _.StorageClass334 + _['@structure' ] = _.Structure335 + _['@namespace' ] = _.Identifier336 + _['@include' ] = _.Include337 + _['@preproc' ] = _.PreProc338 + _['@debug' ] = _.Debug341 + _['@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 = _.NormalFloat357 + _.LazyButton { sp = _.NormalFloat.fg, bold = true , }358 + _.LazyButtonActive { fg = ui_focus, sp = _.NormalFloat.fg, bg = ui_important_local, bold = true , }359 + _.LazyComment = _.Keyword360 + _.LazyCommit = _.LazyComment361 + _.LazyCommitIssue = _.LazyComment362 + _.LazyCommitScope = _.LazyComment363 + _.LazyCommitScope { italic = true , }364 + _.LazyCommitType = _.LazyCommitScope365 + _.LazyDimmed { fg = _.NormalFloat.fg, }366 + _.LazyDir { fg = _.NormalFloat.fg, }370 + _.LazyNoCond = _.WarningMsg371 + _.LazyNormal = _.NormalFloat372 + _.LazyProgressDone { fg = _.Search.bg, bg = _.Cursor.bg, bold = true , }373 + _.LazyProgressTodo { fg = _.LazyProgressDone.bg, bg = _.LazyProgressDone.fg, bold = true , }374 + _.LazyProp = _.LazyComment375 + _.LazyReasonCmd = _.NormalFloat376 + _.LazyReasonEvent = _.NormalFloat377 + _.LazyReasonFt = _.NormalFloat378 + _.LazyReasonImport = _.NormalFloat379 + _.LazyReasonKeys = _.NormalFloat380 + _.LazyReasonPlugin = _.NormalFloat381 + _.LazyReasonRuntime = _.NormalFloat382 + _.LazyReasonSource = _.NormalFloat383 + _.LazyReasonStart = _.NormalFloat384 + _.LazySpecial { fg = _.ColorColumn.fg, }385 + _.LazyTaskError = _.ErrorMsg386 + _.LazyTaskOutput = _.Debug387 + _.LazyUrl { sp = _.NormalFloat.fg, italic = true , underline = true , }388 + _.LazyValue { italic = true , }502 + _.TelescopeSelectionCaret = _.PmenuSel503 + _.TelescopeSelection = _.PmenuSel504 + _.TelescopeMultiSelection { fg = content_normal, bg = ui_important_local, }507 + _.FlashMatch = _.IncSearch508 + _.FlashCurrent = _.CurSearch509 + _.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 = _.GitSignsChange516 + _.GitSignsTopdelete = _.GitSignsDelete517 + _.GitSignsUntracked = _.GitSignsAdd519 + _.GitSignsAddNr = _.GitSignsAdd520 + _.GitSignsChangeNr = _.GitSignsChange521 + _.GitSignsDeleteNr = _.GitSignsDelete523 + _.GitSignsChangedeleteNr = _.GitSignsChange524 + _.GitSignsTopdeleteNr = _.GitSignsDelete525 + _.GitSignsUntrackedNr = _.GitSignsAdd527 + _.GitSignsAddLn = _.GitSignsAdd528 + _.GitSignsChangeLn = _.GitSignsChange529 + _.GitSignsChangedeleteLn = _.GitSignsChange530 + _.GitSignsUntrackedLn = _.GitSignsAdd532 + _.GitSignsAddPreview = _.GitSignsAdd533 + _.GitSignsDeletePreview = _.GitSignsDelete535 + _.GitSignsCurrentLineBlame = _.NonText536 + _.GitSignsAddInline = _.GitSignsAdd537 + _.GitSignsDeleteInline = _.GitSignsDelete538 + _.GitSignsChangeInline = _.GitSignsChange540 + _.GitSignsAddLnInline = _.DiffText541 + _.GitSignsDeleteLnInline = _.DiffText542 + _.GitSignsChangeLnInline = _.DiffText544 + _.GitSignsDeleteVirtLn = _.GitSignsDelete545 + _.GitSignsDeleteVirtLnInLine = _.DiffText546 + _.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 = _.NormalFloat553 + _.WhichKeyBorder = _.FloatBorder554 + _.WhichKeyValue = _.Comment556 + _.IblIndent = _.Whitespace557 + _.IblWhitespace = _.Whitespace558 + _.IblScope { fg = ui_focus, bg = _.Normal.bg, }560 + _.Hlargs { fg = content_important_local, }562 + _.MiniStarterCurrent { fg = ui_normal, bg = ui_accent, }563 + _.MiniStarterFooter = _.Keyword564 + _.MiniStarterHeader = _.Comment565 + _.MiniStarterInactive { fg = content_unfocus, }566 + _.MiniStarterItem = _.Normal567 + _.MiniStarterItemBullet = _.Whitespace568 + _.MiniStarterItemPrefix { fg = content_focus, }569 + _.MiniStarterSection { fg = content_important_global, underline = true , }570 + _.MiniStarterQuery { fg = content_normal, bg = content_accent, }574 + for name, group in pairs ( _.groups ) do 577 + vim.api.nvim_set_hl( namespace, name, group )+3 / −3 text lines
14 + vim.cmd.colorscheme 'nugu_fresh' 15 16 local ok, loadedlocal ok, loaded38 39 ok, loaded = pcall ( require , 'bugabinga.lsp' )ok, loaded = pcall ( require , 'bugabinga.lsp' )39 40 if not ok then vim.print( 'error while loading lsp' , loaded ) end if not ok then vim.print( 'error while loading lsp' , loaded ) end neovim/lazy-lock.json Modified +23 / −32 text lines
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" }, "actions-preview.nvim" : { "branch" : "master" , "commit" : "5072b1b1065a6b22bdd46b5c21780a91d6a08071" },5 4 "auto-dark-mode.nvim" : { "branch" : "master" , "commit" : "e328dc463d238cb7d690fb4daf068eba732a5a14" }, "auto-dark-mode.nvim" : { "branch" : "master" , "commit" : "e328dc463d238cb7d690fb4daf068eba732a5a14" },6 5 "better-escape.nvim" : { "branch" : "master" , "commit" : "7e86edafb8c7e73699e0320f225464a298b96d12" }, "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" }, "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" }, "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" }, "glow.nvim" : { "branch" : "main" , "commit" : "238070a686c1da3bccccf1079700eb4b5e19aea4" },22 13 "heirline.nvim" : { "branch" : "master" , "commit" : "03cff30d7e7d3ba6fdc00925f015822f79cef908" }, "heirline.nvim" : { "branch" : "master" , "commit" : "03cff30d7e7d3ba6fdc00925f015822f79cef908" },23 14 "hlargs.nvim" : { "branch" : "main" , "commit" : "0f2dbf02ff948e8fc8ebe07b215f3174a12bbe3c" }, "hlargs.nvim" : { "branch" : "main" , "commit" : "0f2dbf02ff948e8fc8ebe07b215f3174a12bbe3c" },
15 + "hyper.nvim" : { "branch" : "main" , "commit" : "b84fb39e703b1dd487d20c4faf028ee51374c88b" },24 16 "indent-blankline.nvim" : { "branch" : "master" , "commit" : "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, "indent-blankline.nvim" : { "branch" : "master" , "commit" : "821a7acd88587d966f7e464b0b3031dfe7f5680c" },25 17 "lazy.nvim" : { "branch" : "main" , "commit" : "83493db50a434a4c5c648faf41e2ead80f96e478" }, "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" }, "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" }, "mini.align" : { "branch" : "main" , "commit" : "f845218c5fea89e49074e48270dc5e1b9511a0f9" },31 22 "mini.bracketed" : { "branch" : "main" , "commit" : "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" }, "mini.bracketed" : { "branch" : "main" , "commit" : "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" },32 23 "mini.colors" : { "branch" : "main" , "commit" : "f64963332f7fcb45c8dfcc243f682a9a0fb9935d" }, "mini.colors" : { "branch" : "main" , "commit" : "f64963332f7fcb45c8dfcc243f682a9a0fb9935d" },33 24 "mini.starter" : { "branch" : "main" , "commit" : "ce222a5b6de50a9963c1eb62aa16ec6d5efca7ee" }, "mini.starter" : { "branch" : "main" , "commit" : "ce222a5b6de50a9963c1eb62aa16ec6d5efca7ee" },34 25 "mkdir.nvim" : { "branch" : "main" , "commit" : "c55d1dee4f099528a1853b28bb28caa802eba217" }, "mkdir.nvim" : { "branch" : "main" , "commit" : "c55d1dee4f099528a1853b28bb28caa802eba217" },35 - "neodev.nvim" : { "branch" : "main" , "commit" : "84e0290f5600e8b89c0dfcafc864f45496a53400" },
36 26 "neogen" : { "branch" : "main" , "commit" : "b95347a588401a755eadd17482edc1662876bd58" }, "neogen" : { "branch" : "main" , "commit" : "b95347a588401a755eadd17482edc1662876bd58" },37 27 "nrpattern.nvim" : { "branch" : "master" , "commit" : "f862ce687761078ef3155688151c55f69d28453e" }, "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" }, "nvim-autopairs" : { "branch" : "master" , "commit" : "c6139ca0d5ad7af129ea6c89cb4c56093f2c034a" },40 - "nvim-cmp" : { "branch" : "main" , "commit" : "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
41 30 "nvim-colorizer.lua" : { "branch" : "master" , "commit" : "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-colorizer.lua" : { "branch" : "master" , "commit" : "85855b38011114929f4058efc97af1059ab3e41d" },42 31 "nvim-genghis" : { "branch" : "main" , "commit" : "8613fc1b43db6cc761733b3630eabff9e86296f7" }, "nvim-genghis" : { "branch" : "main" , "commit" : "8613fc1b43db6cc761733b3630eabff9e86296f7" },43 32 "nvim-gomove" : { "branch" : "main" , "commit" : "2b44ae7ac0804f4e3959228122f7c85bef1964e3" }, "nvim-gomove" : { "branch" : "main" , "commit" : "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },44 33 "nvim-jdtls" : { "branch" : "master" , "commit" : "a4746791876166dc146eae573a1b49d24a6652e7" }, "nvim-jdtls" : { "branch" : "master" , "commit" : "a4746791876166dc146eae573a1b49d24a6652e7" },45 34 "nvim-lastplace" : { "branch" : "main" , "commit" : "0bb6103c506315044872e0f84b1f736c4172bb20" }, "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" }, "nvim-neoclip.lua" : { "branch" : "main" , "commit" : "798cd0592a81c185465db3a091a0ff8a21af60fd" },47 39 "nvim-spectre" : { "branch" : "master" , "commit" : "e7db8ebca7fd0a604027ebf85acee52f6642c91c" }, "nvim-spectre" : { "branch" : "master" , "commit" : "e7db8ebca7fd0a604027ebf85acee52f6642c91c" },48 40 "nvim-surround" : { "branch" : "main" , "commit" : "84a26afce16cffa7e3322cfa80a42cddf60616eb" }, "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" }, "nvim-ts-autotag" : { "branch" : "main" , "commit" : "531f48334c422222aebc888fd36e7d109cb354cd" },53 45 "nvim-ts-context-commentstring" : { "branch" : "main" , "commit" : "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "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" }, "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" }, "playground" : { "branch" : "master" , "commit" : "ba48c6a62a280eefb7c85725b0915e021a1a0749" },59 51 "plenary.nvim" : { "branch" : "master" , "commit" : "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, "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" }, "speedtyper.nvim" : { "branch" : "main" , "commit" : "2d158eed4c753995b0501a3a7a72464fbb213e3d" },63 55 "ssr.nvim" : { "branch" : "main" , "commit" : "bb323ba621ac647b4ac5638b47666e3ef3c279e1" }, "ssr.nvim" : { "branch" : "main" , "commit" : "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },64 56 "substitute.nvim" : { "branch" : "main" , "commit" : "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" }, "substitute.nvim" : { "branch" : "main" , "commit" : "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },65 - "symbols-outline.nvim" : { "branch" : "master" , "commit" : "564ee65dfc9024bdde73a6621820866987cbb256" },
66 57 "telescope-symbols.nvim" : { "branch" : "master" , "commit" : "a6d0127a53d39b9fc2af75bd169d288166118aec" }, "telescope-symbols.nvim" : { "branch" : "master" , "commit" : "a6d0127a53d39b9fc2af75bd169d288166118aec" },67 58 "telescope-ui-select.nvim" : { "branch" : "master" , "commit" : "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope-ui-select.nvim" : { "branch" : "master" , "commit" : "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },68 59 "telescope-zoxide" : { "branch" : "main" , "commit" : "68966349aa1b8e9ade403e18479ecf79447389a7" }, "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" }, "toggleterm.nvim" : { "branch" : "main" , "commit" : "193786e0371e3286d3bc9aa0079da1cd41beaa62" },72 63 "tree-sitter-nu" : { "branch" : "main" , "commit" : "c5b7816043992b1cdc1462a889bc74dc08576fa6" }, "tree-sitter-nu" : { "branch" : "main" , "commit" : "c5b7816043992b1cdc1462a889bc74dc08576fa6" },73 64 "treesj" : { "branch" : "main" , "commit" : "60e27280030f9cd8dfb6ceb335922c6ff76682cc" }, "treesj" : { "branch" : "main" , "commit" : "60e27280030f9cd8dfb6ceb335922c6ff76682cc" },74 65 "twilight.nvim" : { "branch" : "main" , "commit" : "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" }, "twilight.nvim" : { "branch" : "main" , "commit" : "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },75 66 "virt-column.nvim" : { "branch" : "master" , "commit" : "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, "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" } "zen-mode.nvim" : { "branch" : "main" , "commit" : "78557d972b4bfbb7488e17b5703d25164ae64e6a" }78 69 }No final newline }No final newline neovim/lua/bugabinga/diagnostic.lua Modified +1 / −0 text lines
70 70 sign { name = 'DiagnosticSignHint' , text = diagnostic_icons.hint }sign { name = 'DiagnosticSignHint' , text = diagnostic_icons.hint }71 71 sign { name = 'DiagnosticSignInfo' , text = diagnostic_icons.info }sign { name = 'DiagnosticSignInfo' , text = diagnostic_icons.info }73 74 map.normal {map.normal {74 75 description = 'Toggle diagnostics' , description = 'Toggle diagnostics' ,75 76 category = 'diagnostic' , category = 'diagnostic' ,neovim/lua/bugabinga/lazy.lua Modified +30 / −30 text lines
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' 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 { vim.fn.system {13 - vim.opt.rtp:prepend(lazypath)13 + vim.opt.rtp:prepend( lazypath )17 - require ( 'lazy.view.colors' ) .did_setup = true 17 + require 'lazy.view.colors' .did_setup = true 19 19 local lazy = require 'lazy' 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 = { defaults = {24 24 lazy = true , lazy = true ,27 27 install = { install = {28 28 missing = true , missing = true ,29 - colorscheme = { 'nugu ' , 'quiet' },29 + colorscheme = { 'nugu_fresh ' , 'quiet' , },31 31 checker = { checker = {32 32 enabled = not win32, enabled = not win32,33 33 notify = false , notify = false ,36 - size = { width = 0.69 , heigth = 0.69 },36 + size = { width = 0.69 , heigth = 0.69 , },37 37 border = vim.g.border_style, border = vim.g.border_style,39 39 lazy = icon.lazy, lazy = icon.lazy,44 44 custom_keys = { 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, cwd = plugin.dir,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, cwd = plugin.dir,56 - change_detection = { notify = false },56 + change_detection = { notify = false , },57 57 performance = { performance = {59 59 disabled_plugins = { disabled_plugins = {85 85 fallback = true , fallback = true ,86 - patterns = { 'bugabinga' },87 - path = win32 and 'W:/' or '~/Workspace' 86 + patterns = { 'bugabinga' , },87 + path = win32 and 'W:/' or '~/Workspace' , 91 91 local map = require 'std.map' local map = require 'std.map' 93 93 local lazy_cmds = vim.iter {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' local base_key = '<leader>z' 108 - lazy_cmds:each(function (cmd)108 + lazy_cmds:each( function ( cmd )109 109 map.normal { map.normal {110 110 name = cmd[1 ] .. ' plugins' , name = cmd[1 ] .. ' plugins' ,111 111 category = 'plugins' , category = 'plugins' ,112 112 keys = base_key .. cmd[2 ], keys = base_key .. cmd[2 ],113 113 command = cmd[3 ], command = cmd[3 ],neovim/lua/bugabinga/lsp/clients/archlinux.lua Deleted deleted file mode 100644+0 / −10 text lines
1 - local project = require 'std.project' 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 ,
neovim/lua/bugabinga/lsp/clients/init.lua Modified +14 / −14 text lines
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 +10 / −15 text lines
1 1 local table = require 'std.table' local table = require 'std.table' 2 2 local project = require 'std.project' local project = require 'std.project' 3 3 local auto = require 'std.auto' 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 )local create_shared_config_path = function ( base_path, syntax_server )7 7 local os_config local os_config54 54 local create_jdtls_command = function ( syntax_server )local create_jdtls_command = function ( syntax_server )55 55 local mason_registry = require 'mason-registry' 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 ) local shared_config_path = create_shared_config_path( jdtls_package_path, syntax_server )58 58 local launcher_jar = find_launcher_jar( jdtls_package_path ) local launcher_jar = find_launcher_jar( jdtls_package_path )59 59 local data_dir = create_data_dir() local data_dir = create_data_dir()94 94 local jdk17 = { local jdk17 = {95 95 name = 'JavaSE-17' , name = 'JavaSE-17' ,100 97 local jdk21 = { local jdk21 = {101 98 name = 'JavaSE-21' , 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 elseif host == 'NB-00718' then 110 106 jdk11.path = 'C:/Users/okr/scoop/apps/openjdk11' jdk11.path = 'C:/Users/okr/scoop/apps/openjdk11' 111 107 jdk17.path = 'C:/Users/okr/scoop/apps/openjdk17' 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' jdk21.path = 'C:/Users/okr/scoop/apps/openjdk21' 115 110 vim.notify 'missing jdk paths in java settings for lsp' 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 = {local java_settings = {221 216 description = 'Extract Variable' , description = 'Extract Variable' ,222 217 category = 'jdlts' , category = 'jdlts' ,223 218 keys = '<leader>ljv' , keys = '<leader>ljv' ,224 - command = function () jdtls.extract_variable(true ) end ,219 + command = function () jdtls.extract_variable( true ) end ,227 222 map.visual { map.visual {228 223 description = 'Extract Constant' , description = 'Extract Constant' ,229 224 category = 'jdlts' , category = 'jdlts' ,230 225 keys = '<leader>ljc' , keys = '<leader>ljc' ,231 - command = function () jdtls.extract_constant(true ) end ,226 + command = function () jdtls.extract_constant( true ) end ,234 229 map.visual { map.visual {235 230 description = 'Extract Method' , description = 'Extract Method' ,236 231 category = 'jdlts' , category = 'jdlts' ,237 232 keys = '<leader>ljm' , keys = '<leader>ljm' ,238 - command = function () jdtls.extract_method(true ) end ,233 + command = function () jdtls.extract_method( true ) end ,241 236 auto 'refresh_codelens' { auto 'refresh_codelens' {neovim/lua/bugabinga/lsp/clients/lua.lua Modified +2 / −3 text lines
4 4 name = 'LuaLS' , name = 'LuaLS' ,5 5 filetypes = 'lua' , filetypes = 'lua' ,6 6 command = 'lua-language-server' , command = 'lua-language-server' ,7 - root_dir = project.find_lua_project_root ,7 + root_dir = project.find_lua_project_root,8 8 single_file_support = true , single_file_support = true ,9 9 workspaces = true , workspaces = true ,10 10 settings = { settings = {12 12 addonManager = { enable = false }, addonManager = { enable = false },13 - completion = { callSnippet = 'Both ' , postfix = '.' },13 + completion = { callSnippet = 'Disable ' , postfix = '.' },14 14 diagnostics = { globals = { 'vim' }, workspaceRate = 50 }, diagnostics = { globals = { 'vim' }, workspaceRate = 50 },15 15 hint = { enable = true , setType = true }, hint = { enable = true , setType = true },16 16 telemetry = { enable = false }, telemetry = { enable = false },18 18 workspace = { checkThirdParty = false , } workspace = { checkThirdParty = false , }21 - before_init = require 'neodev.lsp' .before_init,
neovim/lua/bugabinga/lsp/clients/nu.lua Added new file mode 100644+10 / −0 text lines
1 + local project = require 'std.project' 5 + command = { 'nu' , '--lsp' },7 + root_dir = project.find_project_root,8 + single_file_support = true ,neovim/lua/bugabinga/lsp/clients/zig.lua Modified +2 / −2 text lines
1 - local project = require 'std.project' 1 + local project = require 'std.project' 4 4 name = 'zls' , name = 'zls' ,6 6 filetypes = { 'zig' , 'zir' }, filetypes = { 'zig' , 'zir' },7 7 root_dir = project.find_zig_project_root, root_dir = project.find_zig_project_root,8 8 single_file_support = true , single_file_support = true ,neovim/lua/bugabinga/lsp/init.lua Modified +90 / −39 text lines
38 38 local expand_command = function ( command )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 if type ( command ) == 'table' then 44 42 command[1 ] = expand_path( command[1 ] ) command[1 ] = expand_path( command[1 ] )51 49 local lsp_start = function ( file_type_event )local lsp_start = function ( file_type_event )
50 + debug .print 'trying to start lsp' 52 51 local match = file_type_event.match local match = file_type_event.match54 53 local matches_to_ignore = ignored.filetypes local matches_to_ignore = ignored.filetypes55 - 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 local bufnr = file_type_event.buf59 - 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 ) local buffer_path = vim.api.nvim_buf_get_name( bufnr )66 66 local potential_client_configs = vim.iter( lsp_client_configs ) local potential_client_configs = vim.iter( lsp_client_configs )67 67 :map( function ( config ) :map( function ( config )68 68 vim.validate { 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 , },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 ) expand_command( config.command )87 87 config.environment = config.environment or {} config.environment = config.environment or {}88 - config.filetypes = type ( config.filetypes ) == 'string' and { config.filetypes } or config.filetypes88 + config.filetypes = type ( config.filetypes ) == 'string' and { config.filetypes, } or config.filetypes89 89 config.single_file_support = config.single_file_support == nil and false or config.single_file_support config.single_file_support = config.single_file_support == nil and false or config.single_file_support90 90 config.workspaces = config.workspaces == nil and false or config.workspaces config.workspaces = config.workspaces == nil and false or config.workspaces91 91 config.capabilities = config.capabilities or {} config.capabilities = config.capabilities or {}99 99 :totable() :totable()101 101 debug .print( 'POTENTIAL CLIENTS' , debug .print( 'POTENTIAL CLIENTS' ,102 - vim.iter( potential_client_configs ):map( function ( config ) return { name = config . name , command = config . command } end ) 102 + vim.iter( potential_client_configs ):map( function ( config )105 111 if table .is_empty( potential_client_configs ) then if table .is_empty( potential_client_configs ) then 106 112 debug .print( 'found no lsp client for' , buffer_path ) debug .print( 'found no lsp client for' , buffer_path )115 121 for _, config in ipairs ( potential_client_configs ) do 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 ) 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() 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 ) 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 , 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 , on_attach = function ( client, bufnr ) debug .print( 'LSP CLIENT ATTACH' , client, bufnr ) end ,143 147 trace = 'off' , 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, 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' vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
226 + if client.server_capabilities.documentSymbolProvider then 227 + local ok, navic = pcall ( require , 'nvim-navic' )229 + vim.notify 'navic ready' 230 + navic.attach( client, bufnr )232 + vim.notify 'nvim-navic not found. could not attach to lsp client.' 234 + local ok, navbuddy = pcall ( require , 'nvim-navbuddy' )236 + vim.notify 'navbuddy ready' 237 + navbuddy.attach( client, bufnr )239 + vim.notify 'nvim-navbuddy not found. could not attach to lsp client.' 222 243 if client.server_capabilities.documentHighlightProvider then if client.server_capabilities.documentHighlightProvider then 224 245 local delay = 300 local delay = 300 236 257 description = 'Remove highlight from symbol under cursor on move' , description = 'Remove highlight from symbol under cursor on move' ,237 - events = { 'CursorMoved' , 'InsertEnter' },258 + events = { 'CursorMoved' , 'InsertEnter' , },238 259 buffer = bufnr, buffer = bufnr,239 260 command = debounced_clear, command = debounced_clear,257 278 description = 'Show hover documentation above cursor.' , description = 'Show hover documentation above cursor.' ,258 279 category = 'lsp' , category = 'lsp' ,259 280 buffer = bufnr, buffer = bufnr,260 - keys = { 'K' , '<leader>lk' },281 + keys = { 'K' , '<leader>lk' , },261 282 command = vim.lsp.buf.hover, command = vim.lsp.buf.hover,321 342 description = 'Rename symbol under cursor.' , description = 'Rename symbol under cursor.' ,322 343 category = 'lsp' , category = 'lsp' ,323 344 buffer = bufnr, buffer = bufnr,324 - keys = { '<f2>' , '<leader>ln' },345 + keys = { '<f2>' , '<leader>ln' , },325 346 command = vim.lsp.buf.rename, command = vim.lsp.buf.rename,373 394 description = 'Semantic Tokens from the LSP' , description = 'Semantic Tokens from the LSP' ,374 395 events = 'LspTokenUpdate' , events = 'LspTokenUpdate' ,375 396 command = token_update, command = token_update,379 400 local lsp_info = function ( command )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 ) local active_clients = vim.lsp.get_clients( all_or_current )383 404 local infos = vim.iter( active_clients ) local infos = vim.iter( active_clients )408 429 local lsp_info_extended = function ( command )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 ) local active_clients = vim.lsp.get_clients( all_or_current )411 432 ui.show_tree( active_clients ) ui.show_tree( active_clients )414 435 user_command( 'LspInfo' , lsp_info, {user_command( 'LspInfo' , lsp_info, {415 436 nargs = '?' , nargs = '?' ,416 - complete = function () return { 'all' } end ,437 + complete = function () return { 'all' , } end ,417 438 desc = 'Shows basic information about running LSP clients.' , desc = 'Shows basic information about running LSP clients.' ,420 441 user_command( 'LspInfoExtended' , lsp_info_extended, {user_command( 'LspInfoExtended' , lsp_info_extended, {421 442 nargs = '?' , nargs = '?' ,422 - complete = function () return { 'all' } end ,443 + complete = function () return { 'all' , } end ,423 444 desc = 'Shows detailed information about running LSP clients.' , desc = 'Shows detailed information about running LSP clients.' ,450 + local completion_icons = {474 + local completion_kinds = vim.lsp.protocol.CompletionItemKind475 + for i, kind in ipairs ( completion_kinds ) do 476 + completion_kinds[i] = completion_icons[kind] or kind428 479 return setmetatable ( _, {} )return setmetatable ( _, {} )neovim/lua/bugabinga/lsp/lightbulb.lua Modified +1 / −1 text lines
4 4 local lb_name = 'mariasolos/lightbulb' local lb_name = 'mariasolos/lightbulb' 5 5 local lb_namespace = vim.api.nvim_create_namespace( lb_name )local lb_namespace = vim.api.nvim_create_namespace( lb_name )6 - local lb_icon = require 'std.icon' .hint6 + local lb_icon = require 'std.icon' .hint7 7 local lb_group = vim.api.nvim_create_augroup( lb_name, { clear = true } )local lb_group = vim.api.nvim_create_augroup( lb_name, { clear = true } )8 8 local code_action_method = vim.lsp.protocol.Methods.textDocument_codeActionlocal code_action_method = vim.lsp.protocol.Methods.textDocument_codeAction9 9 local timer = vim.uv.new_timer()local timer = vim.uv.new_timer()neovim/lua/bugabinga/nugu/init.lua Modified +3 / −2 text lines
92 92 Whitespace { NonText }, Whitespace { NonText },93 93 NormalNC { Normal }, NormalNC { Normal },94 94 Pmenu { NormalFloat }, 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 }, PmenuSbar { bg = ui_unfocus },97 97 PmenuThumb { bg = ui_minor }, PmenuThumb { bg = ui_minor },98 98 Question { fg = ui_important_local, gui = 'bold' }, Question { fg = ui_important_local, gui = 'bold' },276 276 LazyCommitScope { LazyComment, gui = 'italic' }, LazyCommitScope { LazyComment, gui = 'italic' },277 277 LazyCommitType { LazyCommitScope }, LazyCommitType { LazyCommitScope },278 278 LazyDimmed { fg = NormalFloat.fg }, LazyDimmed { fg = NormalFloat.fg },279 - LazyDir { N.fgormalFloat },279 + LazyDir { fg = NormalFloat.fg },280 280 LazyH1 { Bold }, LazyH1 { Bold },281 281 LazyH2 { LazyH1 }, LazyH2 { LazyH1 },282 282 LazyLocal {}, LazyLocal {},471 471 IblScope { fg = ui_focus, bg = Normal.bg }, IblScope { fg = ui_focus, bg = Normal.bg },473 473 Hlargs { fg = content_important_local }, Hlargs { fg = content_important_local },474 475 MiniStarterCurrent { fg = ui_accent.readable(), bg = ui_accent }, MiniStarterCurrent { fg = ui_accent.readable(), bg = ui_accent }, 475 476 MiniStarterFooter { Keyword }, MiniStarterFooter { Keyword }, 476 477 MiniStarterHeader { Comment }, MiniStarterHeader { Comment }, neovim/lua/bugabinga/options/behaviour.lua Modified +12 / −11 text lines
1 + local debug = require 'std.debug' 1 2 local auto = require 'std.auto' local auto = require 'std.auto' 6 7 vim.opt.timeoutlen = 250 vim.opt.timeoutlen = 250 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' 27 28 vim.opt.wrap = false vim.opt.wrap = false 30 - vim.opt.scrolloff = 999 31 - vim.opt.sidescrolloff = 999 32 + vim.opt.sidescrolloff = 0 34 35 vim.opt.smartindent = true vim.opt.smartindent = true 99 100 if table .contains( ignored.filetypes, filetype ) then return end if table .contains( ignored.filetypes, filetype ) then return end 100 101 local buftype = vim.api.nvim_buf_get_option( buffer, 'buftype' ) local buftype = vim.api.nvim_buf_get_option( buffer, 'buftype' )101 102 if table .contains( ignored.buftypes, buftype ) then return end 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 if root and cwd ~= root then 105 106 vim.uv.chdir( root ) vim.uv.chdir( root )106 107 vim.notify( 'Changed root directory to ' .. root .. ' from ' .. cwd ) vim.notify( 'Changed root directory to ' .. root .. ' from ' .. cwd )108 + debug .print( buffer, file, vim.inspect( filetype ), vim.inspect( buftype ) )neovim/lua/bugabinga/options/keymaps.lua Modified +13 / −12 text lines
6 6 keys = '<space>' , keys = '<space>' ,7 7 command = '<nop>' , command = '<nop>' ,10 9 vim.g.mapleader = ' ' vim.g.mapleader = ' ' 11 10 vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' ' 20 13 map.normal {map.normal {21 14 description = 'Insert newline under cursor' , description = 'Insert newline under cursor' ,22 15 category = 'editing' , category = 'editing' ,24 17 command = function () command = function ()25 18 local current_buffer = 0 local current_buffer = 0 26 19 local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1 ] local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1 ]33 26 map.normal {map.normal {34 27 description = 'Insert newline above cursor' , description = 'Insert newline above cursor' ,35 28 category = 'editing' , category = 'editing' ,36 - keys = '<C-S-enter>' ,37 30 command = function () command = function ()38 31 local current_buffer = 0 local current_buffer = 0 39 32 local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1 ] - 1 local current_line = vim.api.nvim_win_get_cursor( current_buffer )[1 ] - 1 40 33 local strict_indexing = false local strict_indexing = false 41 34 local newline = { '' } local newline = { '' }42 36 vim.api.nvim_buf_set_lines( current_buffer, current_line, current_line, strict_indexing, newline ) 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 , command = function () return vim.fn.pumvisible() == 1 and '<C-n>' or '<tab>' end ,
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 ()local function open_link_under_cursor ()106 104 local file_under_cursor = vim.fn.expand '<cfile>' local file_under_cursor = vim.fn.expand '<cfile>' 109 107 if file_under_cursor and file_under_cursor:match '%a+://.+' then if file_under_cursor and file_under_cursor:match '%a+://.+' then 110 108 vim.system( vim.system(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 }, { text = true },114 113 function ( completed ) function ( completed )115 114 if completed.code == 0 then 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 ) error ( 'Failed to open ' .. file_under_cursor .. ' because: ' .. completed.stderr )
122 + vim.notify 'Found no url under cursor !' 190 191 vim.lsp.buf.format { async = false } vim.lsp.buf.format { async = false }193 - vim.cmd [[silent make]] 196 197 vim.cmd [[wa]] vim.cmd [[wa]] neovim/lua/bugabinga/options/ui.lua Modified +2 / −0 text lines
96 96 vim.opt.shortmess:append 'c' vim.opt.shortmess:append 'c' 98 98 vim.opt.shortmess:append 'I' vim.opt.shortmess:append 'I'
100 + vim.opt.shortmess:append 't' 101 103 vim.opt.cmdheight = 1 vim.opt.cmdheight = 1 neovim/lua/bugabinga/plugins/autopairs.lua Modified +2 / −14 text lines
4 4 'windwp/nvim-autopairs' , 'windwp/nvim-autopairs' ,5 5 event = 'InsertEnter' , event = 'InsertEnter' ,7 + disable_filetype = ignored.filetypes,10 - local autopairs = require 'nvim-autopairs' 12 - disable_filetype = ignored.filetypes,14 - local cmp_autopairs = require 'nvim-autopairs.completion.cmp' 15 - local cmp = require 'cmp' 18 - cmp_autopairs.on_confirm_done()
neovim/lua/bugabinga/plugins/cmp.lua Deleted deleted file mode 100644+0 / −117 text lines
5 - event = 'InsertEnter' ,8 - 'hrsh7th/cmp-nvim-lsp' ,10 - 'hrsh7th/cmp-nvim-lsp-document-symbol' ,11 - 'hrsh7th/cmp-nvim-lsp-signature-help' ,13 - { 'L3MON4D3/LuaSnip' , version = '2.*' , build = 'make install_jsregexp' },14 - 'saadparwaiz1/cmp_luasnip' ,15 - 'rafamadriz/friendly-snippets' ,16 - 'onsails/lspkind.nvim' ,19 - local cmp = require 'cmp' 20 - local luasnip = require 'luasnip' 21 - local lspkind = require 'lspkind' 23 - require 'luasnip.loaders.from_vscode' .lazy_load()29 - fetching_timeout = 400 ,32 - autocomplete = false ,33 - completeopt = 'menu,menuone,preview,noselect' ,36 - completion = cmp.config.window.bordered(),37 - documentation = cmp.config.window.bordered(),43 - format = lspkind.cmp_format {49 - nvim_lsp_signature_help = '[sig]' ,51 - nvim_lsp_document_symbol = '[sym]' ,60 - preselect = cmp.PreselectMode.None,61 - snippet = { expand = function ( args ) luasnip.lsp_expand( args.body ) end },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()76 - ['<s-tab>' ] = cmp.mapping( function ( fallback )77 - if cmp.visible() then 78 - cmp.select_prev_item()79 - elseif luasnip.locally_jumpable( - 1 ) then 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,96 - sources = cmp.config.sources {97 - { name = 'nvim_lsp_signature_help' },98 - { name = 'nvim_lsp' },99 - { name = 'nvim_lsp_document_symbol' },100 - { name = 'luasnip' },103 - { name = 'buffer' , keyword_length = 3 },107 - cmp.setup.filetype( 'gitcommit' , {108 - sources = cmp.config.sources {112 - { name = 'buffer' },
neovim/lua/bugabinga/plugins/comment.lua Modified +15 / −14 text lines
2 - 'numToStr/Comment.nvim' ,4 - { "gc" , mode = { "n" , "v" }, desc = "Comment toggle linewise" },5 - { "gb" , mode = { "n" , "v" }, desc = "Comment toggle blockwise" },8 - "JoosepAlviste/nvim-ts-context-commentstring" ,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 {}2 + 'numToStr/Comment.nvim' ,5 + { 'gc' , mode = { 'n' , 'v' , }, desc = 'Comment toggle linewise' , },6 + { 'gb' , mode = { 'n' , 'v' , }, desc = 'Comment toggle blockwise' , },9 + 'JoosepAlviste/nvim-ts-context-commentstring' ,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 {}neovim/lua/bugabinga/plugins/dressing.lua Modified +2 / −1 text lines
2 2 'stevearc/dressing.nvim' , 'stevearc/dressing.nvim' ,neovim/lua/bugabinga/plugins/fidget.lua Added new file mode 100644+19 / −0 text lines
1 + local debug = require 'std.debug' 9 + suppress_on_insert = false , 11 + log_handler = debug .get, 15 + filter = debug .get and vim.log.levels.DEBUG,16 + override_vim_notify = true , neovim/lua/bugabinga/plugins/flash.lua Modified +6 / −5 text lines
2 2 'folke/flash.nvim' , 'folke/flash.nvim' ,3 4 event = 'VeryLazy' , event = 'VeryLazy' ,5 - highlight = { backdrop = false },6 - modes = { char = { highlight = { backdrop = false , } },6 + highlight = { backdrop = false , },7 + modes = { char = { highlight = { backdrop = false , }, },12 - mode = { 'n' , 'x' , 'o' },13 + mode = { 'n' , 'x' , 'o' , },13 14 function () require 'flash' .jump() end , function () require 'flash' .jump() end ,14 15 desc = 'Flash' , desc = 'Flash' ,18 - mode = { 'n' , 'o' , 'x' },19 + mode = { 'n' , 'o' , 'x' , },19 20 function () require 'flash' .treesitter() end , function () require 'flash' .treesitter() end ,neovim/lua/bugabinga/plugins/genghis.lua Modified +12 / −11 text lines
17 17 dependencies = { dependencies = {18 18 'stevearc/dressing.nvim' , 'stevearc/dressing.nvim' ,22 20 config = function () config = function ()24 - local cmp = require 'cmp' 29 - sources = cmp.config.sources { { name = 'omni' } }21 + local genghis = require 'genghis' 22 + local keymap = vim.keymap.set23 + 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 )neovim/lua/bugabinga/plugins/gitsigns.lua Modified +12 / −11 text lines
4 4 'lewis6991/gitsigns.nvim' , 'lewis6991/gitsigns.nvim' ,5 6 event = 'VeryLazy' , event = 'VeryLazy' ,9 - change = { text = '│' },10 - delete = { text = '_' },11 - topdelete = { text = '‾' },12 - changedelete = { text = '~' },13 - untracked = { text = '┆' },9 + add = { text = '│' , },10 + change = { text = '│' , },11 + delete = { text = '_' , },12 + topdelete = { text = '‾' , },13 + changedelete = { text = '~' , },14 + untracked = { text = '┆' , },15 16 preview_config = { preview_config = {16 17 border = vim.g.border_style, border = vim.g.border_style,52 53 category = 'git' , category = 'git' ,53 54 keys = '<leader>hs' , keys = '<leader>hs' ,54 55 buffer = bufnr, 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 { map.normal {68 69 category = 'git' , category = 'git' ,69 70 keys = '<leader>hr' , keys = '<leader>hr' ,70 71 buffer = bufnr, 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 { map.normal {108 109 category = 'git' , category = 'git' ,109 110 keys = '<leader>hb' , keys = '<leader>hb' ,110 111 buffer = bufnr, buffer = bufnr,111 - command = function () gitsigns.blame_line { full = true } end ,112 + command = function () gitsigns.blame_line { full = true , } end ,114 115 map.normal { map.normal {148 149 category = 'git' , category = 'git' ,149 150 keys = 'ih' , keys = 'ih' ,150 151 buffer = bufnr, buffer = bufnr,151 - command = ':<C-U>Gitsigns select_hunk<CR>' 152 + command = ':<C-U>Gitsigns select_hunk<CR>' , neovim/lua/bugabinga/plugins/heirline.lua Modified +266 / −164 text lines
3 3 local auto = require 'std.auto' local auto = require 'std.auto' 4 4 local ignored = require 'std.ignored' local ignored = require 'std.ignored' 6 - local NEW_FILE = '~new ~' 6 + local NEW_FILE = '~untitled ~' 10 10 'rebelot/heirline.nvim' , 'rebelot/heirline.nvim' ,11 12 event = 'BufEnter' , event = 'BufEnter' ,12 13 dependencies = { dependencies = {13 14 'nvim-tree/nvim-web-devicons' , 'nvim-tree/nvim-web-devicons' ,14 15 'lewis6991/gitsigns.nvim' , 'lewis6991/gitsigns.nvim' ,
16 + 'SmiteshP/nvim-navic' ,16 18 config = function () config = function ()17 19 local heirline = require 'heirline' local heirline = require 'heirline' 27 29 command = function () utils.on_colorscheme( nugu ) end , command = function () utils.on_colorscheme( nugu ) end ,31 33 init = function ( self ) init = function ( self )32 34 self.mode = vim.fn.mode( 1 ) self.mode = vim.fn.mode( 1 ) 83 85 r = 'ui_important_global' , r = 'ui_important_global' ,84 86 ['!' ] = 'ui_important_global' , ['!' ] = 'ui_important_global' ,85 87 t = 'ui_important_global' , t = 'ui_important_global' ,89 91 provider = function ( self ) provider = function ( self )94 96 hl = function ( self ) hl = function ( self )95 97 local mode = self.mode:sub( 1 , 1 ) local mode = self.mode:sub( 1 , 1 ) 96 - return { fg = self.mode_colors[mode], bold = true }98 + return { fg = self.mode_colors[mode], bold = true , }99 101 update = { update = {107 109 init = function ( self ) init = function ( self )108 110 local filename = self.filename local filename = self.filename109 111 local extension = vim.fn.fnamemodify( filename, ':e' ) 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 ) provider = function ( self )113 115 return self.icon and (self.icon .. ' ' ) return self.icon and (self.icon .. ' ' )115 117 hl = 'DefaultIcon' , hl = 'DefaultIcon' ,119 121 init = function ( self ) init = function ( self )120 122 self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) ) self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) )121 123 if self.lfilename == '' then self.lfilename = NEW_FILE end if self.lfilename == '' then self.lfilename = NEW_FILE end 138 - local file_flags = {140 + local file_flags = {140 142 condition = function () condition = function ()141 143 return vim.bo.modified return vim.bo.modified155 - local file_name_block = {157 + local file_name_block = {156 158 init = function ( self ) init = function ( self )157 159 self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) ) self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )160 162 file_icon, file_icon,163 + { provider = ' ' , },162 164 file_name, file_name,163 165 file_flags, file_flags,166 + { provider = '%<' , }, 168 170 provider = function () provider = function ()169 171 return icon.file .. ' ' .. string .upper ( vim.bo.filetype ) return icon.file .. ' ' .. string .upper ( vim.bo.filetype )173 - local file_encoding = {175 + local file_encoding = {174 176 provider = function () provider = function ()175 177 local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc 176 178 return enc ~= 'utf-8' and enc:upper() return enc ~= 'utf-8' and enc:upper()180 - local file_format = {182 + local file_format = {181 183 static = { static = {182 184 dos = icon.newline .. icon.carriage_return, dos = icon.newline .. icon.carriage_return,183 185 unix = icon.newline, unix = icon.newline,186 188 provider = function ( self ) provider = function ( self )187 189 local fileformat = vim.bo.fileformat local fileformat = vim.bo.fileformat188 190 return self[fileformat] return self[fileformat]193 195 provider = function () provider = function ()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 ) ) local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )198 200 fsize = (fsize < 0 and 0 ) or fsize fsize = (fsize < 0 and 0 ) or fsize199 201 if fsize < 1024 then if fsize < 1024 then 207 - local file_last_modified = {209 + local file_last_modified = {208 210 provider = function () provider = function ()209 211 local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) ) local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )210 212 if ftime > 0 then if ftime > 0 then 217 - local lsp_active = {219 + local lsp_active = {218 220 condition = conditions.lsp_attached, condition = conditions.lsp_attached,219 - update = { 'LspAttach' , 'LspDetach' , 'BufEnter' },223 + update = { 'LspAttach' , 'LspDetach' , 'BufEnter' , ' BufLeave ' , },221 225 provider = function () provider = function ()222 226 local names = {} 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 ) table .insert ( names, client.name )226 230 return icon.lsp .. ' ' .. table .concat ( names, ' ' ) return icon.lsp .. ' ' .. table .concat ( names, ' ' )230 - local diagnostic_enabled = {235 + condition = function () return require 'nvim-navic' .is_available() end ,240 + Module = '@include' ,241 + Namespace = '@namespace' ,242 + Package = '@include' ,243 + Class = '@structure' ,245 + Property = '@property' ,247 + Constructor = '@constructor' ,249 + Interface = '@type' ,250 + Function = '@function' ,251 + Variable = '@variable' ,252 + Constant = '@constant' ,255 + Boolean = '@boolean' ,260 + EnumMember = '@field' ,261 + Struct = '@structure' ,263 + Operator = '@operator' ,264 + TypeParameter = '@type' ,267 + enc = function ( line, col, winnr )268 + return bit.bor( bit.lshift( line, 16 ), bit.lshift( col, 6 ), winnr )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, winnr278 + init = function ( self )279 + local data = require 'nvim-navic' .get_data() or {}282 + for i, d in ipairs ( data ) do 284 + local pos = self.enc( d.scope.start.line, d.scope.start.character, self.winnr )288 + hl = self.type_hl[d.type],292 + provider = d.name:gsub( '%%' , '%%%%' ):gsub( '%s*->%s*' , '' ),294 + hl = self.type_hl[d.type],299 + callback = function ( _, minwid )301 + local line, col, winnr = self.dec( minwid )302 + vim.api.nvim_win_set_cursor( vim.fn.win_getid( winnr ), { line, col, } )304 + name = 'heirline_navic' ,309 + if # data > 1 and i < # data then 310 + table .insert ( child, {315 + table .insert ( children, child )318 + self.child = self:new( children, 1 )321 + provider = function ( self )322 + return self.child:eval()325 + update = 'CursorMoved' ,328 + local diagnostic_enabled = {231 329 init = function ( self ) init = function ( self )232 330 self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on239 - local diagnostic = {337 + local diagnostic = {240 338 condition = conditions.has_diagnostics, condition = conditions.has_diagnostics,242 340 static = { static = {249 347 init = function ( self ) 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 ) provider = function ( self )285 - local is_svn_repo = function ()383 + local is_svn_repo = function ()286 384 local svn_dir = vim.fs.find( '.svn' , { local svn_dir = vim.fs.find( '.svn' , {287 385 upward = true , upward = true ,288 386 stop = vim.uv.os_homedir(), stop = vim.uv.os_homedir(),293 391 return not vim.tbl_isempty( svn_dir ) return not vim.tbl_isempty( svn_dir )296 - local svn_get_relative_url = function ()394 + local svn_get_relative_url = function ()298 396 local job = require 'plenary.job' local job = require 'plenary.job' 299 - local relative_url = { '[ERR]' }397 + local relative_url = { '[ERR]' , }301 399 job:new { job:new {302 400 command = 'svn' , 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 ) on_exit = function ( current_job, exit_code )305 403 if exit_code == 0 then relative_url = current_job:result() end if exit_code == 0 then relative_url = current_job:result() end 309 407 return relative_url[1 ] return relative_url[1 ]313 411 condition = is_svn_repo, condition = is_svn_repo,315 413 update = 'BufEnter' , update = 'BufEnter' ,330 428 condition = conditions.is_git_repo, condition = conditions.is_git_repo,332 430 init = function ( self ) init = function ( self )365 463 init = function ( self ) init = function ( self )366 464 self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local' ] or '' ) .. ' ' .. icon.global .. ' ' 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() ), '~' ) self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )384 482 provider = '' , provider = '' ,388 - local help_file_name = {486 + local help_file_name = {389 487 condition = function () condition = function ()390 488 return vim.bo.filetype == 'help' return vim.bo.filetype == 'help' 396 494 hl = 'Question' , hl = 'Question' ,399 - local terminal_name = {497 + local terminal_name = {400 498 provider = function () provider = function ()401 499 local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:' , '' ) local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:' , '' )402 500 local basename = vim.fs.basename( name ) local basename = vim.fs.basename( name )405 503 hl = 'Bold' , hl = 'Bold' ,409 507 provider = function () provider = function ()410 508 local togglers = require 'bugabinga.options.togglers' local togglers = require 'bugabinga.options.togglers' 411 509 return tostring ( togglers ) return tostring ( togglers )415 - local macro_recording = {513 + local macro_recording = {416 514 condition = function () condition = function ()417 515 return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0 return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0 419 517 provider = icon.macro .. ' ' , provider = icon.macro .. ' ' ,420 518 hl = 'PreProc' , hl = 'PreProc' ,421 - utils.surround( { '░▒▓ ' , ' ▓▒░' }, nil , {519 + utils.surround( { '░▒▓ ' , ' ▓▒░' , }, nil , {422 520 provider = function () provider = function ()423 521 return vim.fn.reg_recording() return vim.fn.reg_recording()427 525 update = { update = {428 526 'RecordingEnter' , 'RecordingEnter' ,429 527 'RecordingLeave' , 'RecordingLeave' ,434 532 condition = function () condition = function ()435 533 local ok, lazy_status = pcall ( require , 'lazy.status' ) local ok, lazy_status = pcall ( require , 'lazy.status' )436 534 return ok and lazy_status.has_updates() 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 , provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status' .updates() .. ' ' end ,440 538 on_click = { on_click = {441 539 callback = function () require 'lazy' .update() end , 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,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 () condition = function ()459 556 return conditions.buffer_matches { return conditions.buffer_matches {460 557 buftype = ignored.buftypes, buftype = ignored.buftypes,465 562 file_type, file_type,467 564 help_file_name, help_file_name,471 - local terminal_statusline = {568 + local terminal_statusline = {473 570 condition = function () 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, file_type,480 577 terminal_name, terminal_name,484 - local inactive_statusline = {581 + local inactive_statusline = {485 582 condition = conditions.is_not_active, condition = conditions.is_not_active,486 583 file_type, file_type,492 - local statuslines = {589 + local statuslines = {493 590 hl = function () hl = function ()494 591 if conditions.is_active() then if conditions.is_active() then 495 592 return 'StatusLine' return 'StatusLine' 506 603 default_statusline, default_statusline,510 607 hl = function () hl = function ()511 608 if conditions.is_active() then if conditions.is_active() then 512 609 return 'Winbar' return 'Winbar' 521 618 condition = function () condition = function ()522 - return conditions.buffer_matches { buftype = { 'terminal' } }619 + return conditions.buffer_matches { buftype = { 'terminal' , }, }525 622 file_type, file_type,527 624 terminal_name, terminal_name,533 - local tabline_buffer_number = {534 - provider = function ( self )535 - return '(' .. tostring ( self.bufnr ) .. ')' 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' }543 - return { fg = utils.get_highlight 'TabLine' .fg }548 - local tabline_file_name = {549 - provider = function ( self )550 - local name = self.file_name551 - return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )553 - hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true } end ,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 .. ' ' ,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 } )566 - provider = function ( self )567 - if vim.api.nvim_get_option_value( 'buftype' , { buf = self.bufnr } ) == 'terminal' then 568 - return icon.terminal
577 - local tabline_file_name_block = {578 - init = function ( self )579 - self.file_name = vim.api.nvim_buf_get_name( self.bufnr )582 - hl = function ( self )583 - if self.is_active then 585 - elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then 586 - return { fg = 'ui_normal' }593 - callback = function ( _, minwid, _, button )594 - if button == 'm' then 595 - vim.schedule( function ()596 - vim.api.nvim_buf_delete( minwid, { force = false } )597 - vim.cmd.redrawtabline()600 - vim.api.nvim_win_set_buf( 0 , minwid )603 - minwid = function ( self ) return self.bufnr end ,604 - name = 'heirline_tabline_buffer_callback' ,610 - tabline_buffer_number,614 - local tabline_buffer_block = utils.surround(616 - ' ' .. icon.slant_left,617 - icon.slant_right .. ' ' ,620 - if self.is_active then 621 - return utils.get_highlight 'TabLineSel' .bg623 - return utils.get_highlight 'TabLine' .bg626 - { tabline_file_name_block }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 ' }636 737 provider = function ( self ) provider = function ( self )637 738 return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T' return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T' 639 740 hl = function ( self ) hl = function ( self )640 - if not self.is_active then 741 + if self.is_active then 643 742 return 'TabLineSel' return 'TabLineSel' 649 - { provider = '%=' },750 + { provider = '%=' , },650 751 utils.make_tablist( tabpage ), utils.make_tablist( tabpage ),653 - local tabline = { buffer_line, tab_pages }657 758 heirline.setup { heirline.setup {658 759 statusline = statuslines, statusline = statuslines,659 760 winbar = winbars, winbar = winbars,761 + tabline = tab_pages,neovim/lua/bugabinga/plugins/hlargs.lua Modified +19 / −18 text lines
2 - 'm-demare/hlargs.nvim' ,5 - paint_arg_declarations = true ,6 - paint_arg_usages = true ,7 - paint_catch_blocks = {11 - extras = { named_parameter = true },12 - excluded_argnames = {14 - usages = { lua = {} },18 - 'nvim-treesitter/nvim-treesitter' 2 + 'm-demare/hlargs.nvim' ,3 + event = { 'BufRead' , 'BufLeave' , 'BufEnter' , 'SessionLoadPost' , },6 + paint_arg_declarations = true ,7 + paint_arg_usages = true ,8 + paint_catch_blocks = {12 + extras = { named_parameter = true , },13 + excluded_argnames = {15 + usages = { lua = {}, },19 + 'nvim-treesitter/nvim-treesitter' ,neovim/lua/bugabinga/plugins/hyper.lua Added new file mode 100644+8 / −0 text lines
2 + 'wet-sandwich/hyper.nvim' ,5 + 'nvim-lua/plenary.nvim' ,neovim/lua/bugabinga/plugins/indent_blankline.lua Modified +3 / −2 text lines
1 - local icon = require 'std.icon' 1 + local icon = require 'std.icon' 4 4 'lukas-reineke/indent-blankline.nvim' , 'lukas-reineke/indent-blankline.nvim' ,5 6 main = 'ibl' , main = 'ibl' ,6 - event = { 'BufReadPost' , 'BufNew' },7 + event = { 'BufReadPost' , 'BufNew' , },7 8 config = function () config = function ()8 9 local ibl = require 'ibl' local ibl = require 'ibl' neovim/lua/bugabinga/plugins/lush.lua Modified +4 / −1 text lines
3 3 'rktjmp/lush.nvim' , 'rktjmp/lush.nvim' ,4 6 branch = 'main' , branch = 'main' ,5 7 lazy = false , lazy = false ,6 8 priority = 1000 , priority = 1000 ,7 9 config = function () config = function ()8 - vim.cmd.colorscheme 'nugu' neovim/lua/bugabinga/plugins/mason.lua Modified +8 / −7 text lines
2 - " williamboman/mason.nvim" ,3 - cmd = { 'Mason' , 'MasonUpdate' , 'MasonInstall' , 'MasonUninstall' , 'MasonUninstallAll' , 'MasonLog' },2 + ' williamboman/mason.nvim' ,4 + cmd = { 'Mason' , 'MasonUpdate' , 'MasonInstall' , 'MasonUninstall' , 'MasonUninstallAll' , 'MasonLog' , },6 7 border = vim.g.border_style, border = vim.g.border_style,7 8 width = 0.69 , width = 0.69 ,8 9 height = 0.69 , height = 0.69 ,11 12 dependencies = { dependencies = {13 14 'WhoIsSethDaniel/mason-tool-installer.nvim' , 'WhoIsSethDaniel/mason-tool-installer.nvim' ,14 15 lazy = false , lazy = false ,15 - cmd = { " MasonToolsInstall" , " MasonToolsInstallSync" , " MasonToolsUpdate" , " MasonToolsUpdateSync" , " MasonToolsClean" },16 + cmd = { ' MasonToolsInstall' , ' MasonToolsInstallSync' , ' MasonToolsUpdate' , ' MasonToolsUpdateSync' , ' MasonToolsClean' , },17 18 ensure_installed = { ensure_installed = {18 19 'lua-language-server' , 'lua-language-server' ,25 26 'lemminx' , 'lemminx' ,26 27 'marksman' , 'marksman' ,neovim/lua/bugabinga/plugins/navic.lua Added new file mode 100644+6 / −0 text lines
2 + 'SmiteshP/nvim-navic' ,neovim/lua/bugabinga/plugins/neodev.lua Deleted deleted file mode 100644+0 / −6 text lines
neovim/lua/bugabinga/plugins/persistence.lua Modified +9 / −9 text lines
1 - local map = require 'std.map' 1 + local map = require 'std.map' 4 4 'folke/persistence.nvim' , 'folke/persistence.nvim' ,7 - config = function (_, opts)8 - local persistence = require 'persistence' 9 - persistence.setup(opts)8 + config = function ( _, opts )9 + local persistence = require 'persistence' 10 + persistence.setup( opts )11 12 map.normal { map.normal {12 13 description = 'Restore session for current directory' , description = 'Restore session for current directory' ,13 14 category = 'history' , category = 'history' ,14 15 keys = '<F4>' , keys = '<F4>' ,15 - command = function () persistence.load() end ,16 + command = function () persistence.load() end ,18 19 map.normal { map.normal {19 20 description = 'Restore last session' , description = 'Restore last session' ,20 21 category = 'history' , category = 'history' ,21 22 keys = '<F4><F4>' , keys = '<F4><F4>' ,22 - command = function () persistence.load{last = true } end ,23 + command = function () persistence.load { last = true , } end ,neovim/lua/bugabinga/plugins/specs.lua Modified +36 / −35 text lines
1 - local map = require 'std.map' 2 - local ignored = require 'std.ignored' 1 + local map = require 'std.map' 2 + local ignored = require 'std.ignored' 6 - keys = { '<leader><leader>' , '<leader><leader><leader>' },8 - local specs = require 'specs' 5 + 'KevinSilvester/specs.nvim' ,6 + keys = { '<leader><leader>' , '<leader><leader><leader>' },8 + local specs = require 'specs' 19 - fader = specs.exp_fader,20 - resizer = specs.shrink_resizer22 - ignore_filetypes = ignored.filetypes_kv,23 - ignore_buftypes = ignored.buftypes_kv,19 + fader = specs.exp_fader,20 + resizer = specs.shrink_resizer22 + ignore_filetypes = ignored.filetypes_kv,23 + ignore_buftypes = ignored.buftypes_kv,27 - description = 'Find cursor!' ,29 - keys = '<leader><leader>' ,30 - command = specs.show_specs,27 + description = 'Find cursor!' ,29 + keys = '<leader><leader>' ,30 + command = specs.show_specs,34 34 description = 'Find cursor, for real!' , description = 'Find cursor, for real!' ,36 - keys = '<leader><leader><leader>' ,38 - specs.show_specs{ width = 69 , delay_ms = 69 , inc_ms = 42 }36 + keys = '<leader><leader><leader>' ,37 + command = function ()38 + specs.show_specs { width = 69 , delay_ms = 69 , inc_ms = 42 }neovim/lua/bugabinga/plugins/starter.lua Modified +4 / −2 text lines
52 52 pattern = 'LazyVimStarted' , pattern = 'LazyVimStarted' ,53 53 once = true , once = true ,54 54 command = vim.schedule_wrap( function () command = vim.schedule_wrap( function ()55 - startuptime = require 'lazy' .stats().startuptime55 + if vim.bo.filetype == "starter" then 56 + startuptime = require 'lazy' .stats().startuptimeneovim/lua/bugabinga/plugins/symbols-outline.lua Modified +11 / −3 text lines
2 - 'simrat39/symbols-outline.nvim' ,3 - cmd = 'SymbolsOutline' ,2 + 'SmiteshP/nvim-navbuddy' ,5 + 'SmiteshP/nvim-navic' ,6 + 'MunifTanjim/nui.nvim' ,10 + border = vim.g.border_style,neovim/lua/bugabinga/plugins/telescope.lua Modified +12 / −12 text lines
5 5 require 'bugabinga.health' .add_dependencyrequire 'bugabinga.health' .add_dependency7 7 name = 'ripgrep' , name = 'ripgrep' ,8 - name_of_executable = 'rg' 8 + name_of_executable = 'rg' , 11 11 name = 'find-fd' , name = 'find-fd' ,12 - name_of_executable = 'fd' 12 + name_of_executable = 'fd' , 16 16 'nvim-telescope/telescope.nvim' , 'nvim-telescope/telescope.nvim' ,18 18 cmd = 'Telescope' , cmd = 'Telescope' ,19 19 event = 'VeryLazy' , event = 'VeryLazy' ,20 20 dependencies = { dependencies = {30 30 local actions = require 'telescope.actions' local actions = require 'telescope.actions' 31 31 local themes = require 'telescope.themes' 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 { telescope.setup {38 38 defaults = { defaults = {39 - path_display = { 'truncate' },39 + path_display = { 'truncate' , },40 40 sorting_strategy = 'ascending' , sorting_strategy = 'ascending' ,41 41 layout_config = { 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 , width = 0.69 ,45 45 height = 0.42 , height = 0.42 ,46 46 preview_cutoff = 124 , preview_cutoff = 124 ,69 69 ['<c-p>' ] = actions.move_selection_previous, ['<c-p>' ] = actions.move_selection_previous,70 70 ['<c-s>' ] = actions.file_split, ['<c-s>' ] = actions.file_split,72 - n = { q = actions.close },72 + n = { q = actions.close, },75 75 pickers = { pickers = {83 83 buffers = cursor, buffers = cursor,85 85 extensions = { 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 +2 / −1 text lines
2 2 'folke/todo-comments.nvim' , 'folke/todo-comments.nvim' ,3 - dependencies = { 'nvim-lua/plenary.nvim' },4 + dependencies = { 'nvim-lua/plenary.nvim' , },4 5 event = 'BufReadPost' , event = 'BufReadPost' ,neovim/lua/bugabinga/plugins/toggleterm.lua Modified +7 / −6 text lines
9 9 name_of_executable = 'mdcat' , name_of_executable = 'mdcat' ,12 - name_of_executable = 'dot' 12 + name_of_executable = 'dot' , 16 16 'akinsho/toggleterm.nvim' , 'akinsho/toggleterm.nvim' ,48 49 toggleterm.setup( opts ) toggleterm.setup( opts )50 51 local set_terminal_keymaps = function () local set_terminal_keymaps = function ()51 - local local_to_buffer = { buffer = 0 }52 + local local_to_buffer = { buffer = 0 , }52 53 map.terminal { map.terminal {53 54 description = 'Quit insert mode' , description = 'Quit insert mode' ,54 55 category = 'terminal' , category = 'terminal' ,69 70 description = 'Open vertical Terminal' , description = 'Open vertical Terminal' ,70 71 category = 'terminal' , category = 'terminal' ,71 72 keys = '<F8>' , 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 { map.normal {76 77 description = 'Open horizontal Terminal' , description = 'Open horizontal Terminal' ,77 78 category = 'terminal' , category = 'terminal' ,78 79 keys = '<F9>' , 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 local Terminal = require 'toggleterm.terminal' .Terminal99 100 command = toggle_gitui, command = toggle_gitui,102 - vim.api.nvim_create_user_command( 'Gitui' , toggle_gitui, { desc = 'Toggle Gitui' } )103 + vim.api.nvim_create_user_command( 'Gitui' , toggle_gitui, { desc = 'Toggle Gitui' , } )neovim/lua/bugabinga/plugins/tree.lua Modified +7 / −0 text lines
4 4 'nvim-tree/nvim-tree.lua' , 'nvim-tree/nvim-tree.lua' ,5 7 cmd = 'NvimTreeOpen' , cmd = 'NvimTreeOpen' ,6 8 keys = '<leader>e' , keys = '<leader>e' ,
10 + 'nvim-tree/nvim-web-devicons' ,11 + 'antosha417/nvim-lsp-file-operations' ,7 13 init = function () init = function ()9 15 vim.g.loaded_netrw = 1 vim.g.loaded_netrw = 1 25 31 dotfiles = false , dotfiles = false ,
34 + require 'lsp-file-operations' .setup()29 36 map.normal { map.normal {30 37 description = 'Toggle Tree File Explorer' , description = 'Toggle Tree File Explorer' ,neovim/lua/bugabinga/plugins/treesitter.lua Modified +56 / −55 text lines
3 3 require 'bugabinga.health' .add_dependencyrequire 'bugabinga.health' .add_dependency5 5 name = 'CMake' , name = 'CMake' ,6 - name_of_executable = 'cmake' 9 - name_of_executable = 'make' 12 - name_of_executable = 'zig' 15 - name = 'TreeSitter CLI' ,16 - name_of_executable = 'tree-sitter' 19 - name_of_executable = 'tar' 6 + name_of_executable = 'cmake' ,
9 + name_of_executable = 'make' ,12 + name_of_executable = 'zig' ,15 + name = 'TreeSitter CLI' ,16 + name_of_executable = 'tree-sitter' ,19 + name_of_executable = 'tar' ,23 23 'nvim-treesitter/nvim-treesitter' , 'nvim-treesitter/nvim-treesitter' ,25 - event = { 'BufReadPre' , 'BufNewFile' },26 + event = { 'BufReadPre' , 'BufNewFile' , },26 27 build = function () build = function ()27 - require 'nvim-treesitter.install' .update { with_sync = true }28 + require 'nvim-treesitter.install' .update { with_sync = true , }29 30 dependencies = { dependencies = {30 31 'windwp/nvim-ts-autotag' , 'windwp/nvim-ts-autotag' ,38 39 local parsers = require 'nvim-treesitter.parsers' local parsers = require 'nvim-treesitter.parsers' 40 41 install.prefer_git = false 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' , }44 45 configs.setup { configs.setup {73 - ignore_install = { 'oil' },74 + ignore_install = { 'oil' , },75 76 auto_install = true , auto_install = true ,77 - autotag = { enable = true },78 + autotag = { enable = true , },79 80 highlight = { highlight = {80 81 enable = true , enable = true ,101 - indent = { enable = true },102 + indent = { enable = true , },103 104 playground = { playground = {104 105 enable = true , enable = true ,124 125 enable = true , enable = true ,125 126 lookahead = true , lookahead = true ,126 127 keymaps = { 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' , },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' , },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 = { selection_modes = {158 159 ['@parameter.outer' ] = 'v' , ['@parameter.outer' ] = 'v' ,167 168 enable = true , enable = true ,168 169 swap_next = { 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 = { 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, border = vim.g.border_style,179 180 floating_preview_opts = {}, floating_preview_opts = {},180 181 peek_definition_code = { 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 , enable = true ,188 189 set_jumps = true , set_jumps = true ,189 190 goto_next = { 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 = { 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' },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' , },208 209 parsers.get_parser_configs().just = { parsers.get_parser_configs().just = {209 210 install_info = { install_info = {210 211 url = 'https://github.com/IndianBoy42/tree-sitter-just' , url = 'https://github.com/IndianBoy42/tree-sitter-just' , 211 - files = { 'src/parser.c' , 'src/scanner.cc' },212 + files = { 'src/parser.c' , 'src/scanner.cc' , },212 213 branch = 'main' , branch = 'main' ,214 - maintainers = { '@IndianBoy42' },215 + maintainers = { '@IndianBoy42' , },neovim/lua/bugabinga/plugins/treesj.lua Modified +19 / −17 text lines
1 - local map = require 'std.map' 1 + local map = require 'std.map' 6 - dependencies = { 'nvim-treesitter/nvim-treesitter' },8 - local treesj = require 'treesj' 6 + dependencies = { 'nvim-treesitter/nvim-treesitter' },8 + use_default_keymaps = false ,10 + config = function ( _, opts )11 + local treesj = require 'treesj' 11 - use_default_keymaps = false ,15 + description = 'Toggle Tree Join/Split' ,16 + category = 'editing' ,19 + command = treesj.toggle,15 - description = 'Toggle Tree Join/Split' ,16 - category = 'editing' ,18 - command = treesj.toggle,
neovim/lua/bugabinga/plugins/virt-column.lua Modified +4 / −3 text lines
5 5 'lukas-reineke/virt-column.nvim' , 'lukas-reineke/virt-column.nvim' ,6 - event = { 'BufReadPost' , 'BufNew' },7 + event = { 'BufReadPost' , 'BufNew' , },9 10 enabled = false , enabled = false ,10 - char = { '░' , '▒' , '▓' },11 + char = { '░' , '▒' , '▓' , },11 12 exclude = { exclude = {12 13 filetypes = ignored.filetypes, filetypes = ignored.filetypes,13 14 buftypes = ignored.buftypes, buftypes = ignored.buftypes,neovim/lua/bugabinga/plugins/whichkey.lua Modified +14 / −13 text lines
5 5 'folke/which-key.nvim' , 'folke/which-key.nvim' ,6 7 event = 'VeryLazy' , event = 'VeryLazy' ,7 8 init = function () init = function ()8 9 vim.o.timeout = true vim.o.timeout = true 24 25 border = vim.g.border_style, border = vim.g.border_style,25 26 winblend = vim.o.winblend, winblend = vim.o.winblend,27 - layout = { align = 'center' },28 + layout = { align = 'center' , },28 29 disable = { disable = {29 30 buftypes = ignored.buftypes, buftypes = ignored.buftypes,32 33 config = function ( _, opts ) config = function ( _, opts )33 34 local wk = require 'which-key' local wk = require 'which-key' 40 41 wk.register { wk.register {41 42 ['<leader>' ] = { ['<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' , },47 48 name = 'swap' , name = 'swap' ,48 49 _ = 'which_key_ignore' , _ = 'which_key_ignore' ,50 - p = { name = 'parameter' , _ = 'which_key_ignore' },51 + p = { name = 'parameter' , _ = 'which_key_ignore' , },54 55 name = 'toggle' , name = 'toggle' ,55 56 _ = 'which_key_ignore' , _ = 'which_key_ignore' ,57 - o = { name = 'options' , _ = 'which_key_ignore' },58 + o = { name = 'options' , _ = 'which_key_ignore' , },60 - z = { name = 'lazy' , _ = 'which_key_ignore' },61 - [' ' ] = { name = 'fun' , _ = 'which_key_ignore' },61 + z = { name = 'lazy' , _ = 'which_key_ignore' , },62 + [' ' ] = { name = 'fun' , _ = 'which_key_ignore' , },neovim/lua/bugabinga/ui.lua Modified +5 / −5 text lines
1 - local display = require 'std.display'
3 1 local NuiPopup = require 'nui.popup' local NuiPopup = require 'nui.popup' 4 2 local NuiText = require 'nui.text' local NuiText = require 'nui.text' 5 3 local NuiLine = require 'nui.line' local NuiLine = require 'nui.line' 30 28 show_tree = function ( tree ) show_tree = function ( tree )31 29 local popup = get_nui_popup() local popup = get_nui_popup()32 30 local bufnr = popup.bufnr local bufnr = popup.bufnr33 - local text, _ = display ( tree )31 + local text = vim . inspect ( tree )35 33 local line_number = 1 local line_number = 1 36 - for line in text:gmatch '[^\r\n]+' do 35 + for line in text:gmatch '[^\r\n]+' do 37 36 local nui_line = NuiLine() local nui_line = NuiLine()38 37 nui_line:append( NuiText( line, 'NormalFloat' ) ) 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 line_number = line_number + 1 neovim/lua/std/debug.lua Modified +5 / −4 text lines
6 6 return vim.g.bugabinga_debug_mode return vim.g.bugabinga_debug_mode9 - local function print_debug ( ... )9 + local function print_debug ( message , ... )10 10 if is_debug_mode() then if is_debug_mode() then 12 + vim.print( message , ... )15 16 local function toggle_debug_mode ()local function toggle_debug_mode ()16 17 vim.g.bugabinga_debug_mode = not vim.g.bugabinga_debug_mode vim.g.bugabinga_debug_mode = not vim.g.bugabinga_debug_mode17 - 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, {} )23 24 print = print_debug, print = print_debug,neovim/lua/std/display.lua Deleted deleted file mode 100644+0 / −44 text lines
1 - local icon = require 'std.icon' 2 - local table = require 'std.table' 4 - local function display (value)6 - return 'nil' , 'Special' 9 - local value_type = type (value)11 - if value_type == 'string' then 12 - return icon.quot_left .. ' ' .. value .. ' ' .. icon.quot_right, 'String' 15 - if value_type == 'number' then 16 - return icon.hash .. ' ' .. tostring (value), 'Number' 19 - if value_type == 'boolean' then 20 - local mark = value and icon.checkbox_mark or icon.checkbox_unmark21 - return mark, 'Boolean' 24 - if value_type == 'userdata' then 25 - local ud = icon.user .. icon.data26 - return ud .. ' ' .. tostring (value), 'Identifier' 29 - if value_type == 'thread' then 30 - local thread = icon.thread31 - return thread .. ' ' .. tostring (value), 'Identifier' 34 - if value_type == 'function' then 35 - local fn = icon['function' ]36 - return fn .. ' ' .. tostring (value), 'Function' 39 - if value_type == 'table' then 40 - return table .deep_concat(value, {render_value = display}), 'Identifier'
neovim/lua/std/icon.lua Modified +5 / −5 text lines
6 6 arrow_right = '' , arrow_right = '' ,7 7 branch = '' , branch = '' ,8 8 carriage_return = '␍' , carriage_return = '␍' ,10 10 checkbox_unmark = '' , checkbox_unmark = '' ,11 11 command = '' , command = '' ,13 13 block = '█' , block = '█' ,14 14 data = '' , data = '' ,15 15 diagnostic = '⊙' , diagnostic = '⊙' ,26 26 global = '' , global = '' ,27 27 group = '' , group = '' ,28 28 hash = '' , hash = '' ,30 30 info = '' , info = '' ,31 31 insert = '' , insert = '' ,32 32 lazy = '' , lazy = '' ,41 41 normal = 'Ν' , normal = 'Ν' ,42 42 pending = '' , pending = '' ,43 43 precedes = '❮' , precedes = '❮' ,46 46 replace = '' , replace = '' ,47 47 select = '' , select = '' ,48 48 space = '·' , space = '·' ,neovim/lua/std/ignored.lua Modified +0 / −1 text lines
21 21 local buftypes = {local buftypes = {23 22 'acwrite' , 'acwrite' ,25 24 'neotree' , 'neotree' ,neovim/lua/std/map.lua Modified +13 / −13 text lines
32 32 local bind = function ( self, map )local bind = function ( self, map )33 33 vim.validate { 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 local keys = map.keys50 50 desc = map.description, 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 if type ( keys ) == 'table' then 56 56 for _, key in ipairs ( keys ) do for _, key in ipairs ( keys ) do 57 - vim.keymap.set( self.mode , key, command, options )57 + vim.keymap.set( self.modes , key, command, options )60 - vim.keymap.set( self.mode , keys, command, options )60 + vim.keymap.set( self.modes , keys, command, options )65 65 return function () 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 if type ( keys ) == 'table' then 68 68 for _, key in ipairs ( keys ) do for _, key in ipairs ( keys ) do 69 - vim.keymap.del( self.mode , key, delete_options )69 + vim.keymap.del( self.modes , key, delete_options )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 )local add_mode = function ( self, key )78 78 local new_mode = available_modes[key] local new_mode = available_modes[key]79 79 if new_mode == nil then error ( 'unknown keymap mode requested: ' .. key ) end 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 return self87 87 local map = setmetatable (local map = setmetatable (92 92 __index = add_mode, __index = add_mode,neovim/lua/std/project.lua Modified +66 / −61 text lines
9 9 local cache = {}local cache = {}10 10 local hasher = vim.fn.sha256local hasher = vim.fn.sha25611 11 local markers_to_string = function ( markers )local markers_to_string = function ( markers )12 - return table .deep_concat( markers, {16 - key_value_delimiter = '' ,12 + return vim.inspect( markers )21 14 local create_hash = function ( path, markers )local create_hash = function ( path, markers )22 15 local path_hash = hasher( path ) local path_hash = hasher( path )40 33 local MAX_TRAVERSAL_COUNT = 100 local MAX_TRAVERSAL_COUNT = 100 72 72 local function find_root ( path, markers, stop )local function find_root ( path, markers, stop )73 73 validate { 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 ) ) path = path or dirname( vim.api.nvim_buf_get_name( 0 ) )88 88 local cache_hit = cache_get( path, markers ) local cache_hit = cache_get( path, markers )89 89 if cache_hit then if cache_hit then 90 + debug .print( ' CACHE HIT' , cache_hit )91 91 return cache_hit return cache_hit135 135 local project_root = nil local project_root = nil 136 136 local max_likelyhood = 0 local max_likelyhood = 0 143 143 for _, score in ipairs ( directory_scores ) do for _, score in ipairs ( directory_scores ) do 144 - local likelihood = score.marker_count + 1 / score.distance_to_buffer_file144 + local likelihood = score.marker_count + score.distance_to_buffer_file145 145 if likelihood > max_likelyhood then if likelihood > max_likelyhood then 146 146 max_likelyhood = likelihood max_likelyhood = likelihood147 147 project_root = score.path project_root = score.path162 162 local function find_project_root ( path, markers )local function find_project_root ( path, markers )164 164 local default_markers = { 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 {} markers = markers or {}190 191 local function find_java_project_root ( path )local function find_java_project_root ( path )191 192 local java_markers = { 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 ) return find_root( path, java_markers )210 211 local lua_markers = {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 )local find_lua_project_root = function ( path )226 227 local zig_markers = {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 )local find_zig_project_root = function ( path )237 238 local find_rust_project_root = function ( path )local find_rust_project_root = function ( path )238 239 local markers = { local markers = {239 - { name = 'Cargo.toml' , weight = 3 },240 + { name = 'Cargo.toml' , weight = DEFINITLY , },241 242 local cargo_crate_dir = find_root( path, markers ) local cargo_crate_dir = find_root( path, markers )242 243 if cargo_crate_dir == nil then return nil end if cargo_crate_dir == nil then return nil end 251 252 vim.fs.joinpath( cargo_crate_dir, 'Cargo.toml' ), 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 local cargo_workspace_root257 258 if result.code == 0 then if result.code == 0 then 279 280 return rooter and rooter( path ) or fallback_rooter( path ) return rooter and rooter( path ) or fallback_rooter( path )
284 + local parse_project_configuration = function ()283 288 find_root = find_root, find_root = find_root,284 289 find_root_by_filetype = find_root_by_filetype, find_root_by_filetype = find_root_by_filetype,neovim/lua/std/table/deep_concat.lua Deleted deleted file mode 100644+0 / −68 text lines
1 - return function ( some_table, options)2 - options = options or {}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 },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)29 - if newline then append(fill:rep(level)) end 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 41 - elseif vim.tbl_count(value) == 1 then 45 - for k,v in pairs (value) do 46 - append(render_key(k))47 - append(key_value_delimiter)48 - append(render_value(v))54 - deep_concat_table(value, next_level)57 - append(render_value(value))59 - append(row_delimiter)63 - if newline then append(fill:rep(level)) end 66 - deep_concat_table(some_table)67 - return table .concat (string_builder)
neovim/lua/std/table/init.lua Modified +4 / −5 text lines
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, count = vim.tbl_count,10 9 deep_extend = vim.tbl_deep_extend, deep_extend = vim.tbl_deep_extend,11 10 extend = vim.tbl_extend, extend = vim.tbl_extend,neovim/neovim/lua/bugabinga/plugins/lush.lua Added new file mode 100644+14 / −0 text lines
neovim/spell/nerd.utf-8.add Modified +5 / −0 text lines
neovim/spell/nerd.utf-8.add.spl Modified Binary size (old → new): 278 → 340 bytes.
+9 / −0 text lines
6 6 $env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }$env.WORKSPACE = if $env.WIN32 { "W:/" } else { "~/Workspace" | path expand }7 7 $env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }$env.NOTES = if $env.WIN32 { "N:/" } else { "~/Notes" | path expand }
9 + if not (which nvim | is-empty) {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 {if ($env | get -i TERM_PROGRAM) == WezTerm {10 19 $env.TERM = "wezterm" $env.TERM = "wezterm" 11 20 if not $env.WIN32 { if not $env.WIN32 {