Commit Graph

1251 Commits (a629343476b5dbf3e0d5a56663a4ff2467a2396f)

Author SHA1 Message Date
Gokul Soumya 966fbc5984 Add tree-sitter based function, class navigation 2 years ago
Blaž Hrastnik 1422449537 .. 2 years ago
Blaž Hrastnik eeb9b39857 Fix build on master 2 years ago
Ludwig Stecher 4429993842
Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker (#1612)
* Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker

* Refactor file picker paging logic

* change key mapping

* Add overlay component

* Use closure instead of margin to calculate size

* Don't wrap file picker in `Overlay` automatically
2 years ago
Kirawi 23907a063c
use PathBuf::to_string_lossy() instead of to_str() (#1655) 2 years ago
Gokul Soumya 4c424d5ee4
Refactor language config loading (#1658) 2 years ago
Blaž Hrastnik 97d4b2b5fe Mark DAP as experimental 2 years ago
Blaž Hrastnik bd549d8a20 Merge remote-tracking branch 'origin/master' into debug 2 years ago
Cydiater 7083b98a38
postpone clone after found (#1656) 2 years ago
Blaž Hrastnik 1bcb624ae6 Instant is more suitable than SystemTime for spinners 2 years ago
Blaž Hrastnik f88c077f99 Replace tendril with smartstring
Slightly smaller API surface, less dependencies.
2 years ago
Matouš Dzivjak fdb9a1677b
feat(editor): add config for search wrap_around (#1516)
* feat(editor): add config for search wrap_around

Fixes: https://github.com/helix-editor/helix/issues/1489

* Move search settings into separate config

* Disable linter
2 years ago
Gokul Soumya bf773db451 Show infobox with register contents 2 years ago
Gokul Soumya 5995568c1d Prevent multiple code action popups 2 years ago
Gokul Soumya 547c3ecd0c Preselect first item in code action popup menu 2 years ago
Gokul Soumya e90276df0b Replace if let with early return 2 years ago
Blaž Hrastnik e7f5ec5561 fix: There is no such thing as markup.normal, use ui.text 2 years ago
Blaž Hrastnik 6ea477ab60 Don't use block_on in jobs.finish(), we can .await 2 years ago
Blaž Hrastnik 36b975c4ce ui: menu: Don't allocate scrollbar space if options fit 2 years ago
Blaž Hrastnik f10a06f4de ui: Only render menu scrollbar if it doesn't fit 2 years ago
Blaž Hrastnik 094a0aa3f9 Render code actions as a menu, allow adding padding to popup 2 years ago
Blaž Hrastnik f7f55143a1 Improve code action picker by displaying it inline 2 years ago
Blaž Hrastnik 62561e9d23 Stop collecting highlight_iter events then turning back into iter 2 years ago
Blaž Hrastnik 5aead46f4b Remove some unnecessary clippy tags 2 years ago
Blaž Hrastnik 2a7ae963e1 Automatically commit changes to history if not in insert mode
Fixes #1500
2 years ago
CossonLeo d49e5323f9
Use markup scopes for the Markdown component (#1363) 2 years ago
Benjamin 4044c70eb2
Fix picker won't scroll down when it hits the bottom #1544 (#1567) 2 years ago
Ivan Tham 759b850859
Allow specifying file start position (#445)
Like helix-term/src/commands.rs:3426:15
2 years ago
Blaž Hrastnik e2d2f19fd0
Merge pull request #1154 from sudormrfbin/cursor-shape-new
Change cursor shape on mode change
2 years ago
Blaž Hrastnik add3be8528 Slicing micro-optimization 2 years ago
Blaž Hrastnik 11c3ba9350 Speed up ensure_next_boundary during render
This code:

    let start = ensure_grapheme_boundary_next(text, text.byte_to_char(start));
    let end = ensure_grapheme_boundary_next(text, text.byte_to_char(end));

Would convert byte to char index, but then internally immediately convert back
to byte index, operate on it, then convert it to char index.

This change reduces the amount of time spent in ensure_grapheme_boundary from
29% to 2%.
2 years ago
Blaž Hrastnik 53d881f172 Store theme scopes on the loader, this way theme isn't passed around 2 years ago
Blaž Hrastnik 6728e44490 syntax: Split parsing and highlighting 2 years ago
Michael Davis f453f8724d
change show_subtree command into ':tree-sitter-subtree' typable command (#1524)
* add default keymap for show_subtree command

* remove space+t keymap

* add a typable command ':show-subtree'

* generate documentation for ':show-subtree'

* remove non-typable show_subtree command

* ':show-subtree'->':tree-sitter-subtree'
2 years ago
Michael Davis 392dfa0841
add select_next_sibling and select_prev_sibling commands (#1495)
* add select_next_sibling and select_prev_sibling commands

* refactor objects to use higher order functions

* address clippy feedback

* move selection cloning into commands

* add default keybindings under left/right brackets

* use [+t,]+t for selecting sibling syntax nodes

* setup Alt-{j,k,h,l} default keymaps for syntax selection commands

* reduce boilerplate of select_next/prev_sibling in commands

* import tree-sitter Node type in commands
2 years ago
Skyler Hawthorne 96d4ca5f73
Dependabot/cargo/pulldown cmark 0.9.1 (#1533)
* build(deps): bump pulldown-cmark from 0.8.0 to 0.9.1

Bumps [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) from 0.8.0 to 0.9.1.
- [Release notes](https://github.com/raphlinus/pulldown-cmark/releases)
- [Commits](https://github.com/raphlinus/pulldown-cmark/compare/v0.8.0...v0.9.1)

---
updated-dependencies:
- dependency-name: pulldown-cmark
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* cmark 0.9 fixes

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
Blaž Hrastnik e7eab95b94 Update to rust 1.58, fix a bunch of optional lints 2 years ago
Mathis Brossier f5b0821860
Fix panics when resizing (#1408)
* Change buffer.get & buffer.get_mut to return Option, Implement Trait Index & IndexMut to panic

* Prevent FilePicker from drawing outside buffer (rust panics)

* apply suggestion

* add function in_bounds to avoid useless calculations

Co-authored-by: mathis <mathis.brossier@universite-paris-saclay.fr>
2 years ago
WindSoilder 22297d0b40
Add alt-backspace, alt-<, alt->, ctrl-j to insert mode (#1441)
* add alt-backspace keymap to delete word backward

* add more useful keymap

* map to correct command

* add C-j to insert_newline
2 years ago
Matouš Dzivjak 38ca8daa09
fix(commands): run fmt for all documents being closed (#1444)
When writing all documents, fmt wouldn't be run.
Run fmt in close all implementation so that all documents
are formatted if necessary.

Fixes: https://github.com/helix-editor/helix/issues/1442
2 years ago
Michael Davis 64d3e7b705
add show_subtree command for viewing tree-sitter subtree in Popup (#1453)
* add show_subtree command for viewing tree-sitter subtree in Popup

* remove '.slice(..)' from show_subtree command

* name docs and subtree Popups 'hover'
2 years ago
Kevin Sjöberg 3a34036310
Use the correct language ID for JavaScript & TypeScript (#1466)
* Use correct language ID for JavaScript/TypeScript

* Add missing slash

* Only calculate fallback when needed
2 years ago
Mathis Brossier 85cf2648a2
buffer picker allow hsplit / vsplit (#1502) 2 years ago
Gokul Soumya b3b4e78585 Merge branch 'master' into cursor-shape-new 3 years ago
Benoît Cortier 05e5520ec0
Put some tests behind #[cfg(test)] (#1459)
It was missing in a few places.
3 years ago
Gokul Soumya 449624965b Merge branch 'master' into cursor-shape-new 3 years ago
Matouš Dzivjak 2e02a1d6bc
feat(commands): shrink_selection (#1340)
* feat(commands): shrink_selection

Add `shrink_selection` command that can be used to shrink
previously expanded selection.

To make `shrink_selection` work it was necessary to add
selection history to the Document since we want to shrink
the selection towards the syntax tree node that was initially
selected.

Selection history is cleared any time the user changes
selection other way than by `expand_selection`. This ensures
that we don't get some funky edge cases when user calls
`shrink_selection`.

Related: https://github.com/helix-editor/helix/discussions/1328

* Refactor shrink_selection, move history to view

* Remove useless comment

* Add default key mapping for extend&shrink selection

* Rework contains_selection method

* Shrink selection without expand selects first child
3 years ago
Blaž Hrastnik 3e4f81547c fix: Use std::path::MAIN_SEPARATOR to determine completion
Refs #1439
3 years ago
Stuart Hinson b18bda928f
fix slash in search selector status message (#1449) 3 years ago
Blaž Hrastnik 7767703979 fix: Only use shellwords parsing on unix platforms 3 years ago