mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 10:51:36 +00:00
assistant/chatgpt: Add jackMort/ChatGPT.nvim
This commit is contained in:
parent
50609c731e
commit
140ed6daa8
6 changed files with 84 additions and 0 deletions
25
modules/plugins/assistant/chatgpt/chatgpt.nix
Normal file
25
modules/plugins/assistant/chatgpt/chatgpt.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.assistant.chatgpt = {
|
||||
enable = mkEnableOption "ChatGPT AI assistant. Requires the environment variable OPENAI_API_KEY to be set";
|
||||
setupOpts = mkPluginSetupOption "chatgpt" {};
|
||||
mappings = {
|
||||
chatGpt = mkMappingOption "ChatGPT" "<leader>ac";
|
||||
editWithInstructions = mkMappingOption "[ChatGPT] Edit with instructions" "<leader>ae";
|
||||
grammarCorrection = mkMappingOption "[ChatGPT] Grammar correction" "<leader>ag";
|
||||
translate = mkMappingOption "[ChatGPT] Translate" "<leader>at";
|
||||
keyword = mkMappingOption "[ChatGPT] Keywords" "<leader>ak";
|
||||
docstring = mkMappingOption "[ChatGPT] Docstring" "<leader>ad";
|
||||
addTests = mkMappingOption "[ChatGPT] Add tests" "<leader>aa";
|
||||
optimize = mkMappingOption "[ChatGPT] Optimize code" "<leader>ao";
|
||||
summarize = mkMappingOption "[ChatGPT] Summarize" "<leader>as";
|
||||
fixBugs = mkMappingOption "[ChatGPT] Fix bugs" "<leader>af";
|
||||
explain = mkMappingOption "[ChatGPT] Explain code" "<leader>ax";
|
||||
roxygenEdit = mkMappingOption "[ChatGPT] Roxygen edit" "<leader>ar";
|
||||
readabilityanalysis = mkMappingOption "[ChatGPT] Code reability analysis" "<leader>al";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue