Commit Graph

969 Commits (bd56dde6e28b22b661ad991d0f23b66e089a9700)

Author SHA1 Message Date
Blaž Hrastnik 8c82f8f140 indent: use_list indentation, fix indentation bug on open_below
use std::{
  time::Duration // <- pressing `o` here would use }'s indent instead of prev line
}
Blaž Hrastnik 7a1ff5e45f commands: Wire up toggle comments as ctrl-c
Blaž Hrastnik c9dd1c930e treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref
Blaž Hrastnik 9cac44c7c0 minor changes
Blaž Hrastnik 8e1a59c140 ui: Redo selection rendering.
Blaž Hrastnik c408e7e01a commands: tie in a simple :w for now.
Blaž Hrastnik 48ef6598db Increase the log level in LSP and log server errors.
Blaž Hrastnik 83d48f10ea search: Barebones implementation.
Blaž Hrastnik 239db79834 Finally: Retain horizontal position when moving vertically.
Blaž Hrastnik de5170dcda Parse input counts: 10w, etc.
Blaž Hrastnik 5e73f83efa Implement vertical split calculations.
Blaž Hrastnik d4b85ce18d popup: wip work on completion popups
Blaž Hrastnik 30d1b7098f commands: % as select_all.
Blaž Hrastnik f2c2fa0cad Restore diagnostics.
Blaž Hrastnik a924ad2885 simplify.
Blaž Hrastnik c70080dd68 Work around rendering errors for positions offscreen.
Blaž Hrastnik 9c33b5340a A dumb "next view" implementation that works.
Blaž Hrastnik a81b8f3e42 Fix statusline rendering, change colors on active view.
Blaž Hrastnik a014787ee8 Correctly position the real terminal cursor.
Blaž Hrastnik 446a7e5743 Don't render selections/cursors on views not in focus.
Blaž Hrastnik 448c1abba0 View tree implementation: render multiple split views.
Cursors are still a bit buggy and we should render in focus statusbar
differently than in the other pane.
Blaž Hrastnik 2bea5db7bd commands: Implement select_on_matches.
Blaž Hrastnik a702af0aeb commands: add W and B (extend selection by word).
Blaž Hrastnik d9fb60e301 commands: Simplify code further via Context::doc.
Blaž Hrastnik 05c7fb98df Refactoring: move language_servers into Editor, proper load for doc.
Blaž Hrastnik 777a80917d Address clippy lints.
Blaž Hrastnik 7d41550a23 indent: refactor logic to be more correct.
Thanks to atom-sane-indentation, nvim-treesitter and tree-sitter-indent.el
for inspiration.
Blaž Hrastnik 941c34a7fc lsp: Move timeouts into client.request
Blaž Hrastnik b2800489de open_below is now indentation-aware.
Blaž Hrastnik 8b95c3353b lsp: buggy insert completion.
Blaž Hrastnik 3bf4e1e8fa Update deps.
Blaž Hrastnik 6ec0f8e80f completion: Don't panic on timeout/no result, just do nothing.
Blaž Hrastnik 3cbab20908 lsp: Fix pos_to_lsp_pos calculation.
Blaž Hrastnik 2ab069bb3f lsp: Work on syncing the state with the language server.
Blaž Hrastnik cd16df19c1 lsp: generate_transaction_from_text_edits
Blaž Hrastnik 56f2193811 Retrieve completion options on ctrl-x.
Blaž Hrastnik 955cb81687 Init lsp through the registry.
Blaž Hrastnik c8424c6ff0 lsp: Re-enable hooks.
Blaž Hrastnik d61b4854b8 Make sure to clear the whole screen with the background color.
Blaž Hrastnik 4749b39b88 .
Blaž Hrastnik 47e282804d buffer picker: Mark current view with (*)
Blaž Hrastnik 3d3295bb75 ui: buffer picker on ctrl-b
Blaž Hrastnik ea502c8665 fix change -> change -> undo -> change -> undo -> undo.
Blaž Hrastnik d181027225 fix: undo/redo selection handling.
Blaž Hrastnik 25aa45e76c picker: Factor out file picker, we want to reuse code for other pickers.
Blaž Hrastnik 0b63e838e0 Port over Doc::relative_path.
Blaž Hrastnik 8b263ef04b picker: open file on Enter.
Blaž Hrastnik edfd3933db picker: Implement fuzzy search.
Blaž Hrastnik 7c75ec04e8 File picker mockup, reuses the line editor work done on Prompt.
Blaž Hrastnik ed60866c54 Add an :o open command.
Blaž Hrastnik 8f0b28aeb8 Make the select prompt interactive.
Blaž Hrastnik 1a843b6c06 prompt: make the callback a FnOnce.
Blaž Hrastnik 2bfdcede32 split_selection
Blaž Hrastnik f92998a14b Prompt needs to close on enter.
Blaž Hrastnik ca809617b2 Take prompt length into account.
Blaž Hrastnik ed6a4c4bd2 wip: Use prompt for interactive commands.
Blaž Hrastnik 07801b60bc Remove the prompt on ESC.
Blaž Hrastnik 7dc24a25ba Move ui modules under a ui:: namespace.
Blaž Hrastnik ef0d062b1f Fix cursor positioning.
Blaž Hrastnik 8695415fbf wip: Move to new rendering structure.
Blaž Hrastnik 29cb33300b wip
Blaž Hrastnik ada3f92c5b wip: Getting the new prompt to render in a new layer.
Blaž Hrastnik 5103dc9617 move commands and keymap back to terminal.
Command needs to be able to deal with UI. We'll separate it again later
on.
Blaž Hrastnik be3c021046 snapshot
Blaž Hrastnik 83f2c24115 wip: Compositor
Blaž Hrastnik a7869c728c wip
Blaž Hrastnik 3f707c19f4 Save command
Blaž Hrastnik 8f0bcfe286 Introduce a command context that carries the executor and other fields.
Blaž Hrastnik ae8a9e5bac lsp: Make base request methods take &self instead of &mut self.
Blaž Hrastnik cc6bdf8f66 Text change generation, RPC call handling.
Blaž Hrastnik af1924404a Configure logging (-vv for debug level logs)
Blaž Hrastnik b39849dde1 Refactor: Document type as a wrapper around barebones State.
Blaž Hrastnik ef5e5f9296 state.version tracking
Blaž Hrastnik 49254d7180 Total mess but it works: diagnostic marking.
Blaž Hrastnik f9bfba4d96 Reroute LSP notification events into the main app event loop.
Blaž Hrastnik 64b5b23315 Move theme from view to editor, support multiple views in editor.
Blaž Hrastnik b2b3083a62 Support multiple open views.
Blaž Hrastnik 13cb442850 wip: Fetching diagnostics, parsing notifications.
Blaž Hrastnik f03830b047 wip: Basic LSP lifecycle requests/notifications.
Jan Hrastnik 1a3c647adf added col_height calculation
Jan Hrastnik 2b44031929 various fixes
Jan Hrastnik c9e9fcf7c5 added base col width
Jan Hrastnik 28a1e11fda added more completions per line
Jan Hrastnik a123cf37a0 several fixes
Jan Hrastnik 8f37c26f35 completion highlighting
Jan Hrastnik f3ddb8631f wip completion
Jan Hrastnik 06502e5a2e added prompt close
Blaž Hrastnik bc2c652fe8 Bugfix
Blaž Hrastnik 49b4cdb566 Refactor command calling.
Blaž Hrastnik 49cc6c1924 Refactor Editor into Application and Editor/Workspace.
Jan Hrastnik 267602328c changed fn to fnmut
Jan Hrastnik fa55b1e51c added closures to prompt
Jan Hrastnik 7d58378374 added move left&right, delete char
Jan Hrastnik ed03ec92a8 moved prompt command matching to prompt.rs
Jan Hrastnik 7208c86f23 separated statusline and prompt
Jan Hrastnik c60f1a6553 created prompt.rs
Jan Hrastnik 9e7b6465c6 refactoring editor.rs
Jan Hrastnik 0c0c2c7103 modified editor.render() to prepare for command mode rendering
Blaž Hrastnik 4996f1b4d3 Move insert mode commands to a separate namespace.
Blaž Hrastnik d64f4beede Share tab width definitions.
Blaž Hrastnik 8098279676 Cleanup
Blaž Hrastnik b765c17896 Hacky undo/redo integration.
Blaž Hrastnik 9a73d3f1b9 fix clippy warning
Blaž Hrastnik 7f07e66768 Cleanup: track first_line as usize.
Jan Hrastnik 750610f0e7 various fixes
Jan Hrastnik 038201647c started work on goto mode
Blaž Hrastnik b7e1c0cf82 Fix cursor positioning on a scrolled buffer.
Blaž Hrastnik 226fa89d46 Fix line number rendering.
Blaž Hrastnik 197651eb30
Merge pull request from helix-editor/tab-implementation
added tab to insert mode
Jan Hrastnik dc11124df5 added tab to insert mode
Blaž Hrastnik 7b4a4f6a3c Use crate info for clap help text.
Blaž Hrastnik 5945815d97 Fix cursor rendering & placement on append mode.
Blaž Hrastnik 4189c362b2 Fix clippy warnings.
Blaž Hrastnik e39bd211d1 argh -> clap to speed up compilation (no syn/proc_macro)
Jan Hrastnik 13800e4dd1 removed redundant line
Jan Hrastnik dd94a39810 moved insert keymap to keymap.rs
Blaž Hrastnik 3feb00283d clippy warnings
Blaž Hrastnik 3020077da8 Extend selection commands.
Blaž Hrastnik eb639eb2e4 More robust syntax detection/grammar loading.
Blaž Hrastnik 2c3b10dbb0 Sync up view size to terminal size for now.
Blaž Hrastnik 935cfeae57 Split parts of helix-term into helix-view.
It still largely depends on term for some types but I plan to change
that later.
Blaž Hrastnik 48330ddb5f Command needs access to view information for certain changes.
Blaž Hrastnik 1303ffd94a Remove old test.
Blaž Hrastnik 91343a6846 Restore terminal mode on panics.
Blaž Hrastnik 929fa5474d Simple cursor scrolling.
Blaž Hrastnik b120515613 Range based highlight_iter. Only works on limiting the start right now
Blaž Hrastnik 3859f6963d More work on the UI.
Blaž Hrastnik eb477ec442 Speed up surface code by resetting instead of allocating a new one.
Blaž Hrastnik 088f8a82af Incremental parsing: rough draft.
Blaž Hrastnik 31999d6528 Make state fields read-only from outside the crate.
Blaž Hrastnik b08278807e Add 'A', 'I' commands.
Blaž Hrastnik fb0f56b747 Add 'o' command.
Blaž Hrastnik eb6b9a9ca9 Support entering newlines.
Blaž Hrastnik d466882d04 Abstract Transaction::change_by_selection, working del/backspace.
Blaž Hrastnik f9348d77ec Fix tests.
Blaž Hrastnik 9546164dc8 cargo fmt & clippy lint
Blaž Hrastnik a106be94f1 Refactor a little bit.
Blaž Hrastnik b17a77b8b8 cleanup: Import tree-sitter-highlight so we can cache trees.
Blaž Hrastnik b647c7a773 tree-sitter based syntax highlighting draft
Blaž Hrastnik 25b3f98e3d draft: tree-sitter highlighting
Blaž Hrastnik 7eac12a4bb Add helix-syntax as a wrapper around tree-sitter parsers.
Blaž Hrastnik e282fc7595 Bump deps, eliminate a lot of transitive deps.
Blaž Hrastnik 9ad40bc40b Experiment with TUI so we can render selections.
Blaž Hrastnik 67017e5336 append mode
Blaž Hrastnik dd749bb284 Expand transaction API.
Blaž Hrastnik 4e349add60 cleanup: Remove leftover files.
Blaž Hrastnik 8b3e152126 cleanup: Make Buffer just a part of State.
Blaž Hrastnik 579b6899f1 Work on insert mode.
Blaž Hrastnik 0d56ce9296 Bump deps, make it compile with latest smol.
Blaž Hrastnik 29f1be91a2 Fix clippy lints.
Blaž Hrastnik 4733afa6c2 Update dependencies.
smol 0.3 makes setup a whole lot easier.
Jan Hrastnik 8681d47292 remove unused import
Jan Hrastnik 6ba082697d added cursor rendering
Jan Hrastnik c3a23a1c09 file now rendered line by line
Jan Hrastnik e93b15cef3 created view struct
Jan Hrastnik 8958f06f08 added file rendering
Blaž Hrastnik 8119f1ec3d Refactor editor module to use state + keymap.
Jan Hrastnik 065cbcee9e fixed async loop
Jan Hrastnik 2985398adc loop is now async
Jan Hrastnik 19643446cd editor.rs now uses crossterm
Blaž Hrastnik f8fe273a2e Fix build.
Blaž Hrastnik 843c20a550 Add a keymap module.
Blaž Hrastnik 387fb57c94 Allow unused code for the time being.
Blaž Hrastnik 57c2046070 Drop tui.
Blaž Hrastnik c17045ed07 Fixup Surface
Blaž Hrastnik 613d06dfb0 wip: importing to github
Blaž Hrastnik 6905ff03c2 Start swapping from termwiz to crossterm + async.
Blaž Hrastnik 44ff4d3c1f Implement a new core based on CodeMirror.
Blaž Hrastnik 240e5f4e3d Initial import.