-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Complete collection of syntax highlighting test files #1213
Comments
Can I submit a python file for this issue? |
yes 👍 |
I will submit a elixir file soon :) |
i am not able to run |
@AkshatGadhwal @sharkdp I was also thinking about it. I think the script should first try to run a locally built binary from |
I'm also getting an error
|
@CCreativeCND The solution is to add the |
See step 1 of the instructions above: "Make sure that you are running the latest version of bat (preferably master, but the latest release should also work) and that bat is available on the path." We could probably improve the error message in the Python script. |
This is to contribute to issue #1213. I took some of the more complicated servers I am running as examples. Everything looks to be correctly highlighted compared to vim's syntax highlighting.
Part of the work for issue sharkdp#1213. A short PowerShell script and the corresponding syntax-highlighted output has been added. The script exhibits many of the peculiarities of the PowerShell syntax.
Part of the work for issue #1213. A short PowerShell script and the corresponding syntax-highlighted output has been added. The script exhibits many of the peculiarities of the PowerShell syntax.
Thanks to @henil and all of the other contributors, we now have syntax tests up and running for all main syntaxes (marked in bold) from sublimehq/Packages. What does that mean? We can now work towards updating sublimehq/Packages to the latest state with much more confidence regarding possible regressions. Unfortunately, |
The |
Adds a syntax highlighting test for VimL with source file based on parts of my own configuration changed to cover as much of syntax as possible. **NOTES:** Last line of source (`syntax enable`) does not get highlighted, since `syntax` keyword is not part of highlighting rules. Related to sharkdp#1213
Adds a syntax highlighting test for VimL with source file based on parts of my own configuration changed to cover as much of syntax as possible. **NOTES:** Last line of source (`syntax enable`) does not get highlighted, since `syntax` keyword is not part of highlighting rules. Related to sharkdp#1213
Adds a syntax highlighting test for VimL with source file based on parts of my own configuration changed to cover as much of syntax as possible. **NOTES:** Last line of source (`syntax enable`) does not get highlighted, since `syntax` keyword is not part of highlighting rules. Related to #1213
Thanks to @mohamed-abdelnour who added the remaining languages in #1668, this can be closed. Thank you to everyone involved! |
With all the recent news about Hacktoberfest I thought it would be a good idea to point out good beginner issues that would be actually helpful for
bat
. In the past years, I have actually experienced Hacktoberfest as a really great event - both as a contributor as well as a maintainer.As of recently,
bat
has a set of syntax highlighting regression tests (see #1124 for more details). The main idea is that we have a large collection of test files for each and every language thatbat
can highlight. This way, we can make sure that we do not run into issues we had in the past where either (1) syntax highlighting for some language is suddenly not working anymore or (2)bat
suddenly crashes/panics for some input (due to incompatibilities in theregex
flavors insyntect
and Sublime Text).In order to add a new test file, you can follow these steps (let's take "Ruby" as an example):
bat
(master
orbat
0.16) and thatbat
is available on the path.tests/syntax-tests/source/Ruby
(adapt for your language). The file name could betest.rb
(adapt extension) but can also be adapted if that is necessary in order forbat
to highlight it correctly (e.g.Makefile
).bat
s license. If it requires attribution, please add aLICENSE.md
in the same folder with a text like this:tests/syntax-tests
and run theupdate.sh
Bash script. A new file should be generated in thehighlighted
folder (e.g.highlighted/Ruby/test.rb
).cat
orbat --language=txt
to display the content of this file and make sure that the syntax highlighting looks correct.git add
the new files in thesource
folder as well as the autogenerated files in thehighlighted
folder.List of languages / syntaxes:
/proc/cpuinfo
)/etc/group
--show-all
)/etc/hosts
/proc/meminfo
)/etc/passwd
requirements.txt
/etc/resolv.conf
)It would be great if we could focus on the syntaxes in
sublimehq/Packages
first (marked in bold) as this would allow us to merge #1174 without having to worry (too much) about syntax highlighting regressions. Also, most of these are really popular languages, so it makes sense to have them in the test suite.The text was updated successfully, but these errors were encountered: