add tide-reset function, fix treesitter config for stable nvim

Extract tide configuration into a reusable fish function (tide-reset)
and call it from the chezmoi onchange script. Also revert treesitter
config to the stable API (nvim-treesitter.configs).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Anton Volnuhin 2026-03-04 18:13:21 +03:00
parent dfdd5b7dae
commit 95c88c3ce1
3 changed files with 21 additions and 12 deletions

View File

@ -34,11 +34,13 @@ require("lazy").setup({
-- Treesitter for better highlighting and moving
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate",
config = function()
require("nvim-treesitter").setup({})
require("nvim-treesitter").install({
"c", "query", "vimdoc", "vim", "bash", "go", "css",
"python", "html", "javascript", "json", "jsonc",
"lua", "rust", "typescript",
require("nvim-treesitter.configs").setup({
ensure_installed = {
"c", "query", "vimdoc", "vim", "bash", "go", "css",
"python", "html", "javascript", "json", "jsonc",
"lua", "rust", "typescript",
},
highlight = { enable = true },
})
end,
},

View File

@ -0,0 +1,13 @@
function tide-reset
if not type -q tide
echo "Tide is not installed"
return 1
end
tide configure --auto --style=Classic --prompt_colors='True color' --classic_prompt_color=Dark --show_time='24-hour format' --classic_prompt_separators=Slanted --powerline_prompt_heads=Slanted --powerline_prompt_tails=Round --powerline_prompt_style='Two lines, frame' --prompt_connection=Disconnected --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Sparse --icons='Few icons'
set -U tide_prompt_transient_enabled false
set -U tide_right_prompt_items (string match -v -- node $tide_right_prompt_items)
set -U tide_right_prompt_items (string match -v -- gcloud $tide_right_prompt_items)
set -U tide_right_prompt_items (string match -v -- kubectl $tide_right_prompt_items)
echo "Tide configured."
end

View File

@ -12,10 +12,4 @@ if ! fish -c "type -q tide" &>/dev/null; then
exit 0
fi
echo "Configuring tide prompt..."
fish -c "tide configure --auto --style=Classic --prompt_colors='True color' --classic_prompt_color=Dark --show_time='24-hour format' --classic_prompt_separators=Slanted --powerline_prompt_heads=Slanted --powerline_prompt_tails=Round --powerline_prompt_style='Two lines, frame' --prompt_connection=Disconnected --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Sparse --icons='Few icons'" >/dev/null
fish -c "set -U tide_prompt_transient_enabled false"
fish -c "set -U tide_right_prompt_items (string match -v -- node \$tide_right_prompt_items)"
fish -c "set -U tide_right_prompt_items (string match -v -- gcloud \$tide_right_prompt_items)"
fish -c "set -U tide_right_prompt_items (string match -v -- kubectl \$tide_right_prompt_items)"
echo "Tide configured."
fish -c "tide-reset"