From 13a6c3f2696124110f08a4912452d2e745493a7b Mon Sep 17 00:00:00 2001 From: Seth Etter Date: Mon, 29 Jun 2026 10:51:08 -0500 Subject: [PATCH] nvim: keys: fmt --- nvim/lua/config/keys.lua | 44 ++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/nvim/lua/config/keys.lua b/nvim/lua/config/keys.lua index 5dd2fea..107d5ae 100644 --- a/nvim/lua/config/keys.lua +++ b/nvim/lua/config/keys.lua @@ -50,9 +50,9 @@ vim.keymap.set("n", "td", "tabclose") vim.keymap.set("n", "/", "CommentToggle") vim.keymap.set("v", "/", ":'<,'>CommentToggle") - -- telescope -vim.keymap.set("n", +vim.keymap.set( + "n", "f", "Telescope find_files find_command=rg,--ignore,--hidden,--files,--iglob=!.git sort_mru=true" ) @@ -96,14 +96,20 @@ vim.keymap.set("n", "F", "Format") -- trouble vim.keymap.set("n", "xx", "Trouble diagnostics toggle", { desc = "Diagnostics (Trouble)" }) -vim.keymap.set("n", "xX", "Trouble diagnostics toggle filter.buf=0", - { desc = "Buffer Diagnostics (Trouble)" }) -vim.keymap.set("n", "cs", "Trouble symbols_float toggle", - { desc = "Symbols (Trouble)" }) -vim.keymap.set("n", "cS", "Trouble symbols toggle", - { desc = "Symbols (Trouble)" }) -vim.keymap.set("n", "cl", "Trouble lsp toggle focus=false", - { desc = "LSP Definitions / references / ... (Trouble)" }) +vim.keymap.set( + "n", + "xX", + "Trouble diagnostics toggle filter.buf=0", + { desc = "Buffer Diagnostics (Trouble)" } +) +vim.keymap.set("n", "cs", "Trouble symbols_float toggle", { desc = "Symbols (Trouble)" }) +vim.keymap.set("n", "cS", "Trouble symbols toggle", { desc = "Symbols (Trouble)" }) +vim.keymap.set( + "n", + "cl", + "Trouble lsp toggle focus=false", + { desc = "LSP Definitions / references / ... (Trouble)" } +) vim.keymap.set("n", "xL", "Trouble loclist toggle", { desc = "Location List (Trouble)" }) vim.keymap.set("n", "xQ", "Trouble qflist toggle", { desc = "Quickfix List (Trouble)" }) @@ -123,28 +129,30 @@ vim.keymap.set("n", "Z", "Goyo") vim.keymap.set("v", "gl", function() require("gitlinker").get_buf_range_url("n", { - action_callback = require("gitlinker.actions").copy_to_clipboard + action_callback = require("gitlinker.actions").copy_to_clipboard, }) end, { silent = true }) vim.keymap.set("v", "gl", function() require("gitlinker").get_buf_range_url("v", { - action_callback = require("gitlinker.actions").copy_to_clipboard + action_callback = require("gitlinker.actions").copy_to_clipboard, }) end, { silent = true }) vim.keymap.set("n", "y", function() - local filepath = vim.fn.expand('%:.') - local line = vim.fn.line('.') - local ref = filepath .. ':' .. line - vim.fn.system('pbcopy', ref) - vim.notify('Copied: ' .. ref, vim.log.levels.INFO) + local filepath = vim.fn.expand("%:.") + local line = vim.fn.line(".") + local ref = filepath .. ":" .. line + vim.fn.system("pbcopy", ref) + vim.notify("Copied: " .. ref, vim.log.levels.INFO) end, { desc = "Copy filepath:line to clipboard" }) -- pi edit vim.api.nvim_create_user_command("Pi", function(opts) vim.ui.input({ prompt = "Pi: " }, function(input) - if not input or input == "" then return end + if not input or input == "" then + return + end local ref = string.format("%s:%d-%d", vim.fn.expand("%:."), opts.line1, opts.line2) local prompt = string.format("%s (in %s)", input, ref) vim.cmd(vim.o.columns >= 160 and "botright vnew" or "botright new") -- 2.51.2