From 24bad1f5c4995f5405d1708cb56e803bb19e9e32 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lopes" Date: Fri, 13 Mar 2026 12:21:18 +0000 Subject: [PATCH] i be working --- DankMaterialShell/files/settings.json | 4 +- fish/files/config.fish | 4 ++ fish/files/functions/y.fish | 11 +++- fish/files/functions/yazi.fish | 15 ++++++ nvim/files/lua/plugins/lsp.lua | 4 +- nvim/files/lua/plugins/treesitter.lua | 76 +++++++++++++++++++++++++-- pi/files.linux/agent/settings.json | 2 +- 7 files changed, 108 insertions(+), 8 deletions(-) create mode 100644 fish/files/functions/yazi.fish diff --git a/DankMaterialShell/files/settings.json b/DankMaterialShell/files/settings.json index 4676cf1..ba5517f 100644 --- a/DankMaterialShell/files/settings.json +++ b/DankMaterialShell/files/settings.json @@ -224,8 +224,8 @@ "networkPreference": "wifi", "iconTheme": "System Default", "cursorSettings": { - "theme": "Qogir", - "size": 32, + "theme": "Adwaita", + "size": 24, "niri": { "hideWhenTyping": false, "hideAfterInactiveMs": 0 diff --git a/fish/files/config.fish b/fish/files/config.fish index 47a3714..42f1dea 100644 --- a/fish/files/config.fish +++ b/fish/files/config.fish @@ -75,6 +75,10 @@ status is-interactive; and begin if test "$TERM" != dumb fzf --fish | source + bind --erase \ct + bind -M insert --erase \ct + bind \cf fzf-file-widget + bind -M insert \cf fzf-file-widget end # add completions generated by Home Manager to $fish_complete_path diff --git a/fish/files/functions/y.fish b/fish/files/functions/y.fish index 6b26304..9281dfd 100644 --- a/fish/files/functions/y.fish +++ b/fish/files/functions/y.fish @@ -1,8 +1,17 @@ function y set tmp (mktemp -t "yazi-cwd.XXXXXX") - yazi $argv --cwd-file="$tmp" + + # In Zellij + Alacritty, force Yazi away from graphical adapters and into Chafa. + # This gives text/blocks previews instead of broken/blank image panes. + if set -q ZELLIJ + env -u DISPLAY -u WAYLAND_DISPLAY -u SWAYSOCK -u HYPRLAND_INSTANCE_SIGNATURE -u WAYFIRE_SOCKET TERM=xterm-256color yazi $argv --cwd-file="$tmp" + else + yazi $argv --cwd-file="$tmp" + end + if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] builtin cd -- "$cwd" end + rm -f -- "$tmp" end diff --git a/fish/files/functions/yazi.fish b/fish/files/functions/yazi.fish new file mode 100644 index 0000000..48d8a0f --- /dev/null +++ b/fish/files/functions/yazi.fish @@ -0,0 +1,15 @@ +function yazi --wraps yazi --description "Yazi wrapper that forces Chafa inside Zellij" + if set -q ZELLIJ + begin + set -e DISPLAY + set -e WAYLAND_DISPLAY + set -e SWAYSOCK + set -e HYPRLAND_INSTANCE_SIGNATURE + set -e WAYFIRE_SOCKET + set -lx TERM xterm-256color + command yazi $argv + end + else + command yazi $argv + end +end diff --git a/nvim/files/lua/plugins/lsp.lua b/nvim/files/lua/plugins/lsp.lua index 10e4da8..4e21901 100644 --- a/nvim/files/lua/plugins/lsp.lua +++ b/nvim/files/lua/plugins/lsp.lua @@ -119,7 +119,9 @@ return { end, "[T]oggle Inlay [H]ints") end - -- Svelte-specific: notify on TS/JS file changes + -- Svelte-specific: keep treesitter highlighting in control + -- (semantic tokens can make svelte buffers look oddly colored) + -- and notify on TS/JS file changes -- https://github.com/sveltejs/language-tools/issues/2008#issuecomment-2351976230 if client and client.name == "svelte" then vim.api.nvim_create_autocmd("BufWritePost", { diff --git a/nvim/files/lua/plugins/treesitter.lua b/nvim/files/lua/plugins/treesitter.lua index f75e80c..c21ea7e 100644 --- a/nvim/files/lua/plugins/treesitter.lua +++ b/nvim/files/lua/plugins/treesitter.lua @@ -4,12 +4,13 @@ return { lazy = false, build = ":TSUpdate", config = function() - require("nvim-treesitter").setup({ + local ts = require("nvim-treesitter") + ts.setup({ install_dir = vim.fn.stdpath("data") .. "/site", }) -- Install parsers (async, no-op if already installed) - require("nvim-treesitter").install({ + ts.install({ "vimdoc", "javascript", "typescript", @@ -28,6 +29,75 @@ return { "nix", }) - -- Enable treesitter highlighting - indentexpr set automatically per filetype + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "svelte", + "javascript", + "typescript", + "tsx", + "html", + "css", + "lua", + "nix", + }, + callback = function() + pcall(vim.treesitter.start) + end, + }) + + + -- Workaround: some svelte parser/query combos don't inject JS for +((script_element + (raw_text) @injection.content) + (#set! injection.language "javascript")) + +((script_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_lang))) + (raw_text) @injection.content) + (#eq? @_attr "lang") + (#any-of? @_lang "ts" "typescript") + (#set! injection.language "typescript")) + +((script_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_lang))) + (raw_text) @injection.content) + (#eq? @_attr "lang") + (#any-of? @_lang "js" "javascript") + (#set! injection.language "javascript")) + +((element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @injection.language))) + (text) @injection.content) + (#eq? @_attr "lang") + (#eq? @injection.language "pug")) +]=]) end, } diff --git a/pi/files.linux/agent/settings.json b/pi/files.linux/agent/settings.json index 009b4e9..0831667 100644 --- a/pi/files.linux/agent/settings.json +++ b/pi/files.linux/agent/settings.json @@ -1,7 +1,7 @@ { "lastChangelogVersion": "0.57.1", "defaultProvider": "openai-codex", - "defaultModel": "gpt-5.3-codex-spark", + "defaultModel": "gpt-5.3-codex", "defaultThinkingLevel": "medium", "theme": "matugen", "lsp": {