Commit Graph

6689 Commits (01cfd2e6d4a303761003d16aa97a532b82a7e10c)

Author SHA1 Message Date
piotrkwarcinski c0c3d69280 Merge remote-tracking branch 'plugin-steel/steel-event-system' into helix-plugin-register-value 2025-05-11 14:58:36 +02:00
Matt Paras 75bf1a7893 update steel to have fixed language server 2025-05-10 11:56:15 -07:00
Matt Paras e8614ce099 use embedded dependencies instead of depending on external code generated ones 2025-05-10 11:55:27 -07:00
Matt Paras 0b5741fa84 attempt to get nix working 2025-05-10 11:53:35 -07:00
piotrkwarcinski edcb630075 cleanup 2025-05-10 14:49:04 +02:00
piotrkwarcinski 63086eecf7 feat: allow to get a register value from scheme 2025-05-04 22:27:25 +02:00
Matthew Paras 85f99f8d5a
Merge pull request #22 from mattwparas/mwp-improving-docs
Improving docs
2025-04-27 09:52:39 -07:00
Matt Paras c69f11b428 fix merge 2025-04-27 11:51:14 -05:00
Matthew Paras 0c967327b1
Merge pull request #21 from mattwparas/mwp-embedded-modules
Setup embedding the code generated modules in the binary itself
2025-04-27 09:43:56 -07:00
Matt Paras 5c6620b465 remove debug prints 2025-04-27 11:42:15 -05:00
Matt Paras e684c7db1b setup embedding 2025-04-27 11:39:38 -05:00
Matt Paras 416642dc24 update 2025-04-27 11:33:56 -05:00
Matt Paras 82ad9c1f97 update steel 2025-04-27 07:48:59 -05:00
Matt Paras 35c9a3dc37 start working on some docs 2025-04-27 07:47:46 -05:00
Matt Paras 170e5068cd wip 2025-04-25 22:08:43 -07:00
Matthew Paras 9bb634ab4a
Merge pull request #16 from RatCornu/steel
Optionally load init.scm and helix.scm from env var
2025-04-19 09:18:06 -07:00
Matt Paras 85eab83d70 fix command and arg parsing with typed commands 2025-04-19 09:01:40 -07:00
Matt Paras 6e8fa50957 bump steel to fix windows 2025-04-17 08:37:48 -07:00
Matt Paras 43b9dd3e65 remove erroneous no such command when the command succeeds 2025-04-08 17:44:50 -07:00
Matt Paras c9b52761ec unpark the interrupt handler after resuming 2025-03-26 21:37:54 -07:00
Matt Paras 05f4352722 bump steel 2025-03-26 17:42:37 -07:00
Matt Paras 7143dd4850 use new mutex guard 2025-03-25 22:31:39 -07:00
Matt Paras 60c0882fd2 remove old document open/close events 2025-03-25 22:10:43 -07:00
Matt Paras 2d16a86c4c update steel submodule 2025-03-25 20:02:52 -07:00
Matthew Paras 14316aeffc
Merge pull request #19 from mattwparas/language-configuration
Merge in master
2025-03-25 19:54:01 -07:00
Matt Paras fffa86e682 merge from master 2025-03-25 19:48:34 -07:00
Michael Davis 388a3b78e3
Avoid removing modified documents in Editor::close_document
This fixes a regression from 6da1a79d80. `:buffer-close` on an
unmodified document would cause later panics since the document should
not have been removed. Instead of eagerly removing the document on the
first line we need to wait until we've checked that it's unmodified.
2025-03-25 09:03:32 -04:00
Michael Davis d43de14807
LSP: Avoid requesting document colors for ghost transactions
The point of ghost transactions is to avoid notifying language servers
about changes since the change is meant to be temporary. This is used
for completion while selecting items in the menu: updating the language
server would mess up incomplete completions.

When a document is changed by a ghost transaction the language server
will not be notified so its understanding of the document will not be
synchronized and any positions it sends may be out-of-date. So we should
avoid triggering a request for new document color information when a
document is changed by a ghost transaction.
2025-03-25 08:52:47 -04:00
dependabot[bot] 04d1180a0c
build(deps): bump the rust-dependencies group with 4 updates (#13190)
Bumps the rust-dependencies group with 4 updates: [tempfile](https://github.com/Stebalien/tempfile), [log](https://github.com/rust-lang/log), [rustix](https://github.com/bytecodealliance/rustix) and [cc](https://github.com/rust-lang/cc-rs).


Updates `tempfile` from 3.19.0 to 3.19.1
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.19.0...v3.19.1)

Updates `log` from 0.4.26 to 0.4.27
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.26...0.4.27)

Updates `rustix` from 1.0.2 to 1.0.3
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGES.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v1.0.2...v1.0.3)

