diff --git a/lua/plugins/astrocore.lua b/lua/plugins/astrocore.lua index d5a14fd..bc69919 100644 --- a/lua/plugins/astrocore.lua +++ b/lua/plugins/astrocore.lua @@ -93,15 +93,27 @@ return { -- Mappings can be configured through AstroCore as well. -- NOTE: keycodes follow the casing in the vimdocs. For example, `` must be capitalized mappings = { - -- first key is the mode + n = { - -- second key is the lefthand side of the map + + -- tables with just a `desc` key will be registered with which-key if it's installed + -- this is useful for naming menus + -- ["b"] = { desc = "Buffers" }, + + -- setting a mapping to false will disable it + -- [""] = false, + + -- Visual selection of pasted text + ["gp"] = { "`[v`]", desc = "Visual selection of pasted text" }, -- navigate buffer tabs ["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" }, ["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" }, -- mappings seen under group name "Buffer" + ["b"] = { desc = "Buffers" }, + ["bn"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" }, + ["bp"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" }, ["bd"] = { function() require("astroui.status.heirline").buffer_picker( @@ -113,13 +125,6 @@ return { ["bp"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" }, ["bn"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" }, - -- tables with just a `desc` key will be registered with which-key if it's installed - -- this is useful for naming menus - -- ["b"] = { desc = "Buffers" }, - - -- setting a mapping to false will disable it - -- [""] = false, - -- Normal mode : Custom mappings [""] = { "Neotree toggle", desc = "File Explorer" }, -- F26 corresponds to on my keyboard [""] = { @@ -155,7 +160,7 @@ return { -- Clear Ctrl+l so that we can use it to clear the terminal [""] = false, [""] = false, - -- Clear Ctrl-J and Ctrl-K so that we can use them to navigate the terminal (for lazygit) + -- Clear Ctrl-J and Ctrl-K so that we can use them for apps running in the terminal (for example lazygit) [""] = false, [""] = false, -- My terms diff --git a/lua/polish.lua b/lua/polish.lua index 1ea0243..6b68109 100644 --- a/lua/polish.lua +++ b/lua/polish.lua @@ -2,14 +2,9 @@ -- This is just pure lua so anything that doesn't -- fit in the normal config locations above can go here --- Custom keymaps - --- use gp to set visual selection on the recently pasted text -vim.keymap.set('n', 'gp', '`[v`]', { desc = 'Visual selection of pasted text' }) - -- Needed for python3 through mise -- Locate python3 using PATH -local python_path = vim.fn.exepath("python3") +local python_path = vim.fn.exepath "python3" if python_path == nil or python_path == "" then else vim.g.python3_host_prog = python_path