Skylar Hill
90b9d770f0
Add simple error handling
...
Now we don't have to deal with a completely obliterated terminal every time
something breaks! \o/
2023-11-12 00:42:45 -06:00
Skylar Hill
34e57d8dcc
Replace single large enum with several simple lists
2023-11-09 22:02:48 -06:00
Skylar Hill
55a251642f
Allow merging lines by backspacing at the beginning of a line
2023-11-08 11:58:12 -06:00
Skylar Hill
cd851bffc7
Refine behavior of next-node
...
I originally thought next-node should wrap around to the next sibling of the
parent node, but actually playing with the navigation showed that what
I *actually* wanted was for it to go to the first child in the absence of a
next sibling.
2023-11-08 11:32:08 -06:00
Skylar Hill
f51617f774
Clamp cursor to within the actual text
2023-11-08 09:52:45 -06:00
Skylar Hill
8fbeeccfdb
Add rudimentary buffer scrolling when cursor leaves window
...
Squashed in fix for crash when only moving one line
2023-11-08 09:52:07 -06:00
Juliana Rat
29c5c9b6a6
Remove redundant optional and keyword initializers
2023-11-07 01:44:56 -05:00
Juliana Rat
c6f4a197dd
Fix indentation again
2023-11-06 23:07:52 -05:00
Skylar Hill
d8ecbc3b98
Fix out-of-bounds errors on empty file
2023-11-06 21:58:10 -06:00
Skylar Hill
dce1c2a09e
Create abstract interface between editor code and toolkit rendering
2023-11-06 21:38:06 -06:00
Juliana Rat
eee88df4bc
Cleanup
...
* sloth/editor.scm: Fix indentation to match new .dir-locals.el
* zhu-li: Delete. She did the thing and now she is no longer needed :'(
2023-11-05 18:56:53 -05:00
Skylar Hill
d7ac8fc31c
Disallow the root node from becoming point-node
...
Unless it's the only node, anyway. This fixes the issue of not being
able to navigate across the children of the document root without
first doing a down-node.
2023-11-04 23:16:18 -05:00
Skylar Hill
4af941954d
Add fallback movements for next- and prev-node
2023-11-04 22:40:14 -05:00
Skylar Hill
5c5f7ff1ba
Fix crash on impossible tree movement
2023-11-04 20:14:03 -05:00
Skylar Hill
00f4935d3b
Extremely rudimentary tree navigation
...
Needs some error checking, and we want to only consider named nodes so
we're navigating the abstract tree rather than the tree of all tokens.
2023-11-04 19:11:48 -05:00
Skylar Hill
57ce73370d
Add state structure
...
As we expand with new features and get tree-sitter working, we're
going to have more to keep track of than can reasonably be done with
individual arguments. Guile's modified srfi-9 lets us do this in a
nice functional style.
This also subtly tweaks the behavior of character insertion so it's
actually correct.
2023-11-04 16:42:30 -05:00
Juliana Rat
3f7684fb13
Add vim movement keys
...
Some indentation weirdness also got caught up in this, not sure what that's about...
2023-11-04 15:27:42 -05:00
Skylar
8a3c3b1aca
A Common Lisper walks into a Schemer bar and says
2023-11-04 12:15:31 -05:00
Skylar
976a1b137d
Insert, rather than change, characters in insert mode
2023-11-04 11:47:29 -05:00
Skylar
8f0e46ee5d
Support loading files
2023-11-04 11:45:31 -05:00
Skylar
4f112832a7
Add modal input layers
2023-11-04 10:54:06 -05:00
Skylar
213552d0fc
Okay we're officially gonna use spaces now
2023-11-04 09:29:18 -05:00
Juliana Rat
878eadd075
Setup initial architecture for testing
2023-11-04 02:03:23 -04:00
Skylar
1db39c1348
Create a basic ncurses buffer that can be edited
2023-11-03 22:15:11 -05:00