omartawfik / vscat Goto Github PK
View Code? Open in Web Editor NEWBringing VS Code syntax highlighting to the terminal!
License: MIT License
Bringing VS Code syntax highlighting to the terminal!
License: MIT License
The vscode-textmate
library we use does not just export foreground color, it also supports a bunch of other metadata, like underlines, and background color. We should be able to extract this info and pass it along to the colorization engine.
Check these first few output lines from executing vscode ./package.json | less -R
:
1 │ {
2 │ ··"name":·"vscat",
3 │ ··"description":·"Bringing·VS·Code·syntax·highlighting·to·the·term…
4 │ ··"version":·"0.0.0",
5 │ ··"private":·false,
6 │ ··"repository":·"https://github.com/OmarTawfik/vscat",
7 │ ··"author":·"Omar·Tawfik·<[email protected]…
8 │ ··"license":·"MIT",
9 │ ··"main":·"out/src/index.js",
10 │ ··"bin":·{
11 │ ····"vscat":·"out/src/cli.js"
12 │ ··},
13 │ ··"scripts":·{
14 │ ····"generate-metadata":·"ts-node-transpile-only·./scripts/metadat…
15 │ ····"generate-readme":·"ts-node·./scripts/readme",
16 │ ····"lint":·"jest·&&·prettier·.·--list-different·&&·tsc"
less -R
.Suggestions:
When provided a file name, we try to do our best to match it to a specific language, according to VSCode's own configuration files. We use a library called micromatch
(link) for glob-matching.
Using it, we can match the expression Dockerfile.*
correctly to foo/Dockerfile.Production
. But currently it does not match nested globs, like **/.git/config
. So we would fail to deduce that foo/.git/config
is a properties file.
One of the metadata pieces we collect for each grammar is the injectTo
and embeddedLanguages
properties. These can be passed to vscode-textmate
so that it can support nested languages. Currently we do not. We should support that and add tests accourdingly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.