diff --git a/.gitignore b/.gitignore index b276faf..1f4cbbb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ config/spicetify/Backup # nixos/hardware-configuration.nix result config/ncspot/userstate.cbor +config/zsh/zprofile.local config/spicetify/CustomApps/* diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 2fb0756..fc6208a 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,4 +1,5 @@ { + "ChatGPT.nvim": { "branch": "main", "commit": "aadb607038d53d97be4da368b07355f65ad3f047" }, "LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" }, "alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" }, "auto-session": { "branch": "main", "commit": "3eb26b949e1b90798e84926848551046e2eb0721" }, diff --git a/config/nvim/lua/aleidk/keymaps.lua b/config/nvim/lua/aleidk/keymaps.lua index 0e1b109..36f220d 100644 --- a/config/nvim/lua/aleidk/keymaps.lua +++ b/config/nvim/lua/aleidk/keymaps.lua @@ -55,9 +55,6 @@ vim.keymap.set("n", "rr", ":%s/", default("Search and replace globally") vim.keymap.set("v", "r", ":s/", default("Search and replace in selection")) vim.keymap.set("v", "p", [["_dP]], default("Paste whitout lossing yanked text")) -vim.keymap.set({ "n", "v" }, "y", [["+y]], default("Yank to system clipboard")) -vim.keymap.set({ "n", "v" }, "Y", [["+Y]], default("Yank line to system clipboard")) -vim.keymap.set({ "n", "v" }, "p", [["+p]], default("Paste from system clipboard")) vim.keymap.set("v", "J", ":m '>+1gv=gv", default("Move selection down")) vim.keymap.set("v", "K", ":m '<-2gv=gv", default("Move selection up")) diff --git a/config/nvim/lua/aleidk/plugins/ai.lua b/config/nvim/lua/aleidk/plugins/ai.lua new file mode 100644 index 0000000..d37d853 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins/ai.lua @@ -0,0 +1,207 @@ +return { + "jackMort/ChatGPT.nvim", + event = "VeryLazy", + opts = { + api_key_cmd = nil, + yank_register = "+", + edit_with_instructions = { + diff = false, + keymaps = { + close = "", + accept = "", + toggle_diff = "", + toggle_settings = "", + toggle_help = "", + cycle_windows = "", + use_output_as_input = "", + }, + }, + chat = { + -- welcome_message = WELCOME_MESSAGE, + loading_text = "Loading, please wait ...", + question_sign = "", -- 🙂 + answer_sign = "ﮧ", -- 🤖 + border_left_sign = "", + border_right_sign = "", + max_line_length = 120, + sessions_window = { + active_sign = "  ", + inactive_sign = "  ", + current_line_sign = "", + border = { + style = "rounded", + text = { + top = " Sessions ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + keymaps = { + close = "", + yank_last = "", + yank_last_code = "", + scroll_up = "", + scroll_down = "", + new_session = "", + cycle_windows = "", + cycle_modes = "", + next_message = "", + prev_message = "", + select_session = "", + rename_session = "r", + delete_session = "d", + draft_message = "", + edit_message = "e", + delete_message = "d", + toggle_settings = "", + toggle_sessions = "", + toggle_help = "", + toggle_message_role = "", + toggle_system_role_open = "", + stop_generating = "", + }, + }, + popup_layout = { + default = "center", + center = { + width = "80%", + height = "80%", + }, + right = { + width = "30%", + width_settings_open = "50%", + }, + }, + popup_window = { + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top = " ChatGPT ", + }, + }, + win_options = { + wrap = true, + linebreak = true, + foldcolumn = "1", + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + buf_options = { + filetype = "markdown", + }, + }, + system_window = { + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top = " SYSTEM ", + }, + }, + win_options = { + wrap = true, + linebreak = true, + foldcolumn = "2", + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + popup_input = { + prompt = "  ", + border = { + highlight = "FloatBorder", + style = "rounded", + text = { + top_align = "center", + top = " Prompt ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + submit = "", + submit_n = "", + max_visible_lines = 20, + }, + settings_window = { + setting_sign = "  ", + border = { + style = "rounded", + text = { + top = " Settings ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + help_window = { + setting_sign = "  ", + border = { + style = "rounded", + text = { + top = " Help ", + }, + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + openai_params = { + model = "gpt-3.5-turbo", + frequency_penalty = 0, + presence_penalty = 0, + max_tokens = 300, + temperature = 0, + top_p = 1, + n = 1, + }, + openai_edit_params = { + model = "gpt-3.5-turbo", + frequency_penalty = 0, + presence_penalty = 0, + temperature = 0, + top_p = 1, + n = 1, + }, + use_openai_functions_for_edits = false, + actions_paths = {}, + show_quickfixes_cmd = "Trouble quickfix", + predefined_chat_gpt_prompts = "https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv", + highlights = { + help_key = "@symbol", + help_description = "@comment", + }, + }, + config = function() + require("chatgpt").setup() + end, + dependencies = { + "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + "folke/trouble.nvim", + "nvim-telescope/telescope.nvim", + }, + keys = { + { "pp", "ChatGPT", desc = "ChatGPT" }, + { "pe", "ChatGPTEditWithInstruction", desc = "Edit with instruction", mode = { "n", "v" } }, + { "pa", "ChatGPTActAs", desc = "Act as", mode = { "n", "v" } }, + { "pg", "ChatGPTRun grammar_correction", desc = "Grammar Correction", mode = { "n", "v" } }, + { "pT", "ChatGPTRun translate", desc = "Translate", mode = { "n", "v" } }, + { "pk", "ChatGPTRun keywords", desc = "Keywords", mode = { "n", "v" } }, + { "pd", "ChatGPTRun docstring", desc = "Docstring", mode = { "n", "v" } }, + { "pt", "ChatGPTRun add_tests", desc = "Add Tests", mode = { "n", "v" } }, + { "po", "ChatGPTRun optimize_code", desc = "Optimize Code", mode = { "n", "v" } }, + { "ps", "ChatGPTRun summarize", desc = "Summarize", mode = { "n", "v" } }, + { "pf", "ChatGPTRun fix_bugs", desc = "Fix Bugs", mode = { "n", "v" } }, + { "px", "ChatGPTRun explain_code", desc = "Explain Code", mode = { "n", "v" } }, + { "pr", "ChatGPTRun roxygen_edit", desc = "Roxygen Edit", mode = { "n", "v" } }, + { + "pl", + "ChatGPTRun code_readability_analysis", + desc = "Code Readability Analysis", + mode = { "n", "v" }, + }, + }, +} diff --git a/config/nvim/lua/aleidk/plugins/key-help.lua b/config/nvim/lua/aleidk/plugins/key-help.lua index c6088c8..6c57be3 100644 --- a/config/nvim/lua/aleidk/plugins/key-help.lua +++ b/config/nvim/lua/aleidk/plugins/key-help.lua @@ -57,6 +57,9 @@ return { { mode = "n", keys = "u", desc = "+UI & Config" }, { mode = "n", keys = "un", desc = "+Noice" }, { mode = "n", keys = "w", desc = "+Workspace" }, + { mode = "n", keys = "p", desc = "+ChatGPT" }, + { mode = "v", keys = "p", desc = "+ChatGPT" }, + { mode = "n", keys = "p", desc = "+ChatGPT" }, }, -- Clue window settings diff --git a/config/spicetify/config-xpui.ini b/config/spicetify/config-xpui.ini index 0e91b2a..1117952 100644 --- a/config/spicetify/config-xpui.ini +++ b/config/spicetify/config-xpui.ini @@ -4,7 +4,7 @@ prefs_path = /home/aleidk/.var/app/com.spotify.Client/config/spotif current_theme = catppuccin-macchiato color_scheme = teal spotify_launch_flags = -spotify_path = /var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify/ +spotify_path = /home/aleidk/.local/share/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify/ inject_css = 1 replace_colors = 1 overwrite_assets = 1 diff --git a/config/zsh/zprofile b/config/zsh/zprofile index 278fdfd..54bedb7 100755 --- a/config/zsh/zprofile +++ b/config/zsh/zprofile @@ -35,6 +35,10 @@ update_path "$HOME/.local/share/rtx/shims" update_path "$HOME/.spicetify" +if [[ -e "$DOTS/config/zsh/zprofile.local" ]]; then + source "$DOTS/config/zsh/zprofile.local" +fi + if [[ $OSTYPE =~ 'darwin' ]]; then eval "$(/opt/homebrew/bin/brew shellenv)" fi diff --git a/exports/dnf.txt b/exports/dnf.txt index 405fa2e..e140fb9 100644 --- a/exports/dnf.txt +++ b/exports/dnf.txt @@ -1,7 +1,7 @@ bat dnf-plugin-system-upgrade duf -exa +eza fd-find firefox-dev flatpak @@ -15,7 +15,6 @@ neovim nodejs papirus-icon-theme gitlint -python3-tmuxp remove-retired-packages ripgrep sd