Commit graph

3291 commits

Author SHA1 Message Date
Bertrand Bousquet
04a4033b6c
theme: Add Varua color scheme (#3610) 2022-09-01 19:57:37 -05:00
Michael Davis
66276ce630
Changelog notes for 22.08.1 (#3639) 2022-09-01 12:07:46 -05:00
A-Walrus
45dbcb6783
Fix closing buffer with custom keymap (#3633)
* Fix closing buffer with custom keymap

* Add comment explaining if
2022-09-02 01:59:39 +09:00
Fanda Vacek
ec28b2b5cc
Change MonokaiProSpectrum theme error background from red to magenta. (#3627)
Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>
2022-09-01 07:45:22 -05:00
Charles Hall
04e1cbe33f
fix: typo in tutor about searching compared to vim (#3625) 2022-09-01 07:41:15 -05:00
Blaž Hrastnik
5c2b77b41f
Make mode editor-wide rather than per-document 2022-09-01 16:14:38 +09:00
Blaž Hrastnik
10d9355b34
Update deps 2022-09-01 16:00:19 +09:00
Saber Haj Rabiee
1cbf552554
fix: prevents storing last prompt if is top of stack (#3609) 2022-09-01 10:29:15 +09:00
Michael Davis
ee94031fc4
Bump VERSION to 22.08 2022-08-31 11:43:51 -05:00
Michael Davis
22c5f2474d
Add changelog entries for 22.08 2022-08-31 11:37:17 -05:00
Michael Davis
7c34f20dca
Fix Prompt::handle_event compilation 2022-08-31 11:37:17 -05:00
Frojdholm
4c9f144dac
fix: Recalculate completion when going through prompt history (#3193)
* fix: Recalculate completion when going through prompt history

* Update completion when the prompt line is changed

It should not be possible to update the line without also updating the
completion since the completion holds an index into the line.

* Fix Prompt::with_line recalculate completion

with_line was the last function where recalculate completion had to be
done manually. This function now also recalculates the completion so
that it's impossible to forget.

* Exit selection when recalculating completion

Keeping the selection index when the completion has been recalculated
doesn't make sense. This clears the selection automatically, removing
most needs to manually clear it.

* Remove &mut on save_filter

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-09-01 01:26:21 +09:00
Gokul Soumya
e3e71fa36b
Show clipboard info in --health output (#2947)
* Show clipboard info in --health output

* health: Separate 'languages' category from 'all'

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-09-01 01:23:45 +09:00
Charlie Groves
5c3f43a7f0
Share the restore_term code between panic and normal exits (#3612)
It was starting to diverge as the normal exit code was restoring the prompt but the panic code
wasn't, and the panic code was disabling bracketed paste but the normal code wasn't.

This changes the panic path slightly in that we won't disable raw mode if exiting alternate screen
and disabling bracketed paste fails. If that happens, things are so busted I don't think it matters
anyway.
2022-09-01 01:23:21 +09:00
Michael Davis
93c6a337c4
Avoid command execution hooks on closed docs (#3613)
Fixes a panic with a config like:

    [keys.normal.space]
    x = [":buffer-close"]

by bailing out of the command-execution handling if the document
doesn't exist after handling a command.
2022-09-01 01:20:55 +09:00
Michael Davis
83f177d270
Refactor goto_ts_object_impl as a motion (#3264)
This refactor changes the overall structure of the goto_ts_object_impl
command without removing any functionality from its behavior. The
refactored motion:

* acts on all selections instead of reducing to one selection
* may be repeated with the `repeat_last_motion` (A-.) command
* informs the user when the syntax-tree is not accessible in the current buffer
2022-08-31 17:48:33 +09:00
Michael Davis
7547a961bb
Discard LSP publishDiagnostic when LS is not initialized (#3403)
This is invalid according to the [LSP spec]:

> In addition the server is not allowed to send any requests
> or notifications to the client until it has responded with an
> InitializeResult, with the exception that during the initialize
> request the server is allowed to send the notifications
> window/showMessage, window/logMessage and telemetry/event as well
> as the window/showMessageRequest request to the client.

So we should discard the message when the language server is not
yet initialized. This can happen if the server sends
textDocument/publishDiagnostics before responding to the initialize
request. clojure-lsp appears to exhibit this behavior in the wild.

[LSP Spec]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize
2022-08-31 17:47:18 +09:00
Michael Davis
03f0ef93ac Update tree-sitter-rust to latest
There don't appear to be any regressions from the updates.
Also included is a fix which highlights the "#" as in attributes
as punctuation. This was previously unhighlighted.
2022-08-31 17:46:34 +09:00
Michael Davis
ac669ade05 erlang: Fix highlighting of empty records
For example

    -record(state, {})

Would not highlight `state` as a type since the alternation didn't
allow for an empty tuple. Allowing the inner atom of the tuple to be
optional fixes this case.
2022-08-31 17:46:34 +09:00
Michael Davis
acf3599723 erlang: Use Edoc style auto-pairs
Specifically this changes backtic's right-hand-side pair character
to single-quote which is the syntax for inline and block code in
Edoc.
2022-08-31 17:46:34 +09:00
Michael Davis
00d88e540e Fix missing C highlights
* "const" keyword
* booleans
* <=/>= operators
2022-08-31 17:46:34 +09:00
Michael Davis
d7d9ca37e5
Reword the feature_request issue template as enhancement (#3481) 2022-08-31 17:45:49 +09:00
Michael Davis
e441b1c472
packaging: Point to homebrew-core instead of tap (#3513) 2022-08-31 17:45:38 +09:00
Michael Davis
73d5bd739e Delete invalid indents.scm queries 2022-08-31 17:45:23 +09:00
Michael Davis
4e4c6da3bf Add query-check xtask 2022-08-31 17:45:23 +09:00
Michael Davis
fa1dc7e508 tree-sitter: Prevent panic on loading queries 2022-08-31 17:45:23 +09:00
Michael Davis
4c789cfbda tree-sitter: Refactor lazy query loading
The code for loading queries can be shared between indent and
textobjects queries. In both cases we want to kick an error
message out to the logs.
2022-08-31 17:45:23 +09:00
Blaž Hrastnik
12ddd03d3b
fix: Don't translate mouse up events as down 2022-08-31 11:36:18 +09:00
Michael Davis
701cea54d2
jumplist: Add documents to view history (#3593)
This change adds documents to the view's document history Vec.
(This is used by `ga` for example to access the last buffer.)

Previously, a sequence like so would have confusing behavior:

1. Open file A: any document with an active language server
2. Find some definition that lives in another file - file B - with `gd`
3. Jump back in the jumplist with `C-o` to file A
4. Use `ga` intending to switch back to file B

The behavior prior to this change was that `ga` would switch to file
A: you could not use `ga` to switch to file B.
2022-08-31 10:45:47 +09:00
Lucy
404db2ebee
Move mode transition logic to handle_keymap_event() (#2634)
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-08-31 10:44:06 +09:00
A-Walrus
78189dd9c1
Fix extra selection with regex anchors (^,$) (#3598)
Also added a bunch of tests to ensure correct behaviour
2022-08-31 10:42:58 +09:00
Michael Davis
9e24f2aa81
Use the original document and view for mode transition hooks (#3508)
When changing focus, the lookup with `current!` may change the
view and end up executing mode transition hooks on the newly
focused view. We should use the same view and document to execute
mode transition hooks so that switching away from a view triggers
history save points.
2022-08-31 10:34:04 +09:00
Alexander Brevig
16525349db
Themes update (#3587)
* lint: snazzy

* lint: pop-dark

* lint: penumbra+

* lint: noctis_bordo

* lint: ingrid

* lint: flatwhite

* lint: doom_acario_dark

* lint: dark_plus

* lint: boo_berry

* fix: use 47345E per author instruction

* lint: bogster

* lint: everforest

* lint: acme

* lint: serika

* fix: use nasty_red per author suggestion

* lint: nord

* lint: dracula

* lint: gruvbox

* fix: cursorline gruvbox

* lint: autumn

* fix: no fg for cursorline

* lint: ayu

* lint: rose_pine

* lint: monokai

* lint: solarized

* lint: spacebones

* fix: penumbra bg!=sky

* Update runtime/themes/ayu_light.toml

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

* Update runtime/themes/ayu_light.toml

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

* fix: fg for ui.help thanks @pickfire

* fix: ingrid with input from @intarga

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2022-08-31 10:27:40 +09:00
dependabot[bot]
86b80e6ce6
build(deps): bump iana-time-zone from 0.1.44 to 0.1.47 (#3611)
Bumps [iana-time-zone](https://github.com/strawlab/iana-time-zone) from 0.1.44 to 0.1.47.
- [Release notes](https://github.com/strawlab/iana-time-zone/releases)
- [Changelog](https://github.com/strawlab/iana-time-zone/blob/main/CHANGELOG.md)
- [Commits](https://github.com/strawlab/iana-time-zone/compare/0.1.44...v0.1.47)

---
updated-dependencies:
- dependency-name: iana-time-zone
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-31 08:47:03 +09:00
Kristoffer Flottorp
1de17a2530
Fix fleetish theme (#3607)
Co-authored-by: krfl <kr.fl@outlook.com>
2022-08-30 08:15:38 -05:00
Blaž Hrastnik
e77b7d147c
fix: Recalculate completion after pasting into prompt 2022-08-30 12:27:04 +09:00
Blaž Hrastnik
8a4fbf6daf
completion: remove_follow links on filename_impl
We don't need to follow links since we're only scanning the current
directory level (non-recursive).
2022-08-30 12:23:49 +09:00
PiergiorgioZagaria
d2cec25395
Fix process spawning error handling (#3349)
* Fix process spawning error handling

* Log stderr in any case
2022-08-30 11:02:34 +09:00
Michael Davis
5f043dde56
Derive Document language name from languages.toml name key (#3338)
* Derive Document language name from `languages.toml` `name` key

This changes switches from deriving the language name from the
`languages.toml` `scope` key to `name` (`language_id` in the
`LanguageConfiguration` type). For the most part it works to derive the
language name from scope by chopping off `source.` or `rsplit_once` on
`.` but for some languages we have now like html (`text.html.basic`),
it doesn't. This also should be a more accurate fallback for the
`language_id` method which is used in LSP and currently uses the
`rsplit_once` strategy.

Here we expose the language's name as `language_name` on `Document` and
replace ad-hoc calculations of the language name with the new method.

This is most impactful for the `file-type` statusline element which is
using `language_id`.

* Use `Document::language_name` for the `file-type` statusline element

The `file-type` indicator element in the statusline was using
`Document::language_id` which is meant to be used to for telling
Language Servers what language we're using. That works for languages
with `language-server` configurations in `languages.toml` but shows
text otherwise. The new `Document::language_name` method from the
parent commit is a more accurate way to determine the language.
2022-08-30 10:59:45 +09:00
A-Walrus
ae81fbdbf6
Allow less than and greater than in macros (#3556)
* Allow less than and greater than in macros

* Fix failing test
2022-08-30 10:58:51 +09:00
dependabot[bot]
841766ef82
build(deps): bump futures-executor from 0.3.23 to 0.3.24 (#3602)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 18:55:26 -05:00
dependabot[bot]
50d5463f90
build(deps): bump futures-util from 0.3.23 to 0.3.24 (#3603)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 18:54:58 -05:00
dependabot[bot]
ca4b6eab74
build(deps): bump lsp-types from 0.93.0 to 0.93.1 (#3601)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 18:54:24 -05:00
Roman Chumak
ab67788e76
Sonokai (#3595)
Co-authored-by: Roman Chumak <p4ymak@yandex.ru>
2022-08-29 09:00:43 -05:00
Bob
411c5e4871
let extend-line respect range direction (#3046)
* let extend-line respect range direction

* fix extend above logic

* keep `x` existing binding

* Update book/src/keymap.md

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

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2022-08-29 10:00:40 +09:00
Charlie Groves
f38ede8631
Add bracketed paste (#3233) 2022-08-29 09:48:49 +09:00
unrelentingtech
51b62230da
Add wezterm to get_terminal_provider (#3588)
https://github.com/wez/wezterm is a terminal emulator with its own built-in multiplexer
2022-08-29 09:24:22 +09:00
Kristoffer Flottorp
eeb0a9f504
Add fleetish theme. Based on the unreleased JetBrains Fleet editor (#3591)
Co-authored-by: krfl <kr.fl@outlook.com>
2022-08-29 09:23:54 +09:00
Soc Virnyl S. Estela
abb9f139c5
update colors for papercolor-light (#3585)
* theme: add papercolor light

* fix typo

* add markup highlighting

* theme: added diff colors 

forgot to add it to PaperColor Light

* fix some ui colors

* assign more color for markup headings

* change heading color to bright7
2022-08-29 07:58:05 +08:00
David
db18206795
Fix rust text objects (#3590) 2022-08-28 16:03:39 -05:00