Updates `cc` from 1.2.16 to 1.2.17
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.16...cc-v1.2.17)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 07:40:40 -05:00
Nick 5adb4b7413
Allow `:theme` to show current theme (#13192)
Updates the signature for the command to take 0 arguments. This probably
regressed during 0efa8207d8.
2025-03-25 18:43:26 +09:00
Sebastian Dörner 13b2dc31f5
Book: Add a section with links to "Helix mode" in non-Helix software. (#12258) 2025-03-24 08:21:37 -05:00
Nik Revenco 0ee5850016
Color swatches ( 🟩 green 🟥 #ffaaaa ) (#12308) 2025-03-23 16:07:02 -05:00
Asta Halkjær From 8ff544757f
Make `goto_word` highlights visible (same fix as #12904) (#13174) 2025-03-23 10:27:58 -05:00
Branch Vincent f07c1c1b29
add `ui.text.directory` to onedark (#13166) 2025-03-23 09:33:23 -05:00
RoloEdits 8ad6e53b1f
build(grammar): remove `-fPIC` flag from windows build (#13169)
Even though there is a check for `is_like_msvc`, when setting `CXX` to
`clang++` this will miss that check and try to use `-fPIC`, which is an
invlaid flag for the target.
2025-03-23 09:32:56 -05:00
Ahmir Postell 6bedca8064
Add focus_nova theme (#13144) 2025-03-22 16:24:16 -05:00
Michael Davis 7e7a98560e
LSP: Eagerly decode request results in the client
Previously the `call` helper (and its related functions) returned a
`serde_json::Value` which was then decoded either later in the client
(see signature help and hover) or by the client's caller. This led to
some unnecessary boilerplate in the client:

    let resp = self.call::<MyRequest>(params);
    Some(async move { Ok(serde_json::from_value(resp.await?)?) })

and in the caller. It also allowed for mistakes with the types. The
workspace symbol request's calling code for example mistakenly decoded a
`lsp::WorkspaceSymbolResponse` as `Vec<lsp::SymbolInformation>` - one of
the untagged enum members (so it parsed successfully) but not the
correct type.

With this change, the `call` helper eagerly decodes the response to a
request as the `lsp::request::Request::Result` trait item. This is
similar to the old helper `request` (which has become redundant and has
been eliminated) but all work is done within the same async block which
avoids some awkward lifetimes. The return types of functions like
`Client::text_document_range_inlay_hints` are now more verbose but it is
no longer possible to accidentally decode as an incorrect type.

Additionally `Client::resolve_code_action` now uses the `call_with_ref`
helper to avoid an unnecessary clone.
2025-03-22 14:40:29 -04:00
Michael Davis 6da1a79d80
Add document and LSP lifecycle events, move some callbacks into hooks
This adds events for:

* a document being opened
* a document being closed
* a language server sending the initialized notification
* a language server exiting

and also moves some handling done for these scenarios into hooks,
generally moving more into helix-view. A hook is also added on
`DocumentDidChange` which sends the `text_document_did_change`
notification - this resolves a TODO in `document`.
2025-03-22 11:41:50 -04:00
Michael Davis 2cc33b5c47
Add pull diagnostics `identifier` to LSP diagnostic provider
This includes a change to lsp-types to store the identifier as an Arc
since it will be cloned for each diagnostic.
2025-03-22 09:25:29 -04:00
Michael Davis 683fac65e7
Refactor DiagnosticProvider as an enum
This resolves a TODO in the core diagnostic module to refactor this
type. It was originally an alias of `LanguageServerId` for simplicity.
Refactoring as an enum is a necessary step towards introducing
"internal" diagnostics - diagnostics emitted by core features such as
a spell checker. Fully supporting this use-case will require further
larger changes to the diagnostic type, but the change to the provider
can be made first.

Note that `Copy` is not derived for `DiagnosticProvider` (as it was
previously because `LanguageServerId` is `Copy`). In the child commits
we will add the `identifier` used in LSP pull diagnostics which is a
string - not `Copy`.
2025-03-22 09:25:29 -04:00
Michael Davis 2d4c2a170c
commands: Allow any number of arguments in `:bc`, `:bc!`
Limiting to zero arguments was incorrect - a set of buffers can be
specified.
2025-03-22 09:17:30 -04:00
Michael Davis 14cab4ba62
LSP: Gracefully handle partial failures in multi-server LSP requests
This is the same change as 1c9a5bd366 but for:

* document symbols
* workspace symbols
* goto definition/declaration/.../references
* hover

Instead of bailing when one server fails, we log an error and continue
gathering items from the other responses.
2025-03-22 08:54:22 -04:00
Michael Davis 3a63e85b6a
Support EditorConfig (#13056) 2025-03-22 16:06:41 +09:00
RoloEdits f6cb90593d
chore(worker): remove unused lifetime on `EventAccumulator` (#13158) 2025-03-22 16:00:39 +09:00
Ian Hobson 1c9a5bd366
Show successfully requested code actions after a failed request (#13156)
When requesting code actions from multiple LSP servers,
rather than bailing as soon as an error is encountered,
instead log the error and then keep going so that successful
requests can be presented to the user.
2025-03-21 09:10:24 -05:00
Michael Davis 1dee64f7ec
minor: Accept `impl AsRef<Path>` in loader's runtime_file helper
This is purely for ergonomics: we should be able to pass strings for
example

    crate::runtime_file(format!("namespace/{foo}/{bar}.txt"))

(Note that this works on Windows, see the `Path` documentation.)
2025-03-20 22:05:23 -04:00
Jan b7d735ffe6
Switch from reddish-orange to orangeish-yellow for Solarized diff.delta (#13121) 2025-03-20 08:59:23 -05:00
Jan 7ca916ab73
Switch from reddish-orange to orangeish-yellow for Solarized diff.delta (#13121) 2025-03-20 08:55:06 -05:00
may 8e65077065
queries(scheme): consider the first argument of λ to be a variable (#13143) 2025-03-20 08:54:26 -05:00
Freddie Gilbraith d6cacb2731
add werk language and highlights (#13136) 2025-03-20 08:04:52 -05:00