o
odinpkg.dev
packages / library / opal

opal

34d0482library

A native Obsidian alternative written in Odin.

No license · updated 2 years ago

Opal Notebook

A native alternative to Obsidian. Only has the features I care about.

TODO

  • Add central theme struct
  • Add status bar and display current mode
  • Add the ability to zoom in and out (with crisp fonts)
  • Add command input
  • Add dw action + motion from Vim
  • Add support for undo
  • Refactor undo code to be less clown
  • Add support for scrolling
  • Add support for redo
  • Add line wrapping
  • Factor our modifier keys into bit_field
  • Allow adjusting the bounds of the text display
  • Add margin to left and right side when rendering
  • Break long individual tokens when wrapping
  • Add command parser
  • Add support for saving and loading
  • Add support for gg and G
  • Add support for r
  • Add support for { and } movements
  • Modify wrapped_lines to be a display data structure instead
  • Scroll cursor into view
  • Parse text into useful nodes before display gen
  • Switch to GLFW + NanoVG instead
  • Parse using vendor:commonmark instead
  • Correctly highlight markdown TODO lists
  • Add ability to flash status for a period of time
  • Add tab completion to commands
  • Refactor undo commit calls to always happen unless a bool is set
  • Add vim end-of-line/start-of-line jk nav behavior
  • Add support for repeat (.), very tricky just record keyboard lol
  • Show workspace tree when doing :E
  • Add command for new day file
  • Add forward and backward search bindings
  • Add support for copy/paste of text
  • Add support for copy/paste of images
  • Add command to push the current document to opalnotebook.com
  • Detect conflicts document push similar to how Git's --force-with-lease works
  • Create server for live collaborative editing (maybe using GGPO lol)?

BUGS

  • When there's a linewrap and a pre right after the wrap, it seems to swap modes
  • Little bug in Odin compiler where it list -build-mode:lib twice in help
  • I can transmute a ^[2]int to ^[]byte but I think that's incorrect since ^[2]int doesn't have the same memory layout as a slice