viconf now disables semantic tokens for nixd if the file contains non-ascii characters, temporary workaround until the feature is fixed
This commit is contained in:
@@ -9,7 +9,7 @@ config here](https://github.com/Frost-Phoenix/nixos-config/tree/catppuccin)
|
||||
|
||||

|
||||

|
||||
Screenshots up to date as of [this commit](https://github.com/pagedMov/nixos-config/commit/0bb0b6ce81a4b214158b5fb4bb0da7105f8d9a17)
|
||||
Screenshots up to date as of [this commit](https://github.com/pagedMov/nixos-config/commit/50decf03c9d1a7792d5ea0056eb51f6a400654f0)
|
||||
|
||||
## Programs
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.3 MiB |
@@ -23,9 +23,23 @@ pkgs.writeShellApplication {
|
||||
results=$(echo "$results" | cut -d'/' -f4-)
|
||||
results=$(echo "$results" | grep "$1")
|
||||
|
||||
echo "$results" | tr ' ' '\n' | fzf | xargs -I {} nvim "$results_prefix"/{}
|
||||
file=$(echo "$results" | tr ' ' '\n' | fzf)
|
||||
file="$results_prefix/$file"
|
||||
|
||||
# Check if the file contains any non-UTF-8 characters
|
||||
if grep --color='auto' -P -q "[^\x00-\x7F]" "$file"; then
|
||||
NIXD_FLAGS="--semantic-tokens=false" nvim "$results_prefix"/"$file"
|
||||
else
|
||||
nvim "$file"
|
||||
fi
|
||||
|
||||
else
|
||||
# Check if the file contains any non-UTF-8 characters
|
||||
if grep --color='auto' -P -q "[^\x00-\x7F]" "$results"; then
|
||||
NIXD_FLAGS="--semantic-tokens=false" nvim "$results"
|
||||
else
|
||||
nvim "$results"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user