From 5662240325314dffd3654ac4fbab6fa4a93ddeae Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Wed, 25 Dec 2024 19:30:02 -0500 Subject: [PATCH] AutoYADM commit: 2024-12-25 19:30:02 --- .config/nvim/lazy-lock.json | 1 + .config/nvim/lua/config/keymaps.lua | 3 +++ .config/nvim/lua/plugins/oil.lua | 1 + .config/nvim/lua/plugins/tabout.lua | 41 +++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 2e781703..f27181ff 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -83,6 +83,7 @@ "rustaceanvim": { "branch": "master", "commit": "6db1fe9e3f005b2e0921c7302d2c195eeb90a451" }, "snacks.nvim": { "branch": "main", "commit": "98df370703b3c47a297988f3e55ce99628639590" }, "speedtyper.nvim": { "branch": "v2", "commit": "f27fa7870dd35f1884efaef1c9f1d2e7dcedcacf" }, + "tabout.nvim": { "branch": "master", "commit": "9a3499480a8e53dcaa665e2836f287e3b7764009" }, "telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" }, "text-case.nvim": { "branch": "main", "commit": "e898cfd46fa6cde0e83abb624a16e67d2ffc6457" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index ca0de016..d48d38bd 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -21,6 +21,9 @@ vim.keymap.set({ "i", "n" }, "", "") -- vim.notify("test") -- end) +map({ "n", "i", "x", "o" }, "", "", { noremap = true, desc = "Escape" }) +map({ "n", "i", "x", "o" }, "", "", { noremap = true, desc = "Escape" }) + -- Better Scroll map({ "n" }, "", "", { noremap = true, desc = "Scroll Up" }) diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil.lua index 5b9366bc..83d1f0e7 100644 --- a/.config/nvim/lua/plugins/oil.lua +++ b/.config/nvim/lua/plugins/oil.lua @@ -15,6 +15,7 @@ return { cmd = "Oil", keys = { { "-", "Oil", desc = "Open Oil" }, + { "_", "Oil --float", desc = "Open Oil Floating" }, }, opts = { default_file_explorer = true, diff --git a/.config/nvim/lua/plugins/tabout.lua b/.config/nvim/lua/plugins/tabout.lua index e69de29b..3c5b9cdd 100644 --- a/.config/nvim/lua/plugins/tabout.lua +++ b/.config/nvim/lua/plugins/tabout.lua @@ -0,0 +1,41 @@ +return { + { + "abecodes/tabout.nvim", + lazy = false, + config = function() + require("tabout").setup({ + tabkey = "", -- key to trigger tabout, set to an empty string to disable + backwards_tabkey = "", -- key to trigger backwards tabout, set to an empty string to disable + act_as_tab = true, -- shift content if tab out is not possible + act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports ) + default_tab = "", -- shift default action (only at the beginning of a line, otherwise is used) + default_shift_tab = "", -- reverse shift default action, + enable_backwards = true, -- well ... + completion = false, -- if the tabkey is used in a completion pum + tabouts = { + { open = "'", close = "'" }, + { open = '"', close = '"' }, + { open = "`", close = "`" }, + { open = "(", close = ")" }, + { open = "[", close = "]" }, + { open = "{", close = "}" }, + { open = "<", close = ">" }, + }, + ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]] + exclude = {}, -- tabout will ignore these filetypes + }) + end, + dependencies = { -- These are optional + "nvim-treesitter/nvim-treesitter", + { + "L3MON4D3/LuaSnip", + keys = function() + -- Disable default tab keybinding in LuaSnip + return {} + end, + }, + }, + event = "InsertCharPre", -- Set the event to 'InsertCharPre' for better compatibility + priority = 1000, + }, +}