Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.28 KB

README.md

File metadata and controls

54 lines (35 loc) · 1.28 KB

✂️ snippit

creates images of code snippets .

Installation

like any other go program:

go install github.com/juliusmh/snippit@latest

General

The font used is RobotoMono. Currently, this is fixed. The default render resolution is pretty low, given the default line height of 17. In order to increase resolution use the -scale X flag (default X=1). To see all available options use the -help flag.

Syntax highlighting is performed by chroma. For a list of all styles I recommend xyproto/splash's demo page. For a list of all lexers checkout chroma/lexers.

Configuration

snippit -l -w testdata/test.go 
  • -l To show line numbers
  • -w To show window

test.go

snippit -l -w -bw 0 -style solarized-light testdata/test.yaml 
  • -bw Border Width zero (hide border)
  • -style Apply stylesheet solarized-light

test.yaml

snippit -br 0 -style xcode-dark testdata/test.py
  • -br Border Radius zero

test.yaml

Upcoming

  • Filename in window header (decoration)
  • SVG output option