Commit graph

558 commits

Author SHA1 Message Date
DylanBulfin
1107296ca9
Add command to merge consecutive ranges in selection (#5047) 2022-12-22 20:27:20 -06:00
Jonathan LEI
24cd7f6adf Make prompt suggestions greyed out 2022-12-17 13:59:05 -06:00
g-s-k
042d03269e
Add support for MATLAB/Octave files (#5192) 2022-12-17 13:44:08 -06:00
Jonas Everaert
aecb524e50
Crystal language support (#4993) 2022-12-17 13:34:00 -06:00
Ifiok Jr
9c9c775a27
Fix a typo in the docs (#5191) 2022-12-18 00:09:14 +09:00
Blaž Hrastnik
ec9aa66902
Remove redraw to fix build 2022-12-15 22:23:06 +09:00
Roberto Vidal
f916915b53
add redraw command (#4354)
* add redraw command

* update docs

* Update helix-term/src/commands/typed.rs

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

* update docs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-12-15 17:59:34 +09:00
gavincrawford
012fc12f97
Add Bash indents (#5149) 2022-12-14 08:42:11 -06:00
Erasin
436296b76c
Add Mermaid.js for markdown support (#5147) 2022-12-14 07:51:00 -06:00
Alexander Schlögl
0b96021643
Add :pipe-to typable command that ignores shell output (#4931) 2022-12-11 20:06:24 -06:00
Marco Ieni
d5ab974d38
chore(book): link repository (#5101) 2022-12-11 19:59:53 -06:00
Slug
c5bfb792b2
update(theme): adjust base16_transparent and dark_high_contrast (#5105) 2022-12-11 12:14:10 -06:00
Ollie Charles
0e8ea13696
Add Haskell text objects (#5061) 2022-12-10 14:03:18 -06:00
Felipe S. S. Schneider
d14de27709
Add support for the BibTeX file format (#5064) 2022-12-08 22:33:08 -06:00
TotalKrill
16e13b9789
allow specifying environment for language servers in language.toml (#4004)
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Co-authored-by: Stephen Wakely <fungus.humungus@gmail.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-12-08 22:09:23 -06:00
Pascal Kuthe
af532147c9
Add command/keybinding to jump between hunks (#4650)
* add command and keybding to jump to next/prev hunk

* add textobject for change

* Update helix-vcs/src/diff.rs

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

* select entire hunk instead of first char

* fix selection range

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-12-06 23:18:33 +09:00
nosa
7210c58a51
Change default TS object bindings (#3782)
* Change default TS object bindings

Changes 'match inside/around' bindings for:
- type definition from `c` to `t`
- comments from `o` to `c`
- tests from `t` to `T`

Also changes those for the `]` / `[` bindings.

* Update docs for changed keybinds

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-12-06 10:13:41 +09:00
Blaž Hrastnik
03ca18b377
Update language support docs 2022-12-05 15:02:13 +09:00
Michael Davis
8c2692caf1
Use the logo as the favicon for the docs book (#4971) 2022-12-02 22:45:06 +09:00
Pascal Kuthe
5a3ff74221
Show (git) diff signs in gutter (#3890)
* Show (git) diff signs in gutter (#3890)

Avoid string allocation when git diffing

Incrementally diff using changesets

refactor diffs to be provider indepndent and improve git implementation

remove dependency on zlib-ng

switch to asynchronus diffing with similar

Update helix-vcs/Cargo.toml

fix toml formatting

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

fix typo in documentation

use ropey reexpors from helix-core

fix crash when creating new file

remove useless use if io::Cursor

fix spelling mistakes

implement suggested improvement to repository loading

improve git test isolation

remove lefover comments

Co-authored-by: univerz <univerz@fu-solution.com>

fixed spelling mistake

minor cosmetic changes

fix: set self.differ to None if decoding the diff_base fails

fixup formatting

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

reload diff_base when file is reloaded from disk

switch to imara-diff

Fixup formatting

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

Redraw buffer whenever a diff is updated.

Only store hunks instead of changes for individual lines to easily allow
jumping between them

Update to latest gitoxide version

Change default diff gutter position

Only update gutter after timeout

* update diff gutter synchronously, with a timeout

* Apply suggestions from code review

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* address review comments and ensure lock is always aquired

* remove configuration for redraw timeout

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-12-01 17:35:23 +09:00
Michael Davis
67415e096e
Fix file-types declaration for racket (#4915)
Both the racket and scheme entries used the rkt file-extension. This
commit removes that entry for scheme and so that the racket entry takes
precedence. We explicitly point to the scheme grammar now and setup
queries that inherit from scheme. This should enable using the racket
language server configuration.
2022-11-30 23:27:08 +09:00
Lennard Hofmann
fc811726e0
Update tree-sitter-java and add Java textobjects (#4886) 2022-11-26 10:17:10 -06:00
alois31
26ec1cf39a
Add QML language support (#4842)
Fixes https://github.com/helix-editor/helix/issues/2771
2022-11-22 21:49:02 -06:00
Sora
420e33a600
Implement simple indents.scm for Elixir (#4821) 2022-11-20 18:36:19 -06:00
Filipe Azevedo
8dac863a5b
Add :reload-all command (#4663) 2022-11-20 12:39:26 -06:00
Blaž Hrastnik
767b179839
Update lang-support doc 2022-11-18 10:53:08 +09:00
Gaurav Tyagi
91ff903bf3
Add global error/warning count statusline element (#4569) 2022-11-14 19:46:07 -06:00
Jonathan
1233c9a989
Add support for Bicep files (#4403) 2022-11-14 19:43:22 -06:00
wes adams
fd585c1ee4
Statusline indicator to show number of selected chars (#4682)
Co-authored-by: wes adams <wadams@grayshift.com>
2022-11-12 11:31:09 -06:00
Philip Giuliani
e17ad2722a
Enable elixir-ls for heex language (#4679) 2022-11-10 09:21:31 -06:00
Matthias Deiml
dee5b2a983
Add LSP workspace command picker (#3140)
* Add workspace command picker

* Make command typable

* Add optional argument to lsp-workspace-command
2022-11-09 18:17:09 +09:00
Zhizhen He
0c30aeea5b
fix typo (#4656) 2022-11-08 11:02:49 -06:00
0xflotus
75d7e0555e
fix: small error (#4651) 2022-11-08 08:29:48 -06:00
Doug Kelkhoff
7ed9e9cf25
Dynamically resize line number gutter width (#3469)
* dynamically resize line number gutter width

* removing digits lower-bound, permitting spacer

* removing max line num char limit; adding notes; qualified successors; notes

* updating tests to use new line number width when testing views

* linenr width based on document line count

* using min width of 2 so line numbers relative is useful

* lint rolling; removing unnecessary type parameter lifetime

* merge change resolution

* reformat code

* rename row_styler to style; add int_log resource

* adding spacer to gutters default; updating book config entry

* adding view.inner_height(), swap for loop for iterator

* reverting change of current! to view! now that doc is not needed
2022-11-08 21:19:59 +09:00
seshotake
ed7ea8c9ba
add highlights for env and ini file formats (#4536) 2022-10-31 19:23:09 -05:00
hh9527
9df4358492
Support WIT grammar (#4525) 2022-10-31 18:48:01 -05:00
Konstantin Podsvirov
f41f28b662
Update windows install instructions (#4530) 2022-10-30 11:55:31 -05:00
Matthew Toohey
f054a3f3ed
feat(lang): add xml (#4518) 2022-10-29 15:41:28 -05:00
Jaden
b5e7501935
feat(lang): add kdl grammar (#4481) 2022-10-29 10:33:23 -05:00
rsteube
26f21da531
language: added vhs (#4486) 2022-10-28 08:22:41 -05:00
James O. D. Hunt
ac0fe29867
commands: Make no arg ':theme' show name (#3740)
Most commands that accept an argument show their current value if no
argument is specified. The `:theme` command previously displayed an
error message in the status bar if not provided with an argument:

```
Theme name not provided
```

It now shows the current theme name in the status bar if no argument is
specified.

Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com>

Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com>
2022-10-26 11:59:50 +09:00
Gaurav Tyagi
ba9e50e93b
Add :update that will write the changes if the file has been modified. (#4426)
* add command update that will write the changes if file hasn been modified

* add docs

* update the docs
2022-10-26 11:58:49 +09:00
Michael Davis
17daf6ac0a
Change syntax for suffix file-types configurations (#4414)
The change in d801a6693c to search for
suffixes in `file-types` is too permissive: files like the tutor or
`*.txt` files are now mistakenly interpreted as R or perl,
respectively.

This change changes the syntax for specifying a file-types entry that
matches by suffix:

```toml
file-types = [{ suffix = ".git/config" }]
```

And changes the file-type detection to first search for any non-suffix
patterns and then search for suffixes only with the file-types entries
marked explicitly as suffixes.
2022-10-22 09:34:15 +09:00
Sora
664064b3cc
Add textobjects.scm for zig (#4409) 2022-10-21 17:32:29 -05:00
Charlie Groves
7e29ee6dae
Autosave all when the terminal loses focus (#3178)
* Autosave all when the terminal loses focus

* Correct comment on focus config

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

* Need a block_try_flush_writes in all quit_all paths

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-10-21 10:35:02 +09:00
Greg Troszak
fbf8078611
Clarify use of HELIX_RUNTIME (#4382) 2022-10-20 19:39:30 -05:00
Garrett D'Amore
36f97b6aad
Add support for D (#4372)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-20 16:54:17 -05:00
midnightexigent
d801a6693c
Allow using path suffixes to associate language file-types (#2455)
* feat(syntax): add strategy to associate file to language through pattern

File path will match if it ends with any of the file types provided in the config.
Also used this feature to add support for the .git/config and .ssh/config files

* Add /etc/ssh/ssh_config to languages.toml

* cargo xtask docgen

* Update languages.md

* Update languages.md

* Update book/src/languages.md

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

* Update book/src/languages.md

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

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2022-10-20 23:13:56 +09:00
Alex
8c9bb23650
Update windows install instructions (#4351) 2022-10-19 17:19:03 -05:00
Blaž Hrastnik
418a622db9
Merge pull request #4061 from pascalkuthe/undercurl-modifier
Support different kinds of underline rendering (updated)
2022-10-19 13:51:13 +09:00
Peter Phillips
faf0c521d1
Fix link to textobjects usage from keymap documentation (#4357) 2022-10-18 21:16:44 -05:00
Gokul Soumya
4e691d6247
Change diagnostic picker keybind to <space>d (#4229)
Also changes workspace diagnostic picker bindings to <space>D and
changes the debug menu keybind to <space>g, the previous diagnostic
picker keybind. This brings the diagnostic picker bindings more in
line with the jump to next/previous diagnostic bindings which are
currently on ]d and [d.
2022-10-17 16:45:42 +09:00
Ben White-Horne
63fe423710
Show keys required to enter each minor mode (#4302)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-16 11:58:18 -05:00
ZJPzjp
0e8e7cae3b
fix :insert-output doc: inserting output **before** each selection (#4286) 2022-10-15 11:07:42 -05:00
Dario Oddenino
2d958d6c50
Add support for Purescript language (#4242) 2022-10-14 11:57:52 -05:00
Pascal Kuthe
66a49080bc
merge underline-style and underline-color into a single table 2022-10-13 19:03:58 +02:00
Tim Siegel
425df93fb8 book: Refer to keys by key names, not representations
This is an attempt to clean up the inconsistent way that keys are
written in various places. These rules require the fewest changes to the
existing text.

Use the "Key name", as defined in remapping.md, which uses
"Some-Modifiers-PascalCaseKey". The "Representation", which uses
"S-M-lowercasekey", is only used for configuration entries.

For key combinations which do not present a popup, just present the keys
one after the other, with no intervening space, like `]p`.

For key combinations which present a popup, separate them with ` + `,
like `Space + f`.

The Ctrl modifier is called Ctrl, not Control.
2022-10-12 18:12:54 -05:00
Lennard Hofmann
a24fae3b3c
Update tree-sitter-lua and add textobjects for Lua (#3552) 2022-10-12 08:45:56 -05:00
Pascal Kuthe
328c4d002f
adress review comments 2022-10-11 12:11:33 +02:00
Daniel Ebert
081327695f Rename extend indent captures.
Clarify comments in indent code.
2022-10-11 16:48:04 +09:00
Daniel Ebert
dc443487d4 Slightly change the behavior of the @stop-extend capture.
This improves the behavior in case of multiple nested extensions.
2022-10-11 16:48:04 +09:00
Triton171
8f19956218 Add python indentation support to docs.
Document @extend-indented and @stop-extend captures for indent queries.
2022-10-11 16:48:04 +09:00
Pascal Kuthe
1a87cbd508 remove filterting with C-space from picker 2022-10-11 12:25:28 +09:00
Sumit Sahrawat
a079f2c9bd
Add some vertical characters to the editor.indent-guides documentation (#4163)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-10 16:23:14 -05:00
David
7af7dadd17
Add instructions for gnome desktop support using the .desktop file (#4165) 2022-10-10 12:23:36 -05:00
A-Walrus
c15f1ea274
Add cursorcolumn (#4084)
* Implement cursorcolumn

* Add documentation

* Separate column style from line with fallback

* Fallback to cursorcolumn first

* Switch to non-fallback try_get_exact

Add new function `try_get_exact`, which doesn't perform fallback,
and use that instead because the fallback behaviour is being handled
manually.
2022-10-09 03:28:42 +09:00
Pascal Kuthe
2f7088c1f3
fix typo
Co-authored-by: Omnikar <omkar.subramaniam@icloud.com>
2022-10-08 17:43:32 +02:00
pascalkuthe
ad0eb4094b
add deprectation not for underlined modifier to docs 2022-10-08 16:39:02 +02:00
Brandon Dong
18cfe864f4
Fix incorrect scrolloff default in documentation (#4136) 2022-10-08 03:22:35 +09:00
Pascal Kuthe
7bc324fde9
make casing consistent with other configuration 2022-10-06 20:50:54 +02:00
Jaden
ccb38e7696
doc: add theme inheritance example (#4096) 2022-10-04 16:33:45 -05:00
Poliorcetics
ed5febf4b3
doc: add example to disable arrow keys in insert mode (#4088) 2022-10-04 09:40:51 -05:00
Karsten Gebbert
9124c231f4
respond to SIGUSR1 by reloading config (#3952)
* respond to SIGUSR1 by reloading config

* document USR1 signal handling
2022-10-04 00:08:32 +09:00
Ivan Tham
3d59d3f8be
Keep arrow and special keys in insert (#3915)
* Keep arrow and special keys in insert

Advanced users won't need it and is useful for beginners.
Revert part of #3671.

* Change text for insert mode section

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

* Remove ctrl-up/down in insert

* Reorganize insert keys and docs

* Improve page up experience on last tutor

The last tutor page can page down multiple times and it will break the
heading on the 80x24 screen paging when reaching the last page, this
keeps the style the same and make sure page up and down won't break it.

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-10-04 00:08:15 +09:00
Robin
6764744ce9
Add option to skip the first indent guide (#3819)
* Add option to skip the first indent guide

* reorder skip_first option

* change indent-guides.skip_first to a number

* rename skip -> skip_levels

* add skip_levels to the book

* Update book/src/configuration.md

Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com>

* Update helix-term/src/ui/editor.rs

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

Co-authored-by: Robin <robinvandijk@klippa.com>
Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-10-04 00:07:04 +09:00
Michael Davis
dbec057363
Rename I/A "Insert at start/end of line" (#3753)
* keymap: Rename A "Insert at end of line"

The language for the `A` binding is potentially confusing because
`A` behaves like `i` done at the end of the line rather than `a`.
This change renames the command to match Kakoune's language[^1].

[^1]: 021da117cf/src/normal.cc (L2229)

* keymap: Rename I `insert_at_line_start`
2022-10-04 00:05:08 +09:00
Ivan Tham
66bbba9024
Select inserted space after join (#3549)
* Select inserted space after join

* Split join_selections with space selection to A-J

Kakoune does that too and some users may still want to retain their selections.

* Update join_selections docs
2022-10-04 00:02:14 +09:00
Joshua Pauline
c144cc0b04
feat(statusline): add option to show total line numbers in file (#3960)
* feat(statusline): add option to show total line numbers in file

* feat(line numbers): add config to doc book
2022-10-03 23:54:00 +09:00
PeepNSheep
77f33e7b20
Add configureable statusline mode names (#3311)
* Added 'long-mode' statusline element

* Added customizable statusline mode names

* Removed a string clone

* Added documentation

* Updated documentation, moved modenames to a seperate section

* Update configuration.md

* Documentation update

* Documentation update

* Documentation update

* Update configuration.md

* Update configuration.md

* Fixed merge error

* Update configuration.md

* Update configuration.md
2022-10-03 23:45:32 +09:00
ChrHorn
589d17c758
Add ui.gutter.selected option for themes (#3303)
* add `ui.gutter.selected`

* add `ui.gutter`, `ui.gutter.selected` to docs
2022-10-03 23:44:45 +09:00
Pascal Kuthe
71ee589bbc
make underline_style a seperate option
Underline styles are mutally exclusive and overwrite each other.
Therefore implementing as an modifier lead to incorrect behaviour
when the underline style is overwritten.

For backwards compatability the "underline" modified is retained (but
deprecated). Instead the "underline_style" and "underline_color"
optios should be used to style underlines.
2022-10-01 19:29:46 +02:00
A-Walrus
de72b9c04c
Update theme documentation 2022-10-01 17:00:36 +02:00
Roberto Vidal
cc257e9bf9
Add support for webassembly text format (#4040) 2022-10-01 09:13:52 -05:00
Oskar Köök
c196a90684
Add documentation for max-line-length (#3974) 2022-09-26 07:56:07 -05:00
taupiqueur
75362dce83
Fix the picker’s keymap documentation (#3925) 2022-09-21 13:51:48 -05:00
Filipe Azevedo
385ccdfc9c
add :lsp-restart command (#3435) 2022-09-20 16:44:36 +09:00
Alexander Brevig
08b2ecc99a
feat: xtask themelint (#3234)
* feat: cargo xtask themelint <theme>

* fix: add docs and print json error status

* fix: refactor paths -> path

* fix: remove unused function

* fix: only report one err per scope (ui.statusline is reported if none of ui.statusline.* is recognized)

* fix: save work for later

* fix: finally decided on a design

* fix: ready for discussion

* fix: better rules

* fix: lint precision

* fix: String -> &'static str

* fix: allowlist not denylist for file type

* fix: add missing and indication of what's needed

* fix: copy pasteable errors

* fix: use Loader:read_names

* Update xtask/src/helpers.rs

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

* fix: remove into and clone for str

* Update book/src/themes.md

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

* fix: better lint output

* fix: cleaner logic for lint reporting

* style: use explicit imports

* Pascal support (#3542)

* fix: add difference check for statusline normal,insert,select

* fix: fg for whitespace and early exit if and one is ok

* chore: cleaning up, no idea how these got here or how this will look

* chore: revert from older commit?

* refactor: use static fn to equalize api between difference and existance

* refactor: querycheck and clippy

* refactor: clippy fixes

* fix: query-check behaves as before

* fix: error with x of y message, not total count

* fix: consistent reporting and less mutable state

* fix: selection difference ref #3942 ref #1833

Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: ath3 <45574139+ath3@users.noreply.github.com>
2022-09-19 21:38:20 +08:00
Alex Suraci
ea25ed6431
add bass language + highlighting (#3771) 2022-09-18 12:06:51 -05:00
Artem Pyanykh
08937fc00e Add Markdown LSP via Marksman
Marksman is an LSP server for Markdown: https://github.com/artempyanykh/marksman
It supports a bunch of LSP features: symbols, references, rename, diag,
etc. and already has integrations with emacs, neovim, and vscode.
2022-09-17 20:58:42 +02:00
taupiqueur
a73e83ef4d
Fix typos (#3858) 2022-09-17 06:34:48 -05:00
Benjamin Streit
ffb41a94f0
feat: Syntax highlighting for Astro files (#3829) 2022-09-13 01:53:55 -05:00
Skyler Hawthorne
0d8ffa6b4a
add example config for all removed insert mode bindings (#3827) 2022-09-13 01:49:18 -05:00
Pablo Ovelleiro Corral
03612174ee
Update usage.md with paragraph textobject(#3797) 2022-09-11 16:41:35 +05:30
Blaž Hrastnik
c2e41082e4
Remove the .txt suffix from tutor
The tutor file is loaded as .txt which can potentially spawn a
language server. Then the path is unset, but the LS remains active.
This can cause panics since updates are now submitted for a doc
with no path.

As a quick workaround we remove the extension which should avoid
detection.

Fixes #3730
2022-09-11 11:11:07 +09:00
Erasin
a15420ed1c
Add textobject for gdscript (#3760) 2022-09-10 08:47:08 -05:00
Erasin
54e78dd24f
Add godot resource support (#3759)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-09-10 08:45:52 -05:00
Matouš Dzivjak
76b3f502c4 feat(lsp): jsonnet-language-server
Add jsonnet-language-server for jsonnet language.
See: https://github.com/grafana/jsonnet-language-server
2022-09-08 18:38:41 -05:00
ChemicalXandco
7210b39587
change to openscad-lsp (#3750) 2022-09-08 18:36:03 -05:00
Skyler Hawthorne
e12690e2f5 Remove default insert mode movement bindings
Helix is first and foremost a modal editor. Willingness to support non-modal
editing is there, but it is not one that should be encouraged with the default
settings. There are an increasing number of users who are stumbling because
they are trying to use Helix as a non-modal editor, so this is an effort to
encourage new users to stop and take notice that Helix has a different paradigm
than VSCode, Sublime, etc. Users can still add these bindings back to their own
configs if they wish.
2022-09-08 17:36:04 -05:00
Matouš Dzivjak
5ab85283e9
feat(languages): jsonnet (#3714)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-09-08 09:04:18 -05:00