aboutsummaryrefslogtreecommitdiffstats
path: root/.config/nvim/init.lua
diff options
context:
space:
mode:
authorkj_sh6042026-06-08 12:53:10 -0400
committerkj_sh6042026-06-08 12:53:10 -0400
commit7561a5eeaf779204e823e85ec62ff8f263814474 (patch)
tree9b1c7d11e254e682bed416da090b2717cfbce962 /.config/nvim/init.lua
parent583a3a83372f48fd529ae5e37ecf0c839dcb25b5 (diff)
refactor: sync vscode and neovim features and keymaps
Diffstat (limited to '.config/nvim/init.lua')
-rw-r--r--.config/nvim/init.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 1afb090..8c76303 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -21,6 +21,7 @@ vim.cmd [[
Plug 'williamboman/mason.nvim'
Plug 'ThePrimeagen/vim-be-good'
Plug 'WhoIsSethDaniel/mason-tool-installer.nvim'
+ Plug 'nickjvandyke/opencode.nvim'
call plug#end()
]]
@@ -448,3 +449,11 @@ if vim.fn.filereadable(_mkey) == 1 and vim.fn.filereadable(_ukey) == 1 then
})
end
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 })
+end