1
1
mirror of https://github.com/walles/moar.git synced 2024-11-27 11:03:58 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Johan Walles
cfbbcb7980 Fix production code compile errors 2024-01-02 09:46:19 +01:00
Johan Walles
b7603ea026 Add a -lang option for input file language 2024-01-02 09:39:47 +01:00
Johan Walles
6c86039965 Move background highlighting into its own function 2024-01-01 18:11:17 +01:00
Johan Walles
52e04a6eda Further slim down the highlighting API 2024-01-01 13:47:38 +01:00
Johan Walles
2d2844f68c Modify the highlighting API
This changes the highlighting API to take a string instead of a file
because strings are what Chroma can highlight.

With this change in place, we should invoke the highlighter after
we're done reading the input. This will allow highlighting both files
(as before) and streaming input.

This also moves the responsibility of checking the file against the max
highlight size from the highlighter to the caller.
2024-01-01 13:47:38 +01:00
Johan Walles
f0bc8f2258 Enable revive for unused parameters check 2024-01-01 13:30:25 +01:00
Johan Walles
7bd5d3e099 Handle some unused parameters issues 2023-03-03 16:56:09 +01:00
Johan Walles
2b77cf7605 Bump Chroma to add new styles
Relates to #112.
2022-12-29 08:28:27 +01:00
Johan Walles
c95e164595 Enable picking style and formatter from command line
Related to #60.
2021-05-13 07:37:34 +02:00
Steven Penny
61f071936a Clean up imports
Remove "io/ioutil" and "math"
2021-05-11 12:20:31 -05:00
Johan Walles
c8bc7b0161 Don't highlight files larger than 1MB
They make the highlighter just run in the background slowly eating up
memory.
2021-04-24 16:14:30 +02:00
Johan Walles
232b784428 Fix tests 2021-04-22 22:05:36 +02:00
Johan Walles
2c3cc80500 Don't use the plaintext highlighter 2021-04-22 19:31:47 +02:00
Johan Walles
985bcce02c Move highlighting into its own file 2021-04-22 08:14:51 +02:00