Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 2.72 KB

TODO.md

File metadata and controls

40 lines (34 loc) · 2.72 KB

TODO

Fix

  • Deleting a character causes PieceTable to segfault, most likely from a bad cursor position
  • Inserting a newline doesn't cause line to split
  • Newlines not being written to file when saving
  • Cursor offset is not correctly calculated after altering buffer contents. I.e inserting a newline into the middle of a line
  • Backspace at start of line seems to fail sometimes and join only part of the line
  • Cursor at end of document moving to the right causes a crash when there is no newline at the end
  • Buffer calculated in buffer#reprocessRange references original file content, it should use updated line content
  • TS queries after edit (i.e. remove @ from @import) still return old highlight tag despite updating tree
  • Reparsing TS tree with custom reader impl causes TS to attempt to parse read results as UTF-16 despite encoding being set to UTF-8 (e.g. panic contains: ???:?:?: 0x10a4aff28 in _ts_decode_utf16 (???))
  • Hard to replicate issue where shiftCursorRow indexes window lines out of bounds. Implies self.vx.screen.cursor_row is not updated correctly in some operation beforehand, likely to with insert/delete at the end of the buffer
  • RwLock synchronisation over QueryHighlights map is a naive solution that needs better management. Maybe a segmented distributed map?
  • Modifiers don't change inserted character correctly

Implement

  • Mode system with NORMAL, INSERT, VISUAL and COMMAND
  • Piece table based buffer and window system
  • Cursor in insert mode should be a line instead of a block
  • Cursor in insert mode should be able to hover over newline (whether it exists or not) to remove last character (before newline if exists)
  • All operations (insert, append, set & delete) on FileBuffer need to update buffer_line_range_indices and buffer_offset_range_indices
  • Treesitter parsing for lines in buffer, using output to style line segments
  • Thread pool based rendering of each language highlight with main thread rendering un-highlighted text.
  • Config loading
  • Configurable colour scheme
  • Query tree sitter using language highlights SCM
  • Range based delete via visual mode
  • Configurable key maps
  • Insertion edits to tree sitter tree (i.e. adding a character and re-parsing)

Refactor

  • Optimise language loading to generate switch at compile time
  • Cache TS queries off heap (performed by a thread pool) and render cached results. Re-cache queries when tree changes.
  • Updated cached entries for only section of tree that changes
  • Improve draw() call structuring
  • Updates should be pushed to a thread pool via queues and @atomicRmw done on a single background thread