mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 03:49:44 +00:00
feat(nixvim): add opencode plugin
- Added opencode plugin - Added keymaps for opencode actions (<leader>oa, <leader>ox, <leader>og) - Included lsof package for opencode.nvim to function
This commit is contained in:
parent
868cc11458
commit
934f2ed339
3 changed files with 41 additions and 15 deletions
|
|
@ -88,6 +88,24 @@
|
|||
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
|
||||
options.desc = "LSP Code Action";
|
||||
}
|
||||
{
|
||||
mode = ["n" "x"];
|
||||
key = "<leader>oa";
|
||||
action.__raw = ''function() require("opencode").ask("@selection: ", { submit = true }) end'';
|
||||
options.desc = "Ask opencode";
|
||||
}
|
||||
{
|
||||
mode = ["n" "x"];
|
||||
key = "<leader>ox";
|
||||
action.__raw = ''function() require("opencode").select() end'';
|
||||
options.desc = "Execute opencode action...";
|
||||
}
|
||||
{
|
||||
mode = ["n" "x"];
|
||||
key = "<leader>og";
|
||||
action.__raw = ''function() require("opencode").prompt("@selection") end'';
|
||||
options.desc = "Add to opencode";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue