Commit graph

2563 commits

Author SHA1 Message Date
Slin Lee
3c79bf5117
Add LSP support for Solidity (#1848)
* Add LSP support for Solidity

This requires a recent version of Solidity 0.8.11+

* Add Solidity to docs

* Update the docs
2022-03-22 11:22:34 +09:00
dependabot[bot]
5d7fa57754
build(deps): bump lsp-types from 0.92.0 to 0.92.1 (#1852)
Bumps [lsp-types](https://github.com/gluon-lang/lsp-types) from 0.92.0 to 0.92.1.
- [Release notes](https://github.com/gluon-lang/lsp-types/releases)
- [Changelog](https://github.com/gluon-lang/lsp-types/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gluon-lang/lsp-types/compare/v0.92.0...v0.92.1)

---
updated-dependencies:
- dependency-name: lsp-types
  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-03-22 11:14:43 +09:00
dependabot[bot]
1de99cf46a
build(deps): bump which from 4.2.4 to 4.2.5 (#1851)
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-03-22 11:14:35 +09:00
dependabot[bot]
585347aca0
build(deps): bump actions/cache from 2.1.7 to 3 (#1850)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-22 11:14:14 +09:00
zetashift
7eb013c6fb
Initial basic Org markup support thanks to tree-sitter-org (#1845) 2022-03-20 17:14:30 -05:00
Blaž Hrastnik
a7ee9f74f7
No need for KeymapResult anymore since we can query .sticky() 2022-03-20 16:03:14 +09:00
Blaž Hrastnik
7909d6f05e
keymap: Store pending/sticky on the root level 2022-03-20 16:03:13 +09:00
Michael Davis
cfd992b151
update tree-sitter-git-commit (#1838)
changes:

- any text following a (scissors) is now contained in one (message)
    - this vastly improves performance on large verbose commits:
      no more slowness on huge commits
2022-03-19 14:43:13 +09:00
Ivan Tham
533cca7195
Improve bug report template (#1826) 2022-03-18 14:06:56 +09:00
Michael Davis
cb7b674f87
cleanup changelog markup (#1829) 2022-03-18 11:53:47 +09:00
Blaž Hrastnik
0b9620108d
ropey 1.4.1 fixes the issue 2022-03-17 12:03:15 +09:00
Blaž Hrastnik
2376fc875e
Temporarily turn on unicode-lines
Ropey's non-unicode lines impl has some bugs still
2022-03-17 10:53:50 +09:00
Blaž Hrastnik
16e2b2e36b
ropey 1.4.0 is out! 2022-03-17 09:29:47 +09:00
Blaž Hrastnik
f67e1ee172
Put esoteric line endings behind a feature flag 2022-03-17 09:29:47 +09:00
Blaž Hrastnik
b4a282fd36
Configure ropey to only use CR/CRLF line breaks by default
Fixes #1643
2022-03-17 09:29:47 +09:00
Blaž Hrastnik
59f05088b9
Optimize rendering by using Ropey::byte_slice
This avoids costly conversions via byte_to_char (which are then
reversed back into bytes internally in Ropey).

Reduces time spent in slice/byte_to_char from ~24% to ~5%.
2022-03-17 09:29:47 +09:00
Michael Davis
c6bd105484
fix enum definition for use-grammars selections (#1818)
See https://github.com/helix-editor/helix/discussions/1817

It looks like we need the enums to have the `only`/`except` fields in order
to deserialize correctly.
2022-03-16 18:26:22 +09:00
Blaž Hrastnik
20a132e36f
Update dependencies (crossterm 0.23.1)
Fixes #1654
2022-03-16 10:40:07 +09:00
Gokul Soumya
2b0835b295
Refactor :set to parse by deserializing values (#1799)
* Refactor :set to parse by deserializing values

* Implement serialize for idle_timeout config
2022-03-15 17:04:22 +09:00
ChrHorn
0902ede7b1
simplify Julia config (#1811)
* simplify Julia config

* remove trailing whitespace
2022-03-15 10:41:36 +09:00
dependabot[bot]
9400d74307
build(deps): bump tree-sitter from 0.20.5 to 0.20.6 (#1813)
Bumps [tree-sitter](https://github.com/tree-sitter/tree-sitter) from 0.20.5 to 0.20.6.
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.20.5...v0.20.6)

---
updated-dependencies:
- dependency-name: tree-sitter
  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-03-15 09:16:14 +09:00
dependabot[bot]
be2b452a39
build(deps): bump regex from 1.5.4 to 1.5.5 (#1812)
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.5.5.
- [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.4...1.5.5)

---
updated-dependencies:
- dependency-name: regex
  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-03-15 09:16:04 +09:00
Joe
c0dbd6dc3f
Add horizontal and vertical split scratch buffers (#1763)
Make subcommand name more descriptive

Fix vsplit completer

Run cargo xtask docgen
2022-03-14 11:47:52 +09:00
Gokul Soumya
85492e587c
Deploy docs for master separately (#1783)
* Deploy docs for master separately

* Output docs for every tagged release

* Update .github/workflows/gh-pages.yml

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-03-14 11:46:40 +09:00
Rohan Jain
1ac576f2b3
Handle panic on move within empty picker (#1786)
When the picker results output is empty, movement actions result in a panic:
```
thread 'main' panicked at 'attempt to calculate the remainder with a divisor of zero', helix-term/src/ui/picker.rs:420:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

This could be a no-op instead when the matches length is zero.
2022-03-14 11:46:23 +09:00
Ivan Tham
29d6a5a9b6
Perform extend line on every selection (#1804)
Currently `x` only affect the current selection, but this will make it
affect every selection so `x` can be more useful with multi-cursors.
2022-03-14 11:45:45 +09:00
Ivan Tham
3d76fa0b81
Match in visual use head not anchor (#1805)
Currently match is finding the match based on the anchor rather than the
head (cursor) so this behavior is rather unexpected when user is doing
a match but a different item was matched instead when the selection is
more than one character.
2022-03-14 11:45:22 +09:00
Michael Davis
43fc073cb3
ci: configure restore-keys for caches (#1806)
`restore-keys` is a configuration option for the actions/cache action
which specifies fallback behavior. The [docs][docs] say it best:

> When a cache miss occurs, the action searches for alternate keys
> called `restore-keys`.
>
> If you provide `restore-keys`, the `cache` action sequentially
> searches for any caches that match the list of `restore-keys`.
> ... If there are no exact matches, the action searches for partial
> matches of the restore keys. When the action finds a partial match,
> the most recent cache is restored to the `path` directory.

So this improves caching when there's a miss. For example if I edit
`.github/workflows/languages.toml`, the current behavior is that the
cache for downloaded grammars will miss and all of them will need to
be fetched again. With `restore-keys`, we use the latest published
cache as 'good enough', we'll fetch whatever grammars changed, and
then at the end we publish a new cache under the new hash.

[docs]: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
2022-03-14 11:44:51 +09:00
Blaž Hrastnik
c94c0d9f1c
minor: occurance -> occurrence 2022-03-14 11:43:52 +09:00
Blaž Hrastnik
610ce93600
fix #1808 2022-03-14 11:34:21 +09:00
Narazaki Shuji
05161aa85e
Fix: insert_register (#1751)
- set register name correctly
 - use autoinfo to display register contents
 - call `paste` with `Paste::Cursor`
2022-03-13 17:23:55 +09:00
Daniel S Poulin
e8cc7ace75
Update keymap documentation in the book (#1745)
* Add missing key bindings to keymap docs

* Add a note about readline bindings in insert mode

* Rewrite section on selection extend mode

We seem to have settled on this model, so no reason to say in the
docs that this is experimental. I also don't think we have any
movements that don't obey extend mode left.

* Fix table formatting

* Fix missing command for command palette binding

* Fix missed capitalization of descriptions in keymap docs

* Be consistent with multiple bindings in keymap docs

* Fix differently marked up commands in keymap docs

* Make special key capitalization consistent

Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>

* Fix extra space in docs

Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>

* A few more capitalizations of special keys in keymap docs

* Move a selection manipulation key map to the appropriate section in docs

* Move minor mode entry bindings to the minor modes section of keymap docs

* Add note about default register used in search commands in keymap docs

* Fix formatting of rebased addition

* Remove note about potential removal of select mode

It's been decided since to keep it

Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>
2022-03-13 17:12:13 +09:00
Philipp Mildenberger
6fdf5d0920
C# highlighting improvements (#1795) 2022-03-12 12:06:56 -06:00
nibon7
43997f1936
Use ^ and $ to match the beginning and end of a line when searching (#1790)
Fixes #1737

Signed-off-by: nibon7 <nibon7@163.com>
2022-03-12 16:05:50 +09:00
Michael Davis
61828ea519
use 'cargo test --workspace' in CI (#1793)
79caa7b72b setup helix-term as the
default workspace member (which I believe is done to avoid building
xtask on every compile). This changes the behavior of 'cargo test'
though so that it only runs helix-term tests by default. To run all
tests, we switch to 'cargo test --workspace'.
2022-03-12 16:04:52 +09:00
Aaron Housh
0712eb3e3b
Add csharp lsp support (#1788)
* add csharp lsp support

* remove hostPID

* update docs
2022-03-12 09:19:31 +09:00
Rohan Jain
cf8f59ddd0
theme: Use distinct colors for match pair and cursor for gruvbox (#1791) 2022-03-11 17:49:21 +05:30
Michael Davis
98851d1594
remove stray 'println!' from grammar building function (#1785) 2022-03-11 12:28:34 +09:00
Michael Davis
37fed4de80
fix '--grammar' flag in help text (#1784) 2022-03-10 22:33:51 +09:00
Blaž Hrastnik
5eb9a0167f
Remove remaining helix-syntax leftovers 2022-03-10 17:46:29 +09:00
Michael Davis
94203a97e5 update revision for tree-sitter-rescript
Looks like this was rebased a few hours ago and now the 789a171
revision no longer exists.
2022-03-10 17:31:57 +09:00
Michael Davis
e01c53551d flake: use builtins.fetchTree to shallow-clone grammar repos
Here we perform a shallow fetch using builtins.fetchTree. In order
to make this work, we need to specify the `ref' for any repository
that doesn't have `master' as its default branch (I'm not sure why
this limitation exists since we don't need this when performing
the shallow fetch in `--grammar build')

This `ref' field is ignored by helix, so I have left it undocumented
for now, but I could be open to documenting it.
2022-03-10 17:31:57 +09:00
Michael Davis
7044d7d804 rename '--fetch/build-grammars' flags into '--grammar fetch/build'
The old flags were a bit long. --grammar is also aliased to -g to make
it even easier.
2022-03-10 17:31:57 +09:00
Michael Davis
37520f46ae fetch and build grammars with nix in flake
This commit replaces the out-of-date builder in the flake which relied
on submodules for fetching and the compiler for building. Now we
disable fetching and building explicitly with the environment variable
and then use builtins.fetchGit and a derivation mostly derived from
upstream to compile the grammars.

Anecdotally, this is still quite slow as builtins.fetchGit does not
seem to do shallow clones. I'm not sure I see a way around it though
without recording sha256s, which seems cumbersome.
2022-03-10 17:31:57 +09:00
Michael Davis
b157c5a8a4 fetch and compile tree-sitter grammars in helix-term build
This restores much of the behavior that existed before this PR:
helix will build the grammars when compiling. The difference is that
now fetching is also done during the build phase and is done much
more quickly - both shallow and in parallel.
2022-03-10 17:31:57 +09:00
Michael Davis
6fcab90d16 only fetch git-sourced grammars
This is a bit of a micro-optimization: in the current setup we waste
a thread in the pool for a local grammar only to println! a message
saying we're skipping fetching because it's a local grammar.
2022-03-10 17:31:57 +09:00
Skyler Hawthorne
a229f405cc shallow clone 2022-03-10 17:31:57 +09:00
Skyler Hawthorne
31b7596f09 fix context in error 2022-03-10 17:31:57 +09:00
Michael Davis
4fc991fdec migrate grammar fetching/building code into helix-loader crate
This is a rather large refactor that moves most of the code for
loading, fetching, and building grammars into a new helix-loader
module. This works well with the [[grammars]] syntax for
languages.toml defined earlier: we only have to depend on the types
for GrammarConfiguration in helix-loader and can leave all the
[[language]] entries for helix-core.
2022-03-10 17:31:57 +09:00
Michael Davis
08ee949dcb add 'use-grammars' to languages.toml
The vision with 'use-grammars' is to allow the long-requested feature
of being able to declare your own set of grammars that you would like.
A simple schema with only/except grammar names controls the list
of grammars that is fetched and built. It does not (yet) control which
grammars may be loaded at runtime if they already exist.
2022-03-10 17:31:57 +09:00