Commit graph

3504 commits

Author SHA1 Message Date
allanderek
9ca4ac6901
Pallettise the bogster theme and, more importantly, add support for color-modes to the bogster theme. (#4121) 2022-10-07 00:52:10 +09:00
Jonathan
4595683622
Fix tutor typo (#4116) 2022-10-06 05:04:01 +09:00
A-Walrus
c927d61791
Fix bugs in search wraparound message (#4101) 2022-10-04 16:49:43 -05:00
Jaden
ccb38e7696
doc: add theme inheritance example (#4096) 2022-10-04 16:33:45 -05:00
Poliorcetics
ed5febf4b3
doc: add example to disable arrow keys in insert mode (#4088) 2022-10-04 09:40:51 -05:00
dependabot[bot]
581fe5c675
build(deps): bump thiserror from 1.0.36 to 1.0.37 (#4095)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 18:38:56 -05:00
dependabot[bot]
6b0fffb647
build(deps): bump tokio from 1.21.1 to 1.21.2 (#4094)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 18:38:43 -05:00
dependabot[bot]
7c33b9c76d
build(deps): bump smallvec from 1.9.0 to 1.10.0 (#4093)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 18:38:24 -05:00
Skyler Hawthorne
27b70696df
Exit gracefully when close operation fails (#4081)
If the close method fails, the editor will quit before restoring the
terminal. This causes the shell to break if, e.g. the LS times out
shutting down.

This fixes this by always restoring the terminal after closing, and
printing out a message to stderr if there is an error.
2022-10-04 00:35:42 +09:00
Michael Davis
6cca7375ec
Automatically track pseudo-pending text (#4077)
This change automatically tracks pending text for for commands which use
on-next-key callbacks. For example, `t` will await the next key event
and "t" will be shown in the bottom right-hand corner to show that we're
in a pending state.

Previously, the text for these on-next-key commands needed to be
hard-coded into the command definition which had some drawbacks:

* It was easy to forget to write and clear the pending text.
* If a command was remapped in a custom config, the pending text would
  still show the old key.

With this change, pending text is automatically tracked based on the
key events that lead to the command being executed. This works even
when the command is remapped in config and when the on-next-key
callback is nested under some key sequence (for example `mi`).
2022-10-04 00:14:57 +09:00
Karsten Gebbert
9124c231f4
respond to SIGUSR1 by reloading config (#3952)
* respond to SIGUSR1 by reloading config

* document USR1 signal handling
2022-10-04 00:08:32 +09:00
Ivan Tham
3d59d3f8be
Keep arrow and special keys in insert (#3915)
* Keep arrow and special keys in insert

Advanced users won't need it and is useful for beginners.
Revert part of #3671.

* Change text for insert mode section

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

* Remove ctrl-up/down in insert

* Reorganize insert keys and docs

* Improve page up experience on last tutor

The last tutor page can page down multiple times and it will break the
heading on the 80x24 screen paging when reaching the last page, this
keeps the style the same and make sure page up and down won't break it.

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-10-04 00:08:15 +09:00
A-Walrus
1d8bb2249b
Change focus to modified docs on quit (#3872)
* Change focus to modified docs on quit

When quitting with modified documents, automatically switch focus to
one of them.

* Update helix-term/src/commands/typed.rs

Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>

* Make it work with buffer-close-all and the like

* Cleanup

Use Cow instead of String, and rename DoesntExist -> DoesNotExist

Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
2022-10-04 00:07:21 +09:00
Robin
6764744ce9
Add option to skip the first indent guide (#3819)
* Add option to skip the first indent guide

* reorder skip_first option

* change indent-guides.skip_first to a number

* rename skip -> skip_levels

* add skip_levels to the book

* Update book/src/configuration.md

Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com>

* Update helix-term/src/ui/editor.rs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

Co-authored-by: Robin <robinvandijk@klippa.com>
Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-04 00:07:04 +09:00
Michael Davis
dbec057363
Rename I/A "Insert at start/end of line" (#3753)
* keymap: Rename A "Insert at end of line"

The language for the `A` binding is potentially confusing because
`A` behaves like `i` done at the end of the line rather than `a`.
This change renames the command to match Kakoune's language[^1].

[^1]: 021da117cf/src/normal.cc (L2229)

* keymap: Rename I `insert_at_line_start`
2022-10-04 00:05:08 +09:00
Kirawi
772af7ffb1
remove split-debuginfo setting (#3691)
According to [the rustc book](https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo), this is not supported on Windows. It also prevents Helix from compiling on the latest nightly.
2022-10-04 00:04:19 +09:00
ath3
7c9809eeb2
Find workspace from document path (#3553) 2022-10-04 00:02:49 +09:00
Ivan Tham
66bbba9024
Select inserted space after join (#3549)
* Select inserted space after join

* Split join_selections with space selection to A-J

Kakoune does that too and some users may still want to retain their selections.

* Update join_selections docs
2022-10-04 00:02:14 +09:00
Michael Davis
4a3b776b78
rust: Highlight function signatures as functions (#4073)
This stanza highlights functions within trait definitions. For example,
in:

    pub trait Widget {
        fn render(self, area: Rect, buf: &mut Buffer);
    }

`render` is currently highlighted as a variable. With this change it's
highlighted as a function.
2022-10-03 23:56:50 +09:00
nuid32
576c34f84e
Add command names to command palette (#4071) 2022-10-03 23:56:43 +09:00
Ivan Tham
93f26a3048
Fix signature help panic when too large (#4030)
When signature help is too large it may cause a panic when it is too
large, now I just make the hover do an intersection with surface to make
sure it never overflow.
2022-10-03 23:56:24 +09:00
greg-enbala
63ff9309ce
goto_window_* extends selection (#3985)
* goto_window_* extends selection

* Don't push to the jumplist
2022-10-03 23:55:26 +09:00
Alexis Kalabura
b9ff5d0e0a
[lsp-restart]: call the force_shutdown method for the old_client (#3972)
* [lsp-restart]: call the shutdown_and_exit method for the old_client

* change shutdown_and_exit to force_shutdown

* remove extra log
2022-10-03 23:54:46 +09:00
Joshua Pauline
c144cc0b04
feat(statusline): add option to show total line numbers in file (#3960)
* feat(statusline): add option to show total line numbers in file

* feat(line numbers): add config to doc book
2022-10-03 23:54:00 +09:00
Slug
519857d632
Add dark high contrast theme refer to vscode (#3312)
* Add dark high contrast theme

* Add my sign

* Fix typo

* Change gray to white for comment and remove Italic
2022-10-03 23:45:56 +09:00
PeepNSheep
77f33e7b20
Add configureable statusline mode names (#3311)
* Added 'long-mode' statusline element

* Added customizable statusline mode names

* Removed a string clone

* Added documentation

* Updated documentation, moved modenames to a seperate section

* Update configuration.md

* Documentation update

* Documentation update

* Documentation update

* Update configuration.md

* Update configuration.md

* Fixed merge error

* Update configuration.md

* Update configuration.md
2022-10-03 23:45:32 +09:00
ChrHorn
589d17c758
Add ui.gutter.selected option for themes (#3303)
* add `ui.gutter.selected`

* add `ui.gutter`, `ui.gutter.selected` to docs
2022-10-03 23:44:45 +09:00
Michael Davis
6939dd3adb Add tests for select-mode TS textobjects 2022-10-03 10:44:08 -04:00
Michael Davis
c253139790 Extend textobject selections in select mode 2022-10-03 10:44:08 -04:00
Michael Davis
032d76ccf2 Use Range::with_direction consistently 2022-10-03 10:44:08 -04:00
Michael Davis
274f2ea459 Use requested direction for new textobject selection range
This changes the behavior of operations like `]f`/`[f` to set the
direction of the new range to the direction of the action.

The original behavior was to always use the head of the next function.
This is inconsistent with the behavior of goto_next_paragraph and makes
it impossible to create extend variants of the textobject motions.

This causes a behavior change when there are nested functions. The
behavior in the parent commit is that repeated uses of `]f` will
select every function in the file even if nested. With this commit,
functions are skipped.

It's notable that it's possible to emulate the original behavior by
using the `ensure_selections_forward` (A-:) command between invocations
of `]f`.
2022-10-03 10:44:08 -04:00
A-Walrus
f3958aa1fd
Cycled to end/beginning + no more matches msgs (#3176)
* Show status msg when next/prev cycles around

* Add msg when there is no wraparound

* Cleanup code

* Change msg to "Wrapped around document"
2022-10-03 23:43:26 +09:00
Christoph Schmidler
2fac9e24e5
Inherit theme (#3067)
* Add RawTheme to handle inheritance with theme palette

* Add a intermediate step in theme loading

it uses RawTheme struct to load the original ThemePalette, so we can merge it with the inherited one.

* Load default themes via RawThemes, remove Theme deserialization

* Allow naming custom theme same as inherited one

* Remove RawTheme and use toml::Value directly

* Resolve all review changes resulting in a cleaner code

* Simplify return for Loader::load

* Add  implementation to avoid extra step for loading of base themes
2022-10-03 23:34:29 +09:00
A-Walrus
57dc5fbe3a
Show "Invalid regex" message on enter (Validate) (#3049)
* Show "Invalid regex" message on enter (Validate)

* Reset selection on invalid regex

* Add popup for invalid regex

* Replace set_position with position

* Make popup auto close
2022-10-03 23:33:48 +09:00
Joe
bcba5d67f9
Add goto preview (#2982) 2022-10-03 23:33:20 +09:00
David
18f6ec7a8e
Update treesitter markdown (#4078)
* Update treesitter markdown

* Update inline and add table injections
2022-10-03 23:14:16 +09:00
Matt Freitas-Stavola
9d1793c45b
Add pseudo_pending for t/T/f/F (#4062) 2022-10-02 14:32:30 -05:00
Kirawi
8c2cc43017
diff full-doc LSP edits (#4041)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-02 14:23:23 -05:00
nuid32
6caa7a7f56
Onedarker theme: some improvements (#4069) 2022-10-02 11:19:55 -05:00
nuid32
5b5f1bd39a
Adjust light-gray in onedarker theme (#4060) 2022-10-01 10:37:18 -05:00
zensayyy
c9584251f3
Ensure cursor in view after format (#4047)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-01 09:32:09 -05:00
Roberto Vidal
cc257e9bf9
Add support for webassembly text format (#4040) 2022-10-01 09:13:52 -05:00
nuid32
2113b1bb2f
themes: Add onedarker (#3980) 2022-10-01 09:11:15 -05:00
Chickenkeeper
60aa7d3607
WGSL syntax highlighting fix (#3996) 2022-09-30 17:43:07 -05:00
Maximilian Muecke
8a7a6e4cff
Add comment injection for R (#4031) 2022-09-29 13:11:45 -05:00
joleaf
c4aec0a5c5
tutor: missing <ESC> before removing the second cursor (#4027)
This step was missing in section 5.2 of tutor.
2022-09-29 11:02:55 -04:00
Sora
038ad6289f
Fix tutor typo favourite to favorite (#4007) 2022-09-28 18:50:24 -05:00
Sven-Hendrik Haase
5dbca0fc08
Add gruvbox dark (#3948)
* Add gruvbox dark

* fixup! Add gruvbox dark
2022-09-28 22:50:53 +08:00
Erin Kim
bdc7b35214
nix: replace runCommandNoCC with runCommand (#3992) 2022-09-27 08:01:58 -05:00
dependabot[bot]
8fc493137d
build(deps): bump serde from 1.0.144 to 1.0.145 (#3989)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-26 18:43:30 -05:00