-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tcsh syntax highlighting partially broken #2638
Comments
I believe this was fixed in #1917 Can you try updating to 22.05? |
ah, great! will give it a go and let you know, thanks! |
tried in 22.05 - same behaviour. I think that it's just that tcsh isn't supported, right now? $ hx --version
helix 22.05
$ hx --health tcsh
Language 'tcsh' not found
Did you mean one of these: toml, typescript, tsx, twig, tsq, tablegen, tfvars |
There isn't any support at the moment but it might be possible to use tree-sitter-bash for it like we do with zsh. Could you post the entire file from the screenshot or a minimal version? Is there a shebang at the top that's selecting the language? |
It does have a shebang, yes. This is another #!/bin/tcsh -e
set python_version_no_dots=`echo ${CM_PYTHON_VERSION} | tr -d "."`
set modulename="third-party-libs-devel-python-${python_version_no_dots}"
printf "Loading $modulename module.."
module load "$modulename"
printf "..done!\n"
# Load custom python
printf "Loading custom python/$CM_PYTHON_VERSION module.."
module load "/net/global/opt/pipeline/python-payloads/modules/python/$CM_PYTHON_VERSION"
printf "..done!\n"
module list
printf "\n"
echo "Current PATH:"
echo "$PATH" | tr ":" "\n"
echo "Current PYTHONPATH:"
echo "$PYTHONPATH" | tr ":" "\n"
echo "Current PL_CONFIG_PATH:"
echo $PL_CONFIG_PATH | tr ":" "\n"
set python="python${CM_PYTHON_VERSION}"
printf "Running default Unit Test suite for Python $CM_PYTHON_VERSION with pytest..\n"
"$python" -m pytest "./$CM_UNIT_TESTS_DIR" -m "$CM_PYTEST_MARKS" \
-vvv \
--cov=$CM_PACKAGE_NAME \
--junitxml=$CM_JUNIT_REPORT_NAME
# See https://docs.pytest.org/en/latest/reference/exit-codes.html
set code = $?
if $code != 0 then
printf "Unit Tests didn't pass!\n"
exit 1
endif
printf "..done!\n"
printf "Running additional custom tests..\n"
echo "--> Running tests using $python.."
"$python" ./ci-scripts/run_tests.py
set code = $?
if $code != 0 then
echo "Additional unit tests didn't pass.\n"
exit 1
endif
# This is used by https://docs.gitlab.com/13.12/ee/user/project/merge_requests/test_coverage_visualization.html
echo "--> Running coverage report.."
coverage report
coverage xml
echo "All done!" |
It looks like the
line is what puts the parser into error mode. I don't write that much shell but I think bash needs brackets around if conditions and then a newline or |
I have the same problem with next #!/usr/bin/env bash
set -x
set -eo pipefail
if ! [ -x "$(command -v psql)" ]; then
echo >&2 "Error: psql is not installed."
exit 1
fi
if ! [ -x "$(command -v sqlx)" ]; then
echo >&2 "Error: sqlx is not installed."
echo >&2 "Use:"
echo >&2 " cargo install --version=0.5.7 sqlx-cli --no-default-features --features postgres"
echo >&2 "to install it."
exit 1
fi
DB_USER=${POSTGRES_USER:=postgres}
DB_PASSWORD="${POSTGRES_PASSWORD:=password}"
DB_NAME="${POSTGRES_DB:=newsletter}"
DB_PORT="${POSTGRES_PORT:=5432}"
# Allow to skip Docker if a dockerized Postgres database is already running
if [[ -z "${SKIP_DOCKER}" ]]
then
docker run \
-e POSTGRES_USER=${DB_USER} \
-e POSTGRES_PASSWORD=${DB_PASSWORD} \
-e POSTGRES_DB=${DB_NAME} \
-p "${DB_PORT}":5432 \
-d postgres \
postgres -N 1000
fi
export PGPASSWORD="${DB_PASSWORD}"
until psql -h "localhost" -U "${DB_USER}" -p "${DB_PORT}" -d "postgres" -c '\q'; do
>&2 echo "Postgres is still unavailable - sleeping"
sleep 1 done
>&2 echo "Postgres is up and running on port ${DB_PORT} - running migrations now!"
export DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@localhost:${DB_PORT}/${DB_NAME}
sqlx database create
sqlx migrate run
>&2 echo "Postgres has been migrated, ready to go!" |
Summary
Hi all!
And thanks for this beatiful project. I absolutely love it!
While editing a tcsh file with
hx
, I noticed that the syntax highlighting was having troubles with an unescaped'
character.This is what I see in
hx
:This is what I see in
neovim
, instead:I suppose that's because
hx
doesn't supporttcsh
natively?If so, I'd like to contribute to it but I don't know where to start.
Thanks!
PS: don't ask why I still need to use
tcsh
in 2022, I'm forced to since it's what we have at work :|Platform
CentOS Linux release 7.9.2009 (Core)
Terminal Emulator
iterm2
Helix Version
helix 22.03
The text was updated successfully, but these errors were encountered: