This reverts commit 0dc67ff885.
See the post-merge discussion in #9828. The old behavior was less
surprising and we have other ways to abort from a prompt, so let's
revert the behavior change.
* feat: Add `Ohm` language support
Hope this commit makes it into release :)
* Update runtime/queries/ohm/highlights.scm
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* chore: final newline
---------
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This uses the new TreeCursor type from the parent commit to reimplement
the tree-sitter motions (`A-p/o/i/n`). Other tree-sitter related
features like textobjects are not touched with this change and will
need a different, unrelated approach to solve.
This uses the layer parentage information from the parent commit to
traverse the layers. It's a similar API to `tree_sitter:TreeCursor`
but internally it does not use a `tree_sitter::TreeCursor` currently
because that interface is behaving very unexpectedly. Using the
`next_sibling`/`prev_sibling`/`parent` API on `tree_sitter::Node`
reflects the previous code's behavior so this should result in no
surprising changes.
This commit adds a `parent` field to the `LanguageLayer`. This
information is conveniently already available when we parse injections.
This will be used in the child commit to create a type that can
traverse injection layers using this information.
This adds parameter highlighting for reference parameters and defaulted
parameters. For example:
```cpp
auto strip_prefix_only(std::string& s,
Hidden_Homonym skip_hidden_homonym = {}) const
-> Affixing_Result<Prefix>;
```
Previously both parameters were only highlighted as variables.
A few changes:
* 0-arity type specs like the following previously would not have the
expected 'variable.parameter' highlighting for the return type:
-spec foo() -> Value when Value :: term().
* Highlight module, type and function docs as documentation comments
and inject markdown into them.
* Replace `#match?` predicates with `#any-of?` where possible.
* Remove custom auto-pairs. Now that Erlang uses markdown for
documentation, the asciidoc-style backtick-singlequote pair is no
longer useful.
* WIP
* WIP
* WIP
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* WIP
* WIP
* WIP
* Fix typos
* Fix typos
* Minor updates
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Remove mention of arrows in split tutorial
* Do not mention starting in normal mode
* Fix right drift of titles
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Update runtime/tutor
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
* Reflow paragraphs
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Update runtime/tutor
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
---------
Co-authored-by: David Else <12832280+David-Else@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
The refactor in bcf7b263 introduced a possible subtraction with overflow
when the statusline is layed out so that the left or right sides are
larger than the padding it would take to align the center area to the
middle.
When the left or right areas are too large, we can evenly space the
elements rather than trying to align the center area to the middle.
This prevents possible underflows and makes sense visually - it's
still easy to tell the areas apart at a glance.
* feat: add support for ember .hbs (glimmer) templates
* adjust highlights to helix
* highlight this correctly in block statements
* correctly highlight attributes
* correctly highlight hash_pair
* add newline to highlights.scm
* refactor: use #any-of and #eq instead of #match
* chore: add newline to languages.toml
The `shell_impl` and `shell_impl_async` functions no longer return
`success` because it was always `true`. If the command didn't succeed
both functions would return an `Err`.
This was also the reason, why `shell_keep_pipe` didn't work. It relied
upon the value of `success` and aborted in case of an `Err`.
It now removes any selection for which `shell_impl` returns `Err`.
If the command always fails, the selections are preserved and an error
message is displayed in the status bar.