Refactor Vue <-> Editor <-> CodeMirror code.
Introduce Pinia store to keep global state, in order to get rid of a lot of event juggling between Editor class/child components and the root App component.
* Add language support for TypeScript
* Add formatter for TypeScript
* Add language autodetection for TypeScript
* Add TypeScript to list of featured languages
* Add language support for JSX and TSX
* Add JSX and TSX to list of featured languages
* Remove guesslang token from JSX and TSX
* Fix syntax error
---------
Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
* Contain language selection dialog in an element that can be scrolled, and automatically scroll it if needed when navigating the list with arrow keys
* Add support for more languages:
Clojure, Erlang, Golang, Lezer, Ruby, Shell, YAML
* Move prettier auto format settings for languages into Language() class
* Remove invalid import
* Fix bug that could cause auto formatting to fail for the last block.
Add tests for language auto detection and formatting.
* Fix broken tests
* Fix language auto detection on Safari Webkit which was broken
* Remove unnecessary wait time
If content starts and ends with { & } or [ & ], we first try to parse is as JSON. If that succeeds, we'll assume it's JSON.
Increase the highlightjs relevance threshold.
Hopefully this will result in fewer false positives that have been observed (e.g. for CSS and JSON).