Commit graph

4110 commits

Author SHA1 Message Date
Gokul Soumya
1562b5ce67 Create popup rect instead of using raw values 2023-02-11 16:05:23 +09:00
Gokul Soumya
0f844ef191 Refactor our Markdown construction in completion doc 2023-02-11 16:05:23 +09:00
Gokul Soumya
937825e8fc Rename completion doc popup area variables 2023-02-11 16:05:23 +09:00
Gokul Soumya
8e9c329952 Use early return in rendering completion doc 2023-02-11 16:05:23 +09:00
Pascal Kuthe
93c7afc4ed
Negotiate LSP Position Encoding (#5894)
So far LSP always required that `PositionEncoding.characters` is an
UTF-16 offset. Now that LSP 3.17 is available in `lsp-types` request
the server to send char offsets (UTF-32) or byte offsets (UTF-8)
instead. For compatability with old servers, UTF-16 remains as the
fallback as required by the standard.
2023-02-11 15:50:01 +09:00
Daniel S Poulin
6929a12f29
Make m textobject look for pairs enclosing selections (#3344)
* Make `m` textobject look for pairs enclosing selections

Right now, this textobject only looks for pairs that surround the
cursor. This ensures that the pair found encloses each selection, which
is likely to be intuitively what is expected of this textobject.

* Simplification of match code

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Adjust logic for ensuring surround range encloses selection

Prior, it was missing the case where the start of the selection came
before the opening brace. We also had an off-by-one error where if the
end of the selection was on the closing brace it would not work.

* Refactor to search for the open pair specifically to avoid edge cases

* Adjust wording of autoinfo to reflect new functionality

* Implement tests for surround functionality in new integration style

* Fix handling of skip values

* Fix out of bounds error

* Add `ma` version of tests

* Fix formatting of tests

* Reduce indentation levels for readability, and update comments

* Preserve each selection's direction with enclosing pair surround

* Add test case for multiple cursors resulting in overlap

* Mark known failures as TODO

* Make tests multi-threaded or they fail

* Cargo fmt

* Fix typos in integration test comments

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2023-02-10 13:52:57 -06:00
lesleyrs
af1157f37c
Add exit code to command failed msg (#5898) 2023-02-10 11:56:56 -06:00
Colton Clemmer
ea3293b4da
Split modification indicator from file statusline elements (#4731) 2023-02-10 11:34:18 -06:00
ath3
1840d775c8
Added tree-sitter-hosts (#4950) 2023-02-10 11:32:04 -06:00
ath3
189c3c2ddc
Add tree-sitter-passwd (#4959) 2023-02-10 11:12:46 -06:00
Pascal Kuthe
8a3ec443f1
Fix new clippy lints (#5892) 2023-02-09 16:27:08 -06:00
Mike Trinkala
9d73a0d112
Fix the infinite loop when copying the cursor to the top of the file (#5888)
Example:
```
test
testitem
```

Select line 2 with x, then type Alt-C; Helix will go into an infinite
loop. The saturating_sub keeps the head_row and anchor_row pinned at 0,
and a selection is never made since the first line is too short.
2023-02-09 23:28:33 +09:00
Pascal Kuthe
7ebcf4e919
properly handle LSP position encoding (#5711)
* properly handle LSP position encoding

* add debug assertion to Transaction::change

* Apply suggestions from code review

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2023-02-09 16:19:29 +09:00
Blaž Hrastnik
8a602995fa
Address new clippy lints 2023-02-09 11:44:14 +09:00
Pascal Kuthe
e474779c87
bump msrv to 1.63 (#5570)
* bump msrv to 1.63

* resolve new complex type clippy lints
2023-02-09 11:24:31 +09:00
Pascal Kuthe
bd14f5a72c
update bug report template (#5872) 2023-02-09 11:22:38 +09:00
Blaž Hrastnik
8e2eab1a6f
Also run build checks on merge queue 2023-02-09 11:04:44 +09:00
zSchoen
882fa11d17
Add Containerfile file-type for dockerfile language (#5873) 2023-02-08 15:08:10 -06:00
Clément Delafargue
f386ff795d
Check for external file modifications when writing (#5805)
`:write` and other file-saving commands now check the file modification
time before writing to protect against overwriting external changes.

Co-authored-by: Gustavo Noronha Silva <gustavo@noronha.dev.br>
Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
2023-02-08 10:09:19 -06:00
gavincrawford
00ecc556a8
Fix Go select indenting (#5713)
* Fix Go  indenting

* Fix bracket outdent predicate

* Fix brace indenting (again)
2023-02-08 16:17:34 +09:00
Matthew Toohey
05c5207265
feat: add pem language (#5797) 2023-02-07 17:24:26 -06:00
Surendrajat
fce30c0da0
xml: add mobileconfig & plist file types (#5863) 2023-02-07 17:17:48 -06:00
Mike Trinkala
c704701714
Short-circuit the word and treesitter object movement commands (#5851)
The loop always iterates the number of times the user specified even
if the beginning/end of the document is reached.

For an extreme demonstration try the following commands, Helix will
hang for several seconds.
100000000w
100000000]c
2023-02-07 17:05:27 -06:00
Michael Davis
23ed8c12f1
Select change range for goto_first/last_change commands (#5206)
This matches the behavior from 42ad1a9e04
but for the first and last change. The selection rules are the same
as for goto_next/prev_change: additions and modifications select the
added and modified range while deletions are represented with a point.
2023-02-07 12:43:48 +09:00
Jesús González
f71f27f804
Add Darcula Solid theme (#5778)
* Add Darcula Solid theme.

* Update darcula solid theme.

* Derive darcula-solid theme from original darcula
2023-02-07 12:39:49 +09:00
Kirawi
fb149133db
Make fleet-dark accurate to the official theme (#5605) 2023-02-06 17:47:51 -06:00
dependabot[bot]
7f6a91fd63
build(deps): bump ropey from 1.5.1 to 1.6.0 (#5859)
Bumps [ropey](https://github.com/cessen/ropey) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/cessen/ropey/releases)
- [Changelog](https://github.com/cessen/ropey/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cessen/ropey/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: ropey
  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>
2023-02-06 17:44:26 -06:00
dependabot[bot]
9b69f5010d
build(deps): bump anyhow from 1.0.68 to 1.0.69 (#5858)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.68 to 1.0.69.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.68...1.0.69)

---
updated-dependencies:
- dependency-name: anyhow
  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>
2023-02-06 17:43:48 -06:00
dependabot[bot]
f3f8660d36
build(deps): bump serde_json from 1.0.91 to 1.0.92 (#5857)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.91 to 1.0.92.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.91...v1.0.92)

---
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>
2023-02-06 17:43:28 -06:00
dependabot[bot]
b97462ea9b
build(deps): bump unicode-segmentation from 1.10.0 to 1.10.1 (#5856)
Bumps [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/unicode-rs/unicode-segmentation/releases)
- [Commits](https://github.com/unicode-rs/unicode-segmentation/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: unicode-segmentation
  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>
2023-02-06 17:43:08 -06:00
dependabot[bot]
093b37d7e7
build(deps): bump cachix/install-nix-action from 18 to 19 (#5855)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  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>
2023-02-06 17:42:45 -06:00
Ethan Budd
9c98043c1c
Recognize .C and .H file types as cpp (#5808) 2023-02-05 16:02:36 -06:00
Jaeho Choi
0eba0db4a0
docs: Fix PowerShell runtime linking command (#5822) 2023-02-05 13:31:20 -06:00
Skyler Hawthorne
b2e83f81e1
enable rendering in integration tests (#5819)
This will allow testing more of the code base, as well as enable UI-
specific testing.

Debug mode builds are prohibitively slow for the tests, mostly
because of the concurrency write tests. So there is now a profile for
integration tests that sets the optimization level to 2 for a few helix
crates, and lowers the number of rounds of concurrent writes to 1000.
2023-02-04 13:20:23 -08:00
Alex
d6e2434f73
Add ui.virtual.wrap to theme docs (#5823) 2023-02-04 10:33:53 -06:00
Aleksey Kuznetsov
7b46a6cada
Add Podfile and *.podspec to the file types for ruby (#5811) 2023-02-03 11:46:57 -08:00
William Etheredge
f7bd7b5eaf
Add :character-info command (#4000) 2023-02-03 08:24:46 -06:00
Brett Lyons
d8f482e11e
Add MSBuild language based on XML grammar (#5793) 2023-02-03 08:24:22 -06:00
LeoniePhiline
30412366be
feat: Update tree-sitter-sql and migrate highlights.scm to match grammar (#5772)
* Sort buildin functions alphabetically

* fix: Query float type like other numeric types

* Update tree-sitter-sql and update highlights.scm to match grammar
2023-02-02 16:44:36 -06:00
Cemal Okten
10fee815c4
Add Jellybeans theme (#5719) 2023-02-02 16:42:15 -06:00
Pascal Kuthe
350535208f
always commit to history when pasting (#5790) 2023-02-02 14:56:52 -05:00
Skyler Hawthorne
a5233cf5ad disable lsp in integration tests 2023-02-02 14:53:18 -05:00
Skyler Hawthorne
06d095f31c provide option to completely disable lsp 2023-02-02 14:53:18 -05:00
Skyler Hawthorne
0e038fb80c make clipboard message debug 2023-02-02 14:53:18 -05:00
Filipe Azevedo
8ba0a46274
add picker: current view dir (#4666) 2023-02-02 14:51:11 -05:00
Dylan Bulfin
61e1e6160a
Removing C-j and C-k from completion menu navigation (#5070) 2023-02-02 14:49:17 -05:00
Pascal Kuthe
f0c2e898b4
add substring matching options to picker (#5114) 2023-02-02 14:48:16 -05:00
Gokul Soumya
e31943c4c4
Tabulate buffer picker contents (#5777) 2023-02-02 14:32:05 -05:00
Pascal Kuthe
2949bb018c
fix position translation at EOF with softwrap (#5786) 2023-02-02 13:04:41 -05:00
Pascal Kuthe
6ed2348078
Hide duplicate symlinks from the picker (#5658)
* hide duplicate symlinks from the picker

* Apply suggestions from code review

Co-authored-by: g-re-g <123515925+g-re-g@users.noreply.github.com>

* minor stylistic fix

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: g-re-g <123515925+g-re-g@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2023-02-02 11:14:02 -06:00