* Send active diagnostics to LSP when requesting code actions.
This allows for e.g. clangd to properly send the quickfix code actions
corresponding to those diagnostics as options.
The LSP spec v3.16.0 introduced an opaque `data` member that would allow
the server to persist arbitrary data between the diagnostic and the code
actions request, but this is not supported yet by this commit.
* Reuse existing range_to_lsp_range functionality
* 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>
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.
This will become more important with the HEEx grammar being added.
Error highlighting with the Elixir grammar is a bit jumpy because
in some scenarios, a bit of missing syntax can force tree-sitter to
give up on error recovery and mark the entire tree as an error.
This ends up looking bad when editing. We don't typically highlight
error nodes so I'm inclined to leave it out of the highlights here.
The new revision handles a case that I come across often: a stab
clause (i.e. '->') with an empty right hand side:
Enum.map(xs, fn x ->
end)
The old version would parse the "end" token as an error.
This is technically valid syntax but more importantly it comes up
very often when editing, and the old revision would flicker between
the keyword highlight and the warning highlight.
* Make textobject select last paragraph
Last paragraph shoud be selected if the cursor was placed on the
whitespace paragraph part and `map` is done, otherwise it would do
nothing useful, but now we select backwards for the last paragraph
which behaves similarly to kakoune, making `map` useful for the last
paragraph with whitespace. Example usecase is to copy and paste last
ledger cli paragraph quickly by `mapyp` to duplicate last entry.
* Fix typo in core textobject
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
hx --health output table's second and third columns were not showing
symbols like ✔ or ✘ to indicate whether LSP or DAP binaries were found.
This change adds these symbols to improve accessibility.
Fixes#1894
Signed-off-by: Nirmal Patel <npate012@gmail.com>
* Make `:write` create nonexistent subdirectories
Prompting as to whether this should take place remains a TODO.
* Move subdirectory creation to new `w!` command
The `file_picker_at_current_directory` command opens the file picker at
the current working directory (CWD). This can be useful when paired with
the built-in `:cd` command which changes the CWD.
It has been mapped to `space F` by default.
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.
During a single HighlightEvent::Source, the highlight spans do not
change and we can merge them into a single style at the beginning
of the event and use it instead of re-computing it for every grapheme