aboutsummaryrefslogtreecommitdiff
path: root/dot_config/nvim/init.lua.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/nvim/init.lua.tmpl')
-rw-r--r--dot_config/nvim/init.lua.tmpl35
1 files changed, 13 insertions, 22 deletions
diff --git a/dot_config/nvim/init.lua.tmpl b/dot_config/nvim/init.lua.tmpl
index b04e420..0912ed5 100644
--- a/dot_config/nvim/init.lua.tmpl
+++ b/dot_config/nvim/init.lua.tmpl
@@ -40,29 +40,8 @@ end, { desc = "Pane split down" })
-- Movement
{{ if eq .chezmoi.hostname "gentoo" }}
-local function smart_move(direction, vim_cmd)
- return function()
- local before = vim.api.nvim_get_current_win()
- vim.cmd("wincmd " .. vim_cmd)
-
- if before == vim.api.nvim_get_current_win() then
- vim.system({
- "hyprctl",
- "dispatch",
- string.format(
- "hl.dsp.focus({direction = '%s' })",
- direction
- )
- })
- end
- end
-end
-
-vim.keymap.set({ 'n', 'i', 'v' }, '<D-h>', smart_move("left", "h"), { noremap = true, silent = false, desc = "Move to left windows" });
-vim.keymap.set({ 'n', 'i', 'v' }, '<D-l>', smart_move("right", "l"), { noremap = true, silent = false, desc = "Move to right windows" });
-vim.keymap.set({ 'n', 'i', 'v' }, '<D-j>', smart_move("down", "j"), { noremap = true, silent = false, desc = "Move to down window" });
-vim.keymap.set({ 'n', 'i', 'v' }, '<D-k>', smart_move("up", "k"), { noremap = true, silent = false, desc = "Move to up window" });
+require("hypr-nav")
{{ end }}
@@ -285,3 +264,15 @@ for _, key in ipairs({
}) do
vim.keymap.set("n", key, "<Nop>")
end
+
+for _, key in ipairs({
+ "<C-z>",
+ "<Up>",
+ "<Down>",
+ "<Left>",
+ "<Right>",
+ "<S-Down>",
+ "<S-Up>"
+}) do
+ vim.keymap.set("i", key, "<Nop>")
+end