From f0d1bcb0c70ef4592ab6a098d46df669983a3c90 Mon Sep 17 00:00:00 2001 From: Steven Crawford Date: Thu, 8 Jan 2026 11:05:57 -0600 Subject: [PATCH] added file --- fix-treesitter-except.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 fix-treesitter-except.sh diff --git a/fix-treesitter-except.sh b/fix-treesitter-except.sh new file mode 100755 index 0000000..584cfe8 --- /dev/null +++ b/fix-treesitter-except.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Script to fix the except* treesitter query issue +# This removes the problematic except* entries from treesitter query files + +echo "Fixing treesitter except* query issue..." + +NVIM_DATA_DIR="$HOME/.local/share/nvim" +QUERY_FILES=( + "$NVIM_DATA_DIR/lazy/nvim-treesitter/queries/python/highlights.scm" + "$NVIM_DATA_DIR/lazy/nvim-treesitter/queries/bitbake/highlights.scm" +) + +for file in "${QUERY_FILES[@]}"; do + if [ -f "$file" ]; then + echo "Processing $file..." + # Create backup if it doesn't exist + if [ ! -f "$file.backup" ]; then + cp "$file" "$file.backup" + echo " Created backup: $file.backup" + fi + + # Remove the problematic except* line + sed -i '/^ "except\*"$/d' "$file" + echo " Removed except* entries from $file" + else + echo "File not found: $file" + fi +done + +echo "Fix applied! You should now be able to open files in Neo-tree without errors." \ No newline at end of file