Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
d4fde2a12c211cf6e35dc36f2fa531127caaa20c
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
- Parent 1: f7518152b7fe · Diff against parent 1
- Parent 2: 6bf371a10cfc · Showing diff
bugabingas dorkfiles
d4fde2a12c211cf6e35dc36f2fa531127caaa20c
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
+8 / −1309 text lines · 1 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately
deleted file mode 100644+0 / −22 text lines
inherits = "base16_default_dark""ui.virtual.ruler" = { bg = "base01" }"comment" = { fg = "base03", modifiers = ["italic", "bold"] }[palette]base00 = "#181818" # Default Backgroundbase01 = "#282828" # Lighter Background (Used for status bars, line number and folding marks)base02 = "#383838" # Selection Backgroundbase03 = "#585858" # Comments, Invisibles, Line Highlightingbase04 = "#b8b8b8" # Dark Foreground (Used for status bars)base05 = "#d8d8d8" # Default Foreground, Caret, Delimiters, Operatorsbase06 = "#e8e8e8" # Light Foreground (Not often used)base07 = "#f8f8f8" # Light Background (Not often used)base08 = "#ab4642" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deletedbase09 = "#dc9656" # Integers, Boolean, Constants, XML Attributes, Markup Link Urlbase0A = "#f7ca88" # Classes, Markup Bold, Search Text Backgroundbase0B = "#a1b56c" # Strings, Inherited Class, Markup Code, Diff Insertedbase0C = "#86c1b9" # Support, Regular Expressions, Escape Characters, Markup Quotesbase0D = "#7cafc2" # Functions, Methods, Attribute IDs, Headingsbase0E = "#ba8baf" # Keywords, Storage, Selector, Markup Italic, Diff Changedbase0F = "#a16946" # Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>deleted file mode 100644+0 / −22 text lines
inherits = "base16_default_light""ui.virtual.ruler" = { bg = "base01" }"comment" = { fg = "base03", modifiers = ["italic", "bold"] }[palette]base00 = "#f2f2f2" # Default Backgroundbase01 = "#dcdcdc" # Lighter Background (Used for status bars, line number and folding marks)base02 = "#c2c2c2" # Selection Backgroundbase03 = "#8a8a8a" # Comments, Invisibles, Line Highlightingbase04 = "#2e2e2e" # Dark Foreground (Used for status bars)base05 = "#1a1a1a" # Default Foreground, Caret, Delimiters, Operatorsbase06 = "#050505" # Light Foreground (Not often used)base07 = "#000000" # Light Background (Not often used)base08 = "#8c3532" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deletedbase09 = "#b45f31" # Integers, Boolean, Constants, XML Attributes, Markup Link Urlbase0A = "#b88e36" # Classes, Markup Bold, Search Text Backgroundbase0B = "#6c782e" # Strings, Inherited Class, Markup Code, Diff Insertedbase0C = "#4d7474" # Support, Regular Expressions, Escape Characters, Markup Quotesbase0D = "#4b6988" # Functions, Methods, Attribute IDs, Headingsbase0E = "#6c5b7b" # Keywords, Storage, Selector, Markup Italic, Diff Changedbase0F = "#5c4343" # Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>deleted file mode 100644+0 / −21 text lines
inherits = "base16_terminal"[palette]black = "#252525"white = "#ffffff"gray = "#555555"red = "#a55f5f"green = "#5f875f"yellow = "#af875f"blue = "#5f87af"magenta = "#875faf"cyan = "#5f8787"light-gray = "#b0b0b0"light-red = "#ff8700"light-green = "#87af5f"light-yellow = "#ffd700"light-blue = "#87afd7"light-magenta = "#d70087"light-cyan = "#87d7d7"+0 / −5 text lines
+0 / −3 text lines
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" }, "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" }, "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" }, "nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" }, "nvim-treesitter": { "branch": "master", "commit": "6a3c6a42a6e24414bdf337b05a84a0ea013dd155" }, "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },deleted file mode 100644+0 / −16 text lines
return { 'f-person/auto-dark-mode.nvim', dev = true, lazy = false, opts = { -- interval of 0 freezes neovim on quit -- update_interval = 0, update_interval = 5000, set_dark_mode = function () vim.opt.background = 'dark' end, set_light_mode = function () vim.opt.background = 'light' end, },}deleted file mode 100644+0 / −69 text lines
--FIXME: own this. is vim.ui.open shim still necessary?return { "stevearc/dressing.nvim", lazy = false, opts = { input = { insert_only = false, -- relative = "editor", win_options = { sidescrolloff = 4, }, get_config = function() if vim.api.nvim_win_get_width(0) < 50 then return { relative = "editor", } end end, }, select = { backend = { "telescope", "builtin", "fzf_lua" }, }, }, config = function(_, opts) require("dressing").setup(opts) -- Shim for vim.ui.open if vim.ui.open then return end ---Copied from vim.ui.open in Neovim 0.10+ ---@param path string ---@return nil|string[] cmd ---@return nil|string error local function get_open_cmd(path) if vim.fn.has("mac") == 1 then return { "open", path } elseif vim.fn.has("win32") == 1 then if vim.fn.executable("rundll32") == 1 then return { "rundll32", "url.dll,FileProtocolHandler", path } else return nil, "rundll32 not found" end elseif vim.fn.executable("wslview") == 1 then return { "wslview", path } elseif vim.fn.executable("xdg-open") == 1 then return { "xdg-open", path } else return nil, "no handler found" end end vim.ui.open = function(path) local is_uri = path:match("%w+:") if not is_uri then path = vim.fn.expand(path) end local cmd, err = get_open_cmd(path) if not cmd or err then return nil, err end local jid = vim.fn.jobstart(cmd, { detach = true }) if jid <= 0 then return nil, "Failed to start job" end end end,}deleted file mode 100644+0 / −20 text lines
local debug = require 'std.dbg'return { 'j-hui/fidget.nvim', version = '1.*', event = 'LspAttach', opts = { progress = { poll_rate = 500, -- How and when to poll for progress messages suppress_on_insert = true, -- Suppress new messages while in insert mode lsp = { log_handler = debug.get(), -- Log `$/progress` handler invocations (for debugging) }, }, notification = { filter = debug.get() and vim.log.levels.DEBUG or vim.log.levels.INFO, override_vim_notify = true, -- Automatically override vim.notify() with Fidget }, },}deleted file mode 100644+0 / −164 text lines
local map = require("std.map")return { "lewis6991/gitsigns.nvim", version = "0.*", event = vim.g.FILE_LOADED_EVENTS, opts = { signs = { add = { text = "│" }, change = { text = "│" }, delete = { text = "_" }, topdelete = { text = "‾" }, changedelete = { text = "~" }, untracked = { text = "┆" }, }, preview_config = { border = vim.g.border_style, }, current_line_blame = true, current_line_blame_opts = { ignore_whitespace = true, }, current_line_blame_formatter = "<author>(<author_time:%d.%m.%Y>): <summary>", on_attach = function(bufnr) local gitsigns = require("gitsigns") map.normal({ description = "Goto next hunk", category = "git", keys = "]h", buffer = bufnr, command = gitsigns.next_hunk, }) map.normal({ description = "Goto previous hunk", category = "git", keys = "[h", buffer = bufnr, command = gitsigns.prev_hunk, }) map.normal({ description = "Stage hunk", category = "git", keys = "<leader>hs", buffer = bufnr, command = gitsigns.stage_hunk, }) map.visual_select({ description = "Stage hunk", category = "git", keys = "<leader>hs", buffer = bufnr, command = function() gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end, }) map.normal({ description = "Reset hunk", category = "git", keys = "<leader>hr", buffer = bufnr, command = gitsigns.reset_hunk, }) map.visual_select({ description = "Reset hunk", category = "git", keys = "<leader>hr", buffer = bufnr, command = function() gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end, }) map.normal({ description = "Undo stage hunk", category = "git", keys = "<leader>hu", buffer = bufnr, command = gitsigns.undo_stage_hunk, }) map.normal({ description = "Stage buffer", category = "git", keys = "<leader>hS", buffer = bufnr, command = gitsigns.stage_buffer, }) map.normal({ description = "Reset buffer", category = "git", keys = "<leader>hR", buffer = bufnr, command = gitsigns.reset_buffer, }) map.normal({ description = "Preview hunk", category = "git", keys = "<leader>hp", buffer = bufnr, command = gitsigns.preview_hunk, }) map.normal({ description = "Blame line", category = "git", keys = "<leader>hb", buffer = bufnr, command = function() gitsigns.blame_line({ full = true }) end, }) map.normal({ description = "Diff this", category = "git", keys = "<leader>hd", buffer = bufnr, command = gitsigns.diffthis, }) map.normal({ description = "Diff this ~", category = "git", keys = "<leader>hD", buffer = bufnr, command = function() gitsigns.diffthis("~") end, }) map.normal({ description = "Toggle current line blame", category = "git", keys = "<leader>tb", buffer = bufnr, command = gitsigns.toggle_current_line_blame, }) map.normal({ description = "Toggle removed lines", category = "git", keys = "<leader>tr", buffer = bufnr, command = gitsigns.toggle_deleted, }) map.operator_pending.visual({ description = "select hunk", category = "git", keys = "ih", buffer = bufnr, command = ":<C-U>Gitsigns select_hunk<CR>", }) end, },}deleted file mode 100644+0 / −817 text lines
---@diagnostic disable: param-type-mismatchlocal icon = require("std.icon")local auto = require("std.auto")local ignored = require("std.ignored")local NEW_FILE = "~untitled~"return { { "rebelot/heirline.nvim", version = "1.*", event = "VeryLazy", dependencies = { "nvim-tree/nvim-web-devicons", { "lewis6991/gitsigns.nvim", lazy = true }, { "SmiteshP/nvim-navic", lazy = true }, }, config = function() local heirline = require("heirline") local conditions = require("heirline.conditions") local utils = require("heirline.utils") local nugu = require("bugabinga.nugu.palette") heirline.load_colors(nugu) auto("reload_heirline_colors")({ description = "Reload dark/light nugu colors for Heirline", events = "ColorScheme", command = function() utils.on_colorscheme(nugu) end, }) local vi_mode = { init = function(self) self.mode = vim.fn.mode(1) -- :h mode() end, static = { mode_names = { n = icon.normal, no = icon.normal .. "?", nov = icon.normal .. "?", noV = icon.normal .. "?", ["no\22"] = icon.normal .. "?", niI = icon.normal .. "i", niR = icon.normal .. "r", niV = icon.normal .. "v", nt = icon.normal .. "t", v = icon.visual, vs = icon.visual .. "s", V = icon.visual .. "_", Vs = icon.visual .. "s", ["\22"] = "^" .. icon.visual, ["\22s"] = "^" .. icon.visual, s = icon.select, S = icon.select .. "_", ["\19"] = "^" .. icon.select, i = icon.insert, ic = icon.insert .. "c", ix = icon.insert .. "x", R = icon.replace, Rc = icon.replace .. "c", Rx = icon.replace .. "x", Rv = icon.replace .. "v", Rvc = icon.replace .. "v", Rvx = icon.replace .. "v", c = icon.command, cv = icon.command .. "x", r = icon.pending, rm = icon.pending .. "m", ["r?"] = icon.pending .. "?", ["!"] = icon.exclaim, t = icon.terminal, }, mode_colors = { n = "ui_normal", i = "ui_accent", v = "ui_important_global", V = "ui_important_global", ["\22"] = "ui_important_global", c = "ui_important_global", s = "ui_important_global", S = "ui_important_global", ["\19"] = "ui_important_global", R = "ui_important_global", r = "ui_important_global", ["!"] = "ui_important_global", t = "ui_important_global", }, }, provider = function(self) local mode_name = self.mode_names[self.mode] return " " .. icon.vim .. " %3(" .. mode_name .. "%) " end, hl = function(self) local mode = self.mode:sub(1, 1) -- get only the first mode character return { fg = self.mode_colors[mode], bold = true } end, update = { "ModeChanged", pattern = "*:*", callback = vim.schedule_wrap(function() vim.cmd.redrawstatus() end), }, } local file_icon = { init = function(self) local filename = self.filename local extension = vim.fn.fnamemodify(filename, ":e") self.icon = require("nvim-web-devicons").get_icon_color(filename, extension, { default = true }) end, provider = function(self) return self.icon and (self.icon .. " ") end, hl = "DefaultIcon", } local file_name = { init = function(self) self.lfilename = vim.fs.normalize(vim.fn.fnamemodify(self.filename, ":.")) if self.lfilename == "" then self.lfilename = NEW_FILE end end, flexible = 2, { provider = function(self) return self.lfilename end, }, { provider = function(self) return vim.fs.normalize(vim.fn.pathshorten(self.lfilename)) end, }, } local file_flags = { { condition = function() return vim.bo.modified end, provider = string.format(" %s ", icon.modified), hl = "Comment", }, { condition = function() return not vim.bo.modifiable or vim.bo.readonly end, provider = string.format(" %s ", icon.lock), hl = "ErrorMsg", }, } local file_name_block = { init = function(self) self.filename = vim.fs.normalize(vim.api.nvim_buf_get_name(0)) end, file_icon, { provider = " " }, file_name, file_flags, { provider = "%<" }, -- this means that the statusline is cut here when there's not enough space } local file_type = { provider = function() return icon.file .. " " .. string.upper(vim.bo.filetype) end, } local file_encoding = { provider = function() local enc = (vim.bo.fenc ~= "" and vim.bo.fenc) or vim.o.enc -- :h 'enc' return enc ~= "utf-8" and enc:upper() end, } local file_format = { static = { dos = icon.newline .. icon.carriage_return, unix = icon.newline, mac = icon.carriage_return, }, provider = function(self) local fileformat = vim.bo.fileformat return self[fileformat] end, } local file_size = { provider = function() -- stackoverflow, compute human readable file size -- i want to see vim opening a 1EiB file local suffix = { "b", "k", "M", "G", "T", "P", "E" } local fsize = vim.fn.getfsize(vim.api.nvim_buf_get_name(0)) fsize = (fsize < 0 and 0) or fsize if fsize < 1024 then return fsize .. suffix[1] end local i = math.floor((math.log(fsize) / math.log(1024))) return string.format("%.2g%s", fsize / math.pow(1024, i), suffix[i + 1]) end, } local file_last_modified = { provider = function() local ftime = vim.fn.getftime(vim.api.nvim_buf_get_name(0)) if ftime > 0 then local timeago = require("std.timeago") return timeago.format(ftime) end end, } local lsp_active = { -- condition = conditions.lsp_attached, condition = function() vim.lsp.buf_is_attached() end, -- FIXME: updates from parent components do not seem to update children, -- if those have their own updates? update = { "LspAttach", "LspDetach", "BufEnter", "BufLeave" }, provider = function() local names = {} for _, client in pairs(vim.lsp.get_clients({ bufnr = 0 })) do table.insert(names, client.name) end return icon.lsp .. " " .. table.concat(names, " ") end, } local navic = { condition = function() local ok, navic = pcall(require, "nvim-navic") return ok and navic.is_available() end, static = { -- create a type highlight map type_hl = { File = "Directory", Module = "@include", Namespace = "@namespace", Package = "@include", Class = "@structure", Method = "@method", Property = "@property", Field = "@field", Constructor = "@constructor", Enum = "@field", Interface = "@type", Function = "@function", Variable = "@variable", Constant = "@constant", String = "@string", Number = "@number", Boolean = "@boolean", Array = "@field", Object = "@type", Key = "@keyword", Null = "@comment", EnumMember = "@field", Struct = "@structure", Event = "@keyword", Operator = "@operator", TypeParameter = "@type", }, -- bit operation dark magic, see below... enc = function(line, col, winnr) return bit.bor(bit.lshift(line, 16), bit.lshift(col, 6), winnr) end, -- line: 16 bit (65535); col: 10 bit (1023); winnr: 6 bit (63) dec = function(c) local line = bit.rshift(c, 16) local col = bit.band(bit.rshift(c, 6), 1023) local winnr = bit.band(c, 63) return line, col, winnr end, }, init = function(self) local data = require("nvim-navic").get_data() or {} local children = {} -- create a child for each level for i, d in ipairs(data) do -- encode line and column numbers into a single integer local pos = self.enc(d.scope.start.line, d.scope.start.character, self.winnr) local child = { { provider = d.icon, hl = self.type_hl[d.type], }, { -- escape `%`s (elixir) and buggy default separators provider = d.name:gsub("%%", "%%%%"):gsub("%s*->%s*", ""), -- highlight icon only or location name as well hl = self.type_hl[d.type], on_click = { -- pass the encoded position through minwid minwid = pos, callback = function(_, minwid) -- decode local line, col, winnr = self.dec(minwid) vim.api.nvim_win_set_cursor(vim.fn.win_getid(winnr), { line, col }) end, name = "heirline_navic", }, }, } -- add a separator only if needed if #data > 1 and i < #data then table.insert(child, { provider = " > ", -- hl = { fg = 'bright_fg', }, }) end table.insert(children, child) end -- instantiate the new child, overwriting the previous one self.child = self:new(children, 1) end, -- evaluate the children containing navic components provider = function(self) return self.child:eval() end, -- hl = { fg = 'gray', }, update = "CursorMoved", } local diagnostic_enabled = { init = function(self) self.icon = (not vim.diagnostic.is_enabled()) and icon.toggle_off or icon.toggle_on end, provider = function(self) return icon.diagnostic .. " " .. self.icon end, } local diagnostic = { condition = conditions.has_diagnostics, static = { error_icon = icon.error, warn_icon = icon.warn, info_icon = icon.info, hint_icon = icon.hint, }, init = function(self) self.errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }) self.warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }) self.hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }) self.info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }) end, update = { "DiagnosticChanged", "BufEnter", "BufLeave" }, { provider = function(self) -- 0 is just another output, we can decide to print it or not! return self.errors > 0 and (self.error_icon .. " " .. self.errors .. " ") end, hl = "DiagnosticError", }, { provider = function(self) return self.warnings > 0 and (self.warn_icon .. " " .. self.warnings .. " ") end, hl = "DiagnosticWarn", }, { provider = function(self) return self.info > 0 and (self.info_icon .. " " .. self.info .. " ") end, hl = "DiagnosticInfo", }, { provider = function(self) return self.hints > 0 and (self.hint_icon .. " " .. self.hints) end, hl = "DiagnosticHint", }, } local is_svn_repo = function() local svn_dir = vim.fs.find(".svn", { upward = true, stop = vim.uv.os_homedir(), path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), type = "directory", }) return not vim.tbl_isempty(svn_dir) end local svn_get_relative_url = function() -- FIXME: replace with vim.system local job = require("plenary.job") local relative_url = { "[ERR]" } job :new({ command = "svn", args = { "info", "--show-item", "relative-url", "--no-newline" }, on_exit = function(current_job, exit_code) if exit_code == 0 then relative_url = current_job:result() end end, }) :sync() return relative_url[1] end local svn = { condition = is_svn_repo, update = "BufEnter", init = function(self) self.relative_url = svn_get_relative_url() end, { provider = function(self) return icon.subversion .. " " .. icon.branch .. " " .. self.relative_url end, }, } local git = { condition = conditions.is_git_repo, init = function(self) self.status_dict = vim.b.gitsigns_status_dict end, { provider = function(self) return icon.git .. " " .. icon.branch .. " " .. self.status_dict.head .. " " end, }, { provider = function(self) local count = self.status_dict.added or 0 return count > 0 and (icon.diff_add .. " " .. count .. " ") end, hl = "DiffAdd", }, { provider = function(self) local count = self.status_dict.removed or 0 return count > 0 and (icon.diff_remove .. " " .. count .. " ") end, hl = "DiffDelete", }, { provider = function(self) local count = self.status_dict.changed or 0 return count > 0 and (icon.diff_change .. " " .. count .. " ") end, hl = "DiffChange", }, } local work_dir = { init = function(self) self.icon = (vim.fn.haslocaldir(0) == 1 and icon["local"] or "") .. " " .. icon.global .. " " self.cwd = vim.fs.normalize(vim.uv.cwd()):gsub(vim.fs.normalize(vim.uv.os_homedir()), "~") end, flexible = 1, { provider = function(self) return self.icon .. self.cwd end, }, { provider = function(self) local cwd = vim.fn.pathshorten(self.cwd) return self.icon .. cwd end, }, { provider = "", }, } local help_file_name = { condition = function() return vim.bo.filetype == "help" end, provider = function() local filename = vim.api.nvim_buf_get_name(0) return vim.fn.fnamemodify(filename, ":t") end, hl = "Question", } local terminal_name = { provider = function() local name, _ = vim.api.nvim_buf_get_name(0):gsub(".*:", "") local basename = vim.fs.basename(name) return icon.terminal .. " " .. (basename or "noname") end, hl = "Bold", } local togglers = { provider = function() local togglers = require("bugabinga.options.togglers") return tostring(togglers) end, } local macro_recording = { condition = function() return vim.fn.reg_recording() ~= "" and vim.o.cmdheight == 0 end, provider = icon.macro .. " ", hl = "PreProc", utils.surround({ "░▒▓ ", " ▓▒░" }, nil, { provider = function() return vim.fn.reg_recording() end, hl = "Bold", }), update = { "RecordingEnter", "RecordingLeave", }, } local lazy = { condition = function() local ok, lazy_status = pcall(require, "lazy.status") return ok and lazy_status.has_updates() end, update = { "User", pattern = "LazyUpdate" }, provider = function() return " " .. icon.lazy .. " " .. require("lazy.status").updates() .. " " end, on_click = { callback = function() require("lazy").update() end, name = "update_plugins", }, } local align = { provider = "%=" } local space = { provider = " " } local default_statusline = { vi_mode, macro_recording, work_dir, space, git, svn, align, diagnostic, space, lsp_active, align, togglers, space, space, diagnostic_enabled, space, lazy, space, file_encoding, space, file_format, space, file_type, space, file_size, space, file_last_modified, } local special_statusline = { condition = function() return conditions.buffer_matches({ buftype = ignored.buftypes, filetype = ignored.filetypes, }) end, file_type, space, help_file_name, align, } local terminal_statusline = { condition = function() return conditions.buffer_matches({ buftype = { "terminal" } }) end, { condition = conditions.is_active, vi_mode, space }, file_type, space, terminal_name, align, } local inactive_statusline = { condition = conditions.is_not_active, file_type, space, file_name, align, } local statuslines = { hl = function() if conditions.is_active() then return "StatusLine" else return "StatusLineNC" end end, fallthrough = false, special_statusline, terminal_statusline, inactive_statusline, default_statusline, } local winbars = { hl = function() if conditions.is_active() then return "Winbar" else return "WinbarNC" end end, fallthrough = false, { condition = function() return conditions.buffer_matches({ buftype = { "terminal" } }) end, file_type, space, terminal_name, }, { file_name_block, space, navic, }, } -- local tabline_buffer_number = { -- provider = function ( self ) -- return '(' .. tostring( self.bufnr ) .. ')' -- end, -- hl = function ( self ) -- if self.is_active then -- return { fg = utils.get_highlight 'TabLineSel'.fg, } -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then -- return { fg = utils.get_highlight 'StatusLineNc'.fg, } -- else -- return { fg = utils.get_highlight 'TabLine'.fg, } -- end -- end, -- } -- local tabline_file_name = { -- provider = function ( self ) -- local name = self.file_name -- return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) ) -- end, -- hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end, -- } -- local tabline_file_flags = { -- { -- condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end, -- provider = icon.modified .. ' ', -- }, -- { -- condition = function ( self ) -- return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or -- vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } ) -- end, -- provider = function ( self ) -- if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then -- return icon.terminal -- else -- return icon.lock -- end -- end, -- }, -- hl = 'Bold', -- } -- local tabline_file_name_block = { -- init = function ( self ) -- self.file_name = vim.api.nvim_buf_get_name( self.bufnr ) -- end, -- -- hl = function ( self ) -- if self.is_active then -- return 'TabLineSel' -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then -- return { fg = utils.get_highlight 'StatusLineNc'.fg, } -- else -- return 'TabLine' -- end -- end, -- -- on_click = { -- callback = function ( _, minwid, _, button ) -- if button == 'm' then --m = middle click -- vim.schedule( function () -- vim.api.nvim_buf_delete( minwid, { force = false, } ) -- vim.cmd.redrawtabline() -- end ) -- else -- vim.api.nvim_win_set_buf( 0, minwid ) -- end -- end, -- minwid = function ( self ) return self.bufnr end, -- name = 'heirline_tabline_buffer_callback', -- }, -- -- file_icon, -- { provider = ' ', }, -- tabline_file_name, -- tabline_buffer_number, -- tabline_file_flags, -- } -- local tabline_buffer_block = utils.surround( -- { -- ' ' .. icon.slant_left, -- icon.slant_right .. ' ', -- }, -- function ( self ) -- if self.is_active then -- return utils.get_highlight 'TabLine'.bg -- else -- return utils.get_highlight 'TabLineFill'.bg -- end -- end, -- { tabline_file_name_block, } -- ) -- local buffer_line = utils.make_buflist( -- tabline_buffer_block, -- { provider = icon.arrow_left .. ' ', hl = 'TabLine', }, -- { provider = ' ' .. icon.arrow_right, hl = 'TabLine', } -- ) local tabpage = { provider = function(self) return "%" .. self.tabnr .. "T " .. self.tabpage .. " %T" end, hl = function(self) if self.is_active then return "TabLineSel" else return "TabLine" end end, } local tab_pages = { { provider = "%=" }, utils.make_tablist(tabpage), } -- local tabline = { buffer_line, tab_pages, } -- local statuscolumn = {} heirline.setup({ statusline = statuslines, winbar = winbars, tabline = tab_pages, -- tabline = tabline, -- statuscolumn = statuscolumn, opts = { colors = nugu, disable_winbar_cb = function(args) return conditions.buffer_matches({ buftype = ignored.buftypes, filetype = ignored.filetypes, }, args.buf) end, }, }) end, },}+4 / −0 text lines
'lazy.nvim',deleted file mode 100644+0 / −11 text lines
return { 'stevearc/pair-ls.nvim', cmd = { 'Pair', 'PairConnect', }, opts = { cmd = { 'pair-ls', 'lsp', }, -- cmd = { "pair-ls", "lsp", "-port", "8080" }, -- cmd = { "pair-ls", "lsp", "-port", "8081" }, -- cmd = { "pair-ls", "lsp", "-signal", "wss://localhost:8080" }, -- cmd = { "pair-ls", "lsp", "-forward", "wss://localhost:8080" }, },}deleted file mode 100644+0 / −83 text lines
local map = require 'std.map'require 'bugabinga.health'.add_dependency{ name_of_executable = 'rg',}map.normal { description = 'Search and replace', category = 'search', keys = '<leader>rs', command = function () require 'spectre'.open() end,}map.normal { description = 'Search current word', category = 'search', keys = '<leader>rw', command = function () require 'spectre'.open_visual { select_word = true, } end,}map.visual { description = 'Search current word', category = 'search', keys = '<leader>rw', command = function () require 'spectre'.open_visual() end,}map.normal { description = 'Search on current file', category = 'search', keys = '<leader>rf', command = function () require 'spectre'.open_file_search { select_word = true, } end,}return { 'nvim-pack/nvim-spectre', cmd = 'Spectre', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', }, opts = { live_update = true, default = { replace = { cmd = 'oxi', }, }, }, build = function ( plugin_spec ) local sysname = vim.uv.os_uname().sysname local copy_cmd = {} if sysname == 'Darwin' then copy_cmd = { 'cp', 'target/release/libspectre_oxi.dylib', '../lua/spectre_oxi.so', } elseif sysname == 'Linux' then copy_cmd = { 'cp', 'target/release/libspectre_oxi.so', '../lua/spectre_oxi.so', } elseif sysname == 'Windows_NT' then copy_cmd = { 'cp', 'target/release/libspectre_oxi.dll', '../lua/spectre_oxi.dll', } else error 'unsupported os' end local spectre_oxi_dir = vim.fs.joinpath( plugin_spec.dir, 'spectre_oxi' ) local cargo_build_proc = vim.system( { 'cargo', 'build', '--release', }, { text = true, cwd = spectre_oxi_dir, } ):wait() if cargo_build_proc.code ~= 0 then error( cargo_build_proc.stderr ) end local cp_proc = vim.system( copy_cmd, { text = true, cwd = spectre_oxi_dir, } ):wait() if cp_proc.code ~= 0 then error( cp_proc.stderr ) end local rm_proc = vim.system( { 'rm', '-r', '-f', 'target', }, { text = true, cwd = spectre_oxi_dir, } ):wait() if rm_proc.code ~= 0 then error( rm_proc.stderr ) end vim.print 'Building oxi done' end,}deleted file mode 100644+0 / −5 text lines
deleted file mode 100644+0 / −1 text lines
return { 'lambdalisue/suda.vim', cmd = { 'SudaRead', 'SudaWrite', }, }deleted file mode 100644+0 / −5 text lines
deleted file mode 100644+0 / −44 text lines
local map = require 'std.map'map.normal { description = 'Toggle Tree File Explorer', category = 'explorer', keys = '<leader>e', command = function () require 'nvim-tree.api'.tree.toggle() end,}return { 'nvim-tree/nvim-tree.lua', version = '1.*', -- docs do not recommend to lazy load, but it does load slowly on win32! -- lazy = false, cmd = 'NvimTreeOpen', dependencies = { 'nvim-tree/nvim-web-devicons', 'antosha417/nvim-lsp-file-operations', }, init = function () -- disable netrw at the very start of your init.lua vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 -- set termguicolors to enable highlight groups vim.opt.termguicolors = true end, opts = { sort_by = 'case_sensitive', view = { width = 69, }, renderer = { group_empty = true, }, filters = { dotfiles = false, }, }, config = function ( _, opts ) require 'nvim-tree'.setup( opts ) require 'lsp-file-operations'.setup() end,}+1 / −0 text lines
Binary size (old → new): 927 → 957 bytes.
+1 / −0 text lines
+2 / −1 text lines
markdown-oxide; markdown-oxide; --locked --git https://github.com/Feel-ix-343/markdown-oxide.git