aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/tree.rs
Commit message (Collapse)AuthorAge
* Feat: LSP Type Hints (#5934)Poliorcetics2023-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * misc: missing inline, outdated link * doc: Add new theme keys and config option to book * fix: don't panic in Tree::try_get(view_id) Necessary for later, where we could be receiving an LSP response for a closed window, in which case we don't want to crash while checking for its existence * fix: reset idle timer on all mouse events * refacto: Introduce Overlay::new and InlineAnnotation::new * refacto: extract make_job_callback from Context::callback * feat: add LSP display_inlay_hint option to config * feat: communicate inlay hints support capabilities of helix to LSP server * feat: Add function to request range of inlay hint from LSP * feat: Save inlay hints in document, per view * feat: Update inlay hints on document changes * feat: Compute inlay hints on idle timeout * nit: Add todo's about inlay hints for later * fix: compute text annotations for current view in view.rs, not document.rs * doc: Improve Document::text_annotations() description * nit: getters don't use 'get_' in front * fix: Drop inlay hints annotations on config refresh if necessary * fix: padding theming for LSP inlay hints * fix: tracking of outdated inlay hints should not be dependant on document revision (because of undos and such) * fix: follow LSP spec and don't highlight padding as virtual text * config: add some LSP inlay hint configs
* Add configuration for min width of line-numbers gutter (#4724)Doug Kelkhoff2023-01-21
|
* When buffer closes, focus on parent buffer (#4766)wes adams2022-11-18
|
* Factor out common code for focusing the next view (#4607)Michael Davis2022-11-17
| | | | | There is some common code between Editor::focus_next and Editor::focus that can be eliminated by refactoring Tree::focus_next into a function that only returns the next ViewId.
* Dynamically resize line number gutter width (#3469)Doug Kelkhoff2022-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | * dynamically resize line number gutter width * removing digits lower-bound, permitting spacer * removing max line num char limit; adding notes; qualified successors; notes * updating tests to use new line number width when testing views * linenr width based on document line count * using min width of 2 so line numbers relative is useful * lint rolling; removing unnecessary type parameter lifetime * merge change resolution * reformat code * rename row_styler to style; add int_log resource * adding spacer to gutters default; updating book config entry * adding view.inner_height(), swap for loop for iterator * reverting change of current! to view! now that doc is not needed
* Fix cargo doc warnings, and add GitHub action to ensure it (#3650)A-Walrus2022-09-03
|
* Fix closing buffer with custom keymap (#3633)A-Walrus2022-09-01
| | | | | * Fix closing buffer with custom keymap * Add comment explaining if
* fix: Reset document mode when losing focusBlaž Hrastnik2022-08-23
| | | | Fixes #3090
* keep jump/file history when using :split (#3031)Robin2022-07-22
| | | | | | | * keep jump/file history when using :split * move history cloning into the switch function Co-authored-by: Robin <robinvandijk@klippa.com>
* add history suggest to global search (#2717)Termina942022-06-21
| | | Co-authored-by: Dean Revell <revell@gmail.com>
* Move Tree nodes on view swapRoland Kovacs2022-05-21
| | | | | Instead of moving the Node contents on view swap if they have the same parent reorder them to keep traversal order otherwise re-parent them.
* Implement view swappingRoland Kovacs2022-05-21
| | | | | | | * add Tree::swap_split_in_direction() * add swap_view_{left,down,up,right} commands, bound to H,J,K,L respectively in the Window menu(s) * add test for view swapping
* Implement view transpose (#2461)Roland Kovacs2022-05-20
| | | | | | | Change the layout of existing split view from horizontal to vertical and vica-versa. It only effects the focused view and its siblings, i.e. not recursive. Command is mapped to 't' or 'C-t' under the Window menus.
* Make gutters configurable (#1967)Dr. David A. Kunz2022-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config option line numbers none * view tests * added tests * doc * comment * Make gutters configurable * docu * docu * rm none docu * order * order * precedence * simpler * rm todo * fixed clippy * order * double quotes * only allow diagnostics and line-numbers * tests * docu * format * rm short variant and more docu * performance improvements * typo * rename
* minor: Remove some outdated commentsBlaž Hrastnik2022-03-03
|
* helix-term/commands: implement buffer-close (bc, bclose) (#1035)Cole Helbling2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * helix-view/view: impl method to remove document from jumps * helix-view/editor: impl close_document * helix-view/editor: remove close_buffer argument from `close` According to archseer, this was never implemented or used properly. Now that we have a proper "buffer close" function, we can get rid of this. * helix-term/commands: implement buffer-close (bc, bclose) This behaves the same as Kakoune's `delete-buffer` / `db` command: * With 3 files opened by the user with `:o ab`, `:o cd`, and `:o ef`: * `buffer-close` once closes `ef` and switches to `cd` * `buffer-close` again closes `cd` and switches to `ab` * `buffer-close` again closes `ab` and switches to a scratch buffer * With 3 files opened from the command line with `hx -- ab cd ef`: * `buffer-close` once closes `ab` and switches to `cd` * `buffer-close` again closes `cd` and switches to `ef` * `buffer-close` again closes `ef` and switches to a scratch buffer * With 1 file opened (`ab`): * `buffer-close` once closes `ab` and switches to a scratch buffer * `buffer-close` again closes the scratch buffer and switches to a new scratch buffer * helix-term/commands: implement buffer-close! (bclose!, bc!) Namely, if you have a document open in multiple splits, all the splits will be closed at the same time, leaving only splits without that document focused (or a scratch buffer if they were all focused on that buffer). * helix-view/tree: reset focus if Tree is empty
* Add commands for moving between splits with a direction (#860)Oskar Nehlin2021-10-23
| | | | | | | | | * Add commands for moving between splits with a direction * Update keymaps * Change picker mapping * Add test and clean up some comments
* Fix typoIvan Tham2021-07-20
|
* reverse the dependency between helix-tui and helix-view (#366)Keith Simmons2021-06-25
| | | | | | | | | * reverse the dependency between helix-tui and helix-view by moving a fiew types to view * fix tests * clippy and format fixes Co-authored-by: Keith Simmons <keithsim@microsoft.com>
* Use full screen sizewojciechkepka2021-06-20
|
* Derive debug without featureIvan Tham2021-06-10
| | | | Note that this also removed those `finish_non_exhaustive()`.
* Implement Debug for data structure as a featurenotoria2021-06-10
|
* Fix split sizes getting out of sync with the terminal size, refs #69Blaž Hrastnik2021-06-03
|
* Render a separator between vertical splits.Blaž Hrastnik2021-04-08
|
* Fix an issue with closing nested splits.Blaž Hrastnik2021-04-08
| | | | | The parent id was never assigned to the split, so removing the container when it became empty failed.
* Correct the naming issue with vsplit and hsplit being swapped.Blaž Hrastnik2021-04-08
|
* clippy lintBlaž Hrastnik2021-03-31
|
* editor.open can now either replace the current view or open in a split.Blaž Hrastnik2021-03-24
|
* Derive a separate ViewId type.Blaž Hrastnik2021-03-24
|
* Drop refcell use, make view simply ref doc.id.Blaž Hrastnik2021-03-23
|
* view: Reposition cursors on tree resize.Blaž Hrastnik2021-02-26
|
* minorBlaž Hrastnik2021-02-22
|
* commands: Simplify some code, only calling cx.doc() once.Blaž Hrastnik2021-02-21
|
* Allow closing individual views.Blaž Hrastnik2021-02-19
|
* view: Disable tree.fullscreen for now to appease clippy.Blaž Hrastnik2021-02-18
|
* Implement vertical split calculations.Blaž Hrastnik2021-02-09
|
* simplify.Blaž Hrastnik2021-02-05
|
* Work around rendering errors for positions offscreen.Blaž Hrastnik2021-02-05
|
* Address clippy warnings.Blaž Hrastnik2021-02-05
|
* A dumb "next view" implementation that works.Blaž Hrastnik2021-02-04
|
* Forgot to add the tree.rs definition...Blaž Hrastnik2021-02-04