From 60b26226596438d79093fad85375a183f0e401a4 Mon Sep 17 00:00:00 2001 From: Kacper Marzecki Date: Sat, 20 Sep 2025 01:41:43 +0200 Subject: [PATCH] safety commit --- .gitignore | 1 + .tmux.conf | 3 +-- nvim/lazyvim.json | 1 - nvim/lua/config/autocmds.lua | 7 +++++++ nvim/lua/config/keymaps.lua | 12 ++++++++++++ nvim/lua/plugins/ai.lua | 2 ++ nvim/lua/plugins/plugins.lua | 20 +++++++++++++++++--- nvim/lua/plugins/themes.lua | 6 +++--- 8 files changed, 43 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 51b4cfd..ef815c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ local/ +.aider* diff --git a/.tmux.conf b/.tmux.conf index 9c14518..c3921b8 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -94,11 +94,10 @@ set -g @tpm_plugins ' \ set-option -g set-clipboard on # bind C-c run "tmux save-buffer - | xclip -selection clipboard" # -bind-key v capture-pane -S -1000 \; save-buffer /tmp/tmux-buffer \; new-window -n '[scrollback]' 'n /tmp/tmux-buffer; rm /tmp/tmux-buffer; tmux kill-window' +# bind-key v capture-pane -S -1000 \; save-buffer /tmp/tmux-buffer \; new-window -n '[scrollback]' 'n /tmp/tmux-buffer; rm /tmp/tmux-buffer; tmux kill-window' # bind-key v capture-pane -S -1000 \; save-buffer /tmp/tmux-buffer \; split-window -h "nvim /tmp/tmux-buffer" # - bind C-c copy-mode bind C-v run "tmux set-buffer \"$(xclip -selection clipboard -o)\"; tmux paste-buffer" setw -g mode-keys vi diff --git a/nvim/lazyvim.json b/nvim/lazyvim.json index 83a91cb..c41cd96 100644 --- a/nvim/lazyvim.json +++ b/nvim/lazyvim.json @@ -1,6 +1,5 @@ { "extras": [ - ], "install_version": 7, "news": { diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index 12d9ef6..7addc5b 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua @@ -25,3 +25,10 @@ vim.api.nvim_create_autocmd("FileType", { end, }) -- END TODO APP MAPPINGS +-- +-- vim.api.nvim_create_autocmd("User", { +-- pattern = "BlinkCmpMenuOpen", +-- callback = function() +-- vim.b.copilot_suggestion_hidden = false +-- end, +-- }) diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index 3f73c2b..2cf0636 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua @@ -108,6 +108,7 @@ map("n", "agr", "GpChatRespond", { desc = "gp chat respond" }) -- JSON FORMAT map("n", "cjf", "%!jq .", { desc = "Json Format" }) +vim.keymap.set("n", "s", "(leap-anywhere)") local function jump_to_file_line() local line = vim.api.nvim_get_current_line() @@ -241,3 +242,14 @@ function choose_timer() }, }) end + +-- Remap arrow keys to hjkl in Normal and Visual modes +vim.keymap.set({ "n", "v" }, "", "k", { noremap = true, silent = true }) +vim.keymap.set({ "n", "v" }, "", "j", { noremap = true, silent = true }) +vim.keymap.set({ "n", "v" }, "", "h", { noremap = true, silent = true }) +vim.keymap.set({ "n", "v" }, "", "l", { noremap = true, silent = true }) + +vim.keymap.set({ "n", "v" }, "", "k", { noremap = true, silent = true }) +vim.keymap.set({ "n", "v" }, "", "j", { noremap = true, silent = true }) +vim.keymap.set({ "n", "v" }, "", "h", { noremap = true, silent = true }) +vim.keymap.set({ "n", "v" }, "", "l", { noremap = true, silent = true }) diff --git a/nvim/lua/plugins/ai.lua b/nvim/lua/plugins/ai.lua index f5f1801..6cc2dd5 100644 --- a/nvim/lua/plugins/ai.lua +++ b/nvim/lua/plugins/ai.lua @@ -1,6 +1,7 @@ return { { "olimorris/codecompanion.nvim", + enabled = vim.loop.os_uname().sysname == "Darwin", opts = {}, dependencies = { "nvim-lua/plenary.nvim", @@ -8,6 +9,7 @@ return { }, { "zbirenbaum/copilot.lua", + enabled = vim.loop.os_uname().sysname == "Darwin", optional = false, opts = function() require("copilot.api").status = require("copilot.status") diff --git a/nvim/lua/plugins/plugins.lua b/nvim/lua/plugins/plugins.lua index 1b4a53d..b716b8e 100644 --- a/nvim/lua/plugins/plugins.lua +++ b/nvim/lua/plugins/plugins.lua @@ -6,6 +6,20 @@ local function masterBranch(dep) end return { + -- { + -- "folke/flash.nvim", + -- event = "VeryLazy", + -- ---@type Flash.Config + -- opts = {}, + -- -- stylua: ignore + -- keys = { + -- { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, + -- { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, + -- { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, + -- { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, + -- { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, + -- }, + -- }, { "nvim-treesitter/nvim-treesitter", opts = { @@ -253,11 +267,11 @@ return { ollama = { endpoint = "http://localhost:11434/v1/chat/completions", }, - openai = { - endpoint = "https://api.openai.com/v1/chat/completions", + openrouter = { + endpoint = "https://openrouter.ai/api/v1", secret = { "echo ", - "$OPENAI_API_KEY", + "$OPENROUTER_API_KEY", }, }, }, diff --git a/nvim/lua/plugins/themes.lua b/nvim/lua/plugins/themes.lua index f579deb..b96576b 100644 --- a/nvim/lua/plugins/themes.lua +++ b/nvim/lua/plugins/themes.lua @@ -16,10 +16,10 @@ return { { "rebelot/kanagawa.nvim", opts = { - theme = "lotus", + theme = "wave", background = { - dark = "lotus", - light = "lotus", + dark = "wave", + light = "wave", }, }, },