Commit Graph

1943 Commits

Author SHA1 Message Date
Blaž Hrastnik
c8794b30ee Update changelog 2022-01-04 18:54:37 +09:00
Sebastian Neubauer
5b1a628e81
Add textobjects and indents to c and cpp (#1293)
Indentation of single line statements doesn't work, i.e.

  for (;;)<hit enter>
leads to
  for(;;)
  <cursor here>

Only blocks with curly braces are indented.
2022-01-04 10:53:04 +09:00
Sebastian Neubauer
641255ccc8
Add llvm-mir highlighting (#1398)
* Add injection regex for more languages

To support embedding them in other languages like markdown.

* Add llvm-mir highlighting

LLVM Machine IR is dumped as yaml files that can embed LLVM IR and
Machine IR.

To support this, add a llvm-mir-yaml language that uses the yaml
parser, but uses different injections to highlight IR and MIR.

* Update submodule with fixed multiline comments

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-01-04 10:52:34 +09:00
dumrich
7c9d3682db
Fix grammatical error (#1427)
it's to its (possessive)
2022-01-04 10:45:31 +09:00
dependabot[bot]
4d59f66b76
build(deps): bump tree-sitter from 0.20.1 to 0.20.2 (#1429)
Bumps [tree-sitter](https://github.com/tree-sitter/tree-sitter) from 0.20.1 to 0.20.2.
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.20.1...v0.20.2)

---
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-01-04 10:44:48 +09:00
dependabot[bot]
96935eb28d
build(deps): bump serde_json from 1.0.73 to 1.0.74 (#1430)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.73 to 1.0.74.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.73...v1.0.74)

---
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-01-04 10:44:15 +09:00
dependabot[bot]
78967779bd
build(deps): bump ropey from 1.3.1 to 1.3.2 (#1431)
Bumps [ropey](https://github.com/cessen/ropey) from 1.3.1 to 1.3.2.
- [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.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: ropey
  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-01-04 10:44:10 +09:00
dependabot[bot]
61fe1dc9e8
build(deps): bump serde from 1.0.132 to 1.0.133 (#1432)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.132 to 1.0.133.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.133)

---
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-01-04 10:44:03 +09:00
Mathis Brossier
dbaed0ba83
scroll: change only main selection, only when needed (#1420)
Co-authored-by: mathis <mathis.brossier@universite-paris-saclay.fr>
2022-01-03 11:50:53 +09:00
WindSoilder
609f7363a1
Add everforest_light, change everforest_dark string color (#1412) 2022-01-03 11:32:47 +09:00
Omnikar
ed97ecceb8
Add :cquit! command and prevent :cquit from ignoring unsaved changes (#1414)
* Add `:cquit!` command and prevent `:cquit` from ignoring unsaved changes

* `cargo xtask docgen`
2022-01-03 11:31:24 +09:00
Kirawi
ea095ca5fb
Optimize lsp_pos_to_pos (#1423)
lines().count() is slow compared to len_lines()
2022-01-03 11:26:17 +09:00
Triton171
4da050b4bb
Add basic indentation for languages without treesitter-based indentation rules (always use the indent of the current line for a new line). (#1341)
Fix several bugs in the treesitter indentation calculation.

Co-authored-by: Triton171 <triton0171@gmail.com>
2022-01-03 11:03:57 +09:00
Sebastian Neubauer
8f2af71340
Add LLVM TableGen highlighting (#1409)
Add a tree-sitter grammar and highlights for TableGen files.
TableGen and its grammar are described here:
https://llvm.org/docs/TableGen/index.html

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-01-03 10:57:55 +09:00
Kirawi
93a948d889
switch redundant current! usage to doc! (#1416) 2022-01-03 10:46:57 +09:00
Martin Junghanns
aaa42e1a69
Underline diagnostics in bogster theme (#1399) 2022-01-02 13:45:22 +09:00
Flakebi
0dab6c8c17 Fix markdown code-block highlighting
Markdown code blocks should be highlighted as a single block, so set
injection.include-children.
2022-01-01 17:36:12 +08:00
Alexis Mousset
8a019b423f
Detect workspace root using language markers (#1370)
* Detect workspace root using language markers

* Avoid allocating root_markers

* Update helix-core/src/lib.rs

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

* Update helix-core/src/lib.rs

Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
2021-12-31 17:06:54 +09:00
Michael Davis
8fda87af2b
add tree-sitter-git-rebase (#1402)
* add submodule on tree-sitter-rebase, add to languages

* add basic highlights query

* inject bash in execute statements

* update tree-sitter-rebase

* tree-sitter-rebase->tree-sitter-git-rebase

* get injection working with tree-sitter-git-commit

* set scope under source.gitrebase

* unset include-children on commit message injections

* Revert "unset include-children on commit message injections"

This reverts commit 2ecee155ea8e229651920b291062c2ee84b47944.

* fix generated language docs

* use rebase_command scopes from tree-sitter-git-commit
2021-12-31 06:58:47 +08:00
Blaž Hrastnik
a066f59dc8 Don't just filter commands by fuzzy match, also order the matches 2021-12-30 15:20:22 +09:00
Michael Davis
bcf3808e97
Add tree-sitter-git-diff (#1373)
* add submodule on tree-sitter-git-diff

* add git-diff highlights

* inject git-diff into git-commit

* update tree-sitter-git-commit with fix for bad diff case

* add git-diff to language support docs

* include-children in diff injections

This ensures that children nodes of $.message are included in the
injection, such as $.user or issue/pr numbers. Without this change,
diffs containing '#' or '@' characters can trip up the injection and
be parsed separately.

See https://github.com/helix-editor/helix/pull/1373#issuecomment-1001215629

* set diff language's scope as source.diff
2021-12-30 00:31:23 +09:00
ath3
49444f9c05
Convert Windows style path separator in completers to Unix style (#1389) 2021-12-30 00:30:20 +09:00
Sebastian Neubauer
8c29b76bcc
Improve llvm highlighting and queries (#1388)
* Improve llvm highlighting and queries

The llvm tree-sitter parser was updated to support scopes and more
accurate highlighting.

* Group highlight expressions better
2021-12-29 18:30:44 +09:00
WindSoilder
f1ed042c84
Fix: when goto normal mode, only want to remove indentation if the line is blank with no text following (#1349)
* when opened new line contains other characters after current position, don't dedent

* abstract checking logic
2021-12-29 18:21:20 +09:00
Stuart Hinson
34db33e1dc
Use a fuzzy matcher for commands (#1386)
* Use a fuzzy matcher for commands

* Take Clippy up on its suggestion

* Rescope FUZZY_MATCHER
2021-12-29 18:18:17 +09:00
Matouš Dzivjak
bd2ab5be43
feat(commands): ensure_selections_forward (#1393)
* feat(commands): ensure_selections_forward

Add command that ensures that selections are in forward direction.

Fixes: https://github.com/helix-editor/helix/issues/1332

* Add keybinding for ensure_selections_forward

Add `A-:` keybinding for the ensure_selections_forward command.

* Re-use range.flip for flip_selections command
2021-12-29 18:17:46 +09:00
dependabot[bot]
dc1faa35cb
build(deps): bump anyhow from 1.0.51 to 1.0.52 (#1392)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.51 to 1.0.52.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.51...1.0.52)

---
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>
2021-12-28 09:35:17 +09:00
dependabot[bot]
1d2009e4f0
build(deps): bump chardetng from 0.1.15 to 0.1.17 (#1390)
Bumps [chardetng](https://github.com/hsivonen/chardetng) from 0.1.15 to 0.1.17.
- [Release notes](https://github.com/hsivonen/chardetng/releases)
- [Commits](https://github.com/hsivonen/chardetng/compare/v0.1.15...v0.1.17)

---
updated-dependencies:
- dependency-name: chardetng
  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>
2021-12-28 09:35:08 +09:00
Omnikar
5b69e9b466
Fix indentation (#1387) 2021-12-28 08:03:14 +09:00
Matouš Dzivjak
a4641a8613
feat(commands): sort command (#1288)
* feat(commands): sort/rsort  command

Add basic implementation of sort command.

* Sort by selections instead, implement reverse sort

* Generate docs

* Rename sort! to rsort
2021-12-27 13:11:06 +09:00
Stuart Hinson
7001665342
Add ruby indents (#1372)
* Add ruby indents

* Include ruby in generated docs
2021-12-27 13:07:09 +09:00
Omnikar
8340d73545 Extract macro parsing to helix-view and add unit tests 2021-12-27 10:13:18 +09:00
Omnikar
2d4bc0aec7 Change how macros separate keypresses
* Keypresses are no longer separated by spaces
* Single-character keypresses are serialized as-is
* Multi-character keypresses are delimited by `<>`
2021-12-27 10:13:18 +09:00
Ivan Tham
ee3eb4057a Update macro display as [q] in message 2021-12-27 10:13:18 +09:00
Ivan Tham
b9cb3930e2 Mark macros as experimental in docs
Given that currently macro does not integrate well with registers and
the internal representation of macros is expected to be changed.
2021-12-27 10:13:18 +09:00
Ivan Tham
9a32617b30 Rename play macro to replay macro
Macro needs to be defined first before playing so replay is more accurate.
Also, replay have the same length as record which makes it looks nice.
2021-12-27 10:13:18 +09:00
Ivan Tham
5326a05117 Improve macro error handling 2021-12-27 10:13:18 +09:00
Ivan Tham
c7a59e24e6 Switch macro Q and q 2021-12-27 10:13:18 +09:00
Tamo
a306a1052a
Update settings at runtime (#798)
* feat: Update settings at runtime

fix the clippy warning

* update the documentation

* use to_value instead of to_vec+from_value

* drop the equal

* remove an useless comment

* apply suggestion
2021-12-26 10:04:33 +09:00
Michael Davis
6af0d51dc5 highlight rebase-commands as markup.raw 2021-12-26 00:12:49 +09:00
Michael Davis
c3fb86cbaa tree-sitter-gitcommit->tree-sitter-git-commit 2021-12-26 00:12:49 +09:00
Michael Davis
28c9afdd0e add commented-out diff and rebase injection queries 2021-12-26 00:12:49 +09:00
Michael Davis
c1f4c0e67a add new scopes to themes docs 2021-12-26 00:12:49 +09:00
Michael Davis
3b800025af add diff.{plus,minus,delta} to themes 2021-12-26 00:12:49 +09:00
Michael Davis
78f93239b5 add gitcommit highlights 2021-12-26 00:12:49 +09:00
Michael Davis
fd31662b70 add gitcommit grammar and language configuration 2021-12-26 00:12:49 +09:00
Matouš Dzivjak
4b0b1a5657
feat(ui): file encoding in statusline (#1355)
* feat(ui): file encoding in statusline

Display file encoding in statusline if the encoding
isn't UTF-8.

* Re-export encoding_rs from core

From there it can be imported by other mods
that rely on it.
2021-12-26 00:10:46 +09:00
Sebastian Neubauer
ec878e4011
Add textobjects and indents to cmake (#1307) 2021-12-26 00:10:19 +09:00
Gabriel Berto
5d7b5db8ab
Resolve completion item (#1315)
Co-authored-by: Gabriel Berto <gabriel.berto@pottencial.com.br>
2021-12-25 19:00:57 +09:00
Matouš Dzivjak
0e7d757869
feat(lsp): configurable diagnostic severity (#1325)
* feat(lsp): configurable diagnostic severity

Allow severity of diagnostic messages to be configured.
E.g. allow turning of Hint level diagnostics.

Fixes: https://github.com/helix-editor/helix/issues/1007

* Use language_config() method

* Add documentation for diagnostic_severity

* Use unreachable for unknown severity level

* fix: documentation for diagnostic_severity config
2021-12-25 14:32:43 +09:00