A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sourcegraph/syntect_server below:

sourcegraph/syntect_server: HTTP code syntax highlighting server written in Rust.

This is an HTTP server that exposes the Rust Syntect syntax highlighting library for use by other services. Send it some code, and it'll send you syntax-highlighted code in response.

Technologies:

docker run --detach --name=syntect_server -p 9238:9238 sourcegraph/syntect_server

You can then e.g. GET http://localhost:9238/health or http://host.docker.internal:9238/health to confirm it is working.

gosyntect is a Go package + CLI program to make requests against syntect_server.

By default on startup, syntect_server will list all features (themes + file types) it supports. This can be disabled by setting QUIET=true in the environment.

  1. Install Rust nightly.
  2. git clone this repository anywhere on your filesystem.
  3. Use cargo run to download dependencies + compile + run the server.

Invoke cargo build --release and an optimized binary will be built (e.g. to ./target/release/syntect_server).

./build.sh will build your current repository checkout into a final Docker image.

Run ./publish.sh after merging your changes.

Once published, the image version will need to be updated in the following locations to make Sourcegraph use it:

Additionally, it's worth doing a search for other uses in case this list is stale.

1) Find an open-source .tmLanguage or .sublime-syntax file and send a PR to our package registry

https://github.com/slimsag/Packages is the package registry we use which holds all of the syntax definitions we use in syntect_server and Sourcegraph. Send a PR there by following these steps

2) Update our temporary fork of syntect

We use a temporary fork of syntect as a hack to get our Packages registry into the binary. Update it by creating a PR with two commits like:

3) Update syntect_server to use the new version of syntect

Send a PR to this repository with the result of running cargo update -p syntect.

4) Publish a new image, use it in Sourcegraph

Run ./publish.sh to build and release a new image of syntect_server, and then send a PR to the main Sourcegraph repository like this. Once merged, it will automatically rollout to Sourcegraph.com and go in the next Sourcegraph release.

Supported file extensions:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4