Commit graph

2707 commits

Author SHA1 Message Date
Triton171
6bb2298391
Fix an issue that caused an empty indentation query to be used instead of using the fallback method of copying the indentation from the current line. (#1908)
Co-authored-by: Triton171 <triton0171@gmail.com>
2022-04-01 11:27:06 +09:00
Blaž Hrastnik
8adf0c1b3a
lsp: Implement support for workspace_folders (currently just one)
Refs #1898
2022-04-01 11:20:41 +09:00
Blaž Hrastnik
236c6b7707
fix: copy_selections was broken with selections (not cursors) 2022-04-01 10:11:44 +09:00
Marcin Puc
924462edda
Add install instructions for Void Linux (#1911) 2022-03-31 14:55:55 -05:00
Blaž Hrastnik
84e799f0e4
fix: Some LSPs still want rootPath, so provide it
Refs #1898
2022-03-31 17:45:51 +09:00
Rohan Jain
5d61631507
Resolve conflicts between prompt/picker bindings (#1792)
Currently, the picker's re-using a few bindings which are also present
in the prompt. This causes some editing behaviours to not function on
the picker.

**Ctrl + k** and **Ctrl + j**
This should kill till the end of the line on prompt, but is overridden
by the picker for scrolling. Since there are redundancies (`Ctrl + p`,
`Ctrl + n`), we can remove it from picker.

**Ctrl + f** and **Ctrl + b**
This are used by the prompt for back/forward movement. We could modify
it to be Ctrl + d and Ctrl + u, to match the `vim` behaviour.
2022-03-31 16:51:11 +09:00
Michael Davis
ef91b6500c
set VERSION file to dev (#1883)
* set VERSION file to dev

* bump to 22.05-dev
2022-03-31 16:31:38 +09:00
Blaž Hrastnik
d15c875214
Add a TODO for the future 2022-03-31 15:59:09 +09:00
Blaž Hrastnik
ab7885e934
fix: copy_selection needs to account for to() being exclusive
Fixes #1367
Fixes #1590
2022-03-31 15:59:09 +09:00
Max
4eed4c26e9
Use fromTOML on Nix >= 2.6.0 (#1892) 2022-03-30 11:28:05 -05:00
Triton171
58758fee61
Indentation rework (#1562)
* WIP: Rework indentation system

* Add ComplexNode for context-aware indentation (including a proof of concept for assignment statements in rust)

* Add switch statements to Go indents.toml (fixes the second half of issue #1523)
Remove commented-out code

* Migrate all existing indentation queries.
Add more options to ComplexNode and use them to improve C/C++ indentation.

* Add comments & replace Option<Vec<_>> with Vec<_>

* Add more detailed documentation for tree-sitter indentation

* Improve code style in indent.rs

* Use tree-sitter queries for indentation instead of TOML config.
Migrate existing indent queries.

* Add documentation for the new indent queries.
Change xtask docgen to look for indents.scm instead of indents.toml

* Improve code style in indent.rs.
Fix an issue with the rust indent query.

* Move indentation test sources to separate files.
Add `#not-kind-eq?`, `#same-line?` and `#not-same-line` custom predicates.
Improve the rust and c indent queries.

* Fix indent test.
Improve rust indent queries.

* Move indentation tests to integration test folder.

* Improve code style in indent.rs.
Reuse tree-sitter cursors for indentation queries.

* Migrate HCL indent query

* Replace custom loading in indent tests with a designated languages.toml

* Update indent query file name for --health command.

* Fix single-space formatting in indent queries.

* Add explanation for unwrapping.

Co-authored-by: Triton171 <triton0171@gmail.com>
2022-03-31 00:08:07 +09:00
Blaž Hrastnik
c18de0e8f0
fix: Don't rely on FormattingOptions::default()
Refs #1884
2022-03-30 15:19:21 +09:00
Nirmal Patel
8702aaaefc
Handle BrokenPipe when piping hx --health through head (#1876)
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2022-03-30 10:39:25 +05:30
Michael Davis
7cd6050235 add tree-sitter-gleam 2022-03-30 13:24:53 +09:00
Michael Davis
1819478940 update tree-sitter-elixir
news:

- tree-sitter-elixir now powers Elixir syntax highlighting on github.com
- GitHub now supports code-navigation for Elixir repos via
  tree-sitter-elixir

changes:

- modules now use the `@module` highlight, which was added upstream to
  tree-sitter
    - it seems appropriate to use `@namespace` to follow helix convention
- added nullary range operator (e.g. `Enum.to_list(..) == []`), a new syntax
  for elixir 1.14
- a fix for stab clause nodes mis-highlighting when the right hand side of
  the stab clause contained multiple simple expressions
2022-03-30 13:24:53 +09:00
Michael Davis
e2a50711d5 update tree-sitter-erlang
changes:

- typed fields within records which do not declare a default
  value are now correctly highlighted as record fields
- the EEP49 'maybe' form is now parsed
- fixes for highlights for 'begin' and 'after' tokens
2022-03-30 13:24:53 +09:00
Marcin Puc
f2dd3d4469
Avoid using the format ident Rust feature (#1881) 2022-03-30 09:08:30 +09:00
Michael Davis
c8082a1133
update screenshot (#1879) 2022-03-30 00:16:57 +09:00
Michael Davis
d4e45fd479
changelog notes for 22.03 (#1830) 2022-03-29 22:15:00 +09:00
Blaž Hrastnik
6c276d7868
Revert "Resize is not necessary inside SIGCONT, handled by render()"
Fixes #1877

This reverts commit 85264a861a.
2022-03-29 22:08:19 +09:00
Michael Davis
838cfcc7cd
publish a source tarball with version and grammars (#1875)
* publish a source tarball with version and grammars

* include_str! the release version from a VERSION file

* remove setting of .version file from tag

don't need this anymore since the file is checked into source
2022-03-29 14:34:19 +09:00
dependabot[bot]
6e7c287371
build(deps): bump log from 0.4.14 to 0.4.16 (#1874)
Bumps [log](https://github.com/rust-lang/log) from 0.4.14 to 0.4.16.
- [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/commits)

---
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-03-29 09:07:17 +09:00
dependabot[bot]
3af0a7f3cb
build(deps): bump smartstring from 1.0.0 to 1.0.1 (#1873)
Bumps [smartstring](https://github.com/bodil/smartstring) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/bodil/smartstring/releases)
- [Changelog](https://github.com/bodil/smartstring/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bodil/smartstring/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: smartstring
  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-29 09:07:07 +09:00
Max
b63b37d5a0
grammars.nix: use github type for fetchTree where possible (#1872) 2022-03-28 16:50:18 -05:00
Blaž Hrastnik
511f37c736
clipboard: fix import on macOS 2022-03-28 11:08:38 +09:00
Blaž Hrastnik
33510d60f4
cargo fmt 2022-03-28 11:05:26 +09:00
Blaž Hrastnik
a516f5881b
Address clippy lint 2022-03-28 11:03:42 +09:00
Blaž Hrastnik
8611c5b84e
Refactor clipboard to make it easier to feature gate std::process 2022-03-28 11:02:56 +09:00
Blaž Hrastnik
4940db3e2d
Make truncate_start a builder method instead 2022-03-28 11:02:49 +09:00
Blaž Hrastnik
20cf75dfa1
Strip some more params 2022-03-28 11:02:39 +09:00
Blaž Hrastnik
1849ad1fde
Clean up global search 2022-03-28 11:02:32 +09:00
Blaž Hrastnik
92bb312f0f
Make line a private property 2022-03-28 11:02:26 +09:00
Blaž Hrastnik
96a4eb8483
Remove more push_layer calls 2022-03-28 11:02:21 +09:00
Blaž Hrastnik
5c162ef995
Make regex_prompt directly call cx.push_layer 2022-03-28 11:02:13 +09:00
Blaž Hrastnik
83b3272166
This doesn't need to be mut 2022-03-28 11:02:07 +09:00
Blaž Hrastnik
9a6ee88e66
Split off dap event handlers into helix-view to allow reuse 2022-03-28 11:01:59 +09:00
Blaž Hrastnik
85264a861a
Resize is not necessary inside SIGCONT, handled by render() 2022-03-28 11:01:53 +09:00
Gokul Soumya
7b3a3d562c
Move top level lsp config to editor.lsp (#1868)
* Move top level lsp config to editor.lsp

This is mainly done to accomodate the new lsp.signature-help config
option that will be introduced in https://github.com/helix-editor/helix/pull/1755
which will have to be accessed by commands. The top level config
struct is split and moved to different places, making the relocation
necessary

* Revert rebase slipup
2022-03-28 10:11:52 +09:00
Joe
bee05dd32a
Add refresh-config and open-config command (#1803)
* Add refresh-config and open-config command

* clippy

* Use dynamic dispatch for editor config

* Refactor Result::Ok to Ok

* Remove unused import

* cargo fmt

* Modify config error handling

* cargo xtask docgen

* impl display for ConfigLoadError

* cargo fmt

* Put keymaps behind dyn access, refactor config.load()

* Update command names

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Switch to unbounded_channel

* Remove --edit-config command

* Update configuration docs

* Revert "Put keymaps behind dyn access", too hard

This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79.

* Add refresh for keys

* Refactor default_keymaps, fix config default, add test

* swap -> store, remove unneeded clone

* cargo fmt

* Rename default_keymaps to default

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-03-25 18:05:20 +09:00
Narazaki Shuji
309f2c2c8e
Revise the color for ui.cursor.match (#1862)
- bogster.toml
 - solarized_dark.toml
 - solarized_light.toml
 - spacebones_light.toml
2022-03-25 15:57:25 +09:00
Jared Ramirez
22ba668fad
Fix Rescript hightlights query (#1863) 2022-03-23 14:03:58 -05:00
Blaž Hrastnik
919ac7ba15
Handle RPC returning an invalid call 2022-03-23 16:16:19 +09:00
Slin Lee
3e78b8fdad
Add syntax highlighting for Solidity (#1854) 2022-03-22 11:38:49 -05:00
Slin Lee
79477ec6e7
Fix typo in query parsing error message (#1856) 2022-03-22 16:22:57 +05:30
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