From 15edf30ef31b2db50cd5a08cb9200e08a6c7eb52 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Mon, 23 Feb 2026 09:08:33 -0500 Subject: [PATCH] fix(nvim): format --- config/nvim/lua/config/blink.lua | 5 ++- config/nvim/lua/config/lines/statuscolumn.lua | 10 ++++- config/nvim/lua/plugins/fzf.lua | 9 ++-- config/nvim/lua/plugins/git.lua | 36 +++++++++++----- config/nvim/lua/plugins/nvim.lua | 42 ++++++++++++------- 5 files changed, 69 insertions(+), 33 deletions(-) diff --git a/config/nvim/lua/config/blink.lua b/config/nvim/lua/config/blink.lua index 29c225a..b00ff3a 100644 --- a/config/nvim/lua/config/blink.lua +++ b/config/nvim/lua/config/blink.lua @@ -77,7 +77,10 @@ M.conventional_commits = make_source({ { range = { start = { line = 0, character = colon - 1 }, - ['end'] = { line = 0, character = colon - 1 }, + ['end'] = { + line = 0, + character = colon - 1, + }, }, newText = '!', }, diff --git a/config/nvim/lua/config/lines/statuscolumn.lua b/config/nvim/lua/config/lines/statuscolumn.lua index 362fd96..e27f999 100644 --- a/config/nvim/lua/config/lines/statuscolumn.lua +++ b/config/nvim/lua/config/lines/statuscolumn.lua @@ -38,7 +38,10 @@ return { end, sign = function() local marks = vim.api.nvim_buf_get_extmarks( - 0, -1, { vim.v.lnum - 1, 0 }, { vim.v.lnum - 1, -1 }, + 0, + -1, + { vim.v.lnum - 1, 0 }, + { vim.v.lnum - 1, -1 }, { details = true, type = 'sign' } ) for _, mark in ipairs(marks) do @@ -46,7 +49,10 @@ return { if d and d.sign_text then local text = vim.trim(d.sign_text) if text ~= '' then - return '%#' .. (d.sign_hl_group or 'SignColumn') .. '#' .. text + return '%#' + .. (d.sign_hl_group or 'SignColumn') + .. '#' + .. text end end end diff --git a/config/nvim/lua/plugins/fzf.lua b/config/nvim/lua/plugins/fzf.lua index b462a32..f0e2bfc 100644 --- a/config/nvim/lua/plugins/fzf.lua +++ b/config/nvim/lua/plugins/fzf.lua @@ -8,7 +8,8 @@ return { opts.files.file_icons = has_devicons opts.grep = opts.grep or {} opts.grep.file_icons = has_devicons - opts.grep.rg_opts = fzf.defaults.grep.rg_opts:gsub("%-e$", "--glob='!.git/' -e") + opts.grep.rg_opts = + fzf.defaults.grep.rg_opts:gsub('%-e$', "--glob='!.git/' -e") fzf.setup(opts) @@ -45,7 +46,7 @@ return { end end, }, - { '', 'FzfLua live_grep' }, + { '', 'FzfLua live_grep' }, { 'f/', 'FzfLua search_history' }, { 'f:', 'FzfLua command_history' }, { 'fa', 'FzfLua autocmds' }, @@ -79,8 +80,8 @@ return { }, { 'gb', 'FzfLua git_branches' }, { 'gw', 'FzfLua git_worktrees' }, - { 'gq', 'FzfLua quickfix' }, - { 'gl', 'FzfLua loclist' }, + { 'gq', 'FzfLua quickfix' }, + { 'gl', 'FzfLua loclist' }, }, opts = { file_icon_padding = ' ', diff --git a/config/nvim/lua/plugins/git.lua b/config/nvim/lua/plugins/git.lua index 69ce20e..eefe472 100644 --- a/config/nvim/lua/plugins/git.lua +++ b/config/nvim/lua/plugins/git.lua @@ -230,7 +230,9 @@ return { dir = '~/dev/oil-git.nvim', opts = { symbol_position = 'signcolumn', - can_use_signcolumn = function() return true end, + can_use_signcolumn = function() + return true + end, show_file_highlights = false, show_directory_highlights = false, symbols = { @@ -268,24 +270,36 @@ return { }, }, { - "lewis6991/gitsigns.nvim", - event = "VeryLazy", + 'lewis6991/gitsigns.nvim', + event = 'VeryLazy', opts = { signs = { - add = { text = "│" }, - change = { text = "│" }, - delete = { text = "_" }, - topdelete = { text = "‾" }, - changedelete = { text = "│" }, + add = { text = '│' }, + change = { text = '│' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '│' }, }, on_attach = function(bufnr) vim.wo[vim.fn.bufwinid(bufnr)].signcolumn = 'yes' end, }, keys = { - { "]g", "Gitsigns next_hunk", desc = "Next git hunk" }, - { "[g", "Gitsigns prev_hunk", desc = "Previous git hunk" }, - { "gB", "Gitsigns toggle_current_line_blame", desc = "Toggle line blame" }, + { + ']g', + 'Gitsigns next_hunk', + desc = 'Next git hunk', + }, + { + '[g', + 'Gitsigns prev_hunk', + desc = 'Previous git hunk', + }, + { + 'gB', + 'Gitsigns toggle_current_line_blame', + desc = 'Toggle line blame', + }, }, }, } diff --git a/config/nvim/lua/plugins/nvim.lua b/config/nvim/lua/plugins/nvim.lua index 3e9c26c..a8daecb 100644 --- a/config/nvim/lua/plugins/nvim.lua +++ b/config/nvim/lua/plugins/nvim.lua @@ -4,8 +4,10 @@ local function parse_output(proc) local result = proc:wait() local ret = {} if result.code == 0 then - for line in vim.gsplit(result.stdout, "\n", { plain = true, trimempty = true }) do - ret[line:gsub("/$", "")] = true + for line in + vim.gsplit(result.stdout, '\n', { plain = true, trimempty = true }) + do + ret[line:gsub('/$', '')] = true end end return ret @@ -14,12 +16,16 @@ end local function new_git_status() return setmetatable({}, { __index = function(self, key) - local ignored_proc = vim.system( - { "git", "ls-files", "--ignored", "--exclude-standard", "--others", "--directory" }, - { cwd = key, text = true } - ) + local ignored_proc = vim.system({ + 'git', + 'ls-files', + '--ignored', + '--exclude-standard', + '--others', + '--directory', + }, { cwd = key, text = true }) local tracked_proc = vim.system( - { "git", "ls-tree", "HEAD", "--name-only" }, + { 'git', 'ls-tree', 'HEAD', '--name-only' }, { cwd = key, text = true } ) local ret = { @@ -267,7 +273,7 @@ return { dir = '~/dev/oil.nvim', config = function(_, opts) require('oil').setup(opts) - local refresh = require("oil.actions").refresh + local refresh = require('oil.actions').refresh local orig_refresh = refresh.callback refresh.callback = function(...) git_status = new_git_status() @@ -297,8 +303,9 @@ return { float = { border = 'single' }, view_options = { is_hidden_file = function(name, bufnr) - local dir = require("oil").get_current_dir(bufnr) - local is_dotfile = vim.startswith(name, ".") and name ~= ".." + local dir = require('oil').get_current_dir(bufnr) + local is_dotfile = vim.startswith(name, '.') + and name ~= '..' if not dir then return is_dotfile end @@ -352,17 +359,22 @@ return { }, }, { 'tpope/vim-abolish', event = 'VeryLazy' }, - { 'tpope/vim-sleuth', event = 'BufReadPost' }, + { 'tpope/vim-sleuth', event = 'BufReadPost' }, { 'kylechui/nvim-surround', config = true, keys = { - { 'cs', mode = 'n' }, - { 'ds', mode = 'n' }, - { 'ys', mode = 'n' }, - { 'yS', mode = 'n' }, + { 'cs', mode = 'n' }, + { 'ds', mode = 'n' }, + { 'ys', mode = 'n' }, + { 'yS', mode = 'n' }, { 'yss', mode = 'n' }, { 'ySs', mode = 'n' }, }, }, + { + 'wallpants/github-preview.nvim', + keys = { 'm', 'GithubPreviewToggle' }, + config = true, + }, }