Commit Graph

6628 Commits (205e7ece70c52a7d921ea014e1017c41488e37e5)

Author SHA1 Message Date
Mykyta effe849cf4
Update themes.md (#13247)
added small description to `label` and `special` - because for me it was not clear what it was for, maybe I am not the one
2025-04-06 12:22:06 -05:00
Jorge Gomez 130f725026
Update mint lsp command args (#13248) 2025-04-06 12:21:33 -05:00
Nik Revenco 42de785779
feat: sync catppuccin theme changes (#13262)
Co-authored-by: Nik Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-04-06 12:06:21 -05:00
Wesley Hershberger 6c42ed1bd5
Debian control file syntax highlighting (#13245)
File format described at
https://www.debian.org/doc/debian-policy/ch-controlfields.html

Co-authored-by: Wesley Hershberger <wesley.hershberger@gmail.com>
2025-04-06 12:05:43 -05:00
Rolo 5b72b59448 perf: use `next_back` on `DoubleEndedIterator` 2025-04-06 12:03:14 -05:00
Rolo 1bc45c8b3a refactor: change empty check to `is_empty` instead of `len > 0` 2025-04-06 12:03:14 -05:00
Rolo f857a98671 refactor: uneeded string conversion for Display type 2025-04-06 12:03:14 -05:00
dependabot[bot] 5a671e65fd
build(deps): bump gix from 0.70.0 to 0.71.0 (#13269)
* build(deps): bump gix from 0.70.0 to 0.71.0

Bumps [gix](https://github.com/GitoxideLabs/gitoxide) from 0.70.0 to 0.71.0.
- [Release notes](https://github.com/GitoxideLabs/gitoxide/releases)
- [Changelog](https://github.com/GitoxideLabs/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/GitoxideLabs/gitoxide/compare/gix-v0.70.0...gix-v0.71.0)

---
updated-dependencies:
- dependency-name: gix
  dependency-version: 0.71.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* minor: Migrate from Repository::work_dir to Repository::workdir

The former was deprecated in favor of the latter

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-04-06 12:02:20 -05:00
Mykyta 994b750dd4
fixed: typo in capture group, removed duplicate query (#13251) 2025-04-06 11:49:21 -05:00
Max 1fc19c6d8e
Add Prolog tree-sitter grammar (#11611) 2025-04-06 11:43:53 -05:00
Daniel Fichtinger d0c5a2044d
feat: added lsp for just (#13276) 2025-04-06 11:41:53 -05:00
Tshepang Mbambo 2bb0d52f3e
book: avoid uncomfortable flow disruption (#13271) 2025-04-06 11:41:10 -05:00
dependabot[bot] 7ebf650029
build(deps): bump once_cell in the rust-dependencies group (#13244)
Bumps the rust-dependencies group with 1 update: [once_cell](https://github.com/matklad/once_cell).


Updates `once_cell` from 1.21.1 to 1.21.3
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.21.1...v1.21.3)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-version: 1.21.3
  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-04-01 13:55:16 +09:00
Sri Senthil Balaji J db187c4870
feat: add ConsoleOnly to desktop entry categories (#13236) 2025-03-31 09:28:50 -05:00
Michael Davis e148d8b311
editor: Remove closed Document after updating Views
When closing a document we must wait until all views have been updated
first - either replacing their current document or closing the view -
before we remove the document from the `documents` map. The
`Editor::_refresh` helper is called by `Editor::close`. It accesses each
View's Document to sync changes and ensure that the cursor is in view.
When closing multiple Views at once, `Editor::_refresh` will attempt
to access the closing Document while refreshing a to-be-closed View.
2025-03-30 11:01:17 -04:00
Andrea Novellini fb815e2c6f
Add peachpuff theme (#13225) 2025-03-29 14:44:55 -05:00
Gavin Morrow e735485277
Remove bg from tokyonight text (#13216) 2025-03-29 14:43:33 -05:00
Keir Lawson bb96a535fc
Add ui.text.directory to spacebones (#13213) 2025-03-29 14:41:43 -05:00
RoloEdits 01fce51c45
fix(keymap): point to proper `MappableCommand` instead of `Command` (#13214) 2025-03-28 08:51:36 -05:00
Keir Lawson 7929c0719d
Track progress title an display in place of internal token (#13180)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-03-27 12:00:23 -05:00
Alexandre Legent 68d7308e25
Update golangci-lint command for v2 (#13204) 2025-03-27 11:27:25 -05:00
Daniel Fichtinger a2c580c4ae
feat: add tmTheme as XML filetype (#13202) 2025-03-27 08:39:10 -05:00
Steven Vancoillie cf7eb5517f
Add earl_grey theme (#13203) 2025-03-27 08:37:32 -05: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
Rishikanth Chandrasekaran ccf9564123
Adds Carbon theme for helix editor (#13067) 2025-03-19 08:54:10 -05:00
Max Milton e7c82a34a5
language: Extend ini with more systemd file-types (#13139) 2025-03-19 08:44:37 -05:00
Michael Davis 33c17d48ff
minor: Move 'execute_lsp_command' helper into helix-view
This is a minor move that will make future refactors of code actions
simpler. We should be able to move nearly all code action functionality
into `helix-view`, save UI stuff like the `menu::Item` implementation
and dealings with the compositor.
2025-03-19 09:41:18 -04:00