Commit Graph

5686 Commits (master)
 

Author SHA1 Message Date
Blaž Hrastnik 7877647cf0 Allow closing individual views. 3 years ago
Blaž Hrastnik 1e1dae1c11 Remove unused method. 3 years ago
Blaž Hrastnik 3f6f82b0c4 Always store the log file under home dir. 3 years ago
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
}
3 years ago
Blaž Hrastnik 7a1ff5e45f commands: Wire up toggle comments as ctrl-c 3 years ago
Blaž Hrastnik 4ab5631d65 more lints 3 years ago
Blaž Hrastnik 0827c45d94 view: Disable tree.fullscreen for now to appease clippy. 3 years ago
Blaž Hrastnik d0791e0f98 core: Implement comment toggling module. 3 years ago
Blaž Hrastnik c9dd1c930e treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref 3 years ago
Blaž Hrastnik bd85460698 Bump jsonrpc-core, lsp-types. 3 years ago
Blaž Hrastnik af55ebd002 transaction: Also modify map_pos to work with insert|delete order. 3 years ago
Blaž Hrastnik d5f9622e2e lsp: edit events change ranges need to affect each other. 3 years ago
Blaž Hrastnik 9cac44c7c0 minor changes 3 years ago
Blaž Hrastnik 8e1a59c140 ui: Redo selection rendering. 3 years ago
Blaž Hrastnik c408e7e01a commands: tie in a simple :w for now. 3 years ago
Blaž Hrastnik 48ef6598db Increase the log level in LSP and log server errors. 3 years ago
Blaž Hrastnik d8bc19f715 Update deps, switch tendril over to crates.io 3 years ago
Blaž Hrastnik 1ffd1e7633 Send updates to the lsp on undo/redo. 3 years ago
Blaž Hrastnik b7da7f83c3 lsp: Test changeset_to_changes. 3 years ago
Blaž Hrastnik 9821c4dd3b Optimize Changeset::is_empty()
Checked the ASM output for these three options:

pub enum Operation {
    /// Move cursor by n characters.
    Retain(usize),
    /// Delete n characters.
    Delete(usize),
    /// Insert text at position.
    Insert(String),
}

pub struct A {
    changes: Vec<Operation>,
    len: usize,
}

impl A {
    pub fn is_empty1(&self) -> bool {
        match self.changes.as_slice() {
            [] => true,
            [Operation::Retain(_)] => true,
            _ => false,
        }
    }

    /// `true` when the set is empty.
    pub fn is_empty2(&self) -> bool {
        let len = self.changes.len();
        len == 0
        || (
            len == 1
            && self.changes[0] == Operation::Retain(self.len)
        )

    }

    pub fn is_empty3(&self) -> bool {
        match self.changes.as_slice() {
            [] | [Operation::Retain(_)] => true,
            _ => false
        }
    }

}
3 years ago
Blaž Hrastnik b0b5451c38 Since insert preceedes deletes, follow that ordering in Transaction::changes.
Produces the same output but will take the happy path.
3 years ago
Blaž Hrastnik 0541fbb85f Adjust LSP changeset generation too: insert now always preceedes delete. 3 years ago
Blaž Hrastnik b4312c9492 transaction: Use builder methods to generate compact changesets. 3 years ago
Blaž Hrastnik 19fb4ed835 transaction: Merge consecutive inserts on compose. 3 years ago
Blaž Hrastnik 65893a2cbc fix test 3 years ago
Blaž Hrastnik 83d48f10ea search: Barebones implementation. 3 years ago
Blaž Hrastnik 6dba0516f2 flake: Update deps. 3 years ago
Blaž Hrastnik 239db79834 Finally: Retain horizontal position when moving vertically. 3 years ago
Blaž Hrastnik de5170dcda Parse input counts: 10w, etc. 3 years ago
Blaž Hrastnik 5e73f83efa Implement vertical split calculations. 3 years ago
Blaž Hrastnik d4b85ce18d popup: wip work on completion popups 3 years ago
Blaž Hrastnik 755632f231 deps update 3 years ago
Blaž Hrastnik 30d1b7098f commands: % as select_all. 3 years ago
Blaž Hrastnik f2c2fa0cad Restore diagnostics. 3 years ago
Blaž Hrastnik a924ad2885 simplify. 3 years ago
Blaž Hrastnik c70080dd68 Work around rendering errors for positions offscreen. 3 years ago
Blaž Hrastnik 8f0ddf9632 Address clippy warnings. 3 years ago
Blaž Hrastnik 9c33b5340a A dumb "next view" implementation that works. 3 years ago
Blaž Hrastnik 5554910e08 Forgot to add the tree.rs definition... 3 years ago
Blaž Hrastnik 4b2b62ebc6 Update flake definition. 3 years ago
Blaž Hrastnik a81b8f3e42 Fix statusline rendering, change colors on active view. 3 years ago
Blaž Hrastnik a014787ee8 Correctly position the real terminal cursor. 3 years ago
Blaž Hrastnik 446a7e5743 Don't render selections/cursors on views not in focus. 3 years ago
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.
3 years ago
Blaž Hrastnik 2bea5db7bd commands: Implement select_on_matches. 3 years ago
Blaž Hrastnik a702af0aeb commands: add W and B (extend selection by word). 3 years ago
Blaž Hrastnik d9fb60e301 commands: Simplify code further via Context::doc. 3 years ago
Blaž Hrastnik 05c7fb98df Refactoring: move language_servers into Editor, proper load for doc. 3 years ago
Blaž Hrastnik 15dd7ca6d8 syntax: Stop compiling haskell, seems unmaintained and slowest to compile 3 years ago
Blaž Hrastnik 240f3a6cc4 nix: Fix execution errors regarding runtime C lib. 3 years ago