aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.code-vimrc2
-rw-r--r--.config/Code/User/keybindings.json68
-rw-r--r--.config/Code/User/settings.json26
-rw-r--r--.config/nvim/init.lua26
4 files changed, 41 insertions, 81 deletions
diff --git a/.code-vimrc b/.code-vimrc
index e88a240..eb089c1 100644
--- a/.code-vimrc
+++ b/.code-vimrc
@@ -2,8 +2,6 @@ nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz
nnoremap n nzzzv
nnoremap N Nzzzv
-nnoremap <Leader>o :jumps<CR>
vnoremap <C-c> "+y
vmap <C-x> "+x
map <C-p> "+p
-map <Leader>p "+P
diff --git a/.config/Code/User/keybindings.json b/.config/Code/User/keybindings.json
index 020478d..acee1bd 100644
--- a/.config/Code/User/keybindings.json
+++ b/.config/Code/User/keybindings.json
@@ -276,68 +276,6 @@
"command": "workbench.action.previousEditorInGroup",
"when": "vim.active && vim.mode == 'Normal'"
},
- // lsp (mirrors some of my neovim lsp keymaps)
- {
- "key": "shift+k",
- "command": "editor.action.showHover",
- "when": "vim.active && vim.mode == 'Normal' && editorTextFocus"
- },
- {
- "key": "g r n",
- "command": "editor.action.rename",
- "when": "vim.active && vim.mode == 'Normal' && editorTextFocus"
- },
- {
- "key": "g r a",
- "command": "editor.action.quickFix",
- "when": "vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorTextFocus"
- },
- {
- "key": "g r d",
- "command": "editor.action.revealDefinition",
- "when": "vim.active && vim.mode == 'Normal' && editorTextFocus"
- },
- {
- "key": "g r t",
- "command": "editor.action.goToTypeDefinition",
- "when": "vim.active && vim.mode == 'Normal' && editorTextFocus"
- },
- {
- "key": "g r i",
- "command": "editor.action.goToImplementation",
- "when": "vim.active && vim.mode == 'Normal' && editorTextFocus"
- },
- {
- "key": "g r r",
- "command": "editor.action.goToReferences",
- "when": "vim.active && vim.mode == 'Normal' && editorTextFocus"
- },
- // leader actions
- {
- "key": "\\ f f",
- "command": "workbench.action.quickOpen",
- "when": "vim.active && vim.mode == 'Normal'"
- },
- {
- "key": "\\ f g",
- "command": "workbench.view.search.focus",
- "when": "vim.active && vim.mode == 'Normal'"
- },
- {
- "key": "\\ f b",
- "command": "workbench.action.quickOpenPreviousRecentlyUsedEditor",
- "when": "vim.active && vim.mode == 'Normal'"
- },
- {
- "key": "\\ e",
- "command": "workbench.action.problems.focus",
- "when": "vim.active && vim.mode == 'Normal'"
- },
- {
- "key": "\\ shift+f",
- "command": "editor.action.formatDocument",
- "when": "vim.active && vim.mode == 'Normal'"
- },
// ai inline completion (mirrors my neovim minuet keymaps)
{
"key": "alt+a",
@@ -353,11 +291,5 @@
"key": "alt+shift+enter",
"command": "editor.action.inlineSuggest.commit",
"when": "editorTextFocus && vim.active && vim.mode == 'Insert'"
- },
- // copilot inline chat (mirrors my neovim opencode keymaps)
- {
- "key": "\\ o",
- "command": "inlineChat.start",
- "when": "vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookAgent && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookInline && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasNotebookInline && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookAgent && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookAgent && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookInline && inlineChatPossible && !config.inlineChat.askInChat && !editorReadonly && !editorSimpleInput && activeEditor == 'workbench.editor.notebook' || vim.active && vim.mode =~ /^(Normal|Visual|VisualLine|VisualBlock)$/ && editorFocus && inlineChatHasEditsAgent && inlineChatHasNotebookInline && inlineChatPossible && !editorReadonly && !editorSimpleInput && !inlineChatFileBelongsToChat && activeEditor == 'workbench.editor.notebook'"
}
]
diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json
index b4e7c20..af03907 100644
--- a/.config/Code/User/settings.json
+++ b/.config/Code/User/settings.json
@@ -251,11 +251,31 @@
"<C-s>": true,
"<C-p>": true,
"<C-j>": false,
- "<C-i>": false,
"<C-n>": false,
"<C-k>": false,
"<C-w>": false
},
+ "vim.normalModeKeyBindingsNonRecursive": [
+ { "before": ["K"], "commands": ["editor.action.showHover"] },
+ { "before": ["\\", "f", "f"], "commands": ["workbench.action.quickOpen"] },
+ { "before": ["\\", "f", "g"], "commands": ["workbench.view.search.focus"] },
+ { "before": ["\\", "f", "b"], "commands": ["workbench.action.quickOpenPreviousRecentlyUsedEditor"] },
+ { "before": ["\\", "e"], "commands": ["workbench.action.problems.focus"] },
+ { "before": ["\\", "F"], "commands": ["editor.action.formatDocument"] },
+ { "before": ["\\", "o"], "commands": [{"command": "vim.remap", "args": {"commands": [{ "command": ":jumps" }]}}] },
+ { "before": ["\\", "p"], "commands": [{"command": "vim.remap", "args": {"after": ["\"", "+", "P"]}}] },
+ { "before": ["\\", "i"], "commands": ["inlineChat.start"] },
+ { "before": ["g", "r", "n"], "commands": ["editor.action.rename"] },
+ { "before": ["g", "r", "a"], "commands": ["editor.action.quickFix"] },
+ { "before": ["g", "r", "d"], "commands": ["editor.action.revealDefinition"] },
+ { "before": ["g", "r", "t"], "commands": ["editor.action.goToTypeDefinition"] },
+ { "before": ["g", "r", "i"], "commands": ["editor.action.goToImplementation"] },
+ { "before": ["g", "r", "r"], "commands": ["editor.action.goToReferences"] }
+ ],
+ "vim.visualModeKeyBindingsNonRecursive": [
+ { "before": ["g", "r", "a"], "commands": ["editor.action.quickFix"] },
+ { "before": ["\\", "i"], "commands": ["inlineChat.start"] }
+ ],
"vim.history": 1000,
"vim.hlsearch": true,
"vim.incsearch": true,
@@ -277,7 +297,7 @@
"statusBar.debuggingForeground": "#ffffff",
"statusBar.foreground": "#ffffff",
"statusBar.noFolderBackground": "#303030",
- "statusBar.noFolderForeground": "#ffffff",
+ "statusBar.noFolderForeground": "#ffffff"
},
"workbench.editor.decorations.badges": false,
"workbench.editor.decorations.colors": false,
@@ -323,4 +343,4 @@
"files.associations": {
"cgitrc": "shellcheckrc"
}
-} \ No newline at end of file
+}
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 066a6f8..e61c32d 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -112,16 +112,21 @@ keymap("n", "N", "Nzzzv", { noremap = true })
keymap("n", "<S-A-b>h", ":NERDTreeToggle<CR>", { noremap = true })
keymap("n", "<S-A-b><S-A-h>", ":NERDTreeToggle<CR>", { noremap = true })
-keymap("n", "<A-n>", ":NERDTreeToggle<CR>", { noremap = true })
+keymap("n", "<S-A-b>H", ":NERDTree<CR>", { noremap = true })
keymap("n", "<S-A-n>", ":NERDTree<CR>", { noremap = true })
-keymap("n", "<S-A-j>", "<C-W>w", { noremap = true })
-keymap("n", "<S-A-k>", "<C-W>W", { noremap = true })
+keymap({ "n", "t" }, "<S-A-j>", "<C-\\><C-n><C-W>w", { noremap = true })
+keymap({ "n", "t" }, "<S-A-k>", "<C-\\><C-n><C-W>W", { noremap = true })
keymap({ "n", "t" }, "<S-A-b>j", function() toggle_terminal() end, { noremap = true })
keymap({ "n", "t" }, "<S-A-b><S-A-j>", function() toggle_terminal() end, { noremap = true })
keymap("n", "<leader>sc", ":set spell!<CR>", { noremap = true, silent = true })
keymap("n", "<A-j>", ":bnext<CR>", { noremap = true, silent = true })
keymap("n", "<A-k>", ":bprev<CR>", { noremap = true, silent = true })
+keymap("n", "<A-w>", ":close<CR>", { noremap = true, silent = true })
+keymap("n", "<A-n>", ":enew<CR>", { noremap = true, silent = true })
+
+-- trick to close current buffer with a keymap
+keymap("n", "<S-A-w>", ":bprevious | bdelete #<CR>", { noremap = true, silent = true })
keymap("n", "<A-q>", "ZQ", { noremap = true })
keymap("n", "<A-z>", "ZZ", { noremap = true })
@@ -327,10 +332,14 @@ local servers = {
},
},
},
+ ruby_lsp = {},
+ gopls = {},
+ rust_analyzer = {},
+ zls = {},
}
if ok_mason then
- mason.setup()
+ mason.setup({ firewall = { enabled = true } })
end
if ok_tools then
@@ -435,7 +444,7 @@ if vim.fn.filereadable(_mkey) == 1 and vim.fn.filereadable(_ukey) == 1 then
end
end)(),
end_point = "https://openrouter.ai/api/v1/chat/completions",
- model = "qwen/qwen3-235b-a22b-2507",
+ model = "meta-llama/llama-3.1-8b-instruct",
name = "Openrouter",
optional = {
max_tokens = 256,
@@ -454,7 +463,8 @@ end
-- opencode integration
local ok_oc, opencode = pcall(require, "opencode")
if ok_oc then
- keymap({ "n", "x" }, "<leader>oa", function() opencode.ask("@this: ") end, { desc = "opencode: ask" })
- keymap({ "n", "x" }, "<leader>os", function() opencode.select() end, { desc = "opencode: select" })
- keymap({ "n", "x" }, "<leader>o", function() return opencode.operator("@this ") end, { desc = "opencode: operator", expr = true })
+ keymap({ "n", "x" }, "<leader>i", function() opencode.ask("@this: ") end, { desc = "opencode: ask" })
+ keymap({ "n", "x" }, "<leader>is", function() opencode.select() end, { desc = "opencode: select" })
+ keymap({ "n", "x" }, "<leader>io", function() return opencode.operator("@this ") end,
+ { desc = "opencode: operator", expr = true })
end