Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/next #24

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 78 additions & 76 deletions nix/icons.nix
Original file line number Diff line number Diff line change
@@ -1,77 +1,79 @@
{
# suggest me with devicons from nerdfonts
language.vim = "";
language.neovim = "";
language.org = "";
language.reason = "";
let
icons = {
# suggest me with devicons from nerdfonts
language.vim = "";
language.neovim = "";
language.org = "";
language.reason = "";

circleLeft = "";
circleLeft1 = "";
circleRight = "";
circleRight1 = "";
hint = "";
info = "ℹ";
info1 = "";
info2 = "";
warning = "";
warning1 = "";
warning2 = "";
warning3 = "";
cross = "";
cross1 = "";
cross2 = "";
cross3 = "";
cross4 = "";
plus = "";
plus1 = "";
plus2 = "洛";
plus3 = "";
plus4 = "⊕";
minus = "";
minus1 = "";
minus2 = "";
minus3 = "";
refresh = "";
file = "";
reload = "";
bookmark = "";
word = "";
recent = "";
notes = "";
lightning = "";
org = "";
still = "";
camera = "";
nix = "";
function = "";
code = "󰘦 ";
wand = " ";
robotFace = " ";
git = " ";
gearSM = "⛭";
checkmark = "✔";
chevronRight = "";
chevronDown = "";
chevronLeft = "";
chevronUp = "";
folder = "";
folderOpen = "";
package = "";
telescope = "";
freeBSD = "";
linux = "";
archlinux = "";
resource = "";
terminal = "";
cloud = "";
database = "";
server = "";
settings = "";
gear = "";
rocket = "";
bug = "";
face = "󰏚 ";
lightbulb = "";
star = "";
indent = "▎";
}
circleLeft = "";
circleLeft1 = "";
circleRight = "";
circleRight1 = "";
hint = "";
info = "ℹ";
info1 = "";
info2 = "";
warning = "";
warning1 = "";
warning2 = "";
warning3 = "";
cross = "";
cross1 = "";
cross2 = "";
cross3 = "";
cross4 = "";
plus = "";
plus1 = "";
plus2 = "洛";
plus3 = "";
plus4 = "⊕";
minus = "";
minus1 = "";
minus2 = "";
minus3 = "";
refresh = "";
file = "";
reload = "";
bookmark = "";
word = "";
recent = "";
notes = "";
lightning = "";
org = "";
still = "";
camera = "";
nix = "";
function = "";
code = "󰘦 ";
wand = " ";
robotFace = " ";
git = " ";
gearSM = "⛭";
checkmark = "✔";
chevronRight = "";
chevronDown = "";
chevronLeft = "";
chevronUp = "";
folder = "";
folderOpen = "";
package = "";
telescope = "";
freeBSD = "";
linux = "";
archlinux = "";
resource = "";
terminal = "";
cloud = "";
database = "";
server = "";
settings = "";
gear = "";
rocket = "";
bug = "";
face = "󰏚 ";
lightbulb = "";
star = "";
indent = "▎";
};
in icons // { withIcon = iconName: s: "${icons.${iconName}} ${s}"; }
182 changes: 68 additions & 114 deletions nvim.nix/config/ai.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{ pkgs, ... }:
{ pkgs, icons, ... }:

let
mode = [
"n"
"v"
];
in
{
extraPlugins = with pkgs.vimPlugins; [
avante-nvim
Expand All @@ -24,123 +18,83 @@ in
},
})
'';
plugins.which-key.settings.spec = [
{
__unkeyed-1 = "<leader>cc";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPT<cr>";
desc = "Open ChatGPT Prompt";
}

# extraConfigLuaPost = # lua
# ''
# require('chatgpt').setup({
# actions_paths = {"~/.config/openai/actions.json"},
# open_ai_params = {
# model = "gpt-4",
# },
# openai_edit_params = {
# model = "gpt-4",
# },
# })
# '';

plugins.which-key.registrations = {
"<leader>cc" = [
[
"<cmd>ChatGPT<cr>"
"Open ChatGPT Prompt"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>ce";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTEditWithInstruction<cr>";
desc = "Edit with instruction";
}

"<leader>ce" = [
[
"<cmd>ChatGPTEditWithInstruction<cr>"
"Edit with instruction"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>cg";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun grammar_correction<cr>";
desc = "Grammar Correction";
}

"<leader>cg" = [
[
"<cmd>ChatGPTRun grammar_correction<cr>"
"Grammar Correction"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>ct";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun translate<cr>";
desc = "Translate";
}

"<leader>ct" = [
[
"<cmd>ChatGPTRun translate<cr>"
"Translate"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>ck";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun keywords<cr>";
desc = "Keywords";
}

"<leader>ck" = [
[
"<cmd>ChatGPTRun keywords<cr>"
"Keywords"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>cd";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun docstring<cr>";
desc = "Docstring";
}

"<leader>cd" = [
[
"<cmd>ChatGPTRun docstring<cr>"
"Docstring"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>ca";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun add_tests<cr>";
desc = "Add Tests";
}

"<leader>ca" = [
[
"<cmd>ChatGPTRun add_tests<cr>"
"Add Tests"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>co";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun optimize_code<cr>";
desc = "Optimize Code";
}

"<leader>co" = [
[
"<cmd>ChatGPTRun optimize_code<cr>"
"Optimize Code"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>cs";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun summarize<cr>";
desc = "Summarize";
}

"<leader>cs" = [
[
"<cmd>ChatGPTRun summarize<cr>"
"Summarize"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>cf";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun fix_bugs<cr>";
desc = "Fix Bugs";
}

"<leader>cf" = [
[
"<cmd>ChatGPTRun fix_bugs<cr>"
"Fix Bugs"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>cx";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun explain_code<cr>";
desc = "Explain Code";
}

"<leader>cx" = [
[
"<cmd>ChatGPTRun explain_code<cr>"
"Explain Code"
{ inherit mode; }
]
];
{
__unkeyed-1 = "<leader>cr";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun roxygen_edit<cr>";
desc = "Roxygen Edit";
}

"<leader>cr" = [
[
"<cmd>ChatGPTRun roxygen_edit<cr>"
"Roxygen Edit"
{ inherit mode; }
]
];

"<leader>cl" = [
[
"<cmd>ChatGPTRun code_readability_analysis<cr>"
"Code Readability Analysis"
{ inherit mode; }
]
];
};
{
__unkeyed-1 = "<leader>cl";
__unkeyed-2 = icons.withIcon "robotFace" "<cmd>ChatGPTRun code_readability_analysis<cr>";
desc = "Code Readability Analysis";
}
];
}
Loading
Loading