9.1 KiB
Executable File
Copyright 2025 Syed Daanish
TODO
- And factorize renderer into its own class
- which is just managed by the renderer
- and adjusment.cc will call it
- which is reused by scrollers/ensurers too (for knowing screen wrapped end)
- this will then allow inlay hints to be possible
- and also make VAI easier to implement
-
Allow keybinds to be set in ruby
-
ruby file for project specific runs alongside any system wide ones
- Seperate system functions into a class that branches to support local / ssh / server modes.
- Even lsp shouldnt be directly controlled because it can branch on local and server modes
- check libssh2 or child process stuff for remote editing (remote mode)
- Thick and thin mode (server mode) (through ssh or port) (for website only port + webhook)
- thin mode only shares screen diffing over the network - uses server settings / themes / shell
- only one user connects at a time
- provides data as a websocket with tui or gui/online modes where tui shares diffing as is (can be connected to by gui or website)
- and gui/online modes try to (if not then render onto a canvas) forward window.render_gui() and dedicated windowing system (i.e windowing is html divs)
- and window.render_gui() returns a markup code (custom markup)
- and for events i could either leave tui as-is and for markup have special event handling or i
- implement the widget system in both and have the same event handling then
- actually for true cross platform i need to make a ui lib with widgets etc. so it is workable on all platforms (so they all need only a single ui lib)
- thick only shared fileio and lsp data with local used for all else - uses local settings / themes
- multiple users connect at once but maybe either make them not be allowed to open same file or make vscode like multiediting (unsure how exactly)
- they all share same lsp instances
- they all have the same shell access
- allow having an instance that forwards thick mode to thin mode (to connect online mode to a thick server for code collaboration)
- thin mode only shares screen diffing over the network - uses server settings / themes / shell
-
Then allow ruby code to create and handle windows as extentions
-
Then 3 inbuilt extentions being file manager, theme picker, tab selector
-
make another tile type called tile tabbed that has a tab switcher and shows only one of its children at once
-
it takes focus and takes some keybinds for switching and forwards the rest (it also forwards the info and adds one for itself - the selected/total tabs)
-
also implement info strings for all the stuff that take focus
-
Mode is a feild on a editor and there is no global "mode system" except in editors (enxtentions do their own thing)
- make mode normal and not atomic if it is truly unused across threads
- this means keybinds can be set to use the editor as insert mode only and so behave like vscode
-
split lsp stuff into multiple files (not a monolithic class as it is now)
-
Extentions can also be used as file openers (for like databases . diffing . images . audio etc)
-
Local cache for state management (like undo history, cursor positions etc) (location can be set in config)
-
make sure to write inbuilt extentions in cpp and not ruby
-
also move default bar and clipboard back into cpp
-
all lsp popups are no longer their own classes but instead windows (extention like) in popup mode
-
also fix click handling to send mouse unclick to the same focus window as the click And also for drag to be same as the starter
-
skip opening binary files
-
apply themeing in bg log bar lsp popus etc. to keep visual consistency
-
searching/replace/Multi-Cursor (for just one lsp command for all) with pcre2 with regex (started by a slash) (disabled for large files)
-
add links support in xterm (kitty like clickable links)
-
And preprocess markdown in popups to be more like styled than just highlighted
-
In the ruby libcrib populate toplevel binding and file and dir and rubybuild stuff and other similar constants
-
in require_relative allow requiring without appending .rb if possible.
-
Possibly in the future limit memory usage by parser for larger files
-
Add a file picker suggestion while typing a path (including stuff like ~ and .. and $HOME etc)
-
allow opening directory after filemanger is sorted out.
-
commands to: change pwd load a rb file run a ruby command close a window etc.
-
Add mgems for most common things and a ruby library to allow combining true ruby with mruby
-
add command to set and use a file type at runtime
-
color alpha in ini files
-
Make warning before ctrl+q for saving
-
LSP Bug: Check why
fish-lspis behaving so off with completions filtering. -
Line move: fix the move line functions to work without the calculations from folds as folds are removed.
-
Editor Indentation Fix: - Main : merger indentation with the parser for more accurate results.
- Ignore comments/strings from parser when auto-indenting.
- Support for stuff like bash \ and math operators in other languages and comma and line starting with a dot (like in ruby) etc.
-
Readme: Update readme to show ruby based config in detail.
-
UI Refinement:
- Finish autocomplete box style functions.
-
Documentation UI: Capture
Ctrl+h/Ctrl+lfor scrolling documentation windows. -
Cap line_tree data limit for large files and just store about a thousand previous lines maybe? (lazily loaded)
-
add
:j<n>command to jump to line <n> in the current file -
and give warning for invalid commands
-
and upon escape clear the current command
-
allow multiline logging which captures the input entirely and y will copy the log and anything else will exit
-
it will then collapse to being the first line from the log only
-
allow flushing functions in ruby to tell c++ to refresh keybinds/themes etc.
-
LSP: support snippets in completion properly check:: pull diagnostics for ruby-lsp lsp selection range - use to highlight start / end of range maybe? goto definiton signature help document symbol for the top bar maybe? (or workspace symbol) also setup workspaces Semantic highlighting Quick fixes Rename symbols
-
Allow ruby to config lsp capabilities
-
also try to fix why solargraph is the only one breaking on edits near emojis
-
ruby-lsp also supports erb so thats a plus
-
the ruby should have an api to be able to draw windows and add mappings to them
-
Syntax highlighting
-
ruby done!!
-
finish bash then do all the directive-like ones like jsonc (first to help with theme files) / toml / yaml / ini / nginx
-
then ch? then gdscript and python then erb then php
-
then markdown / html
-
then gitignore / gitattributes
-
then fish then sql then css and [jt]sx? then lua (make with type annotations for lsp results)
-
then haskell then gomod then go then rust
-
Undo/Redo: Add support for undo/redo history.
-
Auto brace selection: Add support for auto brace selection.
UX
-
Completion Filtering:
- Stop filtering case-sensitive.
- Normalize completion edits if local filtering is used.
-
Basic Autocomplete: Keep a list of words in the current buffer for non-LSP fallback.
Features
-
Search & Replace:
- Add Search/Replace UI.
- Support capture groups (
$1,$2) or allow Perl regex directly. - Ensure virtual cursors are included in search positions.
-
Multi-Cursor:
- Add virtual cursor support (edits apply to all locations).
- Add
Alt+Clickto set multiple cursors. - Allow search and place cursor at all matches.
-
Block Selection:
- Double-clicking a bracket selects the whole block and sets mode to
WORD.
- Double-clicking a bracket selects the whole block and sets mode to
Visuals, UI & Extensions?
-
Add color picker/palette (as a floating extention).
-
Git: Add Git integration (status, diffs).
-
AI/Snippets:
- Add snippets support (LuaSnip/VSnip style).
- Add Codeium/Copilot support (using VAI virtual text) as a test phase.
-
SQL: Add SQL support (Viewer and Basic Editor) (as ruby extension).
-
Prolly?: Add Splash Screen / Minigame.
Unimportant optimizations
- Performance:
- Switch JSON parser to
RapidJSON(or similar high-performance lib). - Decrease usage of
std::stringin UI, LSP, warnings etc. - Also for vectors into managed memory especially for completions/lsp-stuff.
- Switch JSON parser to