1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-05-29 06:46:03 +02:00
Commit Graph

2801 Commits

Author SHA1 Message Date
Blaž Hrastnik 27609f5065
Fix the VERSION file 2022-05-29 01:07:30 +09:00
nitish-17 b31788102e
mention the requirement of C++ compiler for building grammar in doc (#2592) 2022-05-28 11:02:47 -05:00
Blaž Hrastnik a106341fd7
Fix release action 2022-05-28 23:23:08 +09:00
Michael Davis 46f9320709
add 22.05 changelog notes (#2584) 2022-05-28 09:18:15 -05:00
Michael Davis efae76160d
add section on syntax tree motions to the usage docs (#2568) 2022-05-26 10:39:58 +09:00
Ben Lee-Cohen 7160e745f7 Changing Macro color to avoid color confusion
I noticed that in Rust, `println!`being a macro, it matched the color of string literals. This was visually confusing to me, so I checked what the nvim catpuccin theme (https://github.com/catppuccin/nvim) does. While it is pretty different, it does use different colors for strings and all function types: https://share.cleanshot.com/RLG2y1

I don't know if blue or red makes more sense given the other syntax choices, but wanted to propose this change cc @IsotoxalDev
2022-05-25 09:54:20 -05:00
Michael Davis 82da9bd4f2 update Erlang grammar and queries
The update to the grammar itself covers the case where the document
is a single expression without a trailing newline such as "min(A, B)".
A small change to the parser now parses these expressions correctly
which improves the display of the function head in the signature
help popup.

The update to the queries marks 'andalso', 'orelse', 'not', etc. as
`@keyword.operator` which improves the look - it looks odd to see
operators that are words highlighted the same as tokens like '->'
or '=:='.
2022-05-25 21:26:26 +09:00
Michael Davis 45dd54082e update Gleam grammar and queries
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also https://github.com/gleam-lang/tree-sitter-gleam/issues/25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also https://github.com/gleam-lang/tree-sitter-gleam/issues/14#issuecomment-1129263640

A new constructor node has been added as well which makes type
highlighting more fine grained.

See also https://github.com/gleam-lang/tree-sitter-gleam/pull/29
2022-05-25 21:26:26 +09:00
Andrey Tkachenko 10463fe32c Add `parameter.around` text object query 2022-05-25 21:26:06 +09:00
dependabot[bot] da29527258 build(deps): bump once_cell from 1.10.0 to 1.12.0
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.10.0 to 1.12.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.10.0...v1.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 21:25:47 +09:00
dependabot[bot] a13ff27023 build(deps): bump regex from 1.5.5 to 1.5.6
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.5 to 1.5.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.5.5...1.5.6)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 21:25:34 +09:00
Andrey Tkachenko 67fe16008e
Basic verilog support (#2552) 2022-05-24 12:52:32 -05:00
Erasin 386dccc84e
Add lua lsp (#2560) 2022-05-24 10:03:53 -05:00
Isotoxal c429ed660f
Add Catppuccin Theme (#2546)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-05-24 09:02:26 -05:00
Blaž Hrastnik d6865cdca3
nix: bump dependencies 2022-05-24 09:37:17 +09:00
Michael Davis 89c0998aee lower MSRV to 1.57.0
This line uses the Display trait for io::ErrorKind which was
stabilized in Rust 1.60.0. We can set MSRV all the way back to
1.57.0 by replacing it with a pretty-print.

Closes #2460.
2022-05-24 01:05:19 +09:00
Michael Davis 92df5a5425 check MSRV in CI
It's very easy to use new rust features without realizing it since
the CI and local development workflows may use the latest rust version.
We try to keep some backwards compatibility with rust versions to make
packaging easier for some OS-level package-managers like Void Linux's.
See #1881.

This change runs the "Check" step for the pinned version of rust in
the rust-toolchain.toml file as well as the MSRV version in a matrix.
In order to bump the MSRV, we need to edit

    .github/workflows/msrv-rust-toolchain.toml

This commit sets the MSRV as 1.60.0 but a later child commit will
reduce the MSRV back to 1.57.0.

Closes #2482.
2022-05-24 01:05:19 +09:00
Michael Davis aa87adf54b pin the rust toolchain to 1.61.0
1.61.0 in particular introduced new clippy lints that unexpectedly
failed CI until addressed. The lints are a bit tough to fix since
the toolchain action starts using new rust versions almost immediately
after release, so if you aren't using rustup, you may have a hard
time reproducing the lint results until your package manager updates
rust.

This brings an extra burden that we have to remember to make a
commit/PR to update rust in CI.
2022-05-24 01:05:19 +09:00
Michael Davis f6531c9db0 inherit rust toolchain channel from rust-toolchain.toml
We've forked actions-rs/toolchain and merged
https://github.com/actions-rs/toolchain/pull/209
so we can take advantage of full support of `rust-toolchain.toml`.
Without that PR, the action fails because the `rustup` version
built into the runners by default is too old. #2528 covers switching
back to the upstream when it includes those changes.
2022-05-24 01:05:19 +09:00
Blaž Hrastnik 35303f749e
Replace handwritten CI cache with Swatinem/rust-cache
The cache kept growing as dependencies kept changing and updating.
2022-05-23 13:48:00 +09:00
Jens Getreu 6801b28da0
Highlight active window in Autumn theme (#2531)
Co-authored-by: Jens Getreu <jens.getreu@dlh.lu>
2022-05-22 10:40:27 -05:00
Joel 682bcc3a32 fix: missing quotes around `variable.other.member` 2022-05-22 18:36:51 +09:00
Joel 0018545263 fix: remove duplicated `ui.help` in themes
the bottom value is used, so i've removed the top `ui.help` values from all themes

also, the values are not merged, so:

```toml
"ui.help" = { modifiers = ["reversed"] }
"ui.help" = { fg = "white", bg = "black" }
```

is equal to:

```toml
"ui.help" = { fg = "white", bg = "black" }
```
2022-05-22 18:36:51 +09:00
Daniel S Poulin 0c05447d49
Add shrink equivalent of extend_to_line_bounds (#2450)
* Add shrink equivalent of extend_to_line_bounds

* Add a check for being past rope end in end position calc

* Include the EOL character in calculations

* Bind to `A-x` for now

* Document new keybind
2022-05-22 10:33:11 +09:00
Ivan Tham 5bcb31a6df Make Borders u8 2022-05-22 10:26:32 +09:00
Ivan Tham 1837b5e4a6 Refactor Block with Default and bitflags
Specifying empty for bitflags is not recommended, it is now removed and added
Default. For BorderType, it now defaults to plain.
2022-05-22 10:26:32 +09:00
kyrime bfc4ff4dcf
Add theme key for picker separator (#2523)
Co-authored-by: ky <>
2022-05-22 10:24:51 +09:00
Leoi Hung Kin 5c864922d8
Fix panic when reloading a shrunk file (#2506)
* fix panic when reloading a shrunk file

* linting

* use scrolloff
2022-05-22 10:24:32 +09:00
Blaž Hrastnik 8df8ff27c2
cargo xtask docgen 2022-05-22 00:20:45 +09:00
Blaž Hrastnik d25bae844c
Add Scheme support
Skipped scm for now :/ it overlaps with tree-sitter-tsq
2022-05-22 00:01:07 +09:00
Roland Kovacs 6bd8924436 Move Tree nodes on view swap
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.
2022-05-21 08:53:16 -05:00
Roland Kovacs 3f10473d30 Implement view swapping
* 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
2022-05-21 08:53:16 -05:00
Jacob Thompson e8e252648f
Added a default lsp server for Java in languages.toml (#2511)
* Added a default lsp server for Java in languages.toml

* Added a default lsp server for Java in languages.toml cont.

Co-authored-by: Jacob Thompson <a01657923@usu.edu>
2022-05-20 15:17:46 +09:00
Michael Davis e04bb8b891
address rust 1.61.0 clippy lints (#2514) 2022-05-20 12:16:11 +09:00
Christoph Horn 9be810fd01 add missing `ui.menu` to themes, fix issues with some themes 2022-05-20 10:32:59 +09:00
Christoph Horn e7e13dcf06 add `ui.menu` to default theme 2022-05-20 10:32:59 +09:00
Christoph Horn 82fb217b6a use ui.menu instead of ui.statusline for command completion menu theme 2022-05-20 10:32:59 +09:00
Robert Walter 776686ab24
Separate colors for different diagnostics types (#2437)
* feat(theme): add separate diagnostic colors

This commit adds separate diagnostic highlight colors for the different
types of LSP severities. If the severity type doesn't exist or is
unknown, we use some fallback coloring which was in use before this
commit.

Some initial color options were also added in the theme.toml

Resolves issue #2157

* feat(theme): add docs for new diagnostic options

* feat(theme): adjust defaults & reduce redundancy

- the different colors for different diagnostic severities are now
  disabled in the default theme, instead diagnostics are just generally
  underlined (as prior to the changes of this feature)
- the theme querying is now done once instead of every iteration in the
  loop of processing every diagnostic message
2022-05-20 10:30:28 +09:00
Paul Scott 09f9f70576 Python highlight decorator attribute 2022-05-20 10:28:52 +09:00
Paul Scott 2a2030142f Python highlight keyword argument as parameter 2022-05-20 10:28:52 +09:00
Paul Scott e680f9644d Python handling highlighting parameters with defaults 2022-05-20 10:28:52 +09:00
Paul Scott abef250c58 Python highlight improvements: type, parameter etc
* str, list, etc. handled as @function.builtin and @type.builtin
* None and non-conforming type indentifiers as @type in type hints
* class identifiers treated as @type
* @constructor used for constructor definitions and calls rather than
  as a catch-all for type-like things
* Parameters highlighted
* self and cls as @variable.builtin
* improved decorator highlighting as part of @function

Re-ordering of some statements to give more accurate priority.
2022-05-20 10:28:52 +09:00
Zeddicus414 8e8d4ba27f dark_plus theme constructor should be green. 2022-05-20 10:28:52 +09:00
Zeddicus414 a6da99a144 Change python highlights.scm to more fully utilize the themes.
Create type keywords
Allow _CONSTANTS to start with _
Highlight constants before constructors
Move some keywords into @keyword.control
2022-05-20 10:28:52 +09:00
Bob 6462542fc5
support insert register in prompt (#2458)
* support insert register in prompt

* use next_char_handler instead of a flag

* Fix clippy issue

* show autoinfo when inserting register

* Revert "show autoinfo when inserting register"

This reverts commit 5488344de1.

* use completion instead of autoinfo

autoinfo is overlapped when using prompt

* recalculate_completion after inserting register

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

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

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2022-05-20 10:27:59 +09:00
Roland Kovacs 8958bf0a92
Implement view transpose (#2461)
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.
2022-05-20 10:25:04 +09:00
Andrey Tkachenko 62fd1f6999
Include macro attributes to impls, structs, enums, functions etc. textobjects (#2494) 2022-05-20 10:19:46 +09:00
Alexis Kalabura 301ed9b48f
deletion of lines affecting popup scrolling (#2497) 2022-05-20 10:18:19 +09:00
midnightexigent 8493b5fca6
Add tree-sitter ssh client config queries (#2498)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-05-18 14:49:50 -05:00
dependabot[bot] 29121a18b5
build(deps): bump signal-hook from 0.3.13 to 0.3.14 (#2485)
Bumps [signal-hook](https://github.com/vorner/signal-hook) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/vorner/signal-hook/releases)
- [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/signal-hook/compare/v0.3.13...v0.3.14)

---
updated-dependencies:
- dependency-name: signal-hook
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 14:45:43 +09:00