better auto-detection of CSV delimiter
- files with a tsv extension are automatically detected as tab delimited
- other files parsed as CSV go through the following steps:
- if the first line contains at least 3 of the same separator, it uses that separator as a delimiter
- if the first line contains only one supported separator character, it uses that separator as a delimiter
- otherwise it falls back to treating all supported delimiters as the delimiter
supported delimiters, in precedence order:
- comma `,`
- semi-colon `;`
- tab `\t`
- pipe `|`
This update includes an overhaul of scope names to better support the
set of themes included with bat.
You can find a visual diff for every theme in this PR:
https://github.com/victor-gp/cmd-help-sublime-syntax/pull/17
This commit updates the cmd-help syntax test because the scopes (-> colors)
have changed.
Add submodule with sublime syntax.
Add corresponding tests for both Ada (in adb/ads) and for the companion tool
gpr.
fixes#1300
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
We need to type `inf` and `INF` as strings in `INI.sublime-syntax`,
otherwise `yaml-rust` interprets them as real numbers ("infinity") and
they do not get registered as file extensions:
/Users/martin/src/yaml-rust # https://github.com/chyh1990/yaml-rust
% cargo run --example dump_yaml ~/src/bat/assets/syntaxes/02_Extra/INI.sublime-syntax
---
String("name"):
String("INI")
String("file_extensions"):
String("ini")
String("INI")
Real("inf")
Real("INF")
...
Also add a regression test.
The file `LiveScript.sublime-syntax` is a pure export from a licenced version
of Sublime Text, Version 3.1.1, Build 3176 with
assets/syntaxes/02_Extra/LiveScript/Syntaxes/LiveScript.tmLanguage as the source
file.
* syntax-tests: Make CpuInfo test actually work
File extension matching is case-sensitive, so extension needs to be .cpuinfo for
the syntax to actually be used.
* Also fix MemInfo
The syntax is named "Man Page" upstream, but our man page syntax is
different, it's for rendered man pages. Rename to Groff and remove
`.man` from extensions.