added file
This commit is contained in:
31
fix-treesitter-except.sh
Executable file
31
fix-treesitter-except.sh
Executable file
@@ -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."
|
||||
Reference in New Issue
Block a user