Commit graph

1725 commits

Author SHA1 Message Date
CossonLeo
f96be0fcbc
add solarized_light theme (#1010)
* add solarized_light theme

* solarized_light add constant.numeric
2021-11-09 11:08:08 +09:00
Omnikar
a424ef4e20
Use default languages.toml if user's is invalid (#994) 2021-11-09 11:07:54 +09:00
dependabot[bot]
eb68cd3767
build(deps): bump serde_json from 1.0.68 to 1.0.69 (#1030)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.68 to 1.0.69.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.68...v1.0.69)

---
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>
2021-11-09 11:04:44 +09:00
dependabot[bot]
81015266d9
build(deps): bump anyhow from 1.0.44 to 1.0.46 (#1029)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.44 to 1.0.46.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.44...1.0.46)

---
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-11-09 11:04:38 +09:00
Blaž Hrastnik
e18198aeb2 Revert "fix(core): stop merging array toml config values (#1004)"
It breaks languages.toml merging

This reverts commit 4304b52ff8.
2021-11-09 10:58:23 +09:00
Blaž Hrastnik
f804ed3192 Make shebangs optional, they don't make sense outside of scripts 2021-11-09 10:57:08 +09:00
Curiosidad-Racional
41fc326325
Fix panicked missing field shebangs (#1025)
Fix the error:
```
thread 'main' panicked at 'Could not parse merged (built-in + user) languages.toml: Error { inner: ErrorInner { kind: Custom, line: None, col: 0, at: None, message: "missing field `shebangs`", key: ["language"] } }', helix-term/src/application.rs:87:14
```
2021-11-09 10:49:43 +09:00
Mateusz S. Szczygieł
3f0345ff58
glsl support (#993)
* add glsl language support

* glsl: use indents.toml file
2021-11-09 00:48:00 +09:00
Blaž Hrastnik
549cdee561 Refactor shebang detection to reuse the loaded buffer 2021-11-09 00:30:34 +09:00
ath3
77dbbc73f9
Detect filetype from shebang line (#1001) 2021-11-09 00:19:44 +09:00
CossonLeo
29e6849413
Add LSP rename_symbol (space-r) (#1011)
improve apply_workspace_edit
2021-11-09 00:17:54 +09:00
LollipopFt
bf4c70e027
added Down keymapping. (#1019) 2021-11-09 00:14:03 +09:00
ath3
30744646cb
Perl support (#978) 2021-11-08 10:05:12 +09:00
Blaž Hrastnik
cdc2107bca fix: #896 broke some of the default highlights 2021-11-08 10:03:53 +09:00
Blaž Hrastnik
82ff5b0ab6 Specify capacity on toggle_line_comments 2021-11-08 10:03:21 +09:00
jgart
4010b327e2
Adds mint language server (#974) 2021-11-08 10:01:55 +09:00
Daniel S Poulin
1e793c2bbf
Adds single and double quotes to matching pairs (#995)
This enables `mm` to work on quote characters as well as highlighting of
matching quote when on it.
2021-11-08 09:57:26 +09:00
Omnikar
a252ecd8c8
Add WORD textobject (#991)
* Add WORD textobject

* Document WORD textobject
2021-11-08 09:54:39 +09:00
Gokul Soumya
e0e227d172
Touch up docs for adding new language (#1002) 2021-11-08 09:52:51 +09:00
Carter Snook
4304b52ff8
fix(core): stop merging array toml config values (#1004) 2021-11-08 09:50:03 +09:00
Blaž Hrastnik
29fe504398
book: Mention git submodule sync too 2021-11-07 10:33:05 +09:00
ammkrn
acced82be6
feat(book/src/languages.md) (#979)
* feat(book/src/languages.md)

Add a section in the book about language-specific settings and the languages.toml file.

* Update book/src/languages.md

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>

* feat(book/src/guides/adding_languages.md)

Add book section on adding a new language to the compile-time/root languages.toml file.

* Update book/src/guides/adding_languages.md

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

* Update book/src/guides/adding_languages.md

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

* refactor(revise book/src/languages.md)

Change the book page on language settings to match suggestions by archseer and mention both toml files.

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-07 10:31:12 +09:00
Omnikar
ed23057ff8
Launch with defaults upon invalid config/theme (#982)
* Launch with defaults upon invalid config/theme

* Startup message if there is a problematic config
* Statusline error if trying to switch to an invalid theme

* Use serde `deny_unknown_fields` for config
2021-11-07 00:57:14 +09:00
Blaž Hrastnik
2c1313c064 Specify vector capacity on surround_add 2021-11-06 23:52:49 +09:00
Blaž Hrastnik
1a1685acf7 Simplify current!(..).1 into doc!() 2021-11-06 23:52:26 +09:00
Blaž Hrastnik
e80708eba7 Make sure document diagnostics are sorted 2021-11-06 18:58:58 +09:00
Blaž Hrastnik
0f4cd73000 Simplify goto_*_diagnostic commands 2021-11-06 18:58:58 +09:00
Blaž Hrastnik
f659e1178a minor: view!(..).doc is slightly more efficient than current!(..).1.id() 2021-11-06 17:54:04 +09:00
Blaž Hrastnik
4c1321b3b6 minor: Extend search was decclared twice in the keymap 2021-11-06 17:49:18 +09:00
Blaž Hrastnik
b81a554424 Retain range direction on search
Co-authored-by: CossonLeo <20379044+cossonleo@users.noreply.github.com>
2021-11-06 17:41:30 +09:00
Blaž Hrastnik
6431b26a6a Implement Selection::replace to replace a single range
Fixes #985

Co-authored-by: Daniel S Poulin <crimsonmage+github@gmail.com>
2021-11-06 17:37:45 +09:00
Gygaxis Vainhardt
911b9b3276
Add reverse search functionality (#958)
* Add reverse search functionality

* Change keybindings for extend to be in select mode, incorporate Movement and Direction enums

* Fix accidental revert of #948 in rebase

* Add reverse search to docs, clean up mismatched whitespace

* Reverse search optimization

* More optimization via github feedback
2021-11-06 17:33:30 +09:00
Omnikar
cfc8285867
Allow infoboxes to be disabled (#972)
* Allow infoboxes to be disabled

* Document `infoboxes` default value

* Rename `infoboxes` to `auto_info`

* Document `auto-info`

* Fix incomplete rename
2021-11-05 11:25:08 +09:00
Omnikar
51b4d35dce
Inform when reaching undo/redo bounds (#981)
* Inform when reaching undo/redo bounds

* `Already at oldest change` when undo fails
* `Already at newest change` when redo fails

* Add missing `the`
2021-11-05 10:20:06 +09:00
ath3
aa4d0b4646
Fix crash on changing from empty scratch buffer to itself (#975) 2021-11-04 17:57:04 +09:00
Blaž Hrastnik
7b65a6d687 Rewrite goto_buffer 2021-11-04 14:03:03 +09:00
ath3
78c68fae91 Implement "Goto next buffer / Goto previous buffer" commands 2021-11-04 14:03:03 +09:00
Blaž Hrastnik
e2560f427e Replace documents SlotMap with BTreeMap 2021-11-04 13:43:45 +09:00
CossonLeo
39584cbccd
Add c-s to pick word under doc cursor to prompt line & search completion (#831)
* Add prompt shourtcut to book
Add completions to search
Add c-s to pick word under doc cursor to prompt line

* limit 20 last items of search completion, update book

* Update book/src/keymap.md

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* limit search completions 200

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-11-04 12:26:01 +09:00
diegodox
70d21a903f
Prevent preview binary or large file (#939)
* Prevent preview binary or large file (#847)

* fix wrong method name

* fix add use trait

* update lock file

* rename MAX_PREVIEW_SIZE from MAX_BYTE_PREVIEW

* read small bytes to determine cotent type

* [WIP] add preview struct to represent calcurated preveiw

* Refactor content type detection

- Remove unwraps
- Reuse a single read buffer to avoid 1kb reallocations between previews

* Refactor preview rendering so we don't construct docs when not necessary

* Replace unwarap whit Preview::NotFound

* Use index access to hide unwrap

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

* fix Get and unwarp equivalent to referce of Index acess

* better preview implementation

* Rename Preview enum and vairant

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>

* fixup! Rename Preview enum and vairant

* simplify long match

* Center text, add docs, fix formatting, refactor

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2021-11-04 12:24:52 +09:00
Omnikar
5b5d1b9dff
Truncate the starts of file paths instead of the ends in picker (#951)
* Truncate the starts of file paths in picker

* Simplify the truncate implementation

* Break loop at appropriate point

* Fix alignment and ellipsis presence

* Remove extraneous usage of `x_offset`

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-04 12:24:05 +09:00
Omnikar
e39cfa40df
Hide keys bound to no_op from infobox (#971) 2021-11-04 09:50:38 +09:00
Gokul Soumya
253bd6b3a8
Add better description for copy_selection command (#969) 2021-11-03 22:22:41 +09:00
Ivan Tham
3eb829e233
Ensure coords in screen depends on char width (#885)
The issue affected files with lots of tabs at the start as well.

Fix #840
2021-11-03 12:02:29 +09:00
Kirawi
ee889aaa85
Updated tree-sitter query scopes (#896)
* updated theme scopes

variable.property -> variable.field
property -> variable.field

* updated theme scopes

* update book and themes

updated book and themes to reflect scope changes

* wip

* update more queries

* update dark_plus.toml
2021-11-03 12:00:52 +09:00
Triton171
7a0c4322ea Simplify BTreeSet construction
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-11-03 11:56:55 +09:00
Daniel Ebert
eb8745db09 Implement key ordering for info box 2021-11-03 11:56:55 +09:00
Carter Snook
e505bf2b48
chore(doc): use faq for finding helix log file (#963) 2021-11-03 09:57:18 +09:00
Daniel Poulin
9e247bf6ee Add indents definition based on the one from nvim-treesitter 2021-11-02 17:53:24 +09:00
Daniel Poulin
924b7d3b19 Adjust PHP indentation defaults to 4 spaces
In the PHP community, 4 spaces is widely considered the default, as
it is recommended by the PSR-2 and PSR-12 standards, as well as popular
derivative standards like those for Laravel and Symphony.
2021-11-02 17:53:24 +09:00