jeff-hykin / better-shell-syntax

💾 📦 ♻️ An improvement to the shell syntax for VS Code
MIT License
50 stars 4 forks source link

Extension not running? #86

Open Alecton4 opened 2 months ago

Alecton4 commented 2 months ago

How do we confirm the extension is running? I used the "Developer: Show Running Extensions" command in VSCode, but didn't see this extension being on the list. Also, I tried enabling and then disabling the extension, but it seemed the code highlighting had no change.

The code with a problem is:

Example code in README:

export PATH="${PATH}:/usr/local/opt/llvm/bin"

find "$PWD" -maxdepth 1 -print0 | perl -p -e 's/\0'$escaped_path'\//\0/g'

if [[ "$OSTYPR" == "darwin"* ]]; then
    brew install $@
fi

cd /opencv-3.2.0/ \
    && mkdir build \
    && cd build \
    && ldconfig \
    && rm /opencv.zip \
    && rm /opencv_contrib.zip

function go_to_vs_lang_settings {
    arg_1=$1
    arg_2=$2
    arg_3=$3
    all_arguments=$@
    cd "/Applications/extensions/"; ls -1
}

exec 9>&2
exec 8> >(
    perl -e '$|=1; while(sysread STDIN,$a,9999) {print
"$ENV{COLOR_BLUE}$a$ENV{COLOR_RESET}"}'
)

export COLOR_BLUE="$(tput setaf 4)"
export COLOR_RED="$(tput setaf 1)"
export COLOR_RESET="$(tput sgr0)"

It looks like:

Theme: XD Theme MixItUp

image

It should look like:

As in README.

jeff-hykin commented 2 months ago

Yeah I need to update the readme, VS Code started using this repo as the source of their shell syntax so its effectively built-in. Which is why you probably won't notice anything unless its one of the recently fixed issues like local vars or case statement stuff.

In terms of "running" I don't think any syntax grammars will be classified as "running" since they're just a json file. The VS Code parser just looks at the JSON file to know how to parse.

For the "it looks like" vs "expected" did you want the brackets to be red? I don't see any other differences

Alecton4 commented 2 months ago

VS Code started using this repo

That's nice!

For the "it looks like" vs "expected"

Some underline rendering disappears, e.g., in the last three lines. Is this intended in the current version? If so then it's totally fine.

jeff-hykin commented 2 months ago

Some underline rendering disappears, e.g., in the last three lines. Is this intended in the current version? If so then it's totally fine.

Oh, yes! Thats a theme change. I'm also the owner of the XD theme and I've gone back and fourth on underlining unquoted args. I took them off, and I would kind of like to add them back. I believe the reason I took them out was because sometimes stuff like a$(which hi)b was all underlined and felt kinda weird. Like yes, its one arg and it'd be nice to underline each argument, but on the other hand which is a command so it probably shouldnt be underlined.

jeff-hykin commented 2 months ago

I'll keep this open till I update the readme