Snippet text elements can contain escape sequences
that must be treated properly. Furthermore snippets
must always escape certain characters (like `}`
or `\`). The function has been updated to account
for that. `text` is now also included with
`anything` to match the grammar and can also
match empty text. To avoid infinite loops the
`non-empty` combinator has been added which is
automatically used in the `one_or_more` and
`zero_or more` combinator where the problemn would
occur.
Previously any remaining text of the snippet that could not be parsed
was ignored. This commit adds the `parse_all` function which reports
an error if any text was not consumed by the parser
* Switch nix grammar repository location to the new repo. The author
has transferred the repository to 'nix-community'.
* Capture ':' and '...' as 'punctuation.delimiter'.
* Macros that start with underscore were incorrectly marked as
'comment.unused' rather than 'keyword.directive' due to an ordering
issue of those two patterns.
* Recognize escripts as Erlang by the shebang.
These gruvbox variants were introduced before theme inheritance and
only differ by a few colors. This change cleans up the duplicated
theming with theme inheritance.
The gruvbox themes (gruvbox, gruvbox dark hard and guvbox light)
don't provide a colour for the new virtual inlay hints. Looking at the
original repo, and other derivatives, there doesn't appear to be a clear
definition of what inlay hints should be. Although most sources indicate
that it can be the same as the color for comments.
Considering that, this commit sets the new field on each of the three
themes to be gray1, same as commented text.
Signed-off-by: Josh Bainbridge <josh.bainbridge@gmail.com>
* helix-term: send the STOP signal to all processes in the process group
From kill(3p):
If pid is 0, sig shall be sent to all processes (excluding an unspecified set
of system processes) whose process group ID is equal to the process group ID
of the sender, and for which the process has permission to send a signal.
This fixes the issue of running `git commit`, attempting to suspend
helix with ^Z, and then not regaining control over the terminal and
having to press ^Z again.
* helix-term: use libc directly to send STOP signal
* helix-term: document safety of libc::kill
* helix-term: properly handle libc::kill's failure
I misread the manpage for POSIX `kill` -- it returns `-1` in
the failure case, and sets `errno`, which is retrieved via
`std::io::Error::last_os_error()`, has its string representation printed
out, and then exits with the matching status code (or 1 if, for whatever
reason, there is no matching status code).
* helix-term: expand upon why we need to SIGSTOP the entire process group
Also add a link back to one of the upstream issues.
Taken from the official theme:
```json
"editorInlayHint.background": "#4d4d4dcc",
"editorInlayHint.foreground": "#ffffff",
"editorInlayHint.parameterBackground": "#4d4d4dcc",
"editorInlayHint.parameterForeground": "#ffffff",
"editorInlayHint.typeBackground": "#4d4d4dcc",
"editorInlayHint.typeForeground": "#ffffff",
```
* misc: missing inline, outdated link
* doc: Add new theme keys and config option to book
* fix: don't panic in Tree::try_get(view_id)
Necessary for later, where we could be receiving an LSP response
for a closed window, in which case we don't want to crash while
checking for its existence
* fix: reset idle timer on all mouse events
* refacto: Introduce Overlay::new and InlineAnnotation::new
* refacto: extract make_job_callback from Context::callback
* feat: add LSP display_inlay_hint option to config
* feat: communicate inlay hints support capabilities of helix to LSP server
* feat: Add function to request range of inlay hint from LSP
* feat: Save inlay hints in document, per view
* feat: Update inlay hints on document changes
* feat: Compute inlay hints on idle timeout
* nit: Add todo's about inlay hints for later
* fix: compute text annotations for current view in view.rs, not document.rs
* doc: Improve Document::text_annotations() description
* nit: getters don't use 'get_' in front
* fix: Drop inlay hints annotations on config refresh if necessary
* fix: padding theming for LSP inlay hints
* fix: tracking of outdated inlay hints should not be dependant on document revision (because of undos and such)
* fix: follow LSP spec and don't highlight padding as virtual text
* config: add some LSP inlay hint configs