etienne-k
8d28f9543c
feat(statusline): integrate changes from #2676 after rebasing
2022-07-05 22:04:52 +02:00
etienne-k
28fa36f46f
chore(statusline): slight adjustment in the configuration documentation
2022-07-05 21:40:34 +02:00
etienne-k
aa8c467f37
revert(statusline): revert regression introduced by c0a1870
2022-07-05 21:40:34 +02:00
etienne-k
42654fdc57
chore(statusline): adjust documentation following the config field refactoring
2022-07-05 21:40:34 +02:00
etienne-k
5cb4e76432
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`.
2022-07-05 21:40:34 +02:00
etienne-k
2dc4d343ae
chore(statusline): Correct and add documentation
2022-07-05 21:40:34 +02:00
etienne-k
36535e74e9
chore(statusline): Describe the statusline configurability in the book
2022-07-05 21:40:34 +02:00
etienne-k
07b284509d
fix(statusline): avoid an overflow when calculating the maximal center width
2022-07-05 21:40:34 +02:00
etienne-k
18435dc4c5
refactor(statusline): ensure the match is exhaustive
2022-07-05 21:40:34 +02:00
etienne-k
f3513a6526
refactor(statusline): rename `buffer` into `parts`
2022-07-05 21:40:34 +02:00
etienne-k
1e9543953d
refactor(statusline): make clippy happy again
2022-07-05 21:40:34 +02:00
etienne-k
1ccd1deafe
fix(statusline): avoid rendering the left elements twice
2022-07-05 21:40:34 +02:00
etienne-k
82120df409
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.
2022-07-05 21:40:34 +02:00
etienne-k
5ecd26fb10
refactor(statusline): make clippy happy
2022-07-05 21:39:29 +02:00
etienne-k
90db789577
feat(statusline): make the status line configurable
2022-07-05 21:35:51 +02:00
etienne-k
c01e5aa822
refactor(statusline): implement render_diagnostics()
...
This avoid cluttering the render() function and will simplify
configurability.
2022-07-05 21:32:06 +02:00
etienne-k
1b50fbb1eb
refactor(statusline): Append elements using a consistent API
...
This is a preparation for the configurability which is about to be
implemented.
2022-07-05 21:30:54 +02:00
etienne-k
73d6f34861
refactor(statusline): split the statusline implementation into different functions
2022-07-05 21:30:52 +02:00
etienne-k
bf691a1a02
refactor(statusline): move the statusline implementation into an own struct
2022-07-05 21:27:34 +02:00
etienne-k
da5a886cb0
feat(statusline): add the file type (language id) to the status line
2022-07-05 21:16:41 +02: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 `Option`s 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
川田 恵氏 (Kawada Keishi a.k.a megumish)
244825b9e1
Add runtime `xcopy` command on powershell in docs ( #2958 )
2022-07-04 12:32:46 -05:00
0rphee
e58d28a972
Add Haskell roots ( #2954 )
2022-07-03 22:44:17 -05:00
rsteube
4c30a3609a
languages: added elvish ( #2948 )
2022-07-03 16:19:12 -05:00
ChrHorn
9f43dbc45d
Highlight whole row in picker menus ( #2939 )
2022-07-02 17:29:46 +05:30
Gokul Soumya
6e2aaed5c2
Reuse menu::Item trait in picker ( #2814 )
...
* Refactor menu::Item to accomodate external state
Will be useful for storing editor state when reused by pickers.
* Add some type aliases for readability
* Reuse menu::Item trait in picker
This opens the way for merging the menu and picker code in the
future, since a picker is essentially a menu + prompt. More
excitingly, this change will also allow aligning items in the
picker, which would be useful (for example) in the command palette
for aligning the descriptions to the left and the keybinds to
the right in two separate columns.
The item formatting of each picker has been kept as is, even though
there is room for improvement now that we can format the data into
columns, since that is better tackled in a separate PR.
* Rename menu::Item::EditorData to Data
* Call and inline filter_text() in sort_text() completion
* Rename diagnostic picker's Item::Data
2022-07-02 13:21:27 +02:00
nosa
290b3ebbbe
Update night_owl for cursorline ( #2938 )
2022-07-01 14:09:59 -05:00
Michael Jones
1fde77ad9d
Sort themes, language & files by score & then name ( #2675 )
...
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-07-01 11:06:14 -05:00
ramojus
cc3aded185
add statusline mode colors to meliora theme ( #2933 )
2022-07-01 21:24:33 +09:00
Blaž Hrastnik
a1c1abca2b
fix CI
2022-07-01 21:24:10 +09:00
nosa
8a19196ad5
Updated for #2676 , but I took the opportunity to do some other changes. ( #2929 )
...
- Misspelling of 'modifiers' for markdown.heading.1 and 2.
- Errors are now just underlined instead of in red.
- Diagnostics are dimmed, as well as whitespace.
- Add constant.builtin.
2022-07-01 19:18:39 +09:00
Blaž Hrastnik
9ae70cc410
Disable tree-sitter python indents, use fallback for now
...
There's been a lot of complaints about the state of python indentation
and the fallback actually works better until the solution proposed
in https://github.com/helix-editor/helix/issues/763#issuecomment-1137894973=
is implemented.
2022-07-01 19:17:19 +09:00
Michael Jones
d8abd1eaf3
Sort themes, language & files by score & then name ( #2675 )
...
* Sort themes by score & then name
Previously the themes were appearing unordered after typing ':theme '.
This sorts them first by fuzzy score and then by name so that they
generally appear in a more ordered fashion in the initial list.
The sort by name does not really pay off when there is a score so an
alternative approach would be to sort by name if there is string to
fuzzy match against and otherwise sort by score.
I've lowercased the names as that avoids lower case & upper case letters
being sorted into separate groups. There might be a preferable approach
to that though.
* Sort language & files by score then name
And change to use sort_unstable_by instead of sort_unstable_by_key as it
allows us to avoid some allocations.
I don't fully understand the flow of the 'filename_impl' function but
this seems to deliver the desired results.
* Remove unnecessary reference
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-07-01 18:33:52 +09:00