Commit graph

393 commits

Author SHA1 Message Date
Gokul Soumya
a26943de4e
Right align scrollbar with track in completion popup (#2754)
- Align the scollbar to the right edge of the popup rather than at
  a margin of one.
- Add a scrollbar track and a new scope `ui.menu.scroll`.
2022-06-27 16:52:31 +09:00
Amit Beka
ba85779902
book: fix the description of dot repeat (#2878)
Co-authored-by: amitbeka <--->
2022-06-25 15:28:26 -05:00
Hekno25
33e6df8707
feat: add wgsl_analyzer as wgsl language server (#2872) 2022-06-24 16:21:26 -05:00
Gokul Soumya
8ad0b83e30 Make indent guides configurable 2022-06-21 18:43:25 +02:00
Gokul Soumya
924b4ebb39 Add theme scopes for indent guides 2022-06-21 18:43:25 +02:00
Connor Lay (Clay)
67f6c85792 text-objects: add test capture & elixir queries 2022-06-21 11:32:03 -05:00
Michael Davis
0ad10ce6f7
rewrite language configuration docs (#2838)
This change moves the configuration tables from the Adding
Languages guide into the overall Languages section. It also
adds more detailed documentation on the `language-server`
configuration key and fixes a typo in the "mylang" example
(the scope was `scope.mylang` instead of `source.mylang`).
2022-06-21 01:15:50 +02:00
Gygaxis Vainhardt
debd2405d9
views -> buffers in write-all (#2788) 2022-06-16 16:09:30 -05:00
Axot
4d604d3b50
Add clojure language support (#2780)
Co-authored-by: Mateusz Ledwoń <mateusz.ledwon@iteo.com>
2022-06-16 11:47:52 -05:00
Tennix
11dadab371
Add migrate from Vim wiki link (#2781) 2022-06-15 11:04:17 -05:00
Anton Romanov
7983c71752
Introduce storage_class highlight scope (#2731) 2022-06-14 12:35:36 -05:00
Ivan
0bc7259672
add prisma tree-sitter and lsp support (#2703)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-06-12 14:08:51 -05:00
Michael Davis
f7a3d35752 add textobject queries for gleam 2022-06-07 20:03:31 +09:00
Michael Davis
bcafdf404f add textobject queries for elixir 2022-06-07 20:03:31 +09:00
Michael Davis
7a9147489e add textobject queries for erlang 2022-06-07 20:03:31 +09:00
farwyler
f0d1c85553
support for openscad (#2680)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-06-06 12:26:56 -05:00
Henry
8351a82c2c
simplify some keymap key names (#2677) 2022-06-05 21:22:10 -05:00
Termina94
f1ae496860
Add shell insert commands to typable and config (#2589)
* Add shell insert commands to typable and config

* generate docs

Co-authored-by: Dean Revell <revell@gmail.com>
2022-06-05 19:52:41 +09:00
farwyler
f92a25a856
Passing extra formatting options to LSPs (#2635)
* allows passing extra formatting options to LSPs

- adds optional field 'format' to [[language]] sections in 'languages.toml'

- passes specified options the LSPs via FormattingOptions

* cleaner conversion of formatting properties

* move formatting options inside lsp::Client

* cleans up formatting properties merge
2022-06-05 19:50:57 +09:00
nosa
dfd0754394
Update keymap docs for window swapping (#2659) 2022-06-03 07:09:35 -05:00
Michael Davis
fd4858c03d
add tree-sitter-jsdoc (#2650) 2022-06-03 10:26:47 +05:30
Michael Davis
42d780b103
add tree-sitter-edoc (#2640)
* add tree-sitter-edoc

* fix escape character capture in markdown queries

* add field negation operator "!" to tsq highlights
2022-06-03 07:41:17 +08:00
Ryan Russell
ae12c58f0f
Improve Readability (#2639) 2022-06-01 12:01:37 -05:00
pancake
7706a4a0d8
Add Vlang tree-sitter in the languages.toml (#2526)
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-05-28 14:46:10 -05:00
nitish-17
b31788102e
mention the requirement of C++ compiler for building grammar in doc (#2592) 2022-05-28 11:02:47 -05:00
Michael Davis
efae76160d
add section on syntax tree motions to the usage docs (#2568) 2022-05-26 10:39:58 +09:00
Andrey Tkachenko
67fe16008e
Basic verilog support (#2552) 2022-05-24 12:52:32 -05:00
Erasin
386dccc84e
Add lua lsp (#2560) 2022-05-24 10:03:53 -05:00
Daniel S Poulin
0c05447d49
Add shrink equivalent of extend_to_line_bounds (#2450)
* Add shrink equivalent of extend_to_line_bounds

* Add a check for being past rope end in end position calc

* Include the EOL character in calculations

* Bind to `A-x` for now

* Document new keybind
2022-05-22 10:33:11 +09:00
kyrime
bfc4ff4dcf
Add theme key for picker separator (#2523)
Co-authored-by: ky <>
2022-05-22 10:24:51 +09:00
Blaž Hrastnik
8df8ff27c2
cargo xtask docgen 2022-05-22 00:20:45 +09:00
Jacob Thompson
e8e252648f
Added a default lsp server for Java in languages.toml (#2511)
* Added a default lsp server for Java in languages.toml

* Added a default lsp server for Java in languages.toml cont.

Co-authored-by: Jacob Thompson <a01657923@usu.edu>
2022-05-20 15:17:46 +09:00
Robert Walter
776686ab24
Separate colors for different diagnostics types (#2437)
* feat(theme): add separate diagnostic colors

This commit adds separate diagnostic highlight colors for the different
types of LSP severities. If the severity type doesn't exist or is
unknown, we use some fallback coloring which was in use before this
commit.

Some initial color options were also added in the theme.toml

Resolves issue #2157

* feat(theme): add docs for new diagnostic options

* feat(theme): adjust defaults & reduce redundancy

- the different colors for different diagnostic severities are now
  disabled in the default theme, instead diagnostics are just generally
  underlined (as prior to the changes of this feature)
- the theme querying is now done once instead of every iteration in the
  loop of processing every diagnostic message
2022-05-20 10:30:28 +09:00
Bob
6462542fc5
support insert register in prompt (#2458)
* support insert register in prompt

* use next_char_handler instead of a flag

* Fix clippy issue

* show autoinfo when inserting register

* Revert "show autoinfo when inserting register"

This reverts commit 5488344de1c607d44bdf8693287a85b92cb32518.

* use completion instead of autoinfo

autoinfo is overlapped when using prompt

* recalculate_completion after inserting register

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

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

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2022-05-20 10:27:59 +09:00
midnightexigent
8493b5fca6
Add tree-sitter ssh client config queries (#2498)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-05-18 14:49:50 -05:00
amaihoefner
a5bc69c2b5
feat(commands): add log-open command (#2422) 2022-05-11 10:18:45 +09:00
unrelentingtech
2cb1ea7127
feat(lang): add Meson language support (#2314)
https://mesonbuild.com/Syntax.html
2022-05-11 10:06:37 +09:00
Robert Walter
495ba40eaf
feat(languages): add odin language (#2399) 2022-05-05 12:09:09 -05:00
Matthew Toohey
a5f4925f53
feat(languages): git-ignore and git-attributes (#2397) 2022-05-05 08:47:28 -05:00
Ben Lee-Cohen
09a17e4fa3
Making the 'set-option' command help more descriptive. (#2365)
* Making the 'set-option' command help more descriptive.

* Adding the generated docs

* Making the message multi-line

* Replace newline with break in generated docs
2022-05-04 11:17:08 +09:00
Michael Davis
f59b3b91c8
rewrite auto-pairs docs (#2384) 2022-05-04 11:16:34 +09:00
Robert Walter
fba198c1e0
Add documentation for hx --health (#2357) 2022-05-02 16:46:25 -05:00
unrelentingtech
20162a426b
feat(commands): make it possible to disable format-on-save via the 'auto-format' option (#2321) 2022-05-02 23:31:07 +09:00
Vince Mutolo
f9baced216
add reflow command (#2128)
* add reflow command

Users need to be able to hard-wrap text for many applications, including
comments in code, git commit messages, plaintext documentation, etc. It
often falls to the user to manually insert line breaks where appropriate
in order to hard-wrap text.

This commit introduces the "reflow" command (both in the TUI and core
library) to automatically hard-wrap selected text to a given number of
characters (defined by Unicode "extended grapheme clusters"). It handles
lines with a repeated prefix, such as comments ("//") and indentation.

* reflow: consider newlines to be word separators

* replace custom reflow impl with textwrap crate

* Sync reflow command docs with book

* reflow: add default max_line_len language setting

Co-authored-by: Vince Mutolo <vince@mutolo.org>
2022-05-02 23:24:22 +09:00
Ryosuke Hayashi
f85f0b7272
Add run-shell-command for Commands (#1682)
* add run_shell_command

* docgen

* fix command name

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

* refactored Info::new

* show 'Command failed' if execution fails

* TypedCommand takes care of error handling and printing the error to the statusline.

* docgen

* use Popup instead of autoinfo

* remove to_string in format!

* Revert chage in info.rs

* Show "Command succeed" when success

* Fix info.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2022-05-02 23:15:02 +09:00
Fanda Vacek
1668183590
feat(lang): Cpon lang support (#2355)
Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>
2022-05-01 09:34:46 -05:00
Blaž Hrastnik
8bb89dafa2
cargo xtask docgen 2022-05-01 11:37:14 +09:00
unrelentingtech
2c60798b00
feat(ui): add nbsp (non-breaking space) to rendered whitespace (#2322) 2022-04-30 09:48:52 +09:00
unrelentingtech
8e77e3388c
feat(lang): add devicetree (Flattened Device Tree Source) (#2329) 2022-04-29 15:08:00 -05:00
unrelentingtech
030e7ab988
fix(docs): cleanup obsolete indents.toml mentions (#2327) 2022-04-29 12:40:59 -05:00
Gokul Soumya
de15d70171 Add m textobject to select closest surround pair 2022-04-29 15:51:14 +09:00
Ivan Tham
c22873c33f
Change A-left right to C-left right in insert (#2193)
Currently A-left move one word left and the behavior will be more
consistent for people coming GUI world if the key was changed to control
given that both browsers and editors like vscode uses C-left right by
default to move word rather than alt.
2022-04-29 15:50:01 +09:00
Ivan Tham
ab6a00e196
Make A-hjkl tree-sitter nav A-pion (#2205)
A-hl currently is not very consistent with hl when next object is
selected, since it may go up/down or left/right and this behavior is
confusing such that some people think it should swap the keys with A-jk,
so it is better to use A-pn since that only specifies two direction.

A-jk have the same issue as in it usually moves right and is not
consistent with the behavior of jk so people may think A-hl is better,
maybe A-oi is better here since A-hl will be swapped to A-pn, A-oi can
convey the meaning of in and out, similar to some window manager keys?
2022-04-29 15:49:15 +09:00
chunghha
3a398eec56
fix typos (#2304) 2022-04-27 14:21:20 -05:00
Alexis Kalabura
2e46961886
feat(lsp): add toml lsp (#2302) 2022-04-27 13:48:04 -05:00
meak
1a3d6252b9
feat(lang): add hare language support (#2289)
Co-authored-by: Mehdi Katranji <hello@mek.yt>
2022-04-26 14:55:00 -05:00
ttys3
a8cb46680d
feat(lsp): add vala language support (#2243) 2022-04-24 11:21:07 -05:00
Daniel
15db6031bb
Add :get-option command (#2231) 2022-04-24 16:00:18 +05:30
Lukas
5ca8dfe57c
fix(lsp): divide hcl into seperate languages (#2244) 2022-04-23 16:08:12 -05:00
Lukas
1c1ba006ae
feat(lsp): add yaml lsp (#2234) 2022-04-23 08:38:29 -05:00
Kirawi
dd5a7c6191
Replace line endings using set_line_ending command (#1871)
* set_line_ending: now replace line endings

* use ending.len_chars() directly

* account for unicode-lines feaure in line-ending doc
2022-04-23 17:01:08 +09:00
Justin Ma
5c2570582b
feat(lang): add nushell language support (#2225)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-04-22 09:37:51 -05:00
Michael Davis
6de2e7634f
Document ui.virtual.ruler scope in theme docs (#2199)
From the rulers feature (#2060)
2022-04-20 23:34:17 +05:30
ttys3
4144c9d2f2
feat(lang): add go.mod and go.work support (#2197) 2022-04-20 11:16:02 -05:00
Erin van der Veen
9616477197
Add Nickel language (#2173) 2022-04-20 09:31:59 -05:00
Omnikar
e6b865ed0b allow whitespace to be rendered
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-04-20 11:37:23 +09:00
Thomas
5d5b6bab9b
Add rulers option (#2060)
* Add color_column option

* Rename to ruler

Co-authored-by: DeviousStoat <devious@stoat.com>
2022-04-20 10:44:32 +09:00
matan h
02426072cb
add table of OS/command for copy/symlink the runtime folder to the config (#2073)
* create table of OS and commands in the readme

* add link to wiki from health check (without color; just simple println)

* move the table from readme to docs and add link from the readme to docs

* drop copy on unix,and apply some style fixes from the conversations

* by mistake, I edit master insted of develop

* remove this file from pr

* Update README.md

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

* copy table to readme

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-04-20 10:44:11 +09:00
Kirawi
c2a40d9d52
Add support for local language configuration (#1249)
* add local configuration

* move config loading to Application::new

* simplify find_root_impl
2022-04-18 12:10:51 +09:00
Danillo Melo
be656c14e3
Ruby TextObjects and more file extensions (#2143) 2022-04-17 19:25:44 -05:00
Thomas
2eca2901f3
Pipe typable command (#1972)
Co-authored-by: DeviousStoat <devious@stoat.com>
2022-04-17 12:03:47 +09:00
Dr. David A. Kunz
b04c425c63
Make gutters configurable (#1967)
* config option line numbers none

* view tests

* added tests

* doc

* comment

* Make gutters configurable

* docu

* docu

* rm none docu

* order

* order

* precedence

* simpler

* rm todo

* fixed clippy

* order

* double quotes

* only allow diagnostics and line-numbers

* tests

* docu

* format

* rm short variant and more docu

* performance improvements

* typo

* rename
2022-04-16 10:41:25 +09:00
EmmChriss
50df924811
gdscript support (#1985) 2022-04-16 00:35:23 +09:00
nosa
893963df0a
Additions to 'themes' section of docs (#2098)
* Added more descriptions to the themes part of the docs

* Add more descriptions to themes section of the docs

* capitalised first letters of descriptions in docs

Co-authored-by: Joe Mckay <jm@pop-os.localdomain>
2022-04-15 09:58:16 +09:00
Jared Ramirez
460e6a857b
feat(languages): SQL (#2097) 2022-04-14 13:26:20 -05:00
Michael Davis
4836bb38d3 add tree-sitter-heex
HEEx is a templating engine on top of Elixir's EEx templating
language specific to HTML that is included in Phoenix.LiveView
(though I think the plan is to eventually include it in base
Phoenix). It's a superset of EEx with some additional features
like components and slots.

The injections don't work perfectly because the Elixir grammar is
newline sensitive (the _terminator rule). See
https://github.com/elixir-lang/tree-sitter-elixir/issues/24
for more information.
2022-04-13 14:28:51 +09:00
Michael Davis
9d095e0fdc add tree-sitter-eex
EEx is an templating language for Elixir. Since the incremental
parsing refactor we can used combined injections which allows us
to add EEx support.
2022-04-13 14:28:51 +09:00
scgtrp
740f565c80
Document values for editor.cursor-shape (#2094)
These are hinted at in the example config at the top (except `none`), but really should be listed explicitly near the option itself for clarity.
2022-04-13 13:00:17 +09:00
Omnikar
660e0e44b2
Add :write! to create nonexistent subdirectories (#1839)
* Make `:write` create nonexistent subdirectories

Prompting as to whether this should take place remains a TODO.

* Move subdirectory creation to new `w!` command
2022-04-12 16:52:54 +09:00
Michael Davis
3d79c60a1f
Rewrite Language Support docs (#2065) 2022-04-10 23:20:05 +05:30
Michael Davis
494306ad7a
add tree-sitter-embedded-template (erb & ejs) (#2055)
After the incremental parsing rewrite for injections (which was released
in 22.03 https://helix-editor.com/news/release-22-03-highlights/#incremental-injection-parsing-rewrite),
we can now do combined injections which lets us pull in some templating
grammars. The most notable of those is embedded-template - a pretty
straightforward grammar that covers ERB and EJS.

The grammar and highlights queries are shared between the two but they have
different injections.
2022-04-10 08:23:06 +09:00
Michael Davis
78b1600943
Improve documentation on Language Server installation (#2037) 2022-04-09 12:17:32 +05:30
Kurenshe Nurdaulet
0b410b0a16
Add default language server for Vue (#2043) 2022-04-08 21:04:22 -05:00
Evan Relf
7779dbfcb8
docs: Quote TOML keys containing dots (#2040) 2022-04-08 17:21:52 -05:00
unrelentingtech
7f461895b0
Add language server command for OCaml (#2035) 2022-04-08 15:02:25 -05:00
Aaron Housh
9caf7c0d5a
Add swift language (#2033) 2022-04-08 13:10:37 -05:00
Karl Grasegger
8e12fd5290
PHP roots and languageserver improvements (#2031)
Co-authored-by: Karl Grasegger <karl.grasegger@gebruederheitz.de>
2022-04-08 12:57:46 -05:00
David
61d1684a32
Add default language server for CSS (#2025) 2022-04-08 10:06:54 -05:00
David
22629ca211
Add default language server for JSON (#2024) 2022-04-08 10:06:41 -05:00
David
b5efb9d66c
Add default language server for HTML (#2018) 2022-04-08 08:36:10 -05:00
Matthew Toohey
31c468ab95
add languages r and rmarkdown (#1998)
* add languages `r` and `rmarkdown`

* r: fix highlights

* rmarkdown: add eof in queries

* rmarkdown: update lang-support.md

* r: fix highlight query precedence
2022-04-08 09:30:44 +09:00
Michael Davis
275c05008f
fix keymap doc typo for 'delete' in insert-mode (#1990)
closes #1980
see also #1180
2022-04-07 00:31:40 +09:00
VuiMuich
eb84d9493c
add language ron (#1925) 2022-04-05 07:39:22 -05:00
Roland Kovacs
d962e06e91
Add runtime language configuration (#1794) (#1866)
* Add runtime language configuration (#1794)

* Add set-language typable command to change the language of current buffer.
* Add completer for available language options.

* Update set-language to refresh language server as well

* Add language id based config lookup on `syntax::Loader`.
* Add `Document::set_language3` to set programming language based on language
  id.
* Update `Editor::refresh_language_server` to try language detection only if
  language is not already set.

* Remove language detection from Editor::refresh_language_server

* Move document language detection to where the scratch buffer is saved.
* Rename Document::set_language3 to Document::set_language_by_language_id.

* Remove unnecessary clone in completers::language
2022-04-05 09:56:14 +09:00
Dr. David A. Kunz
9782204f73
Add typed commands buffer-next and buffer-previous (#1940) 2022-04-03 17:56:46 +05:30
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.
2022-04-03 00:46:53 +09:00
Lauri Gustafsson
e4561d1dde
Add texlab language server for latex (#1922) 2022-04-02 09:00:05 -05:00
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`.
2022-04-02 10:07:35 +09:00
Marcin Puc
924462edda
Add install instructions for Void Linux (#1911) 2022-03-31 14:55:55 -05:00
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.
2022-03-31 16:51:11 +09:00