Commit Graph

137 Commits (28fd704bce2fec56e46991b26eed5a17e519e6bd)

Author SHA1 Message Date
Blaž Hrastnik d1854d8e6a Merge remote-tracking branch 'origin/master' into debug 3 years ago
Cole Helbling 225e7904ec
helix-view/editor: use SCRATCH_BUFFER_NAME const (#1104) 3 years ago
Cole Helbling c638b6b60e
helix-term/commands: implement buffer-close (bc, bclose) (#1035)
* 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
3 years ago
Cole Helbling 87e61a0894
helix-term/commands: implement cquit (#1096)
This allows you to exit helix with an exit code, e.g. `:cq 2`.
3 years ago
Jason Hansen cf831b1a65
Allow piping from stdin into a buffer on startup (#996)
* Allow piping from stdin into a buffer on startup

* Refactor

* Don't allow piping into new buffer on macOS

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Fix

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
3 years ago
CossonLeo 29e6849413
Add LSP rename_symbol (space-r) (#1011)
improve apply_workspace_edit
3 years ago
Blaž Hrastnik 5938ab1bf1 dap: Fully extract template parameter prompts 3 years ago
Blaž Hrastnik 64bb1f7563 dap: Extract out variable rendering
Will improve on the UI later
3 years ago
Omnikar ed23057ff8
Launch with defaults upon invalid config/theme (#982)
* Launch with defaults upon invalid config/theme

* Startup message if there is a problematic config
* Statusline error if trying to switch to an invalid theme

* Use serde `deny_unknown_fields` for config
3 years ago
Blaž Hrastnik 14a3502cf1 dap: Move template selection into a picker
It's time to move all these components out of ui/editor.rs
3 years ago
Blaž Hrastnik f2b709a3c3 Merge branch 'master' into debug 3 years ago
Omnikar cfc8285867
Allow infoboxes to be disabled (#972)
* Allow infoboxes to be disabled

* Document `infoboxes` default value

* Rename `infoboxes` to `auto_info`

* Document `auto-info`

* Fix incomplete rename
3 years ago
ath3 aa4d0b4646
Fix crash on changing from empty scratch buffer to itself (#975) 3 years ago
Blaž Hrastnik e2560f427e Replace documents SlotMap with BTreeMap 3 years ago
Omnikar 2f8ad7f890
If switching away from an empty scratch buffer, remove it (#935)
* If switching away from an empty scratch buffer, remove it

* Move `view.jumps.push` call into `else` clause

* Refactor
3 years ago
CossonLeo 2ed01f2d9c
find motion and textobj motion repeat (#891) 3 years ago
Kirawi 0cb5e0b2ca
log syntax highlighting init errors (#895) 3 years ago
Oskar Nehlin 0f886af4b9
Add commands for moving between splits with a direction (#860)
* Add commands for moving between splits with a direction

* Update keymaps

* Change picker mapping

* Add test and clean up some comments
3 years ago
CossonLeo 9ac0c95161
Improve completion trigger (#838)
* improve idle completion trigger

* add completion-trigger-len to book

* rename semantics_completion to language_server_completion and optimize idle completion trigger
3 years ago
Blaž Hrastnik 0a6b60085a Merge branch 'master' into debug 3 years ago
Ivan Tham 89707a858f
Make auto-completion a config (#853) 3 years ago
Blaž Hrastnik a930f99179 fix: Make sure to actually use idle_timeout config value for the timers 3 years ago
Blaž Hrastnik 633b981db2 Make idle-timeout configurable 3 years ago
Blaž Hrastnik f99bea404f idle timer wip 3 years ago
Dmitry Sharshakov bf53aff27d Merge branch 'master' into debug 3 years ago
lurpahi a958d34bfb
Add option for automatic insertion of closing-parens/brackets/etc (#779)
* Add auto-pair editor option

* Document auto-pair editor option

* Make cargo fmt happy

* Actually make cargo fmt happy

* Rename auto-pair option to auto-pairs

* Inline a few constants

Co-authored-by: miaomai <cunso@tutanota.com>
3 years ago
kraem 4a003782a5
enable smart case regex search by default (#761) 3 years ago
Kirawi ef532e0c0d
log errors produced when trying to initialize the LSP (#746) 3 years ago
Blaž Hrastnik 72cf86e462 Regex prompts should have a history with a specifiable register 3 years ago
Blaž Hrastnik 46f3c69f06 lsp: Don't send notifications until initialize completes
Then send open events for all documents with the LSP attached.
3 years ago
Blaž Hrastnik 59ed1c8c78 Simplify documents & documents_mut() 3 years ago
Blaž Hrastnik dc7799b980 lsp: Refactor code that could use document_by_path_mut 3 years ago
Blaž Hrastnik c00cf238af Simplify textDocument/didClose, we don't need to look up LSP again 3 years ago
oberblastmeister 99a753a579
Document macros (#693)
* add docs

* clean up

* remove

* more

* Update helix-view/src/macros.rs

Co-authored-by: Ivan Tham <pickfire@riseup.net>

Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Blaž Hrastnik b997d2cdeb dap: Allow setting breakpoints before starting the adapter 3 years ago
Dmitry Sharshakov 5b20f6020a Merge remote-tracking branch 'origin/master' into debug
Contains type fix on helix-term/src/ui/editor.rs:752:13
3 years ago
Omnikar e772808a5b
Shell commands (#547)
* Implement shell interaction commands

* Use slice instead of iterator for shell invocation

* Default to `sh` instead of `$SHELL` for shell commands

* Enforce trailing comma in `commands` macro

* Use `|` register for shell commands

* Move shell config to `editor` and use in command

* Update shell command prompts

* Remove clone of shell config

* Change shell function names to match prompts

* Log stderr contents upon external command error

* Remove `unwrap` calls on potential common errors

`shell` will no longer panic if:
  * The user-configured shell cannot be found
  * The shell command does not output UTF-8

* Remove redundant `pipe` parameter

* Rename `ShellBehavior::None` to `Ignore`

* Display error when shell command is used and `shell = []`

* Document shell commands in `keymap.md`
3 years ago
Dmitry Sharshakov b42631942b
Defaults in completions, better schema 3 years ago
Dmitry Sharshakov 2d42766a71
wip: refactor parameters in UI start 3 years ago
Dmitry Sharshakov 94901b8677
Customized completion for template parameters 3 years ago
Dmitry Sharshakov 8df6739759
New way of starting debug sessions 3 years ago
Dmitry Sharshakov 890b51b568
Paginated variables 3 years ago
Dmitry Sharshakov c7759a5aa0
Merge remote-tracking branch 'origin/master' into debug 3 years ago
Kirawi b99db7c687
Move path util functions from helix-term to helix-core (#650) 3 years ago
Dmitry Sharshakov a938f5a87a
refactor: handle DAP events in editor main loop 3 years ago
Dmitry Sharshakov 6458edecfd
Add stack pointer display when stopped 3 years ago
Blaž Hrastnik 94a1951d40 Work towards a breakpoint UI 3 years ago
Blaž Hrastnik d39baa3b4e Start integrating into the editor's event loop 3 years ago
Blaž Hrastnik 557fd86e71 Extract view.inner_area(), simplify render_focused_view_elements 3 years ago
Blaž Hrastnik 9776553ad0 Refactor view.first_line/first_col into view.offset (Position) 3 years ago