Commit Graph

24 Commits

Author SHA1 Message Date
Espen Jacobsson
475f3465fe
Add TypeScript, JSX and TSX language support (#64)
* 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>
2023-12-26 00:47:28 +01:00
Jonatan Heyman
bb511b868b
Add support for more languages (#69)
* 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
2023-12-26 00:27:43 +01:00
Jonatan Heyman
079fa666d6
Implement web version of Heynote (#63)
* Move windows.darkMode -> window.heynote.themeMode

* Only add UpdateStatusItem if window.heynote.autoUpdate is set

* Update Vite

* Implement web version of Heynote.

Add a child vite project in ./webapp/ that is Heynote running within a browser. Imports almost all code from ../src/ and only adds a thin bridge that corresponds to the API between the Electron main process and the app code.

* Remove commented out tag

* Specify publicDir in vite config, instead of using a symlink

* Add webapp_dev npm command to package.json

* Add npm run command: webapp:build

* Add resolve alias '@' that points to project root.
Move assets file from public to assets in order to let Vite/Rollup handle bundling.
2023-12-25 14:18:44 +01:00
Ahmed M. Atia
96440b28ba
Add syntax highlighting support for C# (#55)
* feat: add syntax highlighting support for C#

* update README - add C# sysntac highlighting support

* restore original indentation / formatting

* Fix syntax error in Lezer grammar

* Fix language auto detection of C#

---------

Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
2023-12-24 10:59:24 +01:00
Jonatan Heyman
6f53b61bb0 Use guesslang-js for language auto detection instead of Highlight.js
Should (hopefully) reduce false positives.
2023-12-06 02:52:51 +01:00
Jonatan Heyman
2102892776 Fix About dialog UI issues on Windows 2023-07-17 11:57:25 +02:00
Jonatan Heyman
414a44d857 Move about.html into public dir, to have it bundled in production build 2023-07-09 01:02:04 +02:00
Jonatan Heyman
459fcd7c4c Add About dialog
The about dialog contains version info as well as the timestamp for the currency exchange rates.
2023-07-08 16:47:25 +02:00
Jonatan Heyman
b26381164a Improve language auto detection
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).
2023-03-07 15:01:41 +01:00
Jonatan Heyman
93bf1e9036 Improve auto update
Add titles to status bar buttons
Bump version to 1.0.7
2023-03-07 01:45:23 +01:00
Jonatan Heyman
7ce91016d6 Add auto update support 2023-03-06 01:30:37 +01:00
Jonatan Heyman
e1fe26b881 Add format block button to status bar, when a supported block is active 2023-03-03 01:40:24 +01:00
Jonatan Heyman
4d12404d77 Add support for Math blocks 2023-03-02 18:40:44 +01:00
Jonatan Heyman
3357e81609 New greenish icon 2023-01-16 23:43:39 +01:00
Jonatan Heyman
8d8f6cdcb3 Add support for Rust, XML and C++
Remove Lezer support
2023-01-16 23:43:22 +01:00
Jonatan Heyman
0b34cc4dd3 Remove old test/template code 2023-01-16 16:32:48 +01:00
Jonatan Heyman
1f73950d8b Fix windows favicon and broken #windows-build 2023-01-16 16:08:39 +01:00
Jonatan Heyman
97995da5e1 Revert "Change icon on Windows"
This reverts commit b561c0184e.
2023-01-16 16:07:39 +01:00
Jonatan Heyman
b561c0184e Change icon on Windows
#windows-build
2023-01-16 15:53:57 +01:00
Jonatan Heyman
895bd4eccc Fix font path to (hopefully) work in release builds
#build
2023-01-15 20:06:57 +01:00
Jonatan Heyman
3b905951af Convert styles.css to SASS and include it by importing it in main.js.
Add fonts: Hack and Open Sans.
Change editor font to Hack.
2023-01-15 19:55:26 +01:00
Jonatan Heyman
d17bade1d6 Pixel push dark/light mode icons 2023-01-15 12:28:34 +01:00
Jonatan Heyman
2f842612fb Read dark/light mode from system, automatically listen for changes, and add button for toggling the mode to the status bar 2023-01-15 11:59:17 +01:00
Jonatan Heyman
9fb543fed3 Move contents of heynote-electron subdirectory into git repo root 2023-01-13 13:21:34 +01:00