Commit graph

6466 commits

Author SHA1 Message Date
Michael Davis
7f416704b1
Fix precedence of JSON highlight queries for keys 2025-03-12 17:28:11 -04:00
Mikhail Katychev
430ce9c46b
chore: Point OpenSCAD grammar to official repo (#13033) 2025-03-12 16:10:38 -05:00
iximeow
d1e0891260
warn when configured theme is unusable for color reasons (#13058)
if `config.toml` either does not have `editor.true-color` or sets
it to false, many (most?) themes stop being usable. when loading such a
theme, Helix falls back to the default theme, but didn't mention this
anywhere - even in `~/.cache/helix/helix.log` when run with `-v`.

if this occurs when reloading a theme at runtime with `:theme`, there's
a fairly helpful error about

> `theme requires true color support`

seems worth logging about this if it happens during startup too.
2025-03-12 15:52:07 -05:00
Michael Davis
e74956fa4d
minor: Add a helper function for setting the configured theme
This block was duplicated in `Application::new` and in another helper
`Application::refresh_theme`. This change adds a helper to cover both
cases.
2025-03-12 16:32:52 -04:00
Chris44442
8d590e8aee
update vhdl tree-sitter (#13091) 2025-03-12 09:47:37 -05:00
Egor Afanasin
63ed85bc62
Sunset theme: version 2.0 (#13086) 2025-03-12 09:39:55 -05:00
Constantin Angheloiu
9bd3cecd49
Update base16_transparent.toml ui.linenr (#13080) 2025-03-12 09:18:40 -05:00
Daniel Fichtinger
8df58b2e17
feat(ini): bumped grammar version to include support for global parameters (#13088) 2025-03-11 15:28:53 -05:00
dependabot[bot]
f9360fb27e
build(deps): bump rustix from 0.38.44 to 1.0.2 (#13071)
* build(deps): bump rustix from 0.38.44 to 1.0.2

Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.44 to 1.0.2.
- [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/v0.38.44...v1.0.2)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Drop unnecessary unsafe blocks for rustix Uid and Gid types

* Revert spurious downgrade of windows-sys

---------

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-03-11 09:34:08 -05:00
dependabot[bot]
88a254d8bf
build(deps): bump cachix/install-nix-action from 30 to 31 (#13073)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 30 to 31.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v30...v31)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 08:49:18 -05:00
Jonathan Davies
c5c9e65cc4
Update install instructions (#13079) 2025-03-11 08:41:35 -05:00
dependabot[bot]
9db6c534a3
build(deps): bump cachix/cachix-action from 15 to 16 (#13074)
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 15 to 16.
- [Release notes](https://github.com/cachix/cachix-action/releases)
- [Commits](https://github.com/cachix/cachix-action/compare/v15...v16)

---
updated-dependencies:
- dependency-name: cachix/cachix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 08:30:17 -05:00
dependabot[bot]
ff558f9105
build(deps): bump the rust-dependencies group with 5 updates (#13070)
Bumps the rust-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.17.1` | `3.18.0` |
| [once_cell](https://github.com/matklad/once_cell) | `1.20.3` | `1.21.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.218` | `1.0.219` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.43.0` | `1.44.0` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.7.1` | `2.8.0` |


Updates `tempfile` from 3.17.1 to 3.18.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.17.1...v3.18.0)

Updates `once_cell` from 1.20.3 to 1.21.0
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.20.3...v1.21.0)

Updates `serde` from 1.0.218 to 1.0.219
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.218...v1.0.219)

Updates `tokio` from 1.43.0 to 1.44.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.43.0...tokio-1.44.0)

Updates `indexmap` from 2.7.1 to 2.8.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.7.1...2.8.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-11 08:29:38 -05:00
Michael Davis
b38eae1f98
minor: Fix native line-ending handling in trimming integration tests 2025-03-10 11:09:46 -04:00
Michael Davis
67879a1e5b
Avoid inserting final newlines in empty files
This matches the behavior described by the EditorConfig spec for its
`insert_final_newline` option:

> Editors must not insert newlines in empty files when saving those
> files, even if `insert_final_newline = true`.

Co-authored-by: Axlefublr <101342105+Axlefublr@users.noreply.github.com>
2025-03-10 10:38:11 -04:00
Michael Davis
aa20eb8e7f
Add config for trimming trailing whitespace and newlines on write
These match the equivalent options in VSCode. `trim_trailing_whitespace`
is also the name used by EditorConfig.

* `trim-final-newlines` trims any extra line endings after the final one
* `trim-trailing-whitespace` trims any trailing whitespace (but not
  empty lines)
2025-03-10 10:18:55 -04:00
Michael Davis
ee9db440ce
minor: Trim trailing whitespace in languages.toml 2025-03-10 10:18:55 -04:00
Lauri Gustafsson
296eb9be83
languages.toml: Change wgsl_analyzer to wgsl-analyzer (#13063)
The binary name was changed in wgsl-analyzer commit
4c56b1435d30cd45d8aee52297bbf68ed5bb3beb and released in 0.9.7.
2025-03-10 08:22:49 -05:00
suza
dc4761ad3a
feat: Add SourcePawn language support (#13028) 2025-03-07 11:55:48 -06:00
Noel Cower
2d3b75a8c5
fix: render rulers before the cursor
Render rulers before the cursor to ensure that the cursor, when over
a ruler, is not hidden from view. Without this, you typically end up
with 1) foreground text that is the same as the background if the
ruler doesn't already have a foreground and 2) no visible cursor,
because the ruler's background color took precedence. By moving the
rulers before the cursor, this ensures that the theme is still rendered
more or less the way one would visually expect things to turn out.
2025-03-07 12:44:28 -05:00
Michael Davis
8da226f0b4
flake: Revert devShell linker to lld
`mold` does not appear to work on macOS as stated in the parent commit.
2025-03-07 12:06:33 -05:00
Michael Davis
fab08c0981
flake: Use mold for linking in devShell
Our `lld` was a bit out of date. Mold seems to be slightly faster
anyways and seems to work well on both Linux & macOS.
2025-03-07 09:41:48 -05:00
Michael Davis
b6e58c0fa4
flake: Split platform and common RUSTFLAGS in devShell
The `--no-rosegment` is not supported on macOS but the other flag
configurations can be used on both macOS and Linux.
2025-03-07 09:36:58 -05:00
Michael Davis
19558839b7
flake: Avoid setting HELIX_RUNTIME in devShell
The runtime directory should be correctly set without the need to set
HELIX_RUNTIME manually because we check for a runtime directory within
CARGO_MANIFEST_DIR.

This change also filters the runtime directory out of the source file
set passed to buildRustPackage since the runtime directory is not needed
at compilation time.
2025-03-06 18:40:35 -05:00
Michael Davis
c4d314d7ba
LSP: Fix offset encoding test case
Co-authored-by: Isaac Mills <rooster0055@protonmail.com>
2025-03-06 17:13:38 -05:00
Daniel Fichtinger
b423ed42f1
feat: add harper-ls LSP configuration (#13029) 2025-03-06 15:59:22 -06:00
Michael Davis
a3fa65880e
flake: Copy logo.svg in postInstall hook 2025-03-04 14:52:17 -05:00
Christopher Smyth
b1ee4ab5c6
Fix the git hash missing and add some more comments. (#13024) 2025-03-04 13:12:48 -06:00
Michael Davis
fbc0f956b3
minor: Move json deserialization into text_document_hover future
This follows a pattern used in the signature help request for example.
Moving the json deserialization into the return future of
`text_document_hover` makes the types easier for callers to work with.
2025-03-04 12:01:07 -05:00
Michael Davis
486f4297b7
Set cargoLock.allowBuiltinFetchGit in Nix package 2025-03-04 11:47:17 -05:00
Michael Davis
28e69f09fc
direnv: Watch changes to default.nix
Now that the package definition lives in default.nix we need direnv to
watch that file to get automatic reloads.
2025-03-04 11:31:54 -05:00
Michael Davis
ab56f9e26b
minor: Tweak some verbose LSP logs
The info log within `process_request_response` duplicated the body of
the JSON message printed earlier by the transport which was confusing.

The error log in the completion handler was easy to hit during normal
use and is not actually an error - dropping is the graceful way to
handle changes occurring while completion requests are in flight.
2025-03-04 11:25:11 -05:00
Christopher Smyth
1d453785e5
Clean up Nix Flake & make it easier to customize (#12831) 2025-03-04 10:23:28 -06:00
Erwin de Keijzer
671a6036b3
Add beans theme (#12963) 2025-03-04 10:03:46 -06:00
Alexander Brassel
82f8ac208f
Improve %% escaping error message (#13018) 2025-03-04 10:03:11 -06:00
dependabot[bot]
9440feae7c
build(deps): bump the rust-dependencies group with 11 updates (#13017)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 18:09:43 -06:00
luetage
1a28999002
Kanagawa: fix palette and attempt at a markdown compromise (#12895) 2025-03-02 11:06:59 -06:00
Michael Davis
0efa8207d8
Rewrite command line parsing, add flags and expansions (#12527)
Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
2025-02-26 19:50:15 -06:00
may
e1c7a1ed77
remove unnecessary allocations in switch_case (#12786) 2025-02-26 19:03:29 -06:00
Michael Davis
7bebe0a70e
Highlight file picker directories with 'ui.text.directory'
This applies the same styling as the parent commit to the file pickers.
2025-02-26 19:19:37 -05:00
Nik Revenco
682967d328
feat: Improve look of Global Search Picker (#12855)
Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
Co-authored-by: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-02-26 18:09:57 -06:00
Mykyta
1e8774a030
Added missing CSS highlight Tree Sitter Scopes (#12497) 2025-02-26 17:51:36 -06:00
Daniel Fichtinger
c36408457a
feat(kdl): add kdlfmt as formatter for kdl (#12967) 2025-02-26 17:50:36 -06:00
Branch Vincent
1dd8a19ad6
Add pkl-lsp (#12962) 2025-02-26 17:45:10 -06:00
tshaynik
43eab10a4c
languages.toml: add starpls as Starlark language server (#12958) 2025-02-26 17:43:16 -06:00
Daniel Fichtinger
83d4ca41cc
feat: added comment textobject to toml (#12952) 2025-02-26 17:40:34 -06:00
SofusA
534d0907d3
Update c-sharp queries (#12948) 2025-02-26 17:40:16 -06:00
Daniel Fichtinger
bb3af143f1
feat: language support for mail files (#12945) 2025-02-26 17:33:36 -06:00
wcampbell
26cb3c20e7
Accept more scons as python language (#12943) 2025-02-26 17:31:23 -06:00
Bang Lee
69f25a85da
Update languages.toml to add astro-ls (#12939) 2025-02-26 17:30:55 -06:00