diff --git a/nvim/after/ftplugin/lua.lua b/nvim/after/ftplugin/lua.lua new file mode 100644 index 0000000..ea8a831 --- /dev/null +++ b/nvim/after/ftplugin/lua.lua @@ -0,0 +1 @@ +vim.opt.expandtab = false diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 89df30e..4af9d34 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -341,7 +341,66 @@ require("lazy").setup({ "nvim-lua/plenary.nvim" }, config = true - } + }, + { + "Bowuigi/acme-nvim", + config = function() + local acme = require('acme') + local opts = { noremap = true, silent = true } + vim.keymap.set("n", "ee", acme.exec, opts) + vim.keymap.set("v", "ee", acme.exec, opts) + vim.keymap.set("v", "et", acme.tagline, opts) + vim.keymap.set("v", "em", acme.mark, opts) + end + }, + { + "nickjvandyke/opencode.nvim", + dependencies = { + { + "folke/snacks.nvim", + opts = { input = {}, picker = {}, terminal = {} } + } + }, + config = function() + ---@type opencode.Opts + vim.g.opencode_opts = {} + local opencode = require("opencode") + vim.o.autoread = true + -- Recommended/example keymaps. + vim.keymap.set({ "n", "x" }, "", function() + opencode.ask("@this: ", { submit = true }) + end, { desc = "Ask opencode…" }) + vim.keymap.set({ "n", "x" }, "", + function() opencode.select() end, + { desc = "Execute opencode action…" }) + vim.keymap.set({ "n", "t" }, "", + function() opencode.toggle() end, + { desc = "Toggle opencode" }) + + vim.keymap.set({ "n", "x" }, "go", function() + return opencode.operator("@this ") + end, { desc = "Add range to opencode", expr = true }) + vim.keymap.set("n", "goo", function() + return opencode.operator("@this ") .. "_" + end, { desc = "Add line to opencode", expr = true }) + + vim.keymap.set("n", "", function() + opencode.command("session.half.page.up") + end, { desc = "Scroll opencode up" }) + vim.keymap.set("n", "", function() + opencode.command("session.half.page.down") + end, { desc = "Scroll opencode down" }) + -- You may want these if you stick with the opinionated "" and "" above — otherwise consider "o…". + vim.keymap.set("n", "+", "", { + desc = "Increment under cursor", + noremap = true + }) + vim.keymap.set("n", "-", "", { + desc = "Decrement under cursor", + noremap = true + }) + end + } } })