robherley/snips.sh

Better language detection with guesslang model

robherley opened this issue · 1 comments

For syntax highlighting chroma is great, but unfortunately the analyzer doesn't support a lot of languages.

Since the uploads are via pipe, we can't get any metadata (like a file name) unless the user manually provides it with the --ext param on upload or changes it in the TUI.

That's where yeo/guesslang could be useful. It's a model trained to detect code and it's quite good at it. It's what vscode uses to detect languages.

Together with something like tfgo, it could provide better analysis on what the input language is.