diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index b8766c8..9aa5607 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -246,7 +246,6 @@ in f fd gi - lazygit parallel ripgrep vim @@ -300,6 +299,65 @@ in ]; }; starship.enable = true; + lazygit.enable = true; + lazygit.settings = { + customCommands = [ + { + key = ""; + context = "global"; + description = "Create new conventional commit"; + prompts = [ + { + type = "menu"; + key = "Type"; + title = "Type of change"; + options = [ + { name = "build"; description = "Changes that affect the build system or external dependencies"; value = "build"; } + { name = "feat"; description = "A new feature"; value = "feat"; } + { name = "fix"; description = "A bug fix"; value = "fix"; } + { name = "chore"; description = "Other changes that don't modify src or test files"; value = "chore"; } + { name = "ci"; description = "Changes to CI configuration files and scripts"; value = "ci"; } + { name = "docs"; description = "Documentation only changes"; value = "docs"; } + { name = "perf"; description = "A code change that improves performance"; value = "perf"; } + { name = "refactor"; description = "A code change that neither fixes a bug nor adds a feature"; value = "refactor"; } + { name = "revert"; description = "Reverts a previous commit"; value = "revert"; } + { name = "style"; description = "Changes that do not affect the meaning of the code"; value = "style"; } + { name = "test"; description = "Adding missing tests or correcting existing tests"; value = "test"; } + ]; + } + { + type = "input"; + title = "Scope"; + key = "Scope"; + initialValue = ""; + } + { + type = "menu"; + key = "Breaking"; + title = "Breaking change"; + options = [ + { name = "no"; value = ""; } + { name = "yes"; value = "!"; } + ]; + } + { + type = "input"; + title = "message"; + key = "Message"; + initialValue = ""; + } + { + type = "confirm"; + key = "Confirm"; + title = "Commit"; + body = "Are you sure you want to commit?"; + } + ]; + command = "git commit --message '{{.Form.Type}}{{ if .Form.Scope }}({{ .Form.Scope }}){{ end }}{{.Form.Breaking}}: {{.Form.Message}}'"; + loadingText = "Creating conventional commit..."; + } + ]; + }; }; home = { username = "moritz"; diff --git a/modules/programs/nvim/new_plugins/avante.nix b/modules/programs/nvim/new_plugins/avante.nix index 1b807d2..3ad02e6 100644 --- a/modules/programs/nvim/new_plugins/avante.nix +++ b/modules/programs/nvim/new_plugins/avante.nix @@ -19,14 +19,28 @@ in require("avante_lib").load() require("avante").setup({ provider = "openai", - auto_suggestions_provider = "openai", + auto_suggestions_provider = "openai-cheap", behaviour = { - -- auto_suggestions = true, + auto_suggestions = false, }, openai = { model = "gpt-4o", - api_key_name = "cmd:cat /run/agenix/openai" - } + api_key_name = "cmd:cat /run/agenix/openai", + }, + vendors = { + ---@type AvanteProvider + ["openai-cheap"] = { + model = "gpt-4o-mini", + api_key_name = "cmd:cat /run/agenix/openai", + endpoint = "https://api.openai.com/v1", + parse_curl_args = function(opts, code_opts) + return require("avante.providers").openai.parse_curl_args(opts, code_opts) + end, + parse_response_data = function(data_stream, event_state, opts) + return require("avante.providers").openai.parse_response(data_stream, event_state, opts) + end + }, + }, }) ''; plugins.dressing.enable = true; diff --git a/modules/programs/nvim/new_plugins/catppuccin.nix b/modules/programs/nvim/new_plugins/catppuccin.nix index 795c81e..a9c4f76 100644 --- a/modules/programs/nvim/new_plugins/catppuccin.nix +++ b/modules/programs/nvim/new_plugins/catppuccin.nix @@ -10,6 +10,7 @@ in colorschemes.catppuccin = { enable = true; settings.flavour = "macchiato"; + settings.default_integrations = true; }; }; } diff --git a/modules/programs/nvim/new_plugins/other.nix b/modules/programs/nvim/new_plugins/other.nix index a65cd02..6c72959 100644 --- a/modules/programs/nvim/new_plugins/other.nix +++ b/modules/programs/nvim/new_plugins/other.nix @@ -26,6 +26,9 @@ in { keymaps = [ { key = ""; action = "noh"; options.desc = "Escape and clear hlsearch"; mode = [ "i" "n" ]; } + { key = "<"; action = "