summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.config/TheSiahxyz/lua')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua10
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua11
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/dadbod.lua1
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/mini.lua6
4 files changed, 20 insertions, 8 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
index 10c1085..8baae0b 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
@@ -318,7 +318,7 @@ local suckless_config = vim.api.nvim_create_augroup("suckless_config", { clear =
vim.api.nvim_create_autocmd("BufWritePost", {
group = suckless_config,
- pattern = home .. "/.local/src/suckless/dmenu/config.h",
+ pattern = home .. "/.local/src/suckless/dmenu/config.def.h",
callback = function()
vim.cmd("silent !cd " .. home .. "/.local/src/suckless/dmenu/ && sudo make install")
end,
@@ -326,7 +326,7 @@ vim.api.nvim_create_autocmd("BufWritePost", {
vim.api.nvim_create_autocmd("BufWritePost", {
group = suckless_config,
- pattern = home .. "/.local/src/suckless/dwmblocks/config.h",
+ pattern = home .. "/.local/src/suckless/dwmblocks/config.def.h",
callback = function()
vim.cmd(
"silent !cd "
@@ -338,7 +338,7 @@ vim.api.nvim_create_autocmd("BufWritePost", {
vim.api.nvim_create_autocmd("BufWritePost", {
group = suckless_config,
- pattern = home .. "/.local/src/suckless/slock/config.h",
+ pattern = home .. "/.local/src/suckless/slock/config.def.h",
callback = function()
vim.cmd("silent !cd " .. home .. "/.local/src/suckless/slock/ && sudo make install")
end,
@@ -347,7 +347,7 @@ vim.api.nvim_create_autocmd("BufWritePost", {
local suckless_keys = augroup("suckless_keys")
vim.api.nvim_create_autocmd("BufWritePost", {
group = suckless_keys,
- pattern = home .. "/.local/src/suckless/dwm/config.h",
+ pattern = home .. "/.local/src/suckless/dwm/config.def.h",
callback = function()
vim.cmd("silent !" .. home .. "/.local/bin/extractkeys")
end,
@@ -355,7 +355,7 @@ vim.api.nvim_create_autocmd("BufWritePost", {
vim.api.nvim_create_autocmd("BufWritePost", {
group = suckless_keys,
- pattern = home .. "/.local/src/suckless/st/config.h",
+ pattern = home .. "/.local/src/suckless/st/config.def.h",
callback = function()
vim.cmd("silent !" .. home .. "/.local/bin/extractkeys")
end,
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
index 044b9cf..cc206ab 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua
@@ -178,6 +178,17 @@ vim.keymap.set("n", "<leader>oq", "<cmd>copen<cr>", { desc = "Open quickfix list
-- Formats
vim.keymap.set("n", "<leader>cF", vim.lsp.buf.format, { desc = "Format buffer by default lsp" })
+-- Full path
+vim.keymap.set("n", "<leader>zf", function()
+ local word = vim.fn.expand("<cWORD>") -- Get full text under the cursor (handles paths with slashes)
+ if word:match("%$") then
+ local expanded_path = vim.fn.expand(word)
+ if expanded_path ~= word then
+ vim.cmd("normal! ciW" .. expanded_path) -- Replace entire word under cursor
+ end
+ end
+end, { desc = "Expand and replace path under cursor" })
+
-- Git
-- create repository
vim.keymap.set("n", "<leader>gR", function()
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/dadbod.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/dadbod.lua
index 41adb5a..730ebfe 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/dadbod.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/dadbod.lua
@@ -18,6 +18,7 @@ return {
firefox = "sqlite://" .. home .. "/.mozilla/firefox/si.default/places.sqlite",
mysql = "mariadb://user:password@localhost/mysql",
postsql = "postgresql://postgres:mypassword@localhost:5432/postgresql",
+ qutebrowser = "sqlite://" .. home .. "/.local/share/qutebrowser/history.sqlite",
sqlite = "sqlite://" .. home .. "/.local/share/db/sqlite.db",
}
local wk = require("which-key")
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/mini.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/mini.lua
index 3c7a35f..b8630d8 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/mini.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/mini.lua
@@ -1139,19 +1139,19 @@ return {
"n",
"<leader>zj",
":lua MiniSplitjoin.toggle()<cr>",
- { noremap = true, silent = true, desc = "Trim trailing whitespace" }
+ { noremap = true, silent = true, desc = "Toggle split-join" }
)
vim.keymap.set(
"n",
"<leader>J",
":lua MiniSplitjoin.join()<cr>",
- { noremap = true, silent = true, desc = "Trim trailing whitespace" }
+ { noremap = true, silent = true, desc = "Join" }
)
vim.keymap.set(
"n",
"<leader><cr>",
":lua MiniSplitjoin.split()<cr>",
- { noremap = true, silent = true, desc = "Trim trailing whitespace" }
+ { noremap = true, silent = true, desc = "Split" }
)
end,
},