Commit Graph

2622 Commits (9d095e0fdc78ad42c033193dd980b6218c9484d6)
 

Author SHA1 Message Date
Ivan Tham 45b76db506 Change test mark from ^@ to #[|]# 2 years ago
Ivan Tham 8350ee9a0e Add paragraph textobject
Change parameter/argument key from p to a since paragraph only have p
but parameter are also called arguments sometimes and a is not used.
2 years ago
Ivan Tham e2a6e33b98 Add next paragraph 2 years ago
Ivan Tham 8b02bf2ea8 Add (prev) paragraph motion
Also improved testing facility.

Fix #1580
2 years ago
Lauri Gustafsson e4561d1dde
Add texlab language server for latex (#1922) 2 years ago
Simon H 36d1df71fc
Added checkmarks to health.rs output, Resolves #1894 (#1918)
* Added checkmarks to health.rs output

* replaced found/not found text with checkmarks
2 years ago
Michael Davis ffdc2f1793
separate JSX queries from javascript (#1921)
It looks like a24fb17b2a (and
855e438f55) broke the typescript
highlights because typescript

    ; inherits: javascript

but it doesn't have those named nodes in its grammar.

So instead we can separate out JSX into its own language and copy
over everything from javascript and supplement it with the new
JSX highlights. Luckily there isn't too much duplication, just the
language configuration parts - we can re-use the parser with the
languages.toml `grammar` key and most of the queries with `inherits`.
2 years ago
joezak11 deb7ee6595
Update bash tree sitter (#1917) 2 years ago
jeepee 85c23b31de
Avoid unnecessary clone when formatting error (#1903)
Instead of first cloning the query and then allocating again to format
the error, format the error using a reference to the query.
2 years ago
jeepee 8165febe23
Fix start-position of next search (#1904)
The search implementation would start searching at the next grapheme
boundary after the previous selection. In case the next occurence of the
needle is immediately after the current selection, this occurence would
not be found (without wraparound) because the first grapheme is skipped.

The correct approach is to use the ensure_grapheme_boundary functions instead
of using the functions that skip unconditionally to the next grapheme.
2 years ago
antoyo 47fe739757
Jump to the next number on the line before incrementing (#1778)
* Jump to the next number on the line before incrementing

Partially fix #1645

* Refactor to avoid duplicating find_nth_next
2 years ago
Blaž Hrastnik 855e438f55
jsx: Add special highlighting to component names 2 years ago
Blaž Hrastnik a24fb17b2a
Add JSX highlighting queries 2 years ago
Amine Hmida d0ff2ffd89
Add support for jsx (#1906)
* Add support for javascriptreact language

* Add support for jsx files
2 years ago
جاد a9635659f7
Reintroduce win32yank as a clipboard provider on Linux for WSL2 + Windows 10 (#1912)
* feat(clipboard): reintroduce win32yank for wsl2 linux

* refactor(clipboard): adjust win32yank position to not interrupt wayland/x11

Co-authored-by: jiqb <gthbji@ml1.net>
2 years ago
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>
2 years ago
Blaž Hrastnik 8adf0c1b3a
lsp: Implement support for workspace_folders (currently just one)
Refs #1898
2 years ago
Blaž Hrastnik 236c6b7707
fix: copy_selections was broken with selections (not cursors) 2 years ago
Marcin Puc 924462edda
Add install instructions for Void Linux (#1911) 2 years ago
Blaž Hrastnik 84e799f0e4
fix: Some LSPs still want rootPath, so provide it
Refs #1898
2 years ago
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.
2 years ago
Michael Davis ef91b6500c
set VERSION file to dev (#1883)
* set VERSION file to dev

* bump to 22.05-dev
2 years ago
Blaž Hrastnik d15c875214
Add a TODO for the future 2 years ago
Blaž Hrastnik ab7885e934
fix: copy_selection needs to account for to() being exclusive
Fixes #1367
Fixes #1590
2 years ago
Max 4eed4c26e9
Use fromTOML on Nix >= 2.6.0 (#1892) 2 years ago
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>
2 years ago
Blaž Hrastnik c18de0e8f0
fix: Don't rely on FormattingOptions::default()
Refs #1884
2 years ago
Nirmal Patel 8702aaaefc
Handle BrokenPipe when piping hx --health through head (#1876)
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2 years ago
Michael Davis 7cd6050235 add tree-sitter-gleam 2 years ago
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
2 years ago
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
2 years ago
Marcin Puc f2dd3d4469
Avoid using the format ident Rust feature (#1881) 2 years ago
Michael Davis c8082a1133
update screenshot (#1879) 2 years ago
Michael Davis d4e45fd479
changelog notes for 22.03 (#1830) 2 years ago
Blaž Hrastnik 6c276d7868
Revert "Resize is not necessary inside SIGCONT, handled by render()"
Fixes #1877

This reverts commit 85264a861a.
2 years ago
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
2 years ago
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>
2 years ago
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>
2 years ago
Max b63b37d5a0
grammars.nix: use github type for fetchTree where possible (#1872) 2 years ago
Blaž Hrastnik 511f37c736
clipboard: fix import on macOS 2 years ago
Blaž Hrastnik 33510d60f4
cargo fmt 2 years ago
Blaž Hrastnik a516f5881b
Address clippy lint 2 years ago
Blaž Hrastnik 8611c5b84e
Refactor clipboard to make it easier to feature gate std::process 2 years ago
Blaž Hrastnik 4940db3e2d
Make truncate_start a builder method instead 2 years ago
Blaž Hrastnik 20cf75dfa1
Strip some more params 2 years ago
Blaž Hrastnik 1849ad1fde
Clean up global search 2 years ago
Blaž Hrastnik 92bb312f0f
Make line a private property 2 years ago
Blaž Hrastnik 96a4eb8483
Remove more push_layer calls 2 years ago
Blaž Hrastnik 5c162ef995
Make regex_prompt directly call cx.push_layer 2 years ago
Blaž Hrastnik 83b3272166
This doesn't need to be mut 2 years ago