Commit graph

3051 commits

Author SHA1 Message Date
Ivan Tham
e8214fb1e6
Make gutters padding optional (#2996)
If all gutters are removed, there are still an extra one padding, would be nice
to remove that to save some space.
2022-07-18 10:13:47 +09:00
Bob
2a8d38c27b
support toggling pickers' preview panel (#3021)
* support toggling pickers' preview panel

* add doc for toggling preview
2022-07-18 10:11:25 +09:00
Mr. E
dbf68e0370
Customizable/configurable status line (#2434)
* feat(statusline): add the file type (language id) to the status line

* refactor(statusline): move the statusline implementation into an own struct

* refactor(statusline): split the statusline implementation into different functions

* refactor(statusline): Append elements using a consistent API

This is a preparation for the configurability which is about to be
implemented.

* refactor(statusline): implement render_diagnostics()

This avoid cluttering the render() function and will simplify
configurability.

* feat(statusline): make the status line configurable

* refactor(statusline): make clippy happy

* refactor(statusline): avoid intermediate StatusLineObject

Use a more functional approach to obtain render functions and write to
the buffers, and avoid an intermediate StatusLineElement object.

* fix(statusline): avoid rendering the left elements twice

* refactor(statusline): make clippy happy again

* refactor(statusline): rename `buffer` into `parts`

* refactor(statusline): ensure the match is exhaustive

* fix(statusline): avoid an overflow when calculating the maximal center width

* chore(statusline): Describe the statusline configurability in the book

* chore(statusline): Correct and add documentation

* refactor(statusline): refactor some code following the code review

Avoid very small helper functions for the diagnositcs and inline them
instead.
Rename the config field `status_line` to `statusline` to remain
consistent with `bufferline`.

* chore(statusline): adjust documentation following the config field refactoring

* revert(statusline): revert regression introduced by c0a1870

* chore(statusline): slight adjustment in the configuration documentation

* feat(statusline): integrate changes from #2676 after rebasing

* refactor(statusline): remove the StatusLine struct

Because none of the functions need `Self` and all of them are in an own
file, there is no explicit need for the struct.

* fix(statusline): restore the configurability of color modes

The configuration was ignored after reintegrating the changes of #2676
in 8d28f95.

* fix(statusline): remove the spinner padding

* refactor(statusline): remove unnecessary format!()
2022-07-18 09:57:01 +09:00
Joe
43761d426c
Remove .git extension from SCSS tree-sitter repo url (#3089) 2022-07-17 21:41:05 +05:30
Joe
0c9594e41e
Add SCSS language support (#3074) 2022-07-17 17:55:20 +08:00
Alex Kim
bcacc703d7
fix wrong value for cursor shape config in the docs (#3081) 2022-07-15 20:21:34 +05:30
Benoît Cortier
333ab27837
feat(term): uniformize word-wise movement and deletion (#2500)
Ctrl-based shortcuts are common in numerous applications.

This change:
- Adds Ctrl+{Left/Right/Backspace/Delete} for word-wise movement/deletion in prompt, picker, …
- Removes Alt-Left and Alt-Right in prompt, picker, …
- Adds Alt-Delete in insert mode for forward word deletion

In some terminals, Alt-Backspace might not work because it is ambigous.
See: https://github.com/helix-editor/helix/pull/2193#issuecomment-1105042501
Hence, Alt alternative is not removed.
2022-07-15 21:59:00 +08:00
Bob
8681fb6d9e
respect count in treesitter movement (#3058) 2022-07-14 08:08:09 +08:00
Bob
4418924ec3
respect count for selecting next/previous match (#3056) 2022-07-13 23:01:42 +08:00
Bob
e6a6e251c5
respect count for repeating motion (#3057) 2022-07-13 23:00:24 +08:00
Termina94
3cced1e3c8
Add cursorline colour to darkplus theme (#3054)
Co-authored-by: Dean Revell <revell@gmail.com>
2022-07-12 15:18:41 -05:00
0rphee
7951ebfd4d
[Theme] Noctis (#3043) 2022-07-12 12:42:17 -05:00
Mateusz S. Szczygieł
5f69beb87f
Add textobjects.scm to GLSL (#3051) 2022-07-12 10:13:57 -05:00
Philipp Mildenberger
e97b8607c1
Added ungrammar language support (#3048) 2022-07-12 10:06:53 -05:00
dependabot[bot]
fb62569785
build(deps): bump regex from 1.5.5 to 1.6.0 (#3041)
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.5 to 1.6.0.
- [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.6.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-12 11:17:24 +09:00
dependabot[bot]
930f98053e
build(deps): bump serde from 1.0.138 to 1.0.139 (#3040)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-12 07:44:00 +05:30
Austen LeBeau
0cb0c30618
add fortran language (#3025) 2022-07-10 11:27:44 -05:00
Slug
e109022bfd
fix: error that caused usize to overflow (#3024)
* fix: error that caused usize to overflow

* update: changed check_sub to saturating_sub
2022-07-10 10:54:06 +02:00
Timothy DeHerrera
718c3baebe
nix: pass makeWrapperArgs to wrapProgram (#3003) 2022-07-09 11:17:44 -05:00
Timothy DeHerrera
fefa4d8c59
nix flake: make the binary cache "just work" (#2999) 2022-07-09 11:09:37 -05:00
Amit Beka
6100b1ba08
book: add wiki links to the title page and install page (#3017)
Co-authored-by: amitbeka <--->
2022-07-09 11:08:47 -05:00
Gokul Soumya
21b66ba068
lsp: Add workspace/applyEdit to client capabilites (#3012)
The functionality already existed, but the capability wasn't being
reported correctly to the server:

230ba264bf/helix-term/src/application.rs (L716-L728)
2022-07-09 07:31:15 +09:00
Gokul Soumya
b7a3531b8f
theme(onedark): Remove bg for window separator (#3011) 2022-07-08 15:24:09 -05:00
Jake Langford
230ba264bf
Introduce storage highlighting for typescript/javascript (#2961) 2022-07-06 08:54:07 -05:00
Ivan Tham
e35abe38f3
Remove broken ledger tag highlight (#2988) 2022-07-06 07:35:36 -05:00
Gokul Soumya
af35c62407 Show file path only in workspace diagnostic picker 2022-07-06 13:06:46 +02:00
Gokul Soumya
a43bcc8765 Display error code only if not none 2022-07-06 13:06:46 +02:00
Gokul Soumya
0c104685c0 Sub sort diagnostics by line number 2022-07-06 13:06:46 +02:00
Gokul Soumya
2c37e25cb5 Display diagnostic text before code in picker 2022-07-06 13:06:46 +02:00
Gokul Soumya
c4e022971d Remove source from diagnostic picker display
It is usually the name of the LSP and doesn't add much
useful information.
2022-07-06 13:06:46 +02:00
Erin van der Veen
e0cf19c612
Update tree-sitter-nickel (#2987) 2022-07-06 13:05:51 +02:00
A-Walrus
1378b911b6
Fix some typos (#2978) 2022-07-05 21:49:54 -05:00
Ivan Tham
b612211070
Update tree-sitter-ledger (#2936) 2022-07-05 09:12:28 -05:00
Michael Davis
aacd0c8aa5
Update TSQ queries (#2960)
A few changes to make TSQ highlights better:

* A parsing error has been fixed in the grammar itself
    * Previously tree-sitter-tsq did not parse the variables
      in predicates like `(#set! injection.language "javascript")`
* Theme nodes as `tag`
    * The newly added node to the parser (from the above fix) is
      `variable` which takes over the `variable` capture from nodes
* Highlight known predicates as `function` and unsupported
  predicates as `error`
    * This may help when translating queries from nvim-treesitter.
      For example `#any-of?` is a common one used in nvim-treesitter
      queries but not implemented in Helix or tree-sitter-cli.
* Inject tree-sitter-regex into `#match?` predicates
2022-07-05 20:01:05 +09:00
Matthew Toohey
d78354c537
add language idris (#2971) 2022-07-05 20:00:38 +09:00
Joe
b26e7e2e8f
Add live preview to theme picker (#1798)
* Add theme picker with live preview

* Add live theme preview to :theme command

* cargo fmt

* Fix clippy warnings

* Remove picker variant

* Remove unused import

* Cleanup

* Change current_theme to last_theme

* Fix accidental comment flash deletion

* Typo

* Remove theme cache

* Add some comments

* Refactor some theme handling

TIL flatmap on Option is called  and_then

* Remove unnecessary renames

* Constrain last_theme theme preview lifecycle

* Switch to bitflag implementation

* Better handling of last_theme

* Sort theme names

* Better memory juggling

* Missed a branch

* Remove name from theme, switch bitand to &

* cargo fmt

* Update helix-view/src/editor.rs

* Switch boolean to enum

* Remove bitflag impl

* cargo fmt

* Remove un-needed type arg

* cargo fmt
2022-07-05 19:44:16 +09:00
Michael Davis
85411bed83 DAP: Make cwd required in RunTerminalArguments
The spec has `cwd` in `RunInTerminalRequestArguments` as non-optional:
https://microsoft.github.io/debug-adapter-protocol/specification#Reverse_Requests_RunInTerminal
2022-07-05 12:34:03 +02:00
Michael Davis
44f596334a DAP: Skip serializing Options when None
DAP follows the same strict TypeScript interface syntax as LSP
which states:

> The document uses TypeScript interfaces in strict mode to describe
> these. This means for example that a `null` value has to be explicitly
> listed and that a mandatory property must be listed even if a falsify
> value might exist.

So we have to skip serializing any fields that end in `?` instead
of passing `null`.
2022-07-05 12:34:03 +02:00
Jens Getreu
936ed3a226 Add Autumn night theme
Under some light conditions, one prefers a high contrast theme.
2022-07-05 12:33:37 +02:00
Jens Getreu
2e709859c4 Autumn theme: slightly adjust contrast 2022-07-05 12:33:37 +02:00
dependabot[bot]
f3e8b0f34b
build(deps): bump smallvec from 1.8.1 to 1.9.0 (#2976)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.8.1...v1.9.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-05 19:31:01 +09:00
dependabot[bot]
f3467399b7
build(deps): bump crossterm from 0.23.0 to 0.24.0 (#2968)
Bumps [crossterm](https://github.com/crossterm-rs/crossterm) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/crossterm-rs/crossterm/releases)
- [Changelog](https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossterm-rs/crossterm/compare/0.23...0.24)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-05 19:30:33 +09:00
dependabot[bot]
ba255e3e3e
build(deps): bump serde_json from 1.0.81 to 1.0.82 (#2966)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.81...v1.0.82)

---
updated-dependencies:
- dependency-name: serde_json
  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-07-05 19:25:56 +09:00
dependabot[bot]
1fc8cbeb68
build(deps): bump log from 0.4.14 to 0.4.17 (#2965)
Bumps [log](https://github.com/rust-lang/log) from 0.4.14 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.14...0.4.17)

---
updated-dependencies:
- dependency-name: log
  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-07-05 19:24:37 +09:00
dependabot[bot]
b98567f248
build(deps): bump which from 4.2.4 to 4.2.5 (#2964)
Bumps [which](https://github.com/harryfei/which-rs) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Commits](https://github.com/harryfei/which-rs/compare/4.2.4...4.2.5)

---
updated-dependencies:
- dependency-name: which
  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-07-05 19:24:07 +09:00
dependabot[bot]
700431d665
build(deps): bump encoding_rs from 0.8.30 to 0.8.31 (#2963)
Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs) from 0.8.30 to 0.8.31.
- [Release notes](https://github.com/hsivonen/encoding_rs/releases)
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.30...v0.8.31)

---
updated-dependencies:
- dependency-name: encoding_rs
  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-07-05 19:19:27 +09:00
dependabot[bot]
c88d736d5c
build(deps): bump once_cell from 1.12.0 to 1.13.0 (#2969)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.12.0 to 1.13.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.12.0...v1.13.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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-05 11:04:03 +08:00
dependabot[bot]
a679efa8ce
build(deps): bump serde from 1.0.136 to 1.0.138 (#2967)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.136 to 1.0.138.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.136...v1.0.138)

---
updated-dependencies:
- dependency-name: serde
  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-07-05 08:20:12 +05:30
Skyler Hawthorne
f392e35439
feat(theme): solarized: add cursorline, ruler, indent guide (#2962) 2022-07-04 18:06:44 -05:00
A-Walrus
2ac1de305e
Fix backwards selection duplication widening bug (#2945)
* Fix backwards selection duplication widening bug

* Add integration tests

* Make tests line-ending agnostic

Make tests line-ending agnostic

Use indoc to fix tests

Fix line-ending on test input
2022-07-05 07:51:15 +09:00