From 9b64299c4558c8e56606a041ef097ae1a8b70531 Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 23 Apr 2026 06:02:32 -0400 Subject: [PATCH] refactor: simplify fish prompt and update config --- .config/fish/functions/define_aliases.fish | 3 +- .config/fish/functions/fish_prompt.fish | 62 +--------------------- .config/nvim/lazy-lock.json | 2 +- .config/nvim/lua/core/autocmds.lua | 8 +++ .config/nvim/lua/core/keymaps.lua | 12 +++-- .config/nvim/lua/plugins/tools.lua | 30 +++++------ .tmux.conf | 2 +- 7 files changed, 35 insertions(+), 84 deletions(-) diff --git a/.config/fish/functions/define_aliases.fish b/.config/fish/functions/define_aliases.fish index 3d79a3b..4cf04a5 100644 --- a/.config/fish/functions/define_aliases.fish +++ b/.config/fish/functions/define_aliases.fish @@ -18,9 +18,8 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands' alias pn pnpm alias nv 'neovide --fork; and clear' alias hx helix - alias ai aichat - alias ais aisearch alias fwl 'sudo firewall-cmd' + alias o 'opencode run --thinking' switch "$uname" case Linux diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish index 2cd8120..fc2721d 100644 --- a/.config/fish/functions/fish_prompt.fish +++ b/.config/fish/functions/fish_prompt.fish @@ -94,69 +94,9 @@ function fish_prompt --description 'Write out the prompt' set git_branch ' on ' (set_color $branch_color) $cur_branch (set_color normal) end - # Set user prefix, based on docker machine name - if test -n "$DOCKER_MACHINE_NAME" - set user_prefix (set_color blue) $DOCKER_MACHINE_NAME (set_color normal) ' ' - end - - # Set go version, by existence of go mod or dep files - if test -e ./go.mod; or test -e ./Gopkg.toml; and command -sq go - if test -z "$go_version" - set -l version_str (string match -r 'go\d+\.\d+\.?\d*' (go version)) - set -g go_version ' with ' (set_color 8eadaf) $version_str (set_color normal) - end - else - set -g go_version - end - - # Set docker version, by existence of Dockerfile - if test -e ./Dockerfile; and command -sq docker - if test -z "$docker_version" - set -l version_str (string match -r '\d+\.\d+\.?\d*' (docker --version)) - set -g docker_version ' on ' (set_color blue) 'docker' $version_str (set_color normal) - end - else - set -g docker_version - end - - # Set node (and ts) version, based on existance of package.json (and tsconfig.json) - if test -e ./package.json; and command -sq node - if test -z "$node_version" - set -l version_str (string sub -s 2 (node -v)) - set -g node_version ' with ' (set_color brgreen) 'node' $version_str (set_color normal) - - if test -e ./tsconfig.json; and command -sq tsc - set -l version_str (string match -r '\d+\.\d+\.?\d*' (tsc -v)) - set -g node_version $node_version ' and ' (set_color cyan) 'ts' $version_str (set_color normal) - end - end - else - set -g node_version - end - - # Set elixir version, based on existance of mix.exs - if test -e ./mix.exs; and command -sq elixir - if test -z "$ex_version" - set -l version_str (string sub -s 8 (string match -r 'Elixir \d+\.\d+\.?\d*' (elixir -v))) - set -g ex_version ' with ' (set_color magenta) 'ex' $version_str (set_color normal) - end - else - set -g ex_version - end - - # Set dart version, based on existances of pubspec.yaml - if test -e ./pubspec.yaml; and command -sq dart - if test -z "$dart_version" - set -l version_str (string match -r '\d+\.\d+\.?\d*' (dart --version 2>| cat)) - set -g dart_version ' with ' (set_color brblue) 'dart' $version_str (set_color normal) - end - else - set -g dart_version - end - # Combine all prompt variables set -l cwd (set_color $color_cwd) (prompt_pwd) (set_color normal) - set -l top_prompt $cwd $git_branch $go_version $ex_version $node_version $dart_version $flutter_version $docker_version + set -l top_prompt $cwd $git_branch set -l bottom_prompt $user_prefix $jobs_num $exit_code $suffix ' ' # Decide whether to insert newline, based on whether the top prompt is only equal to cwd diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 7912125..33b88be 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -8,7 +8,7 @@ "kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, - "markview.nvim": { "branch": "main", "commit": "02810964cc288065c2919ea7a8d41e72f17ccd8a" }, + "markview.nvim": { "branch": "main", "commit": "1861f959599ae03cfd59f56222a542035b0cd947" }, "mini.diff": { "branch": "main", "commit": "9bccf260cdb9308223f47a29fb4cb91c817a9349" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, diff --git a/.config/nvim/lua/core/autocmds.lua b/.config/nvim/lua/core/autocmds.lua index 8f406ca..d87bc09 100644 --- a/.config/nvim/lua/core/autocmds.lua +++ b/.config/nvim/lua/core/autocmds.lua @@ -18,3 +18,11 @@ autocmd("TermOpen", { command = "setlocal nonumber norelativenumber", group = "TerminalSettings", }) + +-- Yaml settings +augroup("YamlSettings", { clear = true }) +autocmd("FileType", { + pattern = "y*ml", + command = "setlocal foldenable foldlevel=1", + group = "YamlSettings", +}) diff --git a/.config/nvim/lua/core/keymaps.lua b/.config/nvim/lua/core/keymaps.lua index d8a752d..ce57b26 100644 --- a/.config/nvim/lua/core/keymaps.lua +++ b/.config/nvim/lua/core/keymaps.lua @@ -15,12 +15,16 @@ map("v", "//", function() end, { noremap = true, silent = true, desc = "Search for Visual Selection" }) -- LSP Diagnostic Mappings -local diag_opts = { silent = true } +local diag_opts = { silent = true, noremap = true } map("n", "d", vim.diagnostic.open_float, diag_opts) map("n", "[d", function() - vim.diagnostic.jump({ count = 1 }) -end, diag_opts) -map("n", "]d", function() vim.diagnostic.jump({ count = -1 }) end, diag_opts) +map("n", "]d", function() + vim.diagnostic.jump({ count = 1 }) +end, diag_opts) map("n", "q", vim.diagnostic.setloclist, diag_opts) + +-- Noice +map("n", "o", "NoiceDismiss", { silent = true, noremap = true }) +map("n", "O", "NoiceDisable", { silent = true, noremap = true }) diff --git a/.config/nvim/lua/plugins/tools.lua b/.config/nvim/lua/plugins/tools.lua index 524d15c..6d5cd91 100644 --- a/.config/nvim/lua/plugins/tools.lua +++ b/.config/nvim/lua/plugins/tools.lua @@ -25,24 +25,24 @@ return { }, interactions = { chat = { - adapter = { name = "opencode", model = "llama.cpp/qwen3.5-35b-a3b-dev" }, - opts = { - -- system_prompt = "", - }, - tools = { - opts = { - system_prompt = { - enabled = true, -- Enable the tools system prompt? - replace_main_system_prompt = true, -- Replace the main system prompt with the tools system prompt? - }, - }, - }, + adapter = { name = "opencode", model = "llama.cpp/qwen3.6-35b-a3b-dev" }, + -- opts = { + -- system_prompt = "", + -- }, + -- tools = { + -- opts = { + -- system_prompt = { + -- enabled = true, -- Enable the tools system prompt? + -- replace_main_system_prompt = true, -- Replace the main system prompt with the tools system prompt? + -- }, + -- }, + -- }, }, inline = { - adapter = { name = "llama.cpp", model = "qwen3.5-35b-a3b-dev" }, + adapter = { name = "llama.cpp", model = "qwen3.6-35b-a3b-dev" }, }, cmd = { - adapter = { name = "llama.cpp", model = "qwen3.5-35b-a3b-dev" }, + adapter = { name = "llama.cpp", model = "qwen3.6-35b-a3b-dev" }, }, cli = { agent = "opencode", @@ -65,7 +65,7 @@ return { return require("codecompanion.adapters").extend("openai_compatible", { schema = { model = { - default = "qwen3.5-35b-a3b-dev", + default = "qwen3.6-35b-a3b-dev", }, }, env = { diff --git a/.tmux.conf b/.tmux.conf index 201dcca..3524b3d 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -20,4 +20,4 @@ bind -r K resize-pane -U 5 bind -r H resize-pane -L 5 bind -r L resize-pane -R 5 -source-file ".tmux-line.conf" +source-file "~/.tmux-line.conf"