Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--.github/dependabot.yml8
-rw-r--r--.github/workflows/build.yml8
-rw-r--r--.github/workflows/cachix.yml2
-rw-r--r--.github/workflows/gh-pages.yml2
-rw-r--r--.github/workflows/release.yml43
-rw-r--r--CHANGELOG.md300
-rw-r--r--Cargo.lock977
-rw-r--r--Cargo.toml13
-rw-r--r--book/src/SUMMARY.md3
-rw-r--r--book/src/building-from-source.md2
-rw-r--r--book/src/command-line.md4
-rw-r--r--book/src/editor.md84
-rw-r--r--book/src/generated/lang-support.md578
-rw-r--r--book/src/generated/static-cmd.md12
-rw-r--r--book/src/generated/typable-cmd.md10
-rw-r--r--book/src/guides/README.md2
-rw-r--r--book/src/guides/rainbow_bracket_queries.md132
-rw-r--r--book/src/guides/tags.md34
-rw-r--r--book/src/guides/textobject.md2
-rw-r--r--book/src/jumplist.md36
-rw-r--r--book/src/keymap.md60
-rw-r--r--book/src/languages.md4
-rw-r--r--book/src/other-software.md2
-rw-r--r--book/src/package-managers.md13
-rw-r--r--book/src/remapping.md38
-rw-r--r--book/src/textobjects.md1
-rw-r--r--book/src/themes.md22
-rw-r--r--contrib/Helix.appdata.xml6
-rw-r--r--contrib/completion/hx.bash4
-rw-r--r--contrib/completion/hx.fish6
-rw-r--r--contrib/completion/hx.nu4
-rw-r--r--contrib/completion/hx.zsh2
-rw-r--r--default.nix2
-rw-r--r--docs/architecture.md16
-rw-r--r--flake.lock12
-rw-r--r--flake.nix11
-rw-r--r--grammars.nix2
-rw-r--r--helix-core/Cargo.toml8
-rw-r--r--helix-core/src/completion.rs1
-rw-r--r--helix-core/src/diagnostic.rs11
-rw-r--r--helix-core/src/editor_config.rs1
-rw-r--r--helix-core/src/indent.rs17
-rw-r--r--helix-core/src/position.rs9
-rw-r--r--helix-core/src/snippets.rs2
-rw-r--r--helix-core/src/snippets/elaborate.rs2
-rw-r--r--helix-core/src/syntax.rs279
-rw-r--r--helix-core/src/syntax/config.rs15
-rw-r--r--helix-core/src/transaction.rs15
-rw-r--r--helix-dap/Cargo.toml2
-rw-r--r--helix-dap/src/client.rs6
-rw-r--r--helix-dap/src/lib.rs14
-rw-r--r--helix-dap/src/transport.rs8
-rw-r--r--helix-event/Cargo.toml2
-rw-r--r--helix-loader/Cargo.toml2
-rw-r--r--helix-loader/src/grammar.rs21
-rw-r--r--helix-loader/src/lib.rs11
-rw-r--r--helix-lsp-types/Cargo.toml4
-rw-r--r--helix-lsp-types/src/code_action.rs25
-rw-r--r--helix-lsp-types/src/completion.rs2
-rw-r--r--helix-lsp-types/src/document_symbols.rs2
-rw-r--r--helix-lsp-types/src/lib.rs55
-rw-r--r--helix-lsp-types/src/progress.rs8
-rw-r--r--helix-lsp-types/src/semantic_tokens.rs8
-rw-r--r--helix-lsp-types/src/workspace_diagnostic.rs2
-rw-r--r--helix-lsp-types/src/workspace_symbols.rs20
-rw-r--r--helix-lsp/Cargo.toml5
-rw-r--r--helix-lsp/src/client.rs35
-rw-r--r--helix-lsp/src/lib.rs115
-rw-r--r--helix-lsp/src/transport.rs10
-rw-r--r--helix-stdx/Cargo.toml6
-rw-r--r--helix-stdx/src/env.rs15
-rw-r--r--helix-stdx/src/faccess.rs23
-rw-r--r--helix-stdx/src/lib.rs3
-rw-r--r--helix-stdx/src/path.rs3
-rw-r--r--helix-stdx/src/range.rs3
-rw-r--r--helix-stdx/src/rope.rs2
-rw-r--r--helix-term/Cargo.toml27
-rw-r--r--helix-term/src/application.rs246
-rw-r--r--helix-term/src/args.rs1
-rw-r--r--helix-term/src/commands.rs270
-rw-r--r--helix-term/src/commands/dap.rs10
-rw-r--r--helix-term/src/commands/lsp.rs25
-rw-r--r--helix-term/src/commands/syntax.rs446
-rw-r--r--helix-term/src/commands/typed.rs306
-rw-r--r--helix-term/src/compositor.rs5
-rw-r--r--helix-term/src/config.rs6
-rw-r--r--helix-term/src/handlers.rs14
-rw-r--r--helix-term/src/handlers/completion.rs4
-rw-r--r--helix-term/src/handlers/completion/item.rs1
-rw-r--r--helix-term/src/handlers/completion/request.rs11
-rw-r--r--helix-term/src/handlers/completion/word.rs134
-rw-r--r--helix-term/src/handlers/diagnostics.rs283
-rw-r--r--helix-term/src/handlers/prompt.rs17
-rw-r--r--helix-term/src/health.rs93
-rw-r--r--helix-term/src/keymap/default.rs6
-rw-r--r--helix-term/src/main.rs35
-rw-r--r--helix-term/src/ui/completion.rs6
-rw-r--r--helix-term/src/ui/document.rs2
-rw-r--r--helix-term/src/ui/editor.rs42
-rw-r--r--helix-term/src/ui/markdown.rs8
-rw-r--r--helix-term/src/ui/menu.rs2
-rw-r--r--helix-term/src/ui/mod.rs145
-rw-r--r--helix-term/src/ui/picker.rs67
-rw-r--r--helix-term/src/ui/prompt.rs3
-rw-r--r--helix-term/src/ui/statusline.rs74
-rw-r--r--helix-term/tests/test/commands.rs2
-rw-r--r--helix-term/tests/test/commands/reverse_selection_contents.rs49
-rw-r--r--helix-term/tests/test/commands/rotate_selection_contents.rs71
-rw-r--r--helix-term/tests/test/commands/write.rs163
-rw-r--r--helix-term/tests/test/helpers.rs6
-rw-r--r--helix-tui/Cargo.toml7
-rw-r--r--helix-tui/src/backend/crossterm.rs54
-rw-r--r--helix-tui/src/backend/mod.rs30
-rw-r--r--helix-tui/src/backend/termina.rs649
-rw-r--r--helix-tui/src/backend/test.rs20
-rw-r--r--helix-tui/src/buffer.rs17
-rw-r--r--helix-tui/src/layout.rs12
-rw-r--r--helix-tui/src/lib.rs130
-rw-r--r--helix-tui/src/symbols.rs2
-rw-r--r--helix-tui/src/terminal.rs44
-rw-r--r--helix-tui/src/text.rs32
-rw-r--r--helix-tui/src/widgets/table.rs12
-rw-r--r--helix-tui/tests/text.rs128
-rw-r--r--helix-vcs/Cargo.toml4
-rw-r--r--helix-vcs/src/diff.rs11
-rw-r--r--helix-vcs/src/diff/line_cache.rs2
-rw-r--r--helix-vcs/src/diff/worker.rs2
-rw-r--r--helix-vcs/src/git.rs2
-rw-r--r--helix-vcs/src/lib.rs12
-rw-r--r--helix-vcs/src/status.rs22
-rw-r--r--helix-view/Cargo.toml11
-rw-r--r--helix-view/src/annotations/diagnostics.rs4
-rw-r--r--helix-view/src/base64.rs163
-rw-r--r--helix-view/src/clipboard.rs54
-rw-r--r--helix-view/src/document.rs26
-rw-r--r--helix-view/src/editor.rs133
-rw-r--r--helix-view/src/expansion.rs39
-rw-r--r--helix-view/src/graphics.rs42
-rw-r--r--helix-view/src/gutter.rs15
-rw-r--r--helix-view/src/handlers.rs9
-rw-r--r--helix-view/src/handlers/lsp.rs11
-rw-r--r--helix-view/src/handlers/word_index.rs509
-rw-r--r--helix-view/src/input.rs126
-rw-r--r--helix-view/src/keyboard.rs226
-rw-r--r--helix-view/src/lib.rs1
-rw-r--r--helix-view/src/theme.rs140
-rw-r--r--helix-view/src/tree.rs2
-rw-r--r--languages.toml677
-rw-r--r--runtime/queries/_javascript/tags.scm10
-rw-r--r--runtime/queries/_jsx/textobjects.scm7
-rw-r--r--runtime/queries/_typescript/highlights.scm1
-rw-r--r--runtime/queries/bash/injections.scm27
-rw-r--r--runtime/queries/bash/rainbows.scm20
-rw-r--r--runtime/queries/bash/tags.scm1
-rw-r--r--runtime/queries/bibtex/tags.scm0
-rw-r--r--runtime/queries/blade/folds.scm5
-rw-r--r--runtime/queries/blade/highlights.scm18
-rw-r--r--runtime/queries/blade/injections.scm106
-rw-r--r--runtime/queries/blade/rainbows.scm1
-rw-r--r--runtime/queries/blade/textobjects.scm1
-rw-r--r--runtime/queries/bovex/highlights.scm88
-rw-r--r--runtime/queries/bovex/rainbows.scm11
-rw-r--r--runtime/queries/c-sharp/tags.scm2
-rw-r--r--runtime/queries/c/highlights.scm29
-rw-r--r--runtime/queries/c/locals.scm38
-rw-r--r--runtime/queries/c/rainbows.scm29
-rw-r--r--runtime/queries/c/tags.scm9
-rw-r--r--runtime/queries/caddyfile/highlights.scm72
-rw-r--r--runtime/queries/caddyfile/indents.scm8
-rw-r--r--runtime/queries/caddyfile/injections.scm2
-rw-r--r--runtime/queries/caddyfile/locals.scm5
-rw-r--r--runtime/queries/caddyfile/textobjects.scm16
-rw-r--r--runtime/queries/clojure/rainbows.scm13
-rw-r--r--runtime/queries/common-lisp/rainbows.scm1
-rw-r--r--runtime/queries/cpp/rainbows.scm49
-rw-r--r--runtime/queries/cpp/tags.scm12
-rw-r--r--runtime/queries/cross-config/highlights.scm1
-rw-r--r--runtime/queries/cross-config/injections.scm9
-rw-r--r--runtime/queries/cross-config/rainbows.scm1
-rw-r--r--runtime/queries/cross-config/textobjects.scm1
-rw-r--r--runtime/queries/css/highlights.scm105
-rw-r--r--runtime/queries/css/rainbows.scm15
-rw-r--r--runtime/queries/cython/folds.scm28
-rw-r--r--runtime/queries/cython/highlights.scm199
-rw-r--r--runtime/queries/cython/indents.scm96
-rw-r--r--runtime/queries/cython/injections.scm18
-rw-r--r--runtime/queries/cython/locals.scm115
-rw-r--r--runtime/queries/cython/tags.scm14
-rw-r--r--runtime/queries/docker-bake/folds.scm1
-rw-r--r--runtime/queries/docker-bake/highlights.scm1
-rw-r--r--runtime/queries/docker-bake/indents.scm1
-rw-r--r--runtime/queries/docker-bake/injections.scm23
-rw-r--r--runtime/queries/docker-bake/rainbows.scm1
-rw-r--r--runtime/queries/docker-bake/tags.scm33
-rw-r--r--runtime/queries/docker-bake/textobjects.scm1
-rw-r--r--runtime/queries/dockerfile/injections.scm14
-rw-r--r--runtime/queries/doxyfile/highlights.scm19
-rw-r--r--runtime/queries/doxyfile/indents.scm3
-rw-r--r--runtime/queries/doxyfile/injections.scm3
-rw-r--r--runtime/queries/doxyfile/tags.scm2
-rw-r--r--runtime/queries/doxyfile/textobjects.scm5
-rw-r--r--runtime/queries/ecma/highlights.scm21
-rw-r--r--runtime/queries/ecma/injections.scm17
-rw-r--r--runtime/queries/ecma/locals.scm6
-rw-r--r--runtime/queries/ecma/rainbows.scm28
-rw-r--r--runtime/queries/ecma/textobjects.scm2
-rw-r--r--runtime/queries/eiffel/highlights.scm108
-rw-r--r--runtime/queries/eiffel/indents.scm30
-rw-r--r--runtime/queries/eiffel/textobjects.scm15
-rw-r--r--runtime/queries/elixir/rainbows.scm24
-rw-r--r--runtime/queries/elixir/tags.scm54
-rw-r--r--runtime/queries/erlang/rainbows.scm24
-rw-r--r--runtime/queries/erlang/tags.scm45
-rw-r--r--runtime/queries/fennel/highlights.scm10
-rw-r--r--runtime/queries/fish/injections.scm12
-rw-r--r--runtime/queries/flatbuffers/highlights.scm89
-rw-r--r--runtime/queries/fortran/folds.scm3
-rw-r--r--runtime/queries/fortran/highlights.scm274
-rw-r--r--runtime/queries/fortran/indents.scm6
-rw-r--r--runtime/queries/gdscript/tags.scm2
-rw-r--r--runtime/queries/git-cliff-config/highlights.scm1
-rw-r--r--runtime/queries/git-cliff-config/injections.scm53
-rw-r--r--runtime/queries/git-cliff-config/rainbows.scm1
-rw-r--r--runtime/queries/git-cliff-config/textobjects.scm1
-rw-r--r--runtime/queries/git-commit/highlights.scm30
-rw-r--r--runtime/queries/git-commit/injections.scm4
-rw-r--r--runtime/queries/git-notes/highlights.scm1
-rw-r--r--runtime/queries/gitlab-ci/highlights.scm89
-rw-r--r--runtime/queries/gitlab-ci/indents.scm1
-rw-r--r--runtime/queries/gitlab-ci/injections.scm51
-rw-r--r--runtime/queries/gitlab-ci/rainbows.scm1
-rw-r--r--runtime/queries/gitlab-ci/tags.scm17
-rw-r--r--runtime/queries/gitlab-ci/textobjects.scm1
-rw-r--r--runtime/queries/gleam/rainbows.scm32
-rw-r--r--runtime/queries/go-format-string/highlights.scm21
-rw-r--r--runtime/queries/go-format-string/rainbows.scm5
-rw-r--r--runtime/queries/go/highlights.scm18
-rw-r--r--runtime/queries/go/injections.scm74
-rw-r--r--runtime/queries/go/rainbows.scm33
-rw-r--r--runtime/queries/go/tags.scm4
-rw-r--r--runtime/queries/go/textobjects.scm2
-rw-r--r--runtime/queries/gomod/highlights.scm2
-rw-r--r--runtime/queries/hdl/highlights.scm44
-rw-r--r--runtime/queries/html/rainbows.scm13
-rw-r--r--runtime/queries/html/textobjects.scm9
-rw-r--r--runtime/queries/htmldjango/highlights.scm26
-rw-r--r--runtime/queries/htmldjango/injections.scm3
-rw-r--r--runtime/queries/hurl/highlights.scm6
-rw-r--r--runtime/queries/ini/highlights.scm2
-rw-r--r--runtime/queries/inko/highlights.scm2
-rw-r--r--runtime/queries/inko/tags.scm14
-rw-r--r--runtime/queries/janet/highlights.scm9
-rw-r--r--runtime/queries/janet/indents.scm28
-rw-r--r--runtime/queries/janet/injections.scm2
-rw-r--r--runtime/queries/janet/rainbows.scm16
-rw-r--r--runtime/queries/java/rainbows.scm35
-rw-r--r--runtime/queries/java/tags.scm27
-rw-r--r--runtime/queries/javascript/rainbows.scm1
-rw-r--r--runtime/queries/jjconfig/highlights.scm1
-rw-r--r--runtime/queries/jjconfig/indents.scm1
-rw-r--r--runtime/queries/jjconfig/injections.scm25
-rw-r--r--runtime/queries/jjconfig/textobjects.scm1
-rw-r--r--runtime/queries/jjrevset/highlights.scm18
-rw-r--r--runtime/queries/jjtemplate/highlights.scm16
-rw-r--r--runtime/queries/json-ld/highlights.scm43
-rw-r--r--runtime/queries/json-ld/indents.scm1
-rw-r--r--runtime/queries/json-ld/textobjects.scm1
-rw-r--r--runtime/queries/json/rainbows.scm9
-rw-r--r--runtime/queries/jsonc/rainbows.scm1
-rw-r--r--runtime/queries/jsonnet/injections.scm2
-rw-r--r--runtime/queries/jsx/rainbows.scm9
-rw-r--r--runtime/queries/just/highlights.scm5
-rw-r--r--runtime/queries/just/locals.scm5
-rw-r--r--runtime/queries/just/tags.scm19
-rw-r--r--runtime/queries/kcl/highlights.scm57
-rw-r--r--runtime/queries/kconfig/folds.scm9
-rw-r--r--runtime/queries/kconfig/highlights.scm86
-rw-r--r--runtime/queries/kconfig/indents.scm11
-rw-r--r--runtime/queries/kconfig/injections.scm2
-rw-r--r--runtime/queries/kconfig/locals.scm17
-rw-r--r--runtime/queries/kdl/highlights.scm14
-rw-r--r--runtime/queries/kdl/injections.scm63
-rw-r--r--runtime/queries/kdl/tags.scm3
-rw-r--r--runtime/queries/koka/highlights.scm313
-rw-r--r--runtime/queries/koka/indents.scm4
-rw-r--r--runtime/queries/koka/locals.scm25
-rw-r--r--runtime/queries/kotlin/tags.scm12
-rw-r--r--runtime/queries/koto/highlights.scm21
-rw-r--r--runtime/queries/koto/rainbows.scm11
-rw-r--r--runtime/queries/koto/textobjects.scm4
-rw-r--r--runtime/queries/lua/injections.scm26
-rw-r--r--runtime/queries/lua/rainbows.scm9
-rw-r--r--runtime/queries/luap/highlights.scm45
-rw-r--r--runtime/queries/luau/injections.scm24
-rw-r--r--runtime/queries/markdown/tags.scm2
-rw-r--r--runtime/queries/miseconfig/highlights.scm1
-rw-r--r--runtime/queries/miseconfig/indents.scm1
-rw-r--r--runtime/queries/miseconfig/injections.scm34
-rw-r--r--runtime/queries/miseconfig/textobjects.scm1
-rw-r--r--runtime/queries/nearley/highlights.scm43
-rw-r--r--runtime/queries/nearley/injections.scm2
-rw-r--r--runtime/queries/nearley/rainbows.scm3
-rw-r--r--runtime/queries/nix/injections.scm16
-rw-r--r--runtime/queries/nix/rainbows.scm17
-rw-r--r--runtime/queries/nu/folds.scm10
-rw-r--r--runtime/queries/nu/highlights.scm566
-rw-r--r--runtime/queries/nu/indents.scm18
-rw-r--r--runtime/queries/nu/injections.scm50
-rw-r--r--runtime/queries/nu/textobjects.scm78
-rw-r--r--runtime/queries/odin/highlights.scm64
-rw-r--r--runtime/queries/odin/indents.scm2
-rw-r--r--runtime/queries/pest/highlights.scm11
-rw-r--r--runtime/queries/php/rainbows.scm15
-rw-r--r--runtime/queries/pip-requirements/highlights.scm41
-rw-r--r--runtime/queries/pip-requirements/injections.scm2
-rw-r--r--runtime/queries/properties/highlights.scm40
-rw-r--r--runtime/queries/properties/injections.scm2
-rw-r--r--runtime/queries/properties/locals.scm5
-rw-r--r--runtime/queries/properties/textobjects.scm4
-rw-r--r--runtime/queries/protobuf/tags.scm11
-rw-r--r--runtime/queries/python/highlights.scm3
-rw-r--r--runtime/queries/python/injections.scm12
-rw-r--r--runtime/queries/python/locals.scm3
-rw-r--r--runtime/queries/python/rainbows.scm30
-rw-r--r--runtime/queries/qml/textobjects.scm49
-rw-r--r--runtime/queries/racket/rainbows.scm1
-rw-r--r--runtime/queries/regex/rainbows.scm17
-rw-r--r--runtime/queries/robots.txt/highlights.scm28
-rw-r--r--runtime/queries/robots.txt/injections.scm2
-rw-r--r--runtime/queries/robots.txt/tags.scm4
-rw-r--r--runtime/queries/robots.txt/textobjects.scm4
-rw-r--r--runtime/queries/ron/rainbows.scm8
-rw-r--r--runtime/queries/ron/tags.scm4
-rw-r--r--runtime/queries/ruby/injections.scm12
-rw-r--r--runtime/queries/ruby/rainbows.scm28
-rw-r--r--runtime/queries/rust-format-args-macro/highlights.scm1
-rw-r--r--runtime/queries/rust-format-args-macro/indents.scm1
-rw-r--r--runtime/queries/rust-format-args-macro/injections.scm13
-rw-r--r--runtime/queries/rust-format-args-macro/locals.scm1
-rw-r--r--runtime/queries/rust-format-args-macro/rainbows.scm1
-rw-r--r--runtime/queries/rust-format-args-macro/textobjects.scm1
-rw-r--r--runtime/queries/rust/highlights.scm41
-rw-r--r--runtime/queries/rust/injections.scm101
-rw-r--r--runtime/queries/rust/rainbows.scm60
-rw-r--r--runtime/queries/rust/tags.scm26
-rw-r--r--runtime/queries/scheme/highlights.scm117
-rw-r--r--runtime/queries/scheme/rainbows.scm12
-rw-r--r--runtime/queries/scheme/textobjects.scm7
-rw-r--r--runtime/queries/scss/rainbows.scm3
-rw-r--r--runtime/queries/shellcheckrc/highlights.scm55
-rw-r--r--runtime/queries/shellcheckrc/injections.scm2
-rw-r--r--runtime/queries/shellcheckrc/textobjects.scm13
-rw-r--r--runtime/queries/slisp/highlights.scm74
-rw-r--r--runtime/queries/slisp/tags.scm8
-rwxr-xr-x[-rw-r--r--]runtime/queries/snakemake/LICENSE0
-rwxr-xr-x[-rw-r--r--]runtime/queries/snakemake/folds.scm0
-rwxr-xr-x[-rw-r--r--]runtime/queries/snakemake/highlights.scm0
-rwxr-xr-x[-rw-r--r--]runtime/queries/snakemake/indents.scm0
-rwxr-xr-x[-rw-r--r--]runtime/queries/snakemake/injections.scm0
-rwxr-xr-x[-rw-r--r--]runtime/queries/snakemake/locals.scm0
-rw-r--r--runtime/queries/starlark/rainbows.scm1
-rw-r--r--runtime/queries/strictdoc/highlights.scm113
-rw-r--r--runtime/queries/strictdoc/injections.scm9
-rw-r--r--runtime/queries/strictdoc/tags.scm258
-rw-r--r--runtime/queries/svelte/folds.scm13
-rw-r--r--runtime/queries/svelte/highlights.scm72
-rw-r--r--runtime/queries/svelte/indents.scm22
-rw-r--r--runtime/queries/svelte/injections.scm64
-rw-r--r--runtime/queries/svelte/locals.scm1
-rw-r--r--runtime/queries/swift/rainbows.scm60
-rw-r--r--runtime/queries/systemd/highlights.scm1
-rw-r--r--runtime/queries/systemverilog/highlights.scm321
-rw-r--r--runtime/queries/toml/rainbows.scm12
-rw-r--r--runtime/queries/tsq/rainbows.scm11
-rw-r--r--runtime/queries/tsx/rainbows.scm2
-rw-r--r--runtime/queries/typescript/rainbows.scm19
-rw-r--r--runtime/queries/typst/highlights.scm17
-rw-r--r--runtime/queries/typst/tags.scm6
-rw-r--r--runtime/queries/unison/rainbows.scm10
-rw-r--r--runtime/queries/unison/tags.scm10
-rw-r--r--runtime/queries/vim/folds.scm4
-rw-r--r--runtime/queries/vim/highlights.scm350
-rw-r--r--runtime/queries/vim/injections.scm44
-rw-r--r--runtime/queries/wgsl/indents.scm6
-rw-r--r--runtime/queries/wgsl/rainbows.scm14
-rw-r--r--runtime/queries/wgsl/tags.scm10
-rw-r--r--runtime/queries/wgsl/textobjects.scm14
-rw-r--r--runtime/queries/wikitext/folds.scm2
-rw-r--r--runtime/queries/wikitext/highlights.scm92
-rw-r--r--runtime/queries/xml/rainbows.scm29
-rw-r--r--runtime/queries/xml/textobjects.scm5
-rw-r--r--runtime/queries/yaml/injections.scm9
-rw-r--r--runtime/queries/yaml/rainbows.scm9
-rw-r--r--runtime/queries/zig/textobjects.scm3
-rw-r--r--runtime/themes/adwaita-light.toml2
-rw-r--r--runtime/themes/andromeda.toml186
-rw-r--r--runtime/themes/ashokai.toml134
-rw-r--r--runtime/themes/ashokai_brahn.toml37
-rw-r--r--runtime/themes/ashokai_evermoor.toml37
-rw-r--r--runtime/themes/ashokai_urple.toml37
-rw-r--r--runtime/themes/aura-dark-soft.toml145
-rw-r--r--runtime/themes/aura-dark.toml143
-rw-r--r--runtime/themes/aurara.toml485
-rw-r--r--runtime/themes/catppuccin_mocha.toml2
-rw-r--r--runtime/themes/cyan_light.toml171
-rw-r--r--runtime/themes/darcula.toml10
-rw-r--r--runtime/themes/dark-synthwave.toml114
-rw-r--r--runtime/themes/dark_plus.toml2
-rw-r--r--runtime/themes/doom-one.toml127
-rw-r--r--runtime/themes/flatwhite.toml13
-rw-r--r--runtime/themes/gruvbox-material.toml124
-rw-r--r--runtime/themes/gruvbox.toml4
-rw-r--r--runtime/themes/gruvbox_material_dark_hard.toml13
-rw-r--r--runtime/themes/gruvbox_material_dark_medium.toml128
-rw-r--r--runtime/themes/gruvbox_material_dark_soft.toml14
-rw-r--r--runtime/themes/gruvbox_material_light_hard.toml14
-rw-r--r--runtime/themes/gruvbox_material_light_medium.toml129
-rw-r--r--runtime/themes/gruvbox_material_light_soft.toml14
-rw-r--r--runtime/themes/jetbrains_cyan_light.toml168
-rw-r--r--runtime/themes/jetbrains_dark.toml4
-rw-r--r--runtime/themes/licenses/aura.LICENSE21
-rw-r--r--runtime/themes/licenses/cyan_light.LICENSE (renamed from runtime/themes/licenses/jetbrains_cyan_light.LICENSE)0
-rw-r--r--runtime/themes/licenses/dark-synthwave.license21
-rw-r--r--runtime/themes/licenses/doom-one.LICENSE23
-rw-r--r--runtime/themes/licenses/modus_vivendi.LICENSE675
-rw-r--r--runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE675
-rw-r--r--runtime/themes/licenses/modus_vivendi_tinted.LICENSE675
-rw-r--r--runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE675
-rw-r--r--runtime/themes/licenses/noctis.LICENSE9
-rw-r--r--runtime/themes/licenses/zenburn.license674
-rw-r--r--runtime/themes/modus_operandi.toml4
-rw-r--r--runtime/themes/modus_vivendi.toml6
-rw-r--r--runtime/themes/modus_vivendi_deuteranopia.toml2
-rw-r--r--runtime/themes/modus_vivendi_tritanopia.toml2
-rw-r--r--runtime/themes/molokai.toml4
-rw-r--r--runtime/themes/nightfox.toml1
-rw-r--r--runtime/themes/nord.toml47
-rw-r--r--runtime/themes/nvchad_solarized_dark.toml168
-rw-r--r--runtime/themes/nvim-dark.toml109
-rw-r--r--runtime/themes/nyxvamp-obsidian.toml23
-rw-r--r--runtime/themes/nyxvamp-radiance.toml70
-rw-r--r--runtime/themes/nyxvamp-transparent.toml54
-rw-r--r--runtime/themes/nyxvamp-veil.toml19
-rw-r--r--runtime/themes/onedarker.toml2
-rw-r--r--runtime/themes/rose_pine.toml2
-rw-r--r--runtime/themes/sidra.toml55
-rw-r--r--runtime/themes/ttox_soft.toml37
-rw-r--r--runtime/themes/zenburn.toml336
-rw-r--r--runtime/tutor4
-rw-r--r--rust-toolchain.toml3
-rw-r--r--xtask/Cargo.toml2
-rw-r--r--xtask/src/docgen.rs3
-rw-r--r--xtask/src/main.rs2
453 files changed, 3274 insertions, 19621 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index d972953e..0e460ebe 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -12,14 +12,6 @@ updates:
update-types:
- "minor"
- "patch"
- ignore:
- # MSRV: these deps use edition 2024 in their newest versions.
- # Once the MSRV reaches 1.85 these can be updated and unignored.
- - dependency-name: ignore
- - dependency-name: globset
- - dependency-name: grep-matcher
- # Now requires Rust 1.87:
- - dependency-name: etcetera
- package-ecosystem: "github-actions"
directory: "/"
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2f9deeb9..92dec93b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,7 +20,7 @@ jobs:
if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule'
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@master
@@ -51,7 +51,7 @@ jobs:
HELIX_LOG_LEVEL: info
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@master
@@ -85,7 +85,7 @@ jobs:
if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule'
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@master
@@ -121,7 +121,7 @@ jobs:
if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule'
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@master
diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml
index c7d945f5..1fed41ed 100644
--- a/.github/workflows/cachix.yml
+++ b/.github/workflows/cachix.yml
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v31
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 8f086fd6..d42ab1c8 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -11,7 +11,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v5
+ - uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7331a2dc..273680e4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
@@ -36,7 +36,7 @@ jobs:
- name: Bundle grammars
run: tar cJf grammars.tar.xz -C runtime/grammars/sources .
- - uses: actions/upload-artifact@v5
+ - uses: actions/upload-artifact@v4
with:
name: grammars
path: grammars.tar.xz
@@ -58,21 +58,23 @@ jobs:
strategy:
fail-fast: false # don't fail other jobs if one fails
matrix:
- build: [x86_64-linux, aarch64-linux, x86_64-macos, x86_64-windows, aarch64-macos] #, x86_64-win-gnu, win32-msvc
+ build: [x86_64-linux, aarch64-linux, x86_64-macos, x86_64-windows] #, x86_64-win-gnu, win32-msvc
include:
- build: x86_64-linux
- # WARN: When changing this to a newer version, make sure that the GLIBC isnt too new, as this can cause issues
- # with portablity on older systems that dont follow ubuntus more rapid release cadence.
- os: ubuntu-22.04
+ os: ubuntu-24.04
rust: stable
target: x86_64-unknown-linux-gnu
cross: false
- build: aarch64-linux
- # Version should be kept in lockstep with the x86_64 version
- os: ubuntu-22.04-arm
+ os: ubuntu-24.04-arm
rust: stable
target: aarch64-unknown-linux-gnu
cross: false
+ # - build: riscv64-linux
+ # os: ubuntu-22.04
+ # rust: stable
+ # target: riscv64gc-unknown-linux-gnu
+ # cross: true
- build: x86_64-macos
os: macos-latest
rust: stable
@@ -83,16 +85,13 @@ jobs:
rust: stable
target: x86_64-pc-windows-msvc
cross: false
+ # 23.03: build issues
- build: aarch64-macos
os: macos-latest
rust: stable
target: aarch64-apple-darwin
cross: false
- # - build: riscv64-linux
- # os: ubuntu-22.04
- # rust: stable
- # target: riscv64gc-unknown-linux-gnu
- # cross: true
+ skip_tests: true # x86_64 host can't run aarch64 code
# - build: x86_64-win-gnu
# os: windows-2019
# rust: stable-x86_64-gnu
@@ -104,16 +103,16 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- name: Download grammars
- uses: actions/download-artifact@v6
+ uses: actions/download-artifact@v4
- name: Move grammars under runtime
if: "!startsWith(matrix.os, 'windows')"
run: |
mkdir -p runtime/grammars/sources
- tar xJf grammars.tar.xz -C runtime/grammars/sources
+ tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources
# The rust-toolchain action ignores rust-toolchain.toml files.
# Removing this before building with cargo ensures that the rust-toolchain
@@ -214,7 +213,7 @@ jobs:
shell: bash
run: |
mkdir -p dist
- if [ "${{ matrix.os }}" = "windows-latest" ]; then
+ if [ "${{ matrix.os }}" = "windows-2019" ]; then
cp "target/${{ matrix.target }}/opt/hx.exe" "dist/"
else
cp "target/${{ matrix.target }}/opt/hx" "dist/"
@@ -224,7 +223,7 @@ jobs:
fi
cp -r runtime dist
- - uses: actions/upload-artifact@v5
+ - uses: actions/upload-artifact@v4
with:
name: bins-${{ matrix.build }}
path: dist
@@ -235,9 +234,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
- uses: actions/checkout@v5
+ uses: actions/checkout@v4
- - uses: actions/download-artifact@v6
+ - uses: actions/download-artifact@v4
- name: Build archive
shell: bash
@@ -292,9 +291,9 @@ jobs:
file_glob: true
tag: ${{ github.ref_name }}
overwrite: true
-
+
- name: Upload binaries as artifact
- uses: actions/upload-artifact@v5
+ uses: actions/upload-artifact@v4
if: env.preview == 'true'
with:
name: release
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd6ed5a2..61c05ae7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,306 +20,6 @@ Updated languages and queries:
Packaging:
-->
-# 25.07.1 (2025-07-18)
-
-This is a patch release which lowers the GLIBC requirements of the release artifacts published to GitHub ([#13983](https://github.com/helix-editor/helix/pull/13983))
-
-# 25.07 (2025-07-15)
-
-As always, a big thank you to all of the contributors! This release saw changes from 195 contributors.
-
-Breaking changes:
-
-* The parsing of the command line has been rewritten and now supports flags and expansions ([#12527](https://github.com/helix-editor/helix/pull/12527), [#13018](https://github.com/helix-editor/helix/pull/13018), [9574e55](https://github.com/helix-editor/helix/commit/9574e55), [2d4c2a1](https://github.com/helix-editor/helix/commit/2d4c2a1), [#13192](https://github.com/helix-editor/helix/pull/13192), [67f1fe2](https://github.com/helix-editor/helix/commit/67f1fe2), [#13466](https://github.com/helix-editor/helix/pull/13466), [#13467](https://github.com/helix-editor/helix/pull/13467), [#13840](https://github.com/helix-editor/helix/pull/13840))
- * Quoting and spaces are now handled differently. This can break existing keymaps which use typable commands, in particular `:sh`, `:set-option` or `:toggle-option`.
- * The `:rsort` command has been removed. Use the reverse flag instead: `:sort --reverse`
-
-Features:
-
-* Add a picker which explores directories ([#11285](https://github.com/helix-editor/helix/pull/11285), [d4aed40](https://github.com/helix-editor/helix/commit/d4aed40))
-* Allow cycling through multiple LSP Hover responses with `A-n`/`A-p` ([#10122](https://github.com/helix-editor/helix/pull/10122), [2367b20](https://github.com/helix-editor/helix/commit/2367b20))
-* Add support for incomplete LSP completions ([5c1f3f8](https://github.com/helix-editor/helix/commit/5c1f3f8))
-* Add support for EditorConfig ([#13056](https://github.com/helix-editor/helix/pull/13056), [#13443](https://github.com/helix-editor/helix/pull/13443))
-* Add support for LSP document colors ([#12308](https://github.com/helix-editor/helix/pull/12308), [d43de14](https://github.com/helix-editor/helix/commit/d43de14), [47cdd23](https://github.com/helix-editor/helix/commit/47cdd23), [ba54b6a](https://github.com/helix-editor/helix/commit/ba54b6a), [#13188](https://github.com/helix-editor/helix/pull/13188))
-* Support expansions in external formatter arguments ([#13429](https://github.com/helix-editor/helix/pull/13429))
-* Switch out the highlighter for the `tree-house` crate ([#12972](https://github.com/helix-editor/helix/pull/12972), [09bc67a](https://github.com/helix-editor/helix/commit/09bc67a), [a7c3a43](https://github.com/helix-editor/helix/commit/a7c3a43), [3ceae88](https://github.com/helix-editor/helix/commit/3ceae88), [05ae617](https://github.com/helix-editor/helix/commit/05ae617), [5a1dcc2](https://github.com/helix-editor/helix/commit/5a1dcc2), [ebf96bd](https://github.com/helix-editor/helix/commit/ebf96bd), [#13644](https://github.com/helix-editor/helix/pull/13644), [b1f4717](https://github.com/helix-editor/helix/commit/b1f4717), [7410fe3](https://github.com/helix-editor/helix/commit/7410fe3), [633c5fb](https://github.com/helix-editor/helix/commit/633c5fb), [362e97e](https://github.com/helix-editor/helix/commit/362e97e), [#13828](https://github.com/helix-editor/helix/pull/13828), [6fd1efd](https://github.com/helix-editor/helix/commit/6fd1efd))
- * This fixes a number of highlighter bugs.
- * Locals like parameter highlights are now highlighted even when the definition is not in view.
- * Markdown is now injected into rust doc comments (`///` and `//!`).
-* Add support for the DAP `startDebugging` reverse request ([#13403](https://github.com/helix-editor/helix/pull/13403))
-
-Commands:
-
-* Add `copy_between_registers` for interactive copying between two registers ([066e938](https://github.com/helix-editor/helix/commit/066e938))
-* Add `extend_to_file_{start,end}`, select-mode variants of `goto_file_{start,end}` ([#11767](https://github.com/helix-editor/helix/pull/11767))
-* Add `:!` alias for `:sh` and `:|` for `:pipe` ([#13263](https://github.com/helix-editor/helix/pull/13263))
-* Add `goto_column` and `extend_to_column` ([#13440](https://github.com/helix-editor/helix/pull/13440))
-* Add an `--insensitive`/`-i` flag to the `:sort` command ([#13560](https://github.com/helix-editor/helix/pull/13560))
-* Add `rotate_selections_first` and `rotate_selections_last` ([#13615](https://github.com/helix-editor/helix/pull/13615))
-* Add a `--no-format` flag for all `:write` commands ([2f56091](https://github.com/helix-editor/helix/commit/2f56091))
-* Add a `--skip-visible` flag for `:buffer-close-others` and `:buffer-close-others!` ([#5393](https://github.com/helix-editor/helix/pull/5393))
-
-Usability improvements:
-
-* Replace current file using `A-ret` in pickers rather than loading it in the background ([#12605](https://github.com/helix-editor/helix/pull/12605))
-* Set multiple selections when passing a file with multiple locations to `hx` ([#12192](https://github.com/helix-editor/helix/pull/12192))
-* Add path completion for multiple cursors ([#12550](https://github.com/helix-editor/helix/pull/12550), [c9dc940](https://github.com/helix-editor/helix/commit/c9dc940))
-* Truncate long prompt lines with "…" ([#12036](https://github.com/helix-editor/helix/pull/12036), [9d6ea77](https://github.com/helix-editor/helix/commit/9d6ea77), [0b9701e](https://github.com/helix-editor/helix/commit/0b9701e), [d3fb8fc](https://github.com/helix-editor/helix/commit/d3fb8fc))
-* Allow specifying languages in `:lsp-stop` and `:lsp-restart` ([#12578](https://github.com/helix-editor/helix/pull/12578), [3d7e273](https://github.com/helix-editor/helix/commit/3d7e273))
-* Add `m` (nearest matching pair) to infobox popups for `md` and `mr` ([#12650](https://github.com/helix-editor/helix/pull/12650))
-* Add a hint message in the statusline when using `:sort` on a single selection ([#12585](https://github.com/helix-editor/helix/pull/12585))
-* Avoid wrapping around in `goto_{next,prev}_diag` ([#12704](https://github.com/helix-editor/helix/pull/12704))
-* Support responses from multiple language servers for LSP goto-definition (and declaration, type definition and implementation) and goto-references ([f7394d5](https://github.com/helix-editor/helix/commit/f7394d5), [1a821ac](https://github.com/helix-editor/helix/commit/1a821ac), [d285a8a](https://github.com/helix-editor/helix/commit/d285a8a))
-* Show formatter errors in `:format` ([47f84d0](https://github.com/helix-editor/helix/commit/47f84d0))
-* Show typable command docs in keybinding infobox popups when the command takes no arguments ([e9c16b7](https://github.com/helix-editor/helix/commit/e9c16b7))
-* Add per-command titles to register selection infobox popups for `select_register`, `insert_register` and `copy_between_registers` ([e0da129](https://github.com/helix-editor/helix/commit/e0da129))
-* Add container name column to the LSP symbol picker ([#12930](https://github.com/helix-editor/helix/pull/12930))
-* Add a theme key for highlighting directories in completions and picker items ([#12855](https://github.com/helix-editor/helix/pull/12855), [7bebe0a](https://github.com/helix-editor/helix/commit/7bebe0a))
-* Add `editor.trim-final-newlines` and `editor.trim-trailing-whitespace` config options ([aa20eb8](https://github.com/helix-editor/helix/commit/aa20eb8))
-* Warn when the configured theme is unusable because true-color is not available ([#13058](https://github.com/helix-editor/helix/pull/13058))
-* Allow configuring `[workspace-]diagnostic` statusline element severities ([#13288](https://github.com/helix-editor/helix/pull/13288), [b0528bb](https://github.com/helix-editor/helix/commit/b0528bb))
-* Improve completion for shell commands ([#12883](https://github.com/helix-editor/helix/pull/12883), [532f241](https://github.com/helix-editor/helix/commit/532f241))
-* Show the primary selection index in the `selections` statusline element when there are multiple selections ([#12326](https://github.com/helix-editor/helix/pull/12326))
-* Use configured language server names when possible in `--health` output ([#13573](https://github.com/helix-editor/helix/pull/13573))
-* Add a statusline element for indentation style ([#13632](https://github.com/helix-editor/helix/pull/13632))
-* Set the working directory of language server commands to the workspace root ([#13691](https://github.com/helix-editor/helix/pull/13691))
-* Avoid jumpiness in the picker preview for languages with non-default tab widths ([#13761](https://github.com/helix-editor/helix/pull/13761))
-* Add a config option for limiting LSP inlay hint length ([#13742](https://github.com/helix-editor/helix/pull/13742))
-* Improve heuristics used in the diff gutter ([#13722](https://github.com/helix-editor/helix/pull/13722))
-* Allow moving a file with `:move` when its old path does not exist ([#13748](https://github.com/helix-editor/helix/pull/13748))
-* Allow moving a file into a directory with `:move` ([#13922](https://github.com/helix-editor/helix/pull/13922))
-* Show human-readable file sizes in the statusline message for file writes ([#13627](https://github.com/helix-editor/helix/pull/13627))
-* Add diagnostic source to the diagnosics pickers ([#13758](https://github.com/helix-editor/helix/pull/13758))
-* Show all active scopes under the cursor in `:tree-sitter-highlight-name` ([4a85171](https://github.com/helix-editor/helix/commit/4a85171))
-* Auto-close the LSP code-actions popup ([#13832](https://github.com/helix-editor/helix/pull/13832))
-* Add a configuration option for controlling atomic writes to disk ([#13656](https://github.com/helix-editor/helix/pull/13656))
-
-Fixes:
-
-* Fix panic from using `search_selection_detect_word_boundaries` (`*`) at the end of the file ([#12611](https://github.com/helix-editor/helix/pull/12611))
-* Discard placeholder text for zero tabstop `${0:placeholder}` ([#12647](https://github.com/helix-editor/helix/pull/12647))
-* Fix panic in `goto_file` (`gf`) on file names with non-ASCII characters ([#12673](https://github.com/helix-editor/helix/pull/12673))
-* Only accept unmodified characters in `goto_word` (`gw`) ([f5f9f49](https://github.com/helix-editor/helix/commit/f5f9f49), [0364521](https://github.com/helix-editor/helix/commit/0364521))
-* Skip recording keys pressed by macros while recording a macro ([#12733](https://github.com/helix-editor/helix/pull/12733))
-* Deny unknown fields in `editor.smart-tab` config ([28047fe](https://github.com/helix-editor/helix/commit/28047fe))
-* Fix soft-wrap word boundary detection for Unicode combining accent characters ([#12483](https://github.com/helix-editor/helix/pull/12483))
-* Fix clearing of infobox popups in `select_register` and `insert_register` commands ([e882a75](https://github.com/helix-editor/helix/commit/e882a75))
-* Fix handling of `stderr` of DAP child processes ([d0d1693](https://github.com/helix-editor/helix/commit/d0d1693))
-* Cancel all pending requests when a DAP session terminates ([26db541](https://github.com/helix-editor/helix/commit/26db541))
-* Properly discard out-of-date diagnostics ([313a647](https://github.com/helix-editor/helix/commit/313a647))
-* Fix display of multiple language servers in `hx --health` ([#12841](https://github.com/helix-editor/helix/pull/12841))
-* Respect `editor.default-yank-register` in `:yank-joined` ([#12890](https://github.com/helix-editor/helix/pull/12890))
-* Escape percent character when pasting the history register into the picker ([#12886](https://github.com/helix-editor/helix/pull/12886))
-* Render rulers before the cursor ([2d3b75a](https://github.com/helix-editor/helix/commit/2d3b75a))
-* Avoid inserting final newlines in empty files ([67879a1](https://github.com/helix-editor/helix/commit/67879a1))
-* Gracefully handle partial failure in multi-language-server requests ([#13156](https://github.com/helix-editor/helix/pull/13156), [14cab4b](https://github.com/helix-editor/helix/commit/14cab4b))
-* Improve LSP progress message display in the statusline ([#13180](https://github.com/helix-editor/helix/pull/13180))
-* Fix behavior of `<esc>` removing added indentation in documents with CRLF line endings ([702a961](https://github.com/helix-editor/helix/commit/702a961))
-* Append changes to document history before pushing jumplist jumps ([#13619](https://github.com/helix-editor/helix/pull/13619))
-* Fix overflow in the display of large chunks of text in the signature-help component ([#13566](https://github.com/helix-editor/helix/pull/13566))
-* Fix panic from clearing whitespace when changing multiple selections on one line ([#13673](https://github.com/helix-editor/helix/pull/13673))
-* Include formatting options in LSP range formatting request ([#13734](https://github.com/helix-editor/helix/pull/13734))
-* Consistently set statusline errors when LSP features are not available ([#12577](https://github.com/helix-editor/helix/pull/12577))
-* Fix `goto_file` on Windows ([#13770](https://github.com/helix-editor/helix/pull/13770))
-* Fix crash in `goto_word` (`gw`) when `editor.jump-label-alphabet` is configured to be empty ([#13863](https://github.com/helix-editor/helix/pull/13863))
-* Fix `open_above` / `open_below` (`o` / `O`) when using a count on a document with CRLF line-endings ([#13905](https://github.com/helix-editor/helix/pull/13905))
-
-Themes:
-
-* Update `modus` themes ([#12670](https://github.com/helix-editor/helix/pull/12670))
-* Update `snazzy` ([#11089](https://github.com/helix-editor/helix/pull/11089))
-* Update `gruber-darker` ([#12797](https://github.com/helix-editor/helix/pull/12797))
-* Update `cyan_light` ([#12864](https://github.com/helix-editor/helix/pull/12864), [#12891](https://github.com/helix-editor/helix/pull/12891))
-* Update `onedarker` ([#12833](https://github.com/helix-editor/helix/pull/12833))
-* Update `github_light` ([#12907](https://github.com/helix-editor/helix/pull/12907))
-* Update `kanagawa` ([#12895](https://github.com/helix-editor/helix/pull/12895))
-* Add `beans` ([#12963](https://github.com/helix-editor/helix/pull/12963))
-* Update `base16_transparent` ([#13080](https://github.com/helix-editor/helix/pull/13080))
-* Update `sunset` ([#13086](https://github.com/helix-editor/helix/pull/13086))
-* Add `carbon` ([#13067](https://github.com/helix-editor/helix/pull/13067))
-* Update `soralized` ([#13121](https://github.com/helix-editor/helix/pull/13121))
-* Add `focus_nova` ([#13144](https://github.com/helix-editor/helix/pull/13144))
-* Update `onedark` ([#13166](https://github.com/helix-editor/helix/pull/13166))
-* Update `adwaita-light` ([#13174](https://github.com/helix-editor/helix/pull/13174))
-* Add `earl_grey` ([#13203](https://github.com/helix-editor/helix/pull/13203))
-* Update `spacebones` ([#13213](https://github.com/helix-editor/helix/pull/13213))
-* Add `peachpuff` ([#13225](https://github.com/helix-editor/helix/pull/13225))
-* Update catppuccin themes ([#13262](https://github.com/helix-editor/helix/pull/13262))
-* Update gruvbox themes ([#13315](https://github.com/helix-editor/helix/pull/13315))
-* Update serika themes ([#13341](https://github.com/helix-editor/helix/pull/13341))
-* Add `gruvbox-material` ([#13311](https://github.com/helix-editor/helix/pull/13311))
-* Add `ashen` ([#13366](https://github.com/helix-editor/helix/pull/13366))
-* Update Zed themes ([#13370](https://github.com/helix-editor/helix/pull/13370))
-* Update Tokyonight themes ([#13375](https://github.com/helix-editor/helix/pull/13375))
-* Update `onelight` ([#13413](https://github.com/helix-editor/helix/pull/13413))
-* Add `ataraxia` ([#13390](https://github.com/helix-editor/helix/pull/13390))
-* Add `vesper` ([#13394](https://github.com/helix-editor/helix/pull/13394))
-* Add `kinda_nvim` and `kinda_nvim_light` ([#13406](https://github.com/helix-editor/helix/pull/13406))
-* Update `sonokai` ([#13410](https://github.com/helix-editor/helix/pull/13410))
-* Add `nyxvamp` themes ([#12185](https://github.com/helix-editor/helix/pull/12185))
-* Update nord themes ([#13574](https://github.com/helix-editor/helix/pull/13574))
-* Add `lapis_aquamarine` ([#13726](https://github.com/helix-editor/helix/pull/13726))
-* Add `sidra` ([#13575](https://github.com/helix-editor/helix/pull/13575))
-* Add `dark-synthwave` ([#13857](https://github.com/helix-editor/helix/pull/13857))
-* Update `rose_pine` ([#13908](https://github.com/helix-editor/helix/pull/13908))
-* Add `doom-one` ([#13933](https://github.com/helix-editor/helix/pull/13933))
-* Update `nightfox` ([#13957](https://github.com/helix-editor/helix/pull/13957))
-
-New languages:
-
-* Ghostty config ([#12703](https://github.com/helix-editor/helix/pull/12703))
-* Tera ([#12756](https://github.com/helix-editor/helix/pull/12756))
-* FGA ([#12763](https://github.com/helix-editor/helix/pull/12763))
-* CSV ([#11973](https://github.com/helix-editor/helix/pull/11973))
-* Yara ([#12753](https://github.com/helix-editor/helix/pull/12753))
-* Djot ([#12562](https://github.com/helix-editor/helix/pull/12562))
-* Ink ([#12773](https://github.com/helix-editor/helix/pull/12773))
-* Mail ([#12945](https://github.com/helix-editor/helix/pull/12945))
-* SourcePawn ([#13028](https://github.com/helix-editor/helix/pull/13028))
-* TLA+ ([#13081](https://github.com/helix-editor/helix/pull/13081))
-* Werk ([#13136](https://github.com/helix-editor/helix/pull/13136))
-* Debian control file ([#13245](https://github.com/helix-editor/helix/pull/13245))
-* WESL ([#13267](https://github.com/helix-editor/helix/pull/13267))
-* Fennel ([#13260](https://github.com/helix-editor/helix/pull/13260), [6081a5d](https://github.com/helix-editor/helix/commit/6081a5d))
-* Quarto ([#13339](https://github.com/helix-editor/helix/pull/13339))
-* Pug ([#13435](https://github.com/helix-editor/helix/pull/13435))
-* Slang ([#13449](https://github.com/helix-editor/helix/pull/13449))
-* Dunst config ([#13458](https://github.com/helix-editor/helix/pull/13458))
-* Luau ([#13702](https://github.com/helix-editor/helix/pull/13702))
-* Caddyfile ([#13859](https://github.com/helix-editor/helix/pull/13859))
-* Java properties ([#13874](https://github.com/helix-editor/helix/pull/13874))
-* Git notes ([#13885](https://github.com/helix-editor/helix/pull/13885))
-* systemd (split from INI) ([#13907](https://github.com/helix-editor/helix/pull/13907))
-* JSON-LD (split from JSON) ([#13925](https://github.com/helix-editor/helix/pull/13925))
-* Django HTML ([#13935](https://github.com/helix-editor/helix/pull/13935))
-
-Updated languages and queries:
-
-* Add `ruby-lsp` for Ruby ([#12511](https://github.com/helix-editor/helix/pull/12511))
-* Add `wat_server` for Wat ([#12581](https://github.com/helix-editor/helix/pull/12581))
-* Recognize `bun.lock` as JSONC ([fcf981b](https://github.com/helix-editor/helix/commit/fcf981b))
-* Update tree-sitter-rust ([#12607](https://github.com/helix-editor/helix/pull/12607), [1afa63d](https://github.com/helix-editor/helix/commit/1afa63d))
-* Fix configuration of `cs-lsp` ([#12615](https://github.com/helix-editor/helix/pull/12615))
-* Add `beancount-language-server` for Beancount ([#12610](https://github.com/helix-editor/helix/pull/12610))
-* Update tree-sitter-fish ([#12456](https://github.com/helix-editor/helix/pull/12456))
-* Add `fish-lsp` for Fish ([#12456](https://github.com/helix-editor/helix/pull/12456))
-* Update tree-sitter-ini ([#12456](https://github.com/helix-editor/helix/pull/12456), [#13088](https://github.com/helix-editor/helix/pull/13088))
-* Recognize `hgrc` as INI ([#12456](https://github.com/helix-editor/helix/pull/12456))
-* Restrict tagged template injection languages for ECMA languages ([#12217](https://github.com/helix-editor/helix/pull/12217))
-* Update tree-sitter-zig ([#11980](https://github.com/helix-editor/helix/pull/11980), [#12708](https://github.com/helix-editor/helix/pull/12708))
-* Update tree-sitter-elixir ([8bf9adf](https://github.com/helix-editor/helix/commit/8bf9adf))
-* Add `asm-lsp` for Assembly dialects ([#12684](https://github.com/helix-editor/helix/pull/12684))
-* Update tree-sitter-just ([#12692](https://github.com/helix-editor/helix/pull/12692), #)
-* Update tree-sitter-cairo ([#12712](https://github.com/helix-editor/helix/pull/12712))
-* Configure a comment token for Svelte ([#12743](https://github.com/helix-editor/helix/pull/12743))
-* Recognize `.sublime-*` files ([#12750](https://github.com/helix-editor/helix/pull/12750))
-* Highlight `$` tagged templates as shell commands in ECMA languages ([#12751](https://github.com/helix-editor/helix/pull/12751))
-* Add `#'` comment token for R ([#12748](https://github.com/helix-editor/helix/pull/12748))
-* Fix module/namespace highlight in Unison ([93fa990](https://github.com/helix-editor/helix/commit/93fa990))
-* Add missing `#not-eq?` and `#not-match?` highlights in TSQ ([3824010](https://github.com/helix-editor/helix/commit/3824010))
-* Reverse the precedence order of highlight queries ([#9458](https://github.com/helix-editor/helix/pull/9458), [#12777](https://github.com/helix-editor/helix/pull/12777), [#12795](https://github.com/helix-editor/helix/pull/12795), [144a4f4](https://github.com/helix-editor/helix/commit/144a4f4), [e1c26eb](https://github.com/helix-editor/helix/commit/e1c26eb), [e1060a2](https://github.com/helix-editor/helix/commit/e1060a2), [7f41670](https://github.com/helix-editor/helix/commit/7f41670), [#13293](https://github.com/helix-editor/helix/pull/13293))
-* Update Rust highlights ([b8bfc44](https://github.com/helix-editor/helix/commit/b8bfc44), [#12871](https://github.com/helix-editor/helix/pull/12871), [#13664](https://github.com/helix-editor/helix/pull/13664))
-* Add block comment configuration for PHP ([0ab403d](https://github.com/helix-editor/helix/commit/0ab403d))
-* Update Gren highlights ([#12769](https://github.com/helix-editor/helix/pull/12769))
-* Remove `ERROR` node highlighting from all highlight queries ([16ff063](https://github.com/helix-editor/helix/commit/16ff063))
-* Update tree-sitter-erlang and highlights ([18b9eb9](https://github.com/helix-editor/helix/commit/18b9eb9), [9f3b193](https://github.com/helix-editor/helix/commit/9f3b193), [12139a4](https://github.com/helix-editor/helix/commit/12139a4))
-* Update Nix injections ([#12776](https://github.com/helix-editor/helix/pull/12776), [#12774](https://github.com/helix-editor/helix/pull/12774), [#13851](https://github.com/helix-editor/helix/pull/13851))
-* Add indent queries for Nix ([#12829](https://github.com/helix-editor/helix/pull/12829))
-* Update Markdown highlights ([#12696](https://github.com/helix-editor/helix/pull/12696))
-* Recognize `xsl` as XML ([#12834](https://github.com/helix-editor/helix/pull/12834))
-* Remove deprecated `typst-lsp` config ([5a66270](https://github.com/helix-editor/helix/commit/5a66270))
-* Replace `pkgbuild-language-server` with `termux-language-server` ([c3c9a0d](https://github.com/helix-editor/helix/commit/c3c9a0d))
-* Update SQL highlights ([#12837](https://github.com/helix-editor/helix/pull/12837))
-* Recognize `mpd` and `smil` as XML ([#12916](https://github.com/helix-editor/helix/pull/12916))
-* Add indents and textojbects for Kotlin ([#12925](https://github.com/helix-editor/helix/pull/12925))
-* Fix module highlights in Koto ([7e87a36](https://github.com/helix-editor/helix/commit/7e87a36))
-* Update language servers for Protobuf ([#12936](https://github.com/helix-editor/helix/pull/12936))
-* Add `astro-ls` for Astro ([#12939](https://github.com/helix-editor/helix/pull/12939))
-* Fix recognition of "scons*" files as Python ([#12943](https://github.com/helix-editor/helix/pull/12943))
-* Update C# queries ([#12948](https://github.com/helix-editor/helix/pull/12948))
-* Add comment textojbect to TOML ([#12952](https://github.com/helix-editor/helix/pull/12952))
-* Add `starpls` as Starlark language server ([#12958](https://github.com/helix-editor/helix/pull/12958))
-* Add `pkl-lsp` for PKL ([#12962](https://github.com/helix-editor/helix/pull/12962))
-* Add `kdlfmt` formatter for KDL ([#12967](https://github.com/helix-editor/helix/pull/12967))
-* Update CSS highlights ([#12497](https://github.com/helix-editor/helix/pull/12497), [fed3edc](https://github.com/helix-editor/helix/commit/fed3edc))
-* Add `harper-ls` ([#13029](https://github.com/helix-editor/helix/pull/13029))
-* Change `wgsl_analyzer` to `wgsl-analyzer` ([#13063](https://github.com/helix-editor/helix/pull/13063))
-* Update tree-sitter-vhdl ([#13091](https://github.com/helix-editor/helix/pull/13091))
-* Update tree-sitter-openscad ([#13033](https://github.com/helix-editor/helix/pull/13033))
-* Update Rust injections ([694b615](https://github.com/helix-editor/helix/commit/694b615), [1bd7a39](https://github.com/helix-editor/helix/commit/1bd7a39))
-* Update Ruby highlights ([#13055](https://github.com/helix-editor/helix/pull/13055))
-* Recognize `gitconfig` as an extension ([#13115](https://github.com/helix-editor/helix/pull/13115))
-* Add `///` comment token for Amber ([#13122](https://github.com/helix-editor/helix/pull/13122))
-* Add indent queries for Starlark ([#13126](https://github.com/helix-editor/helix/pull/13126))
-* Recognize more systemd file types as INI ([#13139](https://github.com/helix-editor/helix/pull/13139))
-* Update scheme queries ([#13143](https://github.com/helix-editor/helix/pull/13143))
-* Recognize `tmTheme` as XML ([#13202](https://github.com/helix-editor/helix/pull/13202))
-* Update `golangci-lint` command for v2 ([#13204](https://github.com/helix-editor/helix/pull/13204))
-* Add `just-lsp` for Just ([#13276](https://github.com/helix-editor/helix/pull/13276))
-* Add a tree-sitter-prolog grammar ([#11611](https://github.com/helix-editor/helix/pull/11611))
-* Fix typos in Ada queries ([#13251](https://github.com/helix-editor/helix/pull/13251))
-* Update mint language server args ([#13248](https://github.com/helix-editor/helix/pull/13248))
-* Update typescript highlights ([#13250](https://github.com/helix-editor/helix/pull/13250))
-* Update tree-sitter-jjdescription ([#13329](https://github.com/helix-editor/helix/pull/13329))
-* Add injection queries for Quint ([#13322](https://github.com/helix-editor/helix/pull/13322))
-* Update tree-sitter-scss and highlights ([#13414](https://github.com/helix-editor/helix/pull/13414))
-* Update tree-sitter-go-mod ([#13395](https://github.com/helix-editor/helix/pull/13395))
-* Update tree-sitter-svelte ([#13423](https://github.com/helix-editor/helix/pull/13423))
-* Update Lua highlights ([#13401](https://github.com/helix-editor/helix/pull/13401))
-* Update Go highlights ([#13425](https://github.com/helix-editor/helix/pull/13425), [25b299a](https://github.com/helix-editor/helix/commit/25b299a), [#13825](https://github.com/helix-editor/helix/pull/13825))
-* Recognize `.git-blame-ignore-revs` as gitignore ([#13460](https://github.com/helix-editor/helix/pull/13460))
-* Update Verilog highlights ([#13473](https://github.com/helix-editor/helix/pull/13473), [#13493](https://github.com/helix-editor/helix/pull/13493))
-* Update tree-sitter-v ([#13469](https://github.com/helix-editor/helix/pull/13469))
-* Update WGSL highlights ([#13479](https://github.com/helix-editor/helix/pull/13479))
-* Update Bash highlights ([#13477](https://github.com/helix-editor/helix/pull/13477))
-* Update tree-sitter-cpp ([#13504](https://github.com/helix-editor/helix/pull/13504))
-* Update rust-analyzer config to use server-side file watching ([#13432](https://github.com/helix-editor/helix/pull/13432))
-* Update Vue injections ([#13511](https://github.com/helix-editor/helix/pull/13511))
-* Recognize `sld` as Scheme ([#13528](https://github.com/helix-editor/helix/pull/13528))
-* Recognize more files as git-attributes ([#13540](https://github.com/helix-editor/helix/pull/13540))
-* Update tree-sitter-haskell and queries ([#13475](https://github.com/helix-editor/helix/pull/13475))
-* Align INI highlights with TOML ([#13589](https://github.com/helix-editor/helix/pull/13589))
-* Add tree-sitter-rust-format-args for `format_args!` injections in Rust ([#13533](https://github.com/helix-editor/helix/pull/13533), [#13657](https://github.com/helix-editor/helix/pull/13657), [4dd4ba7](https://github.com/helix-editor/helix/commit/4dd4ba7), [86f10ae](https://github.com/helix-editor/helix/commit/86f10ae))
-* Update Ungrammar highlights ([8d58f6c](https://github.com/helix-editor/helix/commit/8d58f6c))
-* Add `ty` language server for Python ([#13643](https://github.com/helix-editor/helix/pull/13643))
-* Add `clarinet` language server for Clarity ([#13647](https://github.com/helix-editor/helix/pull/13647))
-* Update prisma config to avoid a crash in the language server ([f6878f6](https://github.com/helix-editor/helix/commit/f6878f6))
-* Add `pyrefly` for Python ([#13713](https://github.com/helix-editor/helix/pull/13713))
-* Update Python highlights ([#13715](https://github.com/helix-editor/helix/pull/13715))
-* Update Mojo language server and formatter to `pixi` ([#13648](https://github.com/helix-editor/helix/pull/13648))
-* Add `tombi` for TOML ([#13723](https://github.com/helix-editor/helix/pull/13723))
-* Add `neocmakelsp` for CMake ([#13740](https://github.com/helix-editor/helix/pull/13740))
-* Update C and C++ highlights ([#13747](https://github.com/helix-editor/helix/pull/13747), [#13772](https://github.com/helix-editor/helix/pull/13772))
-* Highlight escape sequences in ECMA languages ([#13762](https://github.com/helix-editor/helix/pull/13762))
-* Add an external formatter config for Crystal ([#13759](https://github.com/helix-editor/helix/pull/13759))
-* Add `amber-lsp` for Amber ([#13763](https://github.com/helix-editor/helix/pull/13763))
-* Update HTML highlights ([#13753](https://github.com/helix-editor/helix/pull/13753))
-* Update tree-sitter-purescript and highlights ([#13782](https://github.com/helix-editor/helix/pull/13782))
-* Update tree-sitter-gleam and highlights ([#13793](https://github.com/helix-editor/helix/pull/13793), [#13807](https://github.com/helix-editor/helix/pull/13807), [#13813](https://github.com/helix-editor/helix/pull/13813))
-* Recognize Buck files as Starlark ([#13810](https://github.com/helix-editor/helix/pull/13810))
-* Use tree-sitter-crystal instead of tree-sitter-ruby for Crystal and add custom queries ([#13805](https://github.com/helix-editor/helix/pull/13805))
-* Update tree-sitter-twig ([#13689](https://github.com/helix-editor/helix/pull/13689))
-* Recognize `jsconfig.json` as JSONC, use as JavaScript and JSX roots ([#13822](https://github.com/helix-editor/helix/pull/13822))
-* Recognize `.gem/credentials` as YAML ([#13843](https://github.com/helix-editor/helix/pull/13843))
-* Update Dockerfile injections ([#13845](https://github.com/helix-editor/helix/pull/13845), 13852)
-* Change tree-sitter parser for Git commit message files ([44293df](https://github.com/helix-editor/helix/commit/44293df))
-* Recognize `mimeapps.list` as INI ([#13850](https://github.com/helix-editor/helix/pull/13850))
-* Update tree-sitter-odin, highlights and indents ([#13877](https://github.com/helix-editor/helix/pull/13877), [#13917](https://github.com/helix-editor/helix/pull/13917))
-* Add locals queries for C, improve parameter highlighting ([#13876](https://github.com/helix-editor/helix/pull/13876))
-* Add textobjects for QML ([#13855](https://github.com/helix-editor/helix/pull/13855))
-* Add comment tokens for DTD ([#13904](https://github.com/helix-editor/helix/pull/13904))
-* Add `dts-lsp` for DeviceTree ([#13907](https://github.com/helix-editor/helix/pull/13907))
-* Update gomod highlights ([#13913](https://github.com/helix-editor/helix/pull/13913))
-* Recognize `compose.yaml` and `compose.yml` as Docker Compose ([#13930](https://github.com/helix-editor/helix/pull/13930))
-
-Packaging:
-
-* Fix handling of spaces in Bash completion ([#12828](https://github.com/helix-editor/helix/pull/12828))
-* Refactor Nix flake ([#12831](https://github.com/helix-editor/helix/pull/12831), [#13024](https://github.com/helix-editor/helix/pull/13024), [cb1ecc9](https://github.com/helix-editor/helix/commit/cb1ecc9), [#13305](https://github.com/helix-editor/helix/pull/13305))
-* Add `ConsoleOnly` to `Helix.desktop` categories ([#13236](https://github.com/helix-editor/helix/pull/13236))
-* Drop Nix flake dependency on flake-utils ([60a03a3](https://github.com/helix-editor/helix/commit/60a03a3))
-* Increase the MSRV to 1.82 ([#13275](https://github.com/helix-editor/helix/pull/13275))
-
# 25.01.1 (2025-01-19)
25.01.1 is a patch release focusing on fixing bugs and panics from changes in 25.01.
diff --git a/Cargo.lock b/Cargo.lock
index 257156a2..d775ff1e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,13 +3,33 @@
version = 3
[[package]]
+name = "addr2line"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[package]]
name = "ahash"
version = "0.8.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
dependencies = [
"cfg-if",
- "getrandom 0.3.1",
"once_cell",
"version_check",
"zerocopy",
@@ -31,6 +51,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -41,9 +67,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.100"
+version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
+checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
[[package]]
name = "arc-swap"
@@ -58,10 +84,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
+name = "backtrace"
+version = "0.3.73"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide 0.7.4",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
name = "bitflags"
-version = "2.10.0"
+version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
+checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
[[package]]
name = "block-buffer"
@@ -85,9 +126,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.19.0"
+version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
@@ -97,9 +138,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.10.1"
+version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
+checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
[[package]]
name = "cassowary"
@@ -109,11 +150,10 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
[[package]]
name = "cc"
-version = "1.2.43"
+version = "1.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "739eb0f94557554b3ca9a86d2d37bebd49c5e6d0c1d2bda35ba5bdac830befc2"
+checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc"
dependencies = [
- "find-msvc-tools",
"shlex",
]
@@ -136,10 +176,11 @@ dependencies = [
[[package]]
name = "chrono"
-version = "0.4.42"
+version = "0.4.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2"
+checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
dependencies = [
+ "android-tzdata",
"iana-time-zone",
"num-traits",
"windows-link",
@@ -147,9 +188,9 @@ dependencies = [
[[package]]
name = "clipboard-win"
-version = "5.4.1"
+version = "5.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4"
+checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892"
dependencies = [
"error-code",
]
@@ -186,9 +227,9 @@ dependencies = [
[[package]]
name = "crc32fast"
-version = "1.5.0"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
@@ -226,7 +267,9 @@ checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
dependencies = [
"bitflags",
"crossterm_winapi",
+ "filedescriptor",
"futures-core",
+ "libc",
"mio",
"parking_lot",
"rustix 0.38.44",
@@ -269,12 +312,6 @@ dependencies = [
]
[[package]]
-name = "diff"
-version = "0.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
-
-[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -381,24 +418,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
-name = "faststr"
-version = "0.2.32"
+name = "fern"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baec6a0289d7f1fe5665586ef7340af82e3037207bef60f5785e57569776f0c8"
+checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29"
dependencies = [
- "bytes",
- "rkyv",
- "serde",
- "simdutf8",
+ "log",
]
[[package]]
-name = "fern"
-version = "0.7.1"
+name = "filedescriptor"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29"
+checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e"
dependencies = [
- "log",
+ "libc",
+ "thiserror 1.0.69",
+ "winapi",
]
[[package]]
@@ -414,10 +450,15 @@ dependencies = [
]
[[package]]
-name = "find-msvc-tools"
-version = "0.1.4"
+name = "flate2"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127"
+checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece"
+dependencies = [
+ "crc32fast",
+ "libz-rs-sys",
+ "miniz_oxide 0.8.7",
+]
[[package]]
name = "fnv"
@@ -432,12 +473,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
[[package]]
-name = "foldhash"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
-
-[[package]]
name = "form_urlencoded"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -516,10 +551,16 @@ dependencies = [
]
[[package]]
+name = "gimli"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
+
+[[package]]
name = "gix"
-version = "0.74.1"
+version = "0.72.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fd3a6fea165debe0e80648495f894aa2371a771e3ceb7a7dcc304f1c4344c43"
+checksum = "01237e8d3d78581f71642be8b0c2ae8c0b2b5c251c9c5d9ebbea3c1ea280dce8"
dependencies = [
"gix-actor",
"gix-attributes",
@@ -560,29 +601,30 @@ dependencies = [
"gix-utils",
"gix-validate",
"gix-worktree",
+ "once_cell",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-actor"
-version = "0.35.6"
+version = "0.35.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "987a51a7e66db6ef4dc030418eb2a42af6b913a79edd8670766122d8af3ba59e"
+checksum = "6b300e6e4f31f3f6bd2de5e2b0caab192ced00dc0fcd0f7cc56e28c575c8e1ff"
dependencies = [
"bstr",
"gix-date",
"gix-utils",
"itoa",
- "thiserror",
+ "thiserror 2.0.12",
"winnow",
]
[[package]]
name = "gix-attributes"
-version = "0.28.1"
+version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc6591add69314fc43db078076a8da6f07957c65abb0b21c3e1b6a3cf50aa18d"
+checksum = "e7e26b3ac280ddb25bb6980d34f4a82ee326f78bf2c6d4ea45eef2d940048b8e"
dependencies = [
"bstr",
"gix-glob",
@@ -591,33 +633,33 @@ dependencies = [
"gix-trace",
"kstring",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
"unicode-bom",
]
[[package]]
name = "gix-bitmap"
-version = "0.2.15"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e150161b8a75b5860521cb876b506879a3376d3adc857ec7a9d35e7c6a5e531"
+checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540"
dependencies = [
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-chunk"
-version = "0.4.12"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c356b3825677cb6ff579551bb8311a81821e184453cbd105e2fc5311b288eeb"
+checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f"
dependencies = [
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-command"
-version = "0.6.3"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "095c8367c9dc4872a7706fbc39c7f34271b88b541120a4365ff0e36366f66e62"
+checksum = "d2f47f3fb4ba33644061e8e0e1030ef2a937d42dc969553118c320a205a9fb28"
dependencies = [
"bstr",
"gix-path",
@@ -628,22 +670,22 @@ dependencies = [
[[package]]
name = "gix-commitgraph"
-version = "0.30.1"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "826994ff6c01f1ff00d6a1844d7506717810a91ffed143da71e3bf39369751ef"
+checksum = "e05050fd6caa6c731fe3bd7f9485b3b520be062d3d139cb2626e052d6c127951"
dependencies = [
"bstr",
"gix-chunk",
"gix-hash",
"memmap2",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-config"
-version = "0.47.1"
+version = "0.45.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e74f57ea99025de9207db53488be4d59cf2000f617964c1b550880524fefbc3"
+checksum = "48f3c8f357ae049bfb77493c2ec9010f58cfc924ae485e1116c3718fc0f0d881"
dependencies = [
"bstr",
"gix-config-value",
@@ -653,43 +695,44 @@ dependencies = [
"gix-ref",
"gix-sec",
"memchr",
+ "once_cell",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
"unicode-bom",
"winnow",
]
[[package]]
name = "gix-config-value"
-version = "0.15.3"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c489abb061c74b0c3ad790e24a606ef968cebab48ec673d6a891ece7d5aef64"
+checksum = "439d62e241dae2dffd55bfeeabe551275cf9d9f084c5ebc6b48bad49d03285b7"
dependencies = [
"bitflags",
"bstr",
"gix-path",
"libc",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-date"
-version = "0.10.7"
+version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "661245d045aa7c16ba4244daaabd823c562c3e45f1f25b816be2c57ee09f2171"
+checksum = "3a98593f1f1e14b9fa15c5b921b2c465e904d698b9463e21bb377be8376c3c1a"
dependencies = [
"bstr",
"itoa",
"jiff",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-diff"
-version = "0.54.1"
+version = "0.52.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd78d9da421baca219a650d71c797706117095635d7963f21bb6fdf2410abe04"
+checksum = "5e9b43e95fe352da82a969f0c84ff860c2de3e724d93f6681fedbcd6c917f252"
dependencies = [
"bstr",
"gix-attributes",
@@ -706,14 +749,14 @@ dependencies = [
"gix-traverse",
"gix-worktree",
"imara-diff 0.1.8",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-dir"
-version = "0.16.0"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f99fb4dcba076453d791949bf3af977c5678a1cbd76740ec2cfe37e29431daf3"
+checksum = "01e6e2dc5b8917142d0ffe272209d1671e45b771e433f90186bc71c016792e87"
dependencies = [
"bstr",
"gix-discover",
@@ -726,14 +769,14 @@ dependencies = [
"gix-trace",
"gix-utils",
"gix-worktree",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-discover"
-version = "0.42.0"
+version = "0.40.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d24547153810634636471af88338240e6ab0831308cd41eb6ebfffea77811c6"
+checksum = "dccfe3e25b4ea46083916c56db3ba9d1e6ef6dce54da485f0463f9fc0fe1837c"
dependencies = [
"bstr",
"dunce",
@@ -742,32 +785,32 @@ dependencies = [
"gix-path",
"gix-ref",
"gix-sec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-features"
-version = "0.44.1"
+version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfa64593d1586135102307fb57fb3a9d3868b6b1f45a4da1352cce5070f8916a"
+checksum = "56f4399af6ec4fd9db84dd4cf9656c5c785ab492ab40a7c27ea92b4241923fed"
dependencies = [
"crc32fast",
+ "flate2",
"gix-path",
"gix-trace",
"gix-utils",
"libc",
- "libz-rs-sys",
"once_cell",
"prodash",
- "thiserror",
+ "thiserror 2.0.12",
"walkdir",
]
[[package]]
name = "gix-filter"
-version = "0.21.0"
+version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d1253452c9808da01eaaf9b1c4929b9982efec29ef0a668b3326b8046d9b8fb"
+checksum = "f90c21f0d61778f518bbb7c431b00247bf4534b2153c3e85bcf383876c55ca6c"
dependencies = [
"bstr",
"encoding_rs",
@@ -781,28 +824,28 @@ dependencies = [
"gix-trace",
"gix-utils",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-fs"
-version = "0.17.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f1ecd896258cdc5ccd94d18386d17906b8de265ad2ecf68e3bea6b007f6a28f"
+checksum = "67a0637149b4ef24d3ea55f81f77231401c8463fae6da27331c987957eb597c7"
dependencies = [
"bstr",
"fastrand",
"gix-features",
"gix-path",
"gix-utils",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-glob"
-version = "0.22.1"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74254992150b0a88fdb3ad47635ab649512dff2cbbefca7916bb459894fc9d56"
+checksum = "2926b03666e83b8d01c10cf06e5733521aacbd2d97179a4c9b1fdddabb9e937d"
dependencies = [
"bitflags",
"bstr",
@@ -812,32 +855,32 @@ dependencies = [
[[package]]
name = "gix-hash"
-version = "0.20.1"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "826036a9bee95945b0be1e2394c64cd4289916c34a639818f8fd5153906985c1"
+checksum = "8d4900562c662852a6b42e2ef03442eccebf24f047d8eab4f23bc12ef0d785d8"
dependencies = [
"faster-hex",
"gix-features",
"sha1-checked",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-hashtable"
-version = "0.10.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a27d4a3ea9640da504a2657fef3419c517fd71f1767ad8935298bcc805edd195"
+checksum = "b5b5cb3c308b4144f2612ff64e32130e641279fcf1a84d8d40dad843b4f64904"
dependencies = [
"gix-hash",
- "hashbrown 0.16.0",
+ "hashbrown 0.14.5",
"parking_lot",
]
[[package]]
name = "gix-ignore"
-version = "0.17.1"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93b6a9679a1488123b7f2929684bacfd9cd2a24f286b52203b8752cbb8d7fc49"
+checksum = "ae358c3c96660b10abc7da63c06788dfded603e717edbd19e38c6477911b71c8"
dependencies = [
"bstr",
"gix-glob",
@@ -848,9 +891,9 @@ dependencies = [
[[package]]
name = "gix-index"
-version = "0.42.1"
+version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31244542fb98ea4f3e964a4f8deafc2f4c77ad42bed58a1e8424bca1965fae99"
+checksum = "e6d505aea7d7c4267a3153cb90c712a89970b4dd02a2cb3205be322891f530b5"
dependencies = [
"bitflags",
"bstr",
@@ -865,31 +908,31 @@ dependencies = [
"gix-traverse",
"gix-utils",
"gix-validate",
- "hashbrown 0.16.0",
+ "hashbrown 0.14.5",
"itoa",
"libc",
"memmap2",
- "rustix 1.1.2",
+ "rustix 1.0.7",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-lock"
-version = "19.0.0"
+version = "17.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "729d7857429a66023bc0c29d60fa21d0d6ae8862f33c1937ba89e0f74dd5c67f"
+checksum = "570f8b034659f256366dc90f1a24924902f20acccd6a15be96d44d1269e7a796"
dependencies = [
"gix-tempfile",
"gix-utils",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-object"
-version = "0.51.1"
+version = "0.49.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87ba1815638759c80d2318c8e98296fb396f577c2e588a3d9c13f9a5d5184051"
+checksum = "d957ca3640c555d48bb27f8278c67169fa1380ed94f6452c5590742524c40fbb"
dependencies = [
"bstr",
"gix-actor",
@@ -902,15 +945,15 @@ dependencies = [
"gix-validate",
"itoa",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
"winnow",
]
[[package]]
name = "gix-odb"
-version = "0.71.1"
+version = "0.69.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6efc6736d3ea62640efe8c1be695fb0760af63614a7356d2091208a841f1a634"
+checksum = "868f703905fdbcfc1bd750942f82419903ecb7039f5288adb5206d6de405e0c9"
dependencies = [
"arc-swap",
"gix-date",
@@ -924,14 +967,14 @@ dependencies = [
"gix-quote",
"parking_lot",
"tempfile",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-pack"
-version = "0.61.1"
+version = "0.59.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719c60524be76874f4769da20d525ad2c00a0e7059943cc4f31fcb65cfb6b260"
+checksum = "9d49c55d69c8449f2a0a5a77eb9cbacfebb6b0e2f1215f0fc23a4cb60528a450"
dependencies = [
"clru",
"gix-chunk",
@@ -942,51 +985,52 @@ dependencies = [
"gix-path",
"memmap2",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-packetline"
-version = "0.19.3"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64286a8b5148e76ab80932e72762dd27ccf6169dd7a134b027c8a262a8262fcf"
+checksum = "8ddc034bc67c848e4ef7596ab5528cd8fd439d310858dbe1ce8b324f25deb91c"
dependencies = [
"bstr",
"faster-hex",
"gix-trace",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-packetline-blocking"
-version = "0.19.3"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89c59c3ad41e68cb38547d849e9ef5ccfc0d00f282244ba1441ae856be54d001"
+checksum = "c44880f028ba46d6cf37a66d27a300310c6b51b8ed0e44918f93df061168e2f3"
dependencies = [
"bstr",
"faster-hex",
"gix-trace",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-path"
-version = "0.10.21"
+version = "0.10.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0416b41cd00ff292af9b94b0660880c44bd2ed66828ddca9a2b333535cbb71b8"
+checksum = "c091d2e887e02c3462f52252c5ea61150270c0f2657b642e8d0d6df56c16e642"
dependencies = [
"bstr",
"gix-trace",
"gix-validate",
"home",
- "thiserror",
+ "once_cell",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-pathspec"
-version = "0.13.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d05e28457dca7c65a2dbe118869aab922a5bd382b7bb10cff5354f366845c128"
+checksum = "ce061c50e5f8f7c830cacb3da3e999ae935e283ce8522249f0ce2256d110979d"
dependencies = [
"bitflags",
"bstr",
@@ -994,14 +1038,14 @@ dependencies = [
"gix-config-value",
"gix-glob",
"gix-path",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-protocol"
-version = "0.52.1"
+version = "0.50.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64f19873bbf924fd077580d4ccaaaeddb67c3b3c09a8ffb61e6b4cb67e3c9302"
+checksum = "f5c17d78bb0414f8d60b5f952196dc2e47ec320dca885de9128ecdb4a0e38401"
dependencies = [
"bstr",
"gix-date",
@@ -1012,26 +1056,26 @@ dependencies = [
"gix-transport",
"gix-utils",
"maybe-async",
- "thiserror",
+ "thiserror 2.0.12",
"winnow",
]
[[package]]
name = "gix-quote"
-version = "0.6.1"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e912ec04b7b1566a85ad486db0cab6b9955e3e32bcd3c3a734542ab3af084c5b"
+checksum = "4a375a75b4d663e8bafe3bf4940a18a23755644c13582fa326e99f8f987d83fd"
dependencies = [
"bstr",
"gix-utils",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-ref"
-version = "0.54.1"
+version = "0.52.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8881d262f28eda39c244e60ae968f4f6e56c747f65addd6f4100b25f75ed8b88"
+checksum = "d1b7985657029684d759f656b09abc3e2c73085596d5cdb494428823970a7762"
dependencies = [
"gix-actor",
"gix-features",
@@ -1044,29 +1088,29 @@ dependencies = [
"gix-utils",
"gix-validate",
"memmap2",
- "thiserror",
+ "thiserror 2.0.12",
"winnow",
]
[[package]]
name = "gix-refspec"
-version = "0.32.0"
+version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93147960f77695ba89b72019b789679278dd4dad6a0f9a4a5bf2fd07aba56912"
+checksum = "445ed14e3db78e8e79980085e3723df94e1c8163b3ae5bc8ed6a8fe6cf983b42"
dependencies = [
"bstr",
"gix-hash",
"gix-revision",
"gix-validate",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-revision"
-version = "0.36.1"
+version = "0.34.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13c5267e530d8762842be7d51b48d2b134c9dec5b650ca607f735a56a4b12413"
+checksum = "78d0b8e5cbd1c329e25383e088cb8f17439414021a643b30afa5146b71e3c65d"
dependencies = [
"bstr",
"gix-commitgraph",
@@ -1074,14 +1118,14 @@ dependencies = [
"gix-hash",
"gix-object",
"gix-revwalk",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-revwalk"
-version = "0.22.0"
+version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02e2de4f91d712b1f6873477f769225fe430ffce2af8c7c85721c3ff955783b3"
+checksum = "1bc756b73225bf005ddeb871d1ca7b3c33e2417d0d53e56effa5a36765b52b28"
dependencies = [
"gix-commitgraph",
"gix-date",
@@ -1089,38 +1133,38 @@ dependencies = [
"gix-hashtable",
"gix-object",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-sec"
-version = "0.12.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea9962ed6d9114f7f100efe038752f41283c225bb507a2888903ac593dffa6be"
+checksum = "d0dabbc78c759ecc006b970339394951b2c8e1e38a37b072c105b80b84c308fd"
dependencies = [
"bitflags",
"gix-path",
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
name = "gix-shallow"
-version = "0.6.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2374692db1ee1ffa0eddcb9e86ec218f7c4cdceda800ebc5a9fdf73a8c08223"
+checksum = "6b9a6f6e34d6ede08f522d89e5c7990b4f60524b8ae6ebf8e850963828119ad4"
dependencies = [
"bstr",
"gix-hash",
"gix-lock",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-status"
-version = "0.21.1"
+version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c64039358f66c955a471432aef0ea1eeebc7afe0e0a4be7b6b737cc19925e3b"
+checksum = "072099c2415cfa5397df7d47eacbcb6016d2cd17e0d674c74965e6ad1b17289f"
dependencies = [
"bstr",
"filetime",
@@ -1136,14 +1180,14 @@ dependencies = [
"gix-pathspec",
"gix-worktree",
"portable-atomic",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-submodule"
-version = "0.21.0"
+version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9bacc06333b50abc4fc06204622c2dd92850de2066bb5d421ac776d2bef7ae55"
+checksum = "5f51472f05a450cc61bc91ed2f62fb06e31e2bbb31c420bc4be8793f26c8b0c1"
dependencies = [
"bstr",
"gix-config",
@@ -1151,33 +1195,34 @@ dependencies = [
"gix-pathspec",
"gix-refspec",
"gix-url",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-tempfile"
-version = "19.0.1"
+version = "17.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e265fc6b54e57693232a79d84038381ebfda7b1a3b1b8a9320d4d5fe6e820086"
+checksum = "c750e8c008453a2dba67a2b0d928b7716e05da31173a3f5e351d5457ad4470aa"
dependencies = [
"dashmap",
"gix-fs",
"libc",
+ "once_cell",
"parking_lot",
"tempfile",
]
[[package]]
name = "gix-trace"
-version = "0.1.15"
+version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d3f59a8de2934f6391b6b3a1a7654eae18961fcb9f9c843533fed34ad0f3457"
+checksum = "7c396a2036920c69695f760a65e7f2677267ccf483f25046977d87e4cb2665f7"
[[package]]
name = "gix-transport"
-version = "0.49.1"
+version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8da4a77922accb1e26e610c7a84ef7e6b34fd07112e6a84afd68d7f3e795957"
+checksum = "edfe22ba26d4b65c17879f12b9882eafe65d3c8611c933b272fce2c10f546f59"
dependencies = [
"bstr",
"gix-command",
@@ -1186,14 +1231,14 @@ dependencies = [
"gix-quote",
"gix-sec",
"gix-url",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-traverse"
-version = "0.48.0"
+version = "0.46.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "412126bade03a34f5d4125fd64878852718575b3b360eaae3b29970cb555e2a2"
+checksum = "39094185f6d9a4d81101130fbbf7f598a06441d774ae3b3ae7930a613bbe1157"
dependencies = [
"bitflags",
"gix-commitgraph",
@@ -1203,28 +1248,28 @@ dependencies = [
"gix-object",
"gix-revwalk",
"smallvec",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-url"
-version = "0.33.1"
+version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c79b07b48dd9285485eb10429696ddcd1bfe6fb942ec0e5efb401ae7e40238e5"
+checksum = "42a1ad0b04a5718b5cb233e6888e52a9b627846296161d81dcc5eb9203ec84b8"
dependencies = [
"bstr",
"gix-features",
"gix-path",
"percent-encoding",
- "thiserror",
+ "thiserror 2.0.12",
"url",
]
[[package]]
name = "gix-utils"
-version = "0.3.1"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "befcdbdfb1238d2854591f760a48711bed85e72d80a10e8f2f93f656746ef7c5"
+checksum = "5351af2b172caf41a3728eb4455326d84e0d70fe26fc4de74ab0bd37df4191c5"
dependencies = [
"bstr",
"fastrand",
@@ -1233,19 +1278,19 @@ dependencies = [
[[package]]
name = "gix-validate"
-version = "0.10.1"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b1e63a5b516e970a594f870ed4571a8fdcb8a344e7bd407a20db8bd61dbfde4"
+checksum = "77b9e00cacde5b51388d28ed746c493b18a6add1f19b5e01d686b3b9ece66d4d"
dependencies = [
"bstr",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
name = "gix-worktree"
-version = "0.43.1"
+version = "0.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8df3dfc8b62b0eccc923c757b40f488abc357c85c03d798622edfc3eb5137e04"
+checksum = "54f1916f8d928268300c977d773dd70a8746b646873b77add0a34876a8c847e9"
dependencies = [
"bstr",
"gix-attributes",
@@ -1324,27 +1369,20 @@ name = "hashbrown"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
-
-[[package]]
-name = "hashbrown"
-version = "0.15.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
+ "ahash",
"allocator-api2",
- "equivalent",
- "foldhash 0.1.5",
]
[[package]]
name = "hashbrown"
-version = "0.16.0"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
+checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5"
dependencies = [
"allocator-api2",
"equivalent",
- "foldhash 0.2.0",
+ "foldhash",
]
[[package]]
@@ -1359,14 +1397,14 @@ dependencies = [
[[package]]
name = "helix-core"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
"bitflags",
"chrono",
"encoding_rs",
- "foldhash 0.2.0",
+ "foldhash",
"globset",
"helix-loader",
"helix-parsec",
@@ -1397,7 +1435,7 @@ dependencies = [
[[package]]
name = "helix-dap"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
"fern",
@@ -1409,20 +1447,19 @@ dependencies = [
"serde",
"serde_json",
"slotmap",
- "sonic-rs",
- "thiserror",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
]
[[package]]
name = "helix-event"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
- "foldhash 0.2.0",
+ "foldhash",
"futures-executor",
- "hashbrown 0.16.0",
+ "hashbrown 0.15.4",
"log",
"once_cell",
"parking_lot",
@@ -1431,7 +1468,7 @@ dependencies = [
[[package]]
name = "helix-loader"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
"cc",
@@ -1448,7 +1485,7 @@ dependencies = [
[[package]]
name = "helix-lsp"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
@@ -1464,8 +1501,7 @@ dependencies = [
"serde",
"serde_json",
"slotmap",
- "sonic-rs",
- "thiserror",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
]
@@ -1482,11 +1518,11 @@ dependencies = [
[[package]]
name = "helix-parsec"
-version = "25.7.1"
+version = "25.1.1"
[[package]]
name = "helix-stdx"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"bitflags",
"dunce",
@@ -1495,26 +1531,24 @@ dependencies = [
"regex-automata",
"regex-cursor",
"ropey",
- "rustix 1.1.2",
+ "rustix 1.0.7",
"tempfile",
"unicode-segmentation",
"which",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
name = "helix-term"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
"chrono",
"content_inspector",
"crossterm",
- "dashmap",
"fern",
"futures-util",
- "grep-matcher",
"grep-regex",
"grep-searcher",
"helix-core",
@@ -1542,19 +1576,17 @@ dependencies = [
"signal-hook-tokio",
"smallvec",
"tempfile",
- "termina",
"termini",
- "thiserror",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
"toml",
- "tree-house",
"url",
]
[[package]]
name = "helix-tui"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"bitflags",
"cassowary",
@@ -1563,14 +1595,13 @@ dependencies = [
"helix-view",
"log",
"once_cell",
- "termina",
"termini",
"unicode-segmentation",
]
[[package]]
name = "helix-vcs"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
@@ -1586,7 +1617,7 @@ dependencies = [
[[package]]
name = "helix-view"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
@@ -1603,18 +1634,16 @@ dependencies = [
"helix-stdx",
"helix-tui",
"helix-vcs",
- "kstring",
"libc",
"log",
"once_cell",
"parking_lot",
- "rustix 1.1.2",
+ "rustix 1.0.7",
"serde",
"serde_json",
"slotmap",
"tempfile",
- "termina",
- "thiserror",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
"toml",
@@ -1820,7 +1849,7 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17d34b7d42178945f775e84bc4c36dde7c1c6cdfea656d3354d009056f2bb3d2"
dependencies = [
- "hashbrown 0.15.5",
+ "hashbrown 0.15.4",
]
[[package]]
@@ -1829,28 +1858,25 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f01d462f766df78ab820dd06f5eb700233c51f0f4c2e846520eaf4ba6aa5c5c"
dependencies = [
- "hashbrown 0.15.5",
+ "hashbrown 0.15.4",
"memchr",
]
[[package]]
name = "indexmap"
-version = "2.12.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
+checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
dependencies = [
"equivalent",
- "hashbrown 0.16.0",
+ "hashbrown 0.15.4",
]
[[package]]
name = "indoc"
-version = "2.0.7"
+version = "2.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
-dependencies = [
- "rustversion",
-]
+checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
[[package]]
name = "is-docker"
@@ -1879,9 +1905,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "jiff"
-version = "0.2.15"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49"
+checksum = "5a064218214dc6a10fbae5ec5fa888d80c45d611aba169222fc272072bf7aef6"
dependencies = [
"jiff-static",
"jiff-tzdb-platform",
@@ -1894,9 +1920,9 @@ dependencies = [
[[package]]
name = "jiff-static"
-version = "0.2.15"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4"
+checksum = "199b7932d97e325aff3a7030e141eafe7f2c6268e1d1b24859b753a627f45254"
dependencies = [
"proc-macro2",
"quote",
@@ -1920,11 +1946,10 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.80"
+version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "852f13bec5eba4ba9afbeb93fd7c13fe56147f055939ae21c43a29a0ecb2702e"
+checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a"
dependencies = [
- "once_cell",
"wasm-bindgen",
]
@@ -1939,9 +1964,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.177"
+version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
+checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "libloading"
@@ -1966,24 +1991,24 @@ dependencies = [
[[package]]
name = "libz-rs-sys"
-version = "0.5.2"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd"
+checksum = "6489ca9bd760fe9642d7644e827b0c9add07df89857b0416ee15c1cc1a3b8c5a"
dependencies = [
"zlib-rs",
]
[[package]]
name = "linux-raw-sys"
-version = "0.4.15"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
+checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "linux-raw-sys"
-version = "0.11.0"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
+checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9"
[[package]]
name = "litemap"
@@ -1993,18 +2018,19 @@ checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704"
[[package]]
name = "lock_api"
-version = "0.4.14"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
+checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
dependencies = [
+ "autocfg",
"scopeguard",
]
[[package]]
name = "log"
-version = "0.4.28"
+version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
+checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "maybe-async"
@@ -2025,44 +2051,42 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "memmap2"
-version = "0.9.9"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490"
+checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322"
dependencies = [
"libc",
]
[[package]]
-name = "mio"
-version = "1.0.2"
+name = "miniz_oxide"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
+checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
dependencies = [
- "hermit-abi",
- "libc",
- "log",
- "wasi 0.11.0+wasi-snapshot-preview1",
- "windows-sys 0.52.0",
+ "adler",
]
[[package]]
-name = "munge"
-version = "0.4.6"
+name = "miniz_oxide"
+version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7feb0b48aa0a25f9fe0899482c6e1379ee7a11b24a53073eacdecb9adb6dc60"
+checksum = "ff70ce3e48ae43fa075863cef62e8b43b71a4f2382229920e0df362592919430"
dependencies = [
- "munge_macro",
+ "adler2",
]
[[package]]
-name = "munge_macro"
-version = "0.4.6"
+name = "mio"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2e3795a5d2da581a8b252fec6022eee01aea10161a4d1bf237d4cbe47f7e988"
+checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [
- "proc-macro2",
- "quote",
- "syn",
+ "hermit-abi",
+ "libc",
+ "log",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2106,6 +2130,15 @@ dependencies = [
]
[[package]]
+name = "object"
+version = "0.36.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2124,9 +2157,9 @@ dependencies = [
[[package]]
name = "parking_lot"
-version = "0.12.5"
+version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
+checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
dependencies = [
"lock_api",
"parking_lot_core",
@@ -2134,15 +2167,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.12"
+version = "0.9.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
+checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
- "windows-link",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -2185,16 +2218,6 @@ dependencies = [
]
[[package]]
-name = "pretty_assertions"
-version = "1.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d"
-dependencies = [
- "diff",
- "yansi",
-]
-
-[[package]]
name = "proc-macro2"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2205,34 +2228,15 @@ dependencies = [
[[package]]
name = "prodash"
-version = "30.0.1"
+version = "29.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a6efc566849d3d9d737c5cb06cc50e48950ebe3d3f9d70631490fff3a07b139"
+checksum = "f04bb108f648884c23b98a0e940ebc2c93c0c3b89f04dbaf7eb8256ce617d1bc"
dependencies = [
+ "log",
"parking_lot",
]
[[package]]
-name = "ptr_meta"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90"
-dependencies = [
- "ptr_meta_derive",
-]
-
-[[package]]
-name = "ptr_meta_derive"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "pulldown-cmark"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2262,15 +2266,6 @@ dependencies = [
]
[[package]]
-name = "rancor"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "caf5f7161924b9d1cea0e4cabc97c372cea92b5f927fc13c6bca67157a0ad947"
-dependencies = [
- "ptr_meta",
-]
-
-[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2318,30 +2313,10 @@ dependencies = [
]
[[package]]
-name = "ref-cast"
-version = "1.0.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf"
-dependencies = [
- "ref-cast-impl",
-]
-
-[[package]]
-name = "ref-cast-impl"
-version = "1.0.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "regex"
-version = "1.12.2"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
@@ -2351,9 +2326,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.13"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
@@ -2380,41 +2355,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
-name = "rend"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a35e8a6bf28cd121053a66aa2e6a2e3eaffad4a60012179f0e864aa5ffeff215"
-
-[[package]]
-name = "rkyv"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19f5c3e5da784cd8c69d32cdc84673f3204536ca56e1fa01be31a74b92c932ac"
-dependencies = [
- "bytes",
- "hashbrown 0.15.5",
- "indexmap",
- "munge",
- "ptr_meta",
- "rancor",
- "rend",
- "rkyv_derive",
- "tinyvec",
- "uuid",
-]
-
-[[package]]
-name = "rkyv_derive"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4270433626cffc9c4c1d3707dd681f2a2718d3d7b09ad754bec137acecda8d22"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "ropey"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2425,6 +2365,12 @@ dependencies = [
]
[[package]]
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
name = "rustix"
version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2433,30 +2379,24 @@ dependencies = [
"bitflags",
"errno",
"libc",
- "linux-raw-sys 0.4.15",
+ "linux-raw-sys 0.4.14",
"windows-sys 0.59.0",
]
[[package]]
name = "rustix"
-version = "1.1.2"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
+checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
dependencies = [
"bitflags",
"errno",
"libc",
- "linux-raw-sys 0.11.0",
- "windows-sys 0.61.2",
+ "linux-raw-sys 0.9.2",
+ "windows-sys 0.59.0",
]
[[package]]
-name = "rustversion"
-version = "1.0.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
-
-[[package]]
name = "ryu"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2479,28 +2419,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
-version = "1.0.228"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
-dependencies = [
- "serde_core",
- "serde_derive",
-]
-
-[[package]]
-name = "serde_core"
-version = "1.0.228"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.228"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
@@ -2509,24 +2439,23 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.145"
+version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
+checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
- "serde_core",
]
[[package]]
name = "serde_spanned"
-version = "1.0.3"
+version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392"
+checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
dependencies = [
- "serde_core",
+ "serde",
]
[[package]]
@@ -2605,12 +2534,6 @@ dependencies = [
]
[[package]]
-name = "simdutf8"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
-
-[[package]]
name = "slab"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2653,51 +2576,12 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
[[package]]
name = "socket2"
-version = "0.6.0"
+version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
+checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
dependencies = [
"libc",
- "windows-sys 0.59.0",
-]
-
-[[package]]
-name = "sonic-number"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8a74044c092f4f43ca7a6cfd62854cf9fb5ac8502b131347c990bf22bef1dfe"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "sonic-rs"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22540d56ba14521e4878ad436d498518c59698c39a89d5905c694932f0bf7134"
-dependencies = [
- "ahash",
- "bumpalo",
- "bytes",
- "cfg-if",
- "faststr",
- "itoa",
- "ref-cast",
- "ryu",
- "serde",
- "simdutf8",
- "sonic-number",
- "sonic-simd",
- "thiserror",
-]
-
-[[package]]
-name = "sonic-simd"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b421f7b6aa4a5de8f685aaf398dfaa828346ee639d2b1c1061ab43d40baa6223"
-dependencies = [
- "cfg-if",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2742,29 +2626,15 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.23.0"
+version = "3.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16"
+checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"
dependencies = [
"fastrand",
"getrandom 0.3.1",
"once_cell",
- "rustix 1.1.2",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "termina"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b9a48a479fe84f486d932a2e0c549b4d48ed3d57a20f18a3e61199c75a05ecf"
-dependencies = [
- "bitflags",
- "futures-core",
- "parking_lot",
- "rustix 1.1.2",
- "signal-hook",
- "windows-sys 0.61.2",
+ "rustix 1.0.7",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -2789,18 +2659,38 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.17"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
+dependencies = [
+ "thiserror-impl 2.0.12",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
- "thiserror-impl",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.17"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
+checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
@@ -2843,10 +2733,11 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.48.0"
+version = "1.45.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408"
+checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
dependencies = [
+ "backtrace",
"bytes",
"libc",
"mio",
@@ -2855,14 +2746,14 @@ dependencies = [
"signal-hook-registry",
"socket2",
"tokio-macros",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
name = "tokio-macros"
-version = "2.6.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
+checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
@@ -2882,42 +2773,44 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.9.8"
+version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8"
+checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
dependencies = [
- "indexmap",
- "serde_core",
+ "serde",
"serde_spanned",
"toml_datetime",
- "toml_parser",
- "toml_writer",
- "winnow",
+ "toml_edit",
]
[[package]]
name = "toml_datetime"
-version = "0.7.3"
+version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533"
+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
dependencies = [
- "serde_core",
+ "serde",
]
[[package]]
-name = "toml_parser"
-version = "1.0.4"
+name = "toml_edit"
+version = "0.22.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e"
+checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_write",
"winnow",
]
[[package]]
-name = "toml_writer"
-version = "1.0.4"
+name = "toml_write"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2"
+checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
[[package]]
name = "tree-house"
@@ -2926,29 +2819,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d00ea55222392f171ae004dd13b62edd09d995633abf0c13406a8df3547fb999"
dependencies = [
"arc-swap",
- "hashbrown 0.15.5",
+ "hashbrown 0.15.4",
"kstring",
"once_cell",
- "pretty_assertions",
"regex",
"regex-cursor",
"ropey",
"slab",
"tree-house-bindings",
- "unicode-width 0.1.12",
]
[[package]]
name = "tree-house-bindings"
-version = "0.2.1"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f1646788fe0afdbf8e191b5d0f558df7333d8857665a67053c532ec811e6086"
+checksum = "690809022f44e3d2329882649724b6e0027ade3fada65e4631d303e744dc32b4"
dependencies = [
"cc",
"libloading",
"regex-cursor",
"ropey",
- "thiserror",
+ "thiserror 2.0.12",
]
[[package]]
@@ -2974,9 +2865,9 @@ checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217"
[[package]]
name = "unicode-general-category"
-version = "1.1.0"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f"
+checksum = "24adfe8311434967077a6adff125729161e6e4934d76f6b7c55318ac5c9246d3"
[[package]]
name = "unicode-ident"
@@ -3042,16 +2933,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
-name = "uuid"
-version = "1.18.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2"
-dependencies = [
- "js-sys",
- "wasm-bindgen",
-]
-
-[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3084,25 +2965,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen"
-version = "0.2.103"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab10a69fbd0a177f5f649ad4d8d3305499c42bab9aef2f7ff592d0ec8f833819"
+checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
dependencies = [
"cfg-if",
"once_cell",
- "rustversion",
"wasm-bindgen-macro",
- "wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.103"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bb702423545a6007bbc368fde243ba47ca275e549c8a28617f56f6ba53b1d1c"
+checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
dependencies = [
"bumpalo",
"log",
+ "once_cell",
"proc-macro2",
"quote",
"syn",
@@ -3111,9 +2991,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.103"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc65f4f411d91494355917b605e1480033152658d71f722a90647f56a70c88a0"
+checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -3121,9 +3001,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.103"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffc003a991398a8ee604a401e194b6b3a39677b3173d6e74495eb51b82e99a32"
+checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2",
"quote",
@@ -3134,12 +3014,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.103"
+version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "293c37f4efa430ca14db3721dfbe48d8c33308096bd44d80ebaa775ab71ba1cf"
-dependencies = [
- "unicode-ident",
-]
+checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "which"
@@ -3148,7 +3025,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d"
dependencies = [
"env_home",
- "rustix 1.1.2",
+ "rustix 1.0.7",
"winsafe",
]
@@ -3194,9 +3071,9 @@ dependencies = [
[[package]]
name = "windows-link"
-version = "0.2.1"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3"
[[package]]
name = "windows-sys"
@@ -3218,11 +3095,11 @@ dependencies = [
[[package]]
name = "windows-sys"
-version = "0.61.2"
+version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [
- "windows-link",
+ "windows-targets 0.53.2",
]
[[package]]
@@ -3355,9 +3232,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
[[package]]
name = "winnow"
-version = "0.7.13"
+version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf"
+checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec"
dependencies = [
"memchr",
]
@@ -3391,7 +3268,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
[[package]]
name = "xtask"
-version = "25.7.1"
+version = "25.1.1"
dependencies = [
"helix-core",
"helix-loader",
@@ -3401,12 +3278,6 @@ dependencies = [
]
[[package]]
-name = "yansi"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
-
-[[package]]
name = "yoke"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3432,18 +3303,18 @@ dependencies = [
[[package]]
name = "zerocopy"
-version = "0.8.27"
+version = "0.8.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
+checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.27"
+version = "0.8.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
+checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
dependencies = [
"proc-macro2",
"quote",
@@ -3495,6 +3366,6 @@ dependencies = [
[[package]]
name = "zlib-rs"
-version = "0.5.2"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2"
+checksum = "868b928d7949e09af2f6086dfc1e01936064cc7a819253bce650d4e2a2d63ba8"
diff --git a/Cargo.toml b/Cargo.toml
index 90542831..ecb5c7e2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,23 +41,18 @@ tree-house = { version = "0.3.0", default-features = false }
nucleo = "0.5.0"
slotmap = "1.0.7"
thiserror = "2.0"
-tempfile = "3.23.0"
-bitflags = "2.10"
+tempfile = "3.20.0"
+bitflags = "2.9"
unicode-segmentation = "1.2"
ropey = { version = "1.6.1", default-features = false, features = ["simd"] }
-foldhash = "0.2"
+foldhash = "0.1"
parking_lot = "0.12"
futures-executor = "0.3"
futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
tokio-stream = "0.1.17"
-toml = "0.9"
-termina = "0.1"
-sonic-rs = "0.5"
-# MSRV: update once the MSRV is >=1.85
-globset = "=0.4.16"
[workspace.package]
-version = "25.7.1"
+version = "25.1.1"
edition = "2021"
authors = ["Blaž Hrastnik <[email protected]>"]
categories = ["editor"]
diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md
index e6bc5b73..82715b7e 100644
--- a/book/src/SUMMARY.md
+++ b/book/src/SUMMARY.md
@@ -11,7 +11,6 @@
- [Textobjects](./textobjects.md)
- [Syntax aware motions](./syntax-aware-motions.md)
- [Pickers](./pickers.md)
- - [Jumplist](./jumplist.md)
- [Keymap](./keymap.md)
- [Command line](./command-line.md)
- [Commands](./commands.md)
@@ -29,5 +28,3 @@
- [Adding textobject queries](./guides/textobject.md)
- [Adding indent queries](./guides/indent.md)
- [Adding injection queries](./guides/injection.md)
- - [Adding tags queries](./guides/tags.md)
- - [Adding rainbow bracket queries](./guides/rainbow_bracket_queries.md)
diff --git a/book/src/building-from-source.md b/book/src/building-from-source.md
index 33038098..eb6df6d6 100644
--- a/book/src/building-from-source.md
+++ b/book/src/building-from-source.md
@@ -42,7 +42,7 @@ RUSTFLAGS="-C target-feature=-crt-static"
# Optimized
cargo install \
--profile opt \
- --config 'build.rustflags=["-C", "target-cpu=native"]' \
+ --config 'build.rustflags="-C target-cpu=native"' \
--path helix-term \
--locked
```
diff --git a/book/src/command-line.md b/book/src/command-line.md
index 5896eb6f..2c0723fa 100644
--- a/book/src/command-line.md
+++ b/book/src/command-line.md
@@ -47,12 +47,8 @@ The following variables are supported:
| `cursor_column` | The column number of the primary cursor in the currently focused document, starting at 1. This is counted as the number of grapheme clusters from the start of the line rather than bytes or codepoints. |
| `buffer_name` | The relative path of the currently focused document. `[scratch]` is expanded instead for scratch buffers. |
| `line_ending` | A string containing the line ending of the currently focused document. For example on Unix systems this is usually a line-feed character (`\n`) but on Windows systems this may be a carriage-return plus a line-feed (`\r\n`). The line ending kind of the currently focused document can be inspected with the `:line-ending` command. |
-| `current_working_directory` | Current working directory |
-| `workspace_directory` | Nearest ancestor directory of the current working directory that contains `.git`, `.svn`, `jj` or `.helix` |
| `language` | A string containing the language name of the currently focused document.|
| `selection` | A string containing the contents of the primary selection of the currently focused document. |
-| `selection_line_start` | The line number of the start of the primary selection in the currently focused document, starting at 1. |
-| `selection_line_end` | The line number of the end of the primary selection in the currently focused document, starting at 1. |
Aside from editor variables, the following expansions may be used:
diff --git a/book/src/editor.md b/book/src/editor.md
index 92e21f9c..667a7147 100644
--- a/book/src/editor.md
+++ b/book/src/editor.md
@@ -19,7 +19,6 @@
- [`[editor.soft-wrap]` Section](#editorsoft-wrap-section)
- [`[editor.smart-tab]` Section](#editorsmart-tab-section)
- [`[editor.inline-diagnostics]` Section](#editorinline-diagnostics-section)
-- [`[editor.word-completion]` Section](#editorword-completion-section)
### `[editor]` Section
@@ -27,11 +26,11 @@
|--|--|---------|
| `scrolloff` | Number of lines of padding around the edge of the screen when scrolling | `5` |
| `mouse` | Enable mouse mode | `true` |
-| `default-yank-register` | Default register used for yank/paste | `'"'` |
+| `default-yank-register` | Default register used for yank/paste | `"` |
| `middle-click-paste` | Middle click paste support | `true` |
| `scroll-lines` | Number of lines to scroll per scroll wheel step | `3` |
| `shell` | Shell to use when running external commands | Unix: `["sh", "-c"]`<br/>Windows: `["cmd", "/C"]` |
-| `line-number` | Line number display: `absolute` simply shows each line's number, while `relative` shows the distance from the current line. When unfocused or in insert mode, `relative` will still show absolute line numbers | `"absolute"` |
+| `line-number` | Line number display: `absolute` simply shows each line's number, while `relative` shows the distance from the current line. When unfocused or in insert mode, `relative` will still show absolute line numbers | `absolute` |
| `cursorline` | Highlight all lines with a cursor | `false` |
| `cursorcolumn` | Highlight all columns with a cursor | `false` |
| `continue-comments` | if helix should automatically add a line comment token if you create a new line inside a comment. | `true` |
@@ -43,28 +42,25 @@
| `completion-timeout` | Time in milliseconds after typing a word character before completions are shown, set to 5 for instant. | `250` |
| `preview-completion-insert` | Whether to apply completion item instantly when selected | `true` |
| `completion-trigger-len` | The min-length of word under cursor to trigger autocompletion | `2` |
-| `completion-replace` | Whether to make completions always replace the entire word and not just the part before the cursor | `false` |
+| `completion-replace` | Set to `true` to make completions always replace the entire word and not just the part before the cursor | `false` |
| `auto-info` | Whether to display info boxes | `true` |
-| `true-color` | Whether to override automatic detection of terminal truecolor support in the event of a false negative | `false` |
-| `undercurl` | Whether to override automatic detection of terminal undercurl support in the event of a false negative | `false` |
+| `true-color` | Set to `true` to override automatic detection of terminal truecolor support in the event of a false negative | `false` |
+| `undercurl` | Set to `true` to override automatic detection of terminal undercurl support in the event of a false negative | `false` |
| `rulers` | List of column positions at which to display the rulers. Can be overridden by language specific `rulers` in `languages.toml` file | `[]` |
-| `bufferline` | Renders a line at the top of the editor displaying open buffers. Can be `always`, `never` or `multiple` (only shown if more than one buffer is in use) | `"never"` |
+| `bufferline` | Renders a line at the top of the editor displaying open buffers. Can be `always`, `never` or `multiple` (only shown if more than one buffer is in use) | `never` |
| `color-modes` | Whether to color the mode indicator with different colors depending on the mode itself | `false` |
| `text-width` | Maximum line length. Used for the `:reflow` command and soft-wrapping if `soft-wrap.wrap-at-text-width` is set | `80` |
| `workspace-lsp-roots` | Directories relative to the workspace root that are treated as LSP roots. Should only be set in `.helix/config.toml` | `[]` |
-| `default-line-ending` | The line ending to use for new documents. Can be `native`, `lf`, `crlf`, `ff`, `cr` or `nel`. `native` uses the platform's native line ending (`crlf` on Windows, otherwise `lf`). | `"native"` |
+| `default-line-ending` | The line ending to use for new documents. Can be `native`, `lf`, `crlf`, `ff`, `cr` or `nel`. `native` uses the platform's native line ending (`crlf` on Windows, otherwise `lf`). | `native` |
| `insert-final-newline` | Whether to automatically insert a trailing line-ending on write if missing | `true` |
-| `atomic-save` | Whether to use atomic operations to write documents to disk. This prevents data loss if the editor is interrupted while writing the file, but may confuse some file watching/hot reloading programs. | `true` |
| `trim-final-newlines` | Whether to automatically remove line-endings after the final one on write | `false` |
| `trim-trailing-whitespace` | Whether to automatically remove whitespace preceding line endings on write | `false` |
-| `popup-border` | Draw border around `popup`, `menu`, `all`, or `none` | `"none"` |
-| `indent-heuristic` | How the indentation for a newly inserted line is computed: `simple` just copies the indentation level from the previous line, `tree-sitter` computes the indentation based on the syntax tree and `hybrid` combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being `hybrid` -> `tree-sitter` -> `simple`). | `"hybrid"` |
-| `jump-label-alphabet` | The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first. | `"abcdefghijklmnopqrstuvwxyz"` |
-| `end-of-line-diagnostics` | Minimum severity of diagnostics to render at the end of the line. Set to `disable` to disable entirely. Refer to the setting about `inline-diagnostics` for more details | `"hint"` |
-| `clipboard-provider` | Which API to use for clipboard interaction. One of `pasteboard` (MacOS), `wayland`, `x-clip`, `x-sel`, `win32-yank`, `termux`, `tmux`, `windows`, `termcode`, `none`, or a custom command set. | Platform and environment specific. |
+| `popup-border` | Draw border around `popup`, `menu`, `all`, or `none` | `none` |
+| `indent-heuristic` | How the indentation for a newly inserted line is computed: `simple` just copies the indentation level from the previous line, `tree-sitter` computes the indentation based on the syntax tree and `hybrid` combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being `hybrid` -> `tree-sitter` -> `simple`). | `hybrid`
+| `jump-label-alphabet` | The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first. | `"abcdefghijklmnopqrstuvwxyz"`
+| `end-of-line-diagnostics` | Minimum severity of diagnostics to render at the end of the line. Set to `disable` to disable entirely. Refer to the setting about `inline-diagnostics` for more details | "disable"
+| `clipboard-provider` | Which API to use for clipboard interaction. One of `pasteboard` (MacOS), `wayland`, `x-clip`, `x-sel`, `win-32-yank`, `termux`, `tmux`, `windows`, `termcode`, `none`, or a custom command set. | Platform and environment specific. |
| `editor-config` | Whether to read settings from [EditorConfig](https://editorconfig.org) files | `true` |
-| `rainbow-brackets` | Whether to render rainbow colors for matching brackets. Requires tree-sitter `rainbows.scm` queries for the language. | `false` |
-| `kitty-keyboard-protocol` | Whether to enable Kitty Keyboard Protocol. Can be `enabled`, `disabled` or `auto` | `"auto"` |
### `[editor.clipboard-provider]` Section
@@ -134,7 +130,6 @@ The following statusline elements can be configured:
| `file-name` | The path/name of the opened file |
| `file-absolute-path` | The absolute path/name of the opened file |
| `file-base-name` | The basename of the opened file |
-| `current-working-directory` | The current working directory |
| `file-modification-indicator` | The indicator to show whether the file is modified (a `[+]` appears when there are unsaved changes) |
| `file-encoding` | The encoding of the opened file if it differs from UTF-8 |
| `file-line-ending` | The file line endings (CRLF or LF) |
@@ -180,11 +175,11 @@ Valid values for these options are `block`, `bar`, `underline`, or `hidden`.
> 💡 Due to limitations of the terminal environment, only the primary cursor can
> change shape.
-| Key | Description | Default |
-| --- | ----------- | ------- |
-| `normal` | Cursor shape in [normal mode][normal mode] | `"block"` |
-| `insert` | Cursor shape in [insert mode][insert mode] | `"block"` |
-| `select` | Cursor shape in [select mode][select mode] | `"block"` |
+| Key | Description | Default |
+| --- | ----------- | ------- |
+| `normal` | Cursor shape in [normal mode][normal mode] | `block` |
+| `insert` | Cursor shape in [insert mode][insert mode] | `block` |
+| `select` | Cursor shape in [select mode][select mode] | `block` |
[normal mode]: ./keymap.md#normal-mode
[insert mode]: ./keymap.md#insert-mode
@@ -224,25 +219,6 @@ Example:
!.gitattributes
```
-### `[editor.file-explorer]` Section
-
-In addition to the options for the file picker and global search, a similar set of options is presented to configure the file explorer separately. However, unlike the file picker, the defaults are set to avoid ignoring most files.
-
-Note that the ignore files consulted by the file explorer when `ignore` is set to true are the same ones used by the file picker, including the aforementioned Helix-specific ignore files.
-
-
-| Key | Description | Default |
-|--|--|---------|
-|`hidden` | Enables ignoring hidden files | `false`
-|`follow-symlinks` | Follow symlinks instead of ignoring them | `false`
-|`parents` | Enables reading ignore files from parent directories | `false`
-|`ignore` | Enables reading `.ignore` files | `false`
-|`git-ignore` | Enables reading `.gitignore` files | `false`
-|`git-global` | Enables reading global `.gitignore`, whose path is specified in git's config: `core.excludesfile` option | `false`
-|`git-exclude` | Enables reading `.git/info/exclude` files | `false`
-|`flatten-dirs` | Enables flattening single child directories | `true`
-
-
### `[editor.auto-pairs]` Section
Enables automatic insertion of pairs to parentheses, brackets, etc. Can be a
@@ -312,7 +288,7 @@ Options for rendering whitespace with visible characters. Use `:set whitespace.r
| Key | Description | Default |
|-----|-------------|---------|
-| `render` | Whether to render whitespace. May either be `all` or `none`, or a table with sub-keys `space`, `nbsp`, `nnbsp`, `tab`, and `newline` | `"none"` |
+| `render` | Whether to render whitespace. May either be `all` or `none`, or a table with sub-keys `space`, `nbsp`, `nnbsp`, `tab`, and `newline` | `none` |
| `characters` | Literal characters to use when rendering whitespace. Sub-keys may be any of `tab`, `space`, `nbsp`, `nnbsp`, `newline` or `tabpad` | See example below |
Example
@@ -344,7 +320,7 @@ Options for rendering vertical indent guides.
| Key | Description | Default |
| --- | --- | --- |
| `render` | Whether to render indent guides | `false` |
-| `character` | Literal character to use for rendering the indent guide | `"│"` |
+| `character` | Literal character to use for rendering the indent guide | `│` |
| `skip-levels` | Number of indent levels to skip | `0` |
Example:
@@ -422,7 +398,7 @@ Options for soft wrapping lines that exceed the view width:
| `enable` | Whether soft wrapping is enabled. | `false` |
| `max-wrap` | Maximum free space left at the end of the line. | `20` |
| `max-indent-retain` | Maximum indentation to carry over when soft wrapping a line. | `40` |
-| `wrap-indicator` | Text inserted before soft wrapped lines, highlighted with `ui.virtual.wrap` | `"↪ "` |
+| `wrap-indicator` | Text inserted before soft wrapped lines, highlighted with `ui.virtual.wrap` | `↪ ` |
| `wrap-at-text-width` | Soft wrap at `text-width` instead of using the full viewport size. | `false` |
Example:
@@ -473,7 +449,7 @@ fn main() {
| Key | Description | Default |
|------------|-------------|---------|
-| `cursor-line` | The minimum severity that a diagnostic must have to be shown inline on the line that contains the primary cursor. Set to `disable` to not show any diagnostics inline. This option does not have any effect when in insert-mode and will only take effect 350ms after moving the cursor to a different line. | `"warning"` |
+| `cursor-line` | The minimum severity that a diagnostic must have to be shown inline on the line that contains the primary cursor. Set to `disable` to not show any diagnostics inline. This option does not have any effect when in insert-mode and will only take effect 350ms after moving the cursor to a different line. | `"disable"` |
| `other-lines` | The minimum severity that a diagnostic must have to be shown inline on a line that does not contain the cursor-line. Set to `disable` to not show any diagnostics inline. | `"disable"` |
| `prefix-len` | How many horizontal bars `─` are rendered before the diagnostic text. | `1` |
| `max-wrap` | Equivalent of the `editor.soft-wrap.max-wrap` option for diagnostics. | `20` |
@@ -491,20 +467,12 @@ fn main() {
}
```
-### `[editor.word-completion]` Section
-
-Options for controlling completion of words from open buffers.
-
-| Key | Description | Default |
-| --- | --- | --- |
-| `enable` | Whether word completion is enabled | `true` |
-| `trigger-length` | Number of word characters to type before triggering completion | `7` |
-Example:
+The new diagnostic rendering is not yet enabled by default. As soon as end of line or inline diagnostics are enabled the old diagnostics rendering is automatically disabled. The recommended default setting are:
```toml
-[editor.word-completion]
-enable = true
-# Set the trigger length lower so that words are completed more often
-trigger-length = 4
+[editor]
+end-of-line-diagnostics = "hint"
+[editor.inline-diagnostics]
+cursor-line = "warning" # show warnings and errors on the cursorline inline
```
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index f753541a..dad557d9 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -1,306 +1,272 @@
-| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Code Navigation Tags | Rainbow Brackets | Default language servers |
-| --- | --- | --- | --- | --- | --- | --- |
-| ada | ✓ | ✓ | | | | `ada_language_server` |
-| adl | ✓ | ✓ | ✓ | | | |
-| agda | ✓ | | | | | |
-| alloy | ✓ | | | | | |
-| amber | ✓ | | | | | `amber-lsp` |
-| astro | ✓ | | | | | `astro-ls` |
-| awk | ✓ | ✓ | | | | `awk-language-server` |
-| bash | ✓ | ✓ | ✓ | ✓ | ✓ | `bash-language-server` |
-| bass | ✓ | | | | | `bass` |
-| beancount | ✓ | | | | | `beancount-language-server` |
-| bibtex | ✓ | | | | | `texlab` |
-| bicep | ✓ | | | | | `bicep-langserver` |
-| bitbake | ✓ | | | | | `bitbake-language-server` |
-| blade | ✓ | ✓ | | | ✓ | |
-| blueprint | ✓ | | | | | `blueprint-compiler` |
-| bovex | ✓ | | | | ✓ | |
-| c | ✓ | ✓ | ✓ | ✓ | ✓ | `clangd` |
-| c-sharp | ✓ | ✓ | | ✓ | | `OmniSharp` |
-| cabal | | | | | | `haskell-language-server-wrapper` |
-| caddyfile | ✓ | ✓ | ✓ | | | |
-| cairo | ✓ | ✓ | ✓ | | | `cairo-language-server` |
-| capnp | ✓ | | ✓ | | | |
-| cel | ✓ | | | | | |
-| circom | ✓ | | | | | `circom-lsp` |
-| clarity | ✓ | | | | | `clarinet` |
-| clojure | ✓ | | | | ✓ | `clojure-lsp` |
-| cmake | ✓ | ✓ | ✓ | | | `neocmakelsp`, `cmake-language-server` |
-| codeql | ✓ | ✓ | | | | `codeql` |
-| comment | ✓ | | | | | |
-| common-lisp | ✓ | | ✓ | | ✓ | `cl-lsp` |
-| cpon | ✓ | | ✓ | | | |
-| cpp | ✓ | ✓ | ✓ | ✓ | ✓ | `clangd` |
-| cross-config | ✓ | ✓ | | | ✓ | `taplo`, `tombi` |
-| crystal | ✓ | ✓ | ✓ | ✓ | | `crystalline`, `ameba-ls` |
-| css | ✓ | | ✓ | | ✓ | `vscode-css-language-server` |
-| csv | ✓ | | | | | |
-| cue | ✓ | | | | | `cuelsp` |
-| cylc | ✓ | ✓ | ✓ | | | |
-| cython | ✓ | | ✓ | ✓ | | |
-| d | ✓ | ✓ | ✓ | | | `serve-d` |
-| dart | ✓ | ✓ | ✓ | | | `dart` |
-| dbml | ✓ | | | | | |
-| debian | ✓ | | | | | |
-| devicetree | ✓ | | | | | `dts-lsp` |
-| dhall | ✓ | ✓ | | | | `dhall-lsp-server` |
-| diff | ✓ | | | | | |
-| djot | ✓ | | | | | |
-| docker-bake | ✓ | ✓ | ✓ | ✓ | ✓ | `docker-language-server` |
-| docker-compose | ✓ | ✓ | ✓ | | | `docker-compose-langserver`, `yaml-language-server`, `docker-language-server` |
-| dockerfile | ✓ | ✓ | | | | `docker-langserver`, `docker-language-server` |
-| dot | ✓ | | | | | `dot-language-server` |
-| doxyfile | ✓ | ✓ | ✓ | ✓ | | |
-| dtd | ✓ | | | | | |
-| dune | ✓ | | | | | |
-| dunstrc | ✓ | | | | | |
-| earthfile | ✓ | ✓ | ✓ | | | `earthlyls` |
-| edoc | ✓ | | | | | |
-| eex | ✓ | | | | | |
-| eiffel | ✓ | ✓ | ✓ | | | `eiffel-language-server` |
-| ejs | ✓ | | | | | |
-| elisp | ✓ | | | ✓ | | |
-| elixir | ✓ | ✓ | ✓ | ✓ | ✓ | `elixir-ls`, `expert` |
-| elm | ✓ | ✓ | | ✓ | | `elm-language-server` |
-| elvish | ✓ | | | | | `elvish` |
-| env | ✓ | ✓ | | | | |
-| erb | ✓ | | | | | |
-| erlang | ✓ | ✓ | | ✓ | ✓ | `erlang_ls`, `elp` |
-| esdl | ✓ | | | | | |
-| fennel | ✓ | | | | | `fennel-ls` |
-| fga | ✓ | ✓ | ✓ | | | |
-| fidl | ✓ | | | | | |
-| fish | ✓ | ✓ | ✓ | | | `fish-lsp` |
-| flatbuffers | ✓ | | | | | |
-| forth | ✓ | | | | | `forth-lsp` |
-| fortran | ✓ | | ✓ | | | `fortls` |
-| fsharp | ✓ | | | | | `fsautocomplete` |
-| gas | ✓ | ✓ | | | | `asm-lsp` |
-| gdscript | ✓ | ✓ | ✓ | ✓ | | |
-| gemini | ✓ | | | | | |
-| gherkin | ✓ | | | | | |
-| ghostty | ✓ | | | | | |
-| git-attributes | ✓ | | | | | |
-| git-cliff-config | ✓ | ✓ | | | ✓ | `taplo`, `tombi` |
-| git-commit | ✓ | ✓ | | | | |
-| git-config | ✓ | ✓ | | | | |
-| git-ignore | ✓ | | | | | |
-| git-notes | ✓ | | | | | |
-| git-rebase | ✓ | | | | | |
-| gitlab-ci | ✓ | ✓ | ✓ | ✓ | ✓ | `yaml-language-server`, `gitlab-ci-ls` |
-| gjs | ✓ | ✓ | ✓ | ✓ | | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
-| gleam | ✓ | ✓ | | | ✓ | `gleam` |
-| glimmer | ✓ | | | | | `ember-language-server` |
-| glsl | ✓ | ✓ | ✓ | | | `glsl_analyzer` |
-| gn | ✓ | | | | | |
-| go | ✓ | ✓ | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
-| go-format-string | ✓ | | | | ✓ | |
-| godot-resource | ✓ | ✓ | | | | |
-| gomod | ✓ | | | | | `gopls` |
-| gotmpl | ✓ | | | | | `gopls` |
-| gowork | ✓ | | | | | `gopls` |
-| gpr | ✓ | | | | | `ada_language_server` |
-| graphql | ✓ | ✓ | | | | `graphql-lsp` |
-| gren | ✓ | ✓ | | | | |
-| groovy | ✓ | | | | | |
-| gts | ✓ | ✓ | ✓ | ✓ | | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
-| hare | ✓ | | | | | |
-| haskell | ✓ | ✓ | | | | `haskell-language-server-wrapper` |
-| haskell-persistent | ✓ | | | | | |
-| hcl | ✓ | ✓ | ✓ | | | `terraform-ls` |
-| hdl | ✓ | | | | | `hdls` |
-| heex | ✓ | ✓ | | | | `elixir-ls`, `expert` |
-| helm | ✓ | | | | | `helm_ls` |
-| hocon | ✓ | ✓ | ✓ | | | |
-| hoon | ✓ | | | | | |
-| hosts | ✓ | | | | | |
-| html | ✓ | ✓ | | | ✓ | `vscode-html-language-server`, `superhtml` |
-| htmldjango | ✓ | | | | | `djlsp`, `vscode-html-language-server`, `superhtml` |
-| hurl | ✓ | ✓ | ✓ | | | |
-| hyprlang | ✓ | | ✓ | | | `hyprls` |
-| idris | | | | | | `idris2-lsp` |
-| iex | ✓ | | | | | |
-| ini | ✓ | | | | | |
-| ink | ✓ | | | | | |
-| inko | ✓ | ✓ | ✓ | ✓ | | |
-| janet | ✓ | | ✓ | | ✓ | |
-| java | ✓ | ✓ | ✓ | ✓ | ✓ | `jdtls` |
-| javascript | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
-| jinja | ✓ | | | | | |
-| jjconfig | ✓ | ✓ | ✓ | | | `taplo`, `tombi` |
-| jjdescription | ✓ | | | | | |
-| jjrevset | ✓ | | | | | |
-| jjtemplate | ✓ | | | | | |
-| jq | ✓ | ✓ | | | | `jq-lsp` |
-| jsdoc | ✓ | | | | | |
-| json | ✓ | ✓ | ✓ | | ✓ | `vscode-json-language-server` |
-| json-ld | ✓ | ✓ | ✓ | | | `vscode-json-language-server` |
-| json5 | ✓ | | | | | |
-| jsonc | ✓ | | ✓ | | ✓ | `vscode-json-language-server` |
-| jsonnet | ✓ | | | | | `jsonnet-language-server` |
-| jsx | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
-| julia | ✓ | ✓ | ✓ | | | `julia` |
-| just | ✓ | ✓ | ✓ | ✓ | | `just-lsp` |
-| kcl | ✓ | | | | | `kcl-language-server` |
-| kconfig | ✓ | | ✓ | | | |
-| kdl | ✓ | ✓ | ✓ | ✓ | | |
-| koka | ✓ | | ✓ | | | `koka` |
-| kotlin | ✓ | ✓ | ✓ | ✓ | | `kotlin-language-server` |
-| koto | ✓ | ✓ | ✓ | | ✓ | `koto-ls` |
-| latex | ✓ | ✓ | | | | `texlab` |
-| ld | ✓ | | ✓ | | | |
-| ldif | ✓ | | | | | |
-| lean | ✓ | | | | | `lake` |
-| ledger | ✓ | | | | | |
-| llvm | ✓ | ✓ | ✓ | | | |
-| llvm-mir | ✓ | ✓ | ✓ | | | |
-| llvm-mir-yaml | ✓ | | ✓ | | | |
-| log | ✓ | | | | | |
-| lpf | ✓ | | | | | |
-| lua | ✓ | ✓ | ✓ | | ✓ | `lua-language-server` |
-| luap | ✓ | | | | | |
-| luau | ✓ | ✓ | ✓ | | | `luau-lsp` |
-| mail | ✓ | ✓ | | | | |
-| make | ✓ | | ✓ | | | |
-| markdoc | ✓ | | | | | `markdoc-ls` |
-| markdown | ✓ | | | ✓ | | `marksman`, `markdown-oxide` |
-| markdown-rustdoc | ✓ | | | | | |
-| markdown.inline | ✓ | | | | | |
-| matlab | ✓ | ✓ | ✓ | | | |
-| mermaid | ✓ | | | | | |
-| meson | ✓ | | ✓ | | | `mesonlsp` |
-| mint | | | | | | `mint` |
-| miseconfig | ✓ | ✓ | ✓ | | | `taplo`, `tombi` |
-| mojo | ✓ | ✓ | ✓ | | | `pixi` |
-| move | ✓ | | | | | |
-| msbuild | ✓ | | ✓ | | | |
-| nasm | ✓ | ✓ | | | | `asm-lsp` |
-| nearley | ✓ | | | | ✓ | |
-| nestedtext | ✓ | ✓ | ✓ | | | |
-| nginx | ✓ | | | | | |
-| nickel | ✓ | | ✓ | | | `nls` |
-| nim | ✓ | ✓ | ✓ | | | `nimlangserver` |
-| nix | ✓ | ✓ | ✓ | | ✓ | `nil`, `nixd` |
-| nu | ✓ | ✓ | ✓ | | | `nu` |
-| nunjucks | ✓ | | | | | |
-| ocaml | ✓ | | ✓ | | | `ocamllsp` |
-| ocaml-interface | ✓ | | | | | `ocamllsp` |
-| odin | ✓ | ✓ | ✓ | | | `ols` |
-| ohm | ✓ | ✓ | ✓ | | | |
-| opencl | ✓ | ✓ | ✓ | | | `clangd` |
-| openscad | ✓ | | | | | `openscad-lsp` |
-| org | ✓ | | | | | |
-| pascal | ✓ | ✓ | | | | `pasls` |
-| passwd | ✓ | | | | | |
-| pem | ✓ | | | | | |
-| perl | ✓ | ✓ | ✓ | | | `perlnavigator` |
-| pest | ✓ | ✓ | ✓ | | | `pest-language-server` |
-| php | ✓ | ✓ | ✓ | ✓ | ✓ | `intelephense` |
-| php-only | ✓ | | | ✓ | | |
-| pip-requirements | ✓ | | | | | |
-| pkgbuild | ✓ | ✓ | ✓ | | | `termux-language-server`, `bash-language-server` |
-| pkl | ✓ | | ✓ | | | `pkl-lsp` |
-| po | ✓ | ✓ | | | | |
-| pod | ✓ | | | | | |
-| ponylang | ✓ | ✓ | ✓ | | | |
-| powershell | ✓ | | | | | |
-| prisma | ✓ | ✓ | | | | `prisma-language-server` |
-| prolog | ✓ | | ✓ | | | `swipl` |
-| properties | ✓ | ✓ | | | | |
-| protobuf | ✓ | ✓ | ✓ | ✓ | | `buf`, `pb`, `protols` |
-| prql | ✓ | | | | | |
-| pug | ✓ | | | | | |
-| purescript | ✓ | ✓ | | | | `purescript-language-server` |
-| python | ✓ | ✓ | ✓ | ✓ | ✓ | `ty`, `ruff`, `jedi-language-server`, `pylsp` |
-| qml | ✓ | ✓ | ✓ | | | `qmlls` |
-| quarto | ✓ | | ✓ | | | |
-| quint | ✓ | | | | | `quint-language-server` |
-| r | ✓ | | | | | `R` |
-| racket | ✓ | | ✓ | | ✓ | `racket` |
-| regex | ✓ | | | | ✓ | |
-| rego | ✓ | | | | | `regols` |
-| rescript | ✓ | ✓ | | | | `rescript-language-server` |
-| rmarkdown | ✓ | | ✓ | | | `R` |
-| robot | ✓ | | | | | `robotframework_ls` |
-| robots.txt | ✓ | ✓ | | ✓ | | |
-| ron | ✓ | | ✓ | ✓ | ✓ | |
-| rst | ✓ | | | | | |
-| ruby | ✓ | ✓ | ✓ | ✓ | ✓ | `ruby-lsp`, `solargraph` |
-| rust | ✓ | ✓ | ✓ | ✓ | ✓ | `rust-analyzer` |
-| rust-format-args | ✓ | | | | | |
-| rust-format-args-macro | ✓ | ✓ | ✓ | | ✓ | |
-| sage | ✓ | ✓ | | | | |
-| scala | ✓ | ✓ | ✓ | | | `metals` |
-| scheme | ✓ | ✓ | ✓ | | ✓ | |
-| scss | ✓ | | | | ✓ | `vscode-css-language-server` |
-| shellcheckrc | ✓ | ✓ | | | | |
-| slang | ✓ | ✓ | ✓ | | | `slangd` |
-| slint | ✓ | ✓ | ✓ | | | `slint-lsp` |
-| slisp | ✓ | | | ✓ | | |
-| smali | ✓ | | ✓ | | | |
-| smithy | ✓ | | | | | `cs` |
-| sml | ✓ | | | | | |
-| snakemake | ✓ | | ✓ | | | `pylsp` |
-| solidity | ✓ | ✓ | | | | `solc` |
-| sourcepawn | ✓ | ✓ | | | | `sourcepawn-studio` |
-| spade | ✓ | | ✓ | | | `spade-language-server` |
-| spicedb | ✓ | | | ✓ | | |
-| sql | ✓ | ✓ | | | | |
-| sshclientconfig | ✓ | | | | | |
-| starlark | ✓ | ✓ | ✓ | | ✓ | `starpls` |
-| strace | ✓ | | | | | |
-| strictdoc | ✓ | | | ✓ | | |
-| supercollider | ✓ | | | | | |
-| svelte | ✓ | | ✓ | | | `svelteserver` |
-| sway | ✓ | ✓ | ✓ | | | `forc` |
-| swift | ✓ | ✓ | | | ✓ | `sourcekit-lsp` |
-| systemd | ✓ | | | | | `systemd-lsp` |
-| systemverilog | ✓ | | | | | |
-| t32 | ✓ | | | | | |
-| tablegen | ✓ | ✓ | ✓ | | | |
-| tact | ✓ | ✓ | ✓ | | | |
-| task | ✓ | | | | | |
-| tcl | ✓ | | ✓ | | | |
-| teal | ✓ | | | | | `teal-language-server` |
-| templ | ✓ | | | | | `templ` |
-| tera | ✓ | | | | | |
-| textproto | ✓ | ✓ | ✓ | | | |
-| tfvars | ✓ | | ✓ | | | `terraform-ls` |
-| thrift | ✓ | | | | | |
-| tlaplus | ✓ | | | | | |
-| todotxt | ✓ | | | | | |
-| toml | ✓ | ✓ | | | ✓ | `taplo`, `tombi` |
-| tsq | ✓ | | | | ✓ | `ts_query_ls` |
-| tsx | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
-| twig | ✓ | | | | | |
-| typescript | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
-| typespec | ✓ | ✓ | ✓ | | | `tsp-server` |
-| typst | ✓ | | | ✓ | | `tinymist` |
-| ungrammar | ✓ | | | | | |
-| unison | ✓ | ✓ | ✓ | ✓ | ✓ | |
-| uxntal | ✓ | | | | | |
-| v | ✓ | ✓ | ✓ | | | `v-analyzer` |
-| vala | ✓ | ✓ | | | | `vala-language-server` |
-| vento | ✓ | | | | | |
-| verilog | ✓ | ✓ | | | | `svlangserver` |
-| vhdl | ✓ | | | | | `vhdl_ls` |
-| vhs | ✓ | | | | | |
-| vim | ✓ | | | | | |
-| vue | ✓ | | | | | `vue-language-server` |
-| wast | ✓ | | | | | |
-| wat | ✓ | | | | | `wat_server` |
-| webc | ✓ | | | | | |
-| werk | ✓ | | | | | |
-| wesl | ✓ | ✓ | | | | |
-| wgsl | ✓ | ✓ | ✓ | ✓ | ✓ | `wgsl-analyzer` |
-| wikitext | ✓ | | | | | `wikitext-lsp` |
-| wit | ✓ | | ✓ | | | |
-| wren | ✓ | ✓ | ✓ | | | |
-| xit | ✓ | | | | | |
-| xml | ✓ | ✓ | ✓ | | ✓ | |
-| xtc | ✓ | | | | | |
-| yaml | ✓ | ✓ | ✓ | | ✓ | `yaml-language-server`, `ansible-language-server` |
-| yara | ✓ | | | | | `yls` |
-| yuck | ✓ | | | | | |
-| zig | ✓ | ✓ | ✓ | | | `zls` |
+| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default language servers |
+| --- | --- | --- | --- | --- |
+| ada | ✓ | ✓ | | `ada_language_server` |
+| adl | ✓ | ✓ | ✓ | |
+| agda | ✓ | | | |
+| alloy | ✓ | | | |
+| amber | ✓ | | | `amber-lsp` |
+| astro | ✓ | | | `astro-ls` |
+| awk | ✓ | ✓ | | `awk-language-server` |
+| bash | ✓ | ✓ | ✓ | `bash-language-server` |
+| bass | ✓ | | | `bass` |
+| beancount | ✓ | | | `beancount-language-server` |
+| bibtex | ✓ | | | `texlab` |
+| bicep | ✓ | | | `bicep-langserver` |
+| bitbake | ✓ | | | `bitbake-language-server` |
+| blade | ✓ | | | |
+| blueprint | ✓ | | | `blueprint-compiler` |
+| c | ✓ | ✓ | ✓ | `clangd` |
+| c-sharp | ✓ | ✓ | | `OmniSharp` |
+| cabal | | | | `haskell-language-server-wrapper` |
+| cairo | ✓ | ✓ | ✓ | `cairo-language-server` |
+| capnp | ✓ | | ✓ | |
+| cel | ✓ | | | |
+| circom | ✓ | | | `circom-lsp` |
+| clarity | ✓ | | | `clarinet` |
+| clojure | ✓ | | | `clojure-lsp` |
+| cmake | ✓ | ✓ | ✓ | `neocmakelsp`, `cmake-language-server` |
+| codeql | ✓ | ✓ | | `codeql` |
+| comment | ✓ | | | |
+| common-lisp | ✓ | | ✓ | `cl-lsp` |
+| cpon | ✓ | | ✓ | |
+| cpp | ✓ | ✓ | ✓ | `clangd` |
+| crystal | ✓ | ✓ | ✓ | `crystalline`, `ameba-ls` |
+| css | ✓ | | ✓ | `vscode-css-language-server` |
+| csv | ✓ | | | |
+| cue | ✓ | | | `cuelsp` |
+| cylc | ✓ | ✓ | ✓ | |
+| d | ✓ | ✓ | ✓ | `serve-d` |
+| dart | ✓ | ✓ | ✓ | `dart` |
+| dbml | ✓ | | | |
+| debian | ✓ | | | |
+| devicetree | ✓ | | | |
+| dhall | ✓ | ✓ | | `dhall-lsp-server` |
+| diff | ✓ | | | |
+| djot | ✓ | | | |
+| docker-compose | ✓ | ✓ | ✓ | `docker-compose-langserver`, `yaml-language-server` |
+| dockerfile | ✓ | ✓ | | `docker-langserver` |
+| dot | ✓ | | | `dot-language-server` |
+| dtd | ✓ | | | |
+| dune | ✓ | | | |
+| dunstrc | ✓ | | | |
+| earthfile | ✓ | ✓ | ✓ | `earthlyls` |
+| edoc | ✓ | | | |
+| eex | ✓ | | | |
+| ejs | ✓ | | | |
+| elisp | ✓ | | | |
+| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
+| elm | ✓ | ✓ | | `elm-language-server` |
+| elvish | ✓ | | | `elvish` |
+| env | ✓ | ✓ | | |
+| erb | ✓ | | | |
+| erlang | ✓ | ✓ | | `erlang_ls`, `elp` |
+| esdl | ✓ | | | |
+| fennel | ✓ | | | `fennel-ls` |
+| fga | ✓ | ✓ | ✓ | |
+| fidl | ✓ | | | |
+| fish | ✓ | ✓ | ✓ | `fish-lsp` |
+| forth | ✓ | | | `forth-lsp` |
+| fortran | ✓ | | ✓ | `fortls` |
+| fsharp | ✓ | | | `fsautocomplete` |
+| gas | ✓ | ✓ | | `asm-lsp` |
+| gdscript | ✓ | ✓ | ✓ | |
+| gemini | ✓ | | | |
+| gherkin | ✓ | | | |
+| ghostty | ✓ | | | |
+| git-attributes | ✓ | | | |
+| git-commit | ✓ | ✓ | | |
+| git-config | ✓ | ✓ | | |
+| git-ignore | ✓ | | | |
+| git-rebase | ✓ | | | |
+| gjs | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
+| gleam | ✓ | ✓ | | `gleam` |
+| glimmer | ✓ | | | `ember-language-server` |
+| glsl | ✓ | ✓ | ✓ | `glsl_analyzer` |
+| gn | ✓ | | | |
+| go | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
+| godot-resource | ✓ | ✓ | | |
+| gomod | ✓ | | | `gopls` |
+| gotmpl | ✓ | | | `gopls` |
+| gowork | ✓ | | | `gopls` |
+| gpr | ✓ | | | `ada_language_server` |
+| graphql | ✓ | ✓ | | `graphql-lsp` |
+| gren | ✓ | ✓ | | |
+| groovy | ✓ | | | |
+| gts | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
+| hare | ✓ | | | |
+| haskell | ✓ | ✓ | | `haskell-language-server-wrapper` |
+| haskell-persistent | ✓ | | | |
+| hcl | ✓ | ✓ | ✓ | `terraform-ls` |
+| heex | ✓ | ✓ | | `elixir-ls` |
+| helm | ✓ | | | `helm_ls` |
+| hocon | ✓ | ✓ | ✓ | |
+| hoon | ✓ | | | |
+| hosts | ✓ | | | |
+| html | ✓ | | | `vscode-html-language-server`, `superhtml` |
+| hurl | ✓ | ✓ | ✓ | |
+| hyprlang | ✓ | | ✓ | `hyprls` |
+| idris | | | | `idris2-lsp` |
+| iex | ✓ | | | |
+| ini | ✓ | | | |
+| ink | ✓ | | | |
+| inko | ✓ | ✓ | ✓ | |
+| janet | ✓ | | | |
+| java | ✓ | ✓ | ✓ | `jdtls` |
+| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
+| jinja | ✓ | | | |
+| jjdescription | ✓ | | | |
+| jq | ✓ | ✓ | | `jq-lsp` |
+| jsdoc | ✓ | | | |
+| json | ✓ | ✓ | ✓ | `vscode-json-language-server` |
+| json5 | ✓ | | | |
+| jsonc | ✓ | | ✓ | `vscode-json-language-server` |
+| jsonnet | ✓ | | | `jsonnet-language-server` |
+| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
+| julia | ✓ | ✓ | ✓ | `julia` |
+| just | ✓ | ✓ | ✓ | `just-lsp` |
+| kdl | ✓ | ✓ | ✓ | |
+| koka | ✓ | | ✓ | `koka` |
+| kotlin | ✓ | ✓ | ✓ | `kotlin-language-server` |
+| koto | ✓ | ✓ | ✓ | `koto-ls` |
+| latex | ✓ | ✓ | | `texlab` |
+| ld | ✓ | | ✓ | |
+| ldif | ✓ | | | |
+| lean | ✓ | | | `lean` |
+| ledger | ✓ | | | |
+| llvm | ✓ | ✓ | ✓ | |
+| llvm-mir | ✓ | ✓ | ✓ | |
+| llvm-mir-yaml | ✓ | | ✓ | |
+| log | ✓ | | | |
+| lpf | ✓ | | | |
+| lua | ✓ | ✓ | ✓ | `lua-language-server` |
+| luau | ✓ | ✓ | ✓ | `luau-lsp` |
+| mail | ✓ | ✓ | | |
+| make | ✓ | | ✓ | |
+| markdoc | ✓ | | | `markdoc-ls` |
+| markdown | ✓ | | | `marksman`, `markdown-oxide` |
+| markdown-rustdoc | ✓ | | | |
+| markdown.inline | ✓ | | | |
+| matlab | ✓ | ✓ | ✓ | |
+| mermaid | ✓ | | | |
+| meson | ✓ | | ✓ | `mesonlsp` |
+| mint | | | | `mint` |
+| mojo | ✓ | ✓ | ✓ | `pixi` |
+| move | ✓ | | | |
+| msbuild | ✓ | | ✓ | |
+| nasm | ✓ | ✓ | | `asm-lsp` |
+| nestedtext | ✓ | ✓ | ✓ | |
+| nginx | ✓ | | | |
+| nickel | ✓ | | ✓ | `nls` |
+| nim | ✓ | ✓ | ✓ | `nimlangserver` |
+| nix | ✓ | ✓ | ✓ | `nil`, `nixd` |
+| nu | ✓ | | | `nu` |
+| nunjucks | ✓ | | | |
+| ocaml | ✓ | | ✓ | `ocamllsp` |
+| ocaml-interface | ✓ | | | `ocamllsp` |
+| odin | ✓ | ✓ | ✓ | `ols` |
+| ohm | ✓ | ✓ | ✓ | |
+| opencl | ✓ | ✓ | ✓ | `clangd` |
+| openscad | ✓ | | | `openscad-lsp` |
+| org | ✓ | | | |
+| pascal | ✓ | ✓ | | `pasls` |
+| passwd | ✓ | | | |
+| pem | ✓ | | | |
+| perl | ✓ | ✓ | ✓ | `perlnavigator` |
+| pest | ✓ | ✓ | ✓ | `pest-language-server` |
+| php | ✓ | ✓ | ✓ | `intelephense` |
+| php-only | ✓ | | | |
+| pkgbuild | ✓ | ✓ | ✓ | `termux-language-server`, `bash-language-server` |
+| pkl | ✓ | | ✓ | `pkl-lsp` |
+| po | ✓ | ✓ | | |
+| pod | ✓ | | | |
+| ponylang | ✓ | ✓ | ✓ | |
+| powershell | ✓ | | | |
+| prisma | ✓ | ✓ | | `prisma-language-server` |
+| prolog | ✓ | | ✓ | `swipl` |
+| protobuf | ✓ | ✓ | ✓ | `buf`, `pb`, `protols` |
+| prql | ✓ | | | |
+| pug | ✓ | | | |
+| purescript | ✓ | ✓ | | `purescript-language-server` |
+| python | ✓ | ✓ | ✓ | `ty`, `ruff`, `jedi-language-server`, `pylsp` |
+| qml | ✓ | | ✓ | `qmlls` |
+| quarto | ✓ | | ✓ | |
+| quint | ✓ | | | `quint-language-server` |
+| r | ✓ | | | `R` |
+| racket | ✓ | | ✓ | `racket` |
+| regex | ✓ | | | |
+| rego | ✓ | | | `regols` |
+| rescript | ✓ | ✓ | | `rescript-language-server` |
+| rmarkdown | ✓ | | ✓ | `R` |
+| robot | ✓ | | | `robotframework_ls` |
+| ron | ✓ | | ✓ | |
+| rst | ✓ | | | |
+| ruby | ✓ | ✓ | ✓ | `ruby-lsp`, `solargraph` |
+| rust | ✓ | ✓ | ✓ | `rust-analyzer` |
+| rust-format-args | ✓ | | | |
+| sage | ✓ | ✓ | | |
+| scala | ✓ | ✓ | ✓ | `metals` |
+| scheme | ✓ | | ✓ | |
+| scss | ✓ | | | `vscode-css-language-server` |
+| slang | ✓ | ✓ | ✓ | `slangd` |
+| slint | ✓ | ✓ | ✓ | `slint-lsp` |
+| smali | ✓ | | ✓ | |
+| smithy | ✓ | | | `cs` |
+| sml | ✓ | | | |
+| snakemake | ✓ | | ✓ | `pylsp` |
+| solidity | ✓ | ✓ | | `solc` |
+| sourcepawn | ✓ | ✓ | | `sourcepawn-studio` |
+| spade | ✓ | | ✓ | `spade-language-server` |
+| spicedb | ✓ | | | |
+| sql | ✓ | ✓ | | |
+| sshclientconfig | ✓ | | | |
+| starlark | ✓ | ✓ | ✓ | `starpls` |
+| strace | ✓ | | | |
+| supercollider | ✓ | | | |
+| svelte | ✓ | | ✓ | `svelteserver` |
+| sway | ✓ | ✓ | ✓ | `forc` |
+| swift | ✓ | ✓ | | `sourcekit-lsp` |
+| t32 | ✓ | | | |
+| tablegen | ✓ | ✓ | ✓ | |
+| tact | ✓ | ✓ | ✓ | |
+| task | ✓ | | | |
+| tcl | ✓ | | ✓ | |
+| teal | ✓ | | | `teal-language-server` |
+| templ | ✓ | | | `templ` |
+| tera | ✓ | | | |
+| textproto | ✓ | ✓ | ✓ | |
+| tfvars | ✓ | | ✓ | `terraform-ls` |
+| thrift | ✓ | | | |
+| tlaplus | ✓ | | | |
+| todotxt | ✓ | | | |
+| toml | ✓ | ✓ | | `taplo`, `tombi` |
+| tsq | ✓ | | | `ts_query_ls` |
+| tsx | ✓ | ✓ | ✓ | `typescript-language-server` |
+| twig | ✓ | | | |
+| typescript | ✓ | ✓ | ✓ | `typescript-language-server` |
+| typespec | ✓ | ✓ | ✓ | `tsp-server` |
+| typst | ✓ | | | `tinymist` |
+| ungrammar | ✓ | | | |
+| unison | ✓ | ✓ | ✓ | |
+| uxntal | ✓ | | | |
+| v | ✓ | ✓ | ✓ | `v-analyzer` |
+| vala | ✓ | ✓ | | `vala-language-server` |
+| vento | ✓ | | | |
+| verilog | ✓ | ✓ | | `svlangserver` |
+| vhdl | ✓ | | | `vhdl_ls` |
+| vhs | ✓ | | | |
+| vue | ✓ | | | `vue-language-server` |
+| wast | ✓ | | | |
+| wat | ✓ | | | `wat_server` |
+| webc | ✓ | | | |
+| werk | ✓ | | | |
+| wesl | ✓ | ✓ | | |
+| wgsl | ✓ | | | `wgsl-analyzer` |
+| wit | ✓ | | ✓ | |
+| wren | ✓ | ✓ | ✓ | |
+| xit | ✓ | | | |
+| xml | ✓ | | ✓ | |
+| xtc | ✓ | | | |
+| yaml | ✓ | ✓ | ✓ | `yaml-language-server`, `ansible-language-server` |
+| yara | ✓ | | | `yls` |
+| yuck | ✓ | | | |
+| zig | ✓ | ✓ | ✓ | `zls` |
diff --git a/book/src/generated/static-cmd.md b/book/src/generated/static-cmd.md
index 1b347290..7ecb7f4e 100644
--- a/book/src/generated/static-cmd.md
+++ b/book/src/generated/static-cmd.md
@@ -106,14 +106,10 @@
| `code_action` | Perform code action | normal: `` <space>a ``, select: `` <space>a `` |
| `buffer_picker` | Open buffer picker | normal: `` <space>b ``, select: `` <space>b `` |
| `jumplist_picker` | Open jumplist picker | normal: `` <space>j ``, select: `` <space>j `` |
-| `symbol_picker` | Open symbol picker | |
-| `syntax_symbol_picker` | Open symbol picker from syntax information | |
-| `lsp_or_syntax_symbol_picker` | Open symbol picker from LSP or syntax information | normal: `` <space>s ``, select: `` <space>s `` |
+| `symbol_picker` | Open symbol picker | normal: `` <space>s ``, select: `` <space>s `` |
| `changed_file_picker` | Open changed file picker | normal: `` <space>g ``, select: `` <space>g `` |
| `select_references_to_symbol_under_cursor` | Select symbol references | normal: `` <space>h ``, select: `` <space>h `` |
-| `workspace_symbol_picker` | Open workspace symbol picker | |
-| `syntax_workspace_symbol_picker` | Open workspace symbol picker from syntax information | |
-| `lsp_or_syntax_workspace_symbol_picker` | Open workspace symbol picker from LSP or syntax information | normal: `` <space>S ``, select: `` <space>S `` |
+| `workspace_symbol_picker` | Open workspace symbol picker | normal: `` <space>S ``, select: `` <space>S `` |
| `diagnostics_picker` | Open diagnostic picker | normal: `` <space>d ``, select: `` <space>d `` |
| `workspace_diagnostics_picker` | Open workspace diagnostic picker | normal: `` <space>D ``, select: `` <space>D `` |
| `last_picker` | Open last picker | normal: `` <space>' ``, select: `` <space>' `` |
@@ -172,8 +168,6 @@
| `smart_tab` | Insert tab if all cursors have all whitespace to their left; otherwise, run a separate command. | insert: `` <tab> `` |
| `insert_tab` | Insert tab char | insert: `` <S-tab> `` |
| `insert_newline` | Insert newline char | insert: `` <C-j> ``, `` <ret> `` |
-| `insert_char_interactive` | Insert an interactively-chosen char | |
-| `append_char_interactive` | Append an interactively-chosen char | |
| `delete_char_backward` | Delete previous char | insert: `` <C-h> ``, `` <backspace> ``, `` <S-backspace> `` |
| `delete_char_forward` | Delete next char | insert: `` <C-d> ``, `` <del> `` |
| `delete_word_backward` | Delete previous word | insert: `` <C-w> ``, `` <A-backspace> `` |
@@ -273,8 +267,6 @@
| `goto_prev_comment` | Goto previous comment | normal: `` [c ``, select: `` [c `` |
| `goto_next_test` | Goto next test | normal: `` ]T ``, select: `` ]T `` |
| `goto_prev_test` | Goto previous test | normal: `` [T ``, select: `` [T `` |
-| `goto_next_xml_element` | Goto next (X)HTML element | normal: `` ]x ``, select: `` ]x `` |
-| `goto_prev_xml_element` | Goto previous (X)HTML element | normal: `` [x ``, select: `` [x `` |
| `goto_next_entry` | Goto next pairing | normal: `` ]e ``, select: `` ]e `` |
| `goto_prev_entry` | Goto previous pairing | normal: `` [e ``, select: `` [e `` |
| `goto_next_paragraph` | Goto next paragraph | normal: `` ]p ``, select: `` ]p `` |
diff --git a/book/src/generated/typable-cmd.md b/book/src/generated/typable-cmd.md
index 3d2ce4e3..219f6b95 100644
--- a/book/src/generated/typable-cmd.md
+++ b/book/src/generated/typable-cmd.md
@@ -1,7 +1,5 @@
| Name | Description |
| --- | --- |
-| `:exit`, `:x`, `:xit` | Write changes to disk if the buffer is modified and then quit. Accepts an optional path (:exit some/path.txt). |
-| `:exit!`, `:x!`, `:xit!` | Force write changes to disk, creating necessary subdirectories, if the buffer is modified and then quit. Accepts an optional path (:exit! some/path.txt). |
| `:quit`, `:q` | Close the current view. |
| `:quit!`, `:q!` | Force close the current view, ignoring unsaved changes. |
| `:open`, `:o`, `:edit`, `:e` | Open a file from disk into the current view. |
@@ -23,12 +21,12 @@
| `:line-ending` | Set the document's default line ending. Options: crlf, lf. |
| `:earlier`, `:ear` | Jump back to an earlier point in edit history. Accepts a number of steps or a time span. |
| `:later`, `:lat` | Jump to a later point in edit history. Accepts a number of steps or a time span. |
-| `:write-quit`, `:wq` | Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt) |
-| `:write-quit!`, `:wq!` | Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt) |
+| `:write-quit`, `:wq`, `:x` | Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt) |
+| `:write-quit!`, `:wq!`, `:x!` | Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt) |
| `:write-all`, `:wa` | Write changes from all buffers to disk. |
| `:write-all!`, `:wa!` | Forcefully write changes from all buffers to disk creating necessary subdirectories. |
| `:write-quit-all`, `:wqa`, `:xa` | Write changes from all buffers to disk and close all views. |
-| `:write-quit-all!`, `:wqa!`, `:xa!` | Forcefully write changes from all buffers to disk, creating necessary subdirectories, and close all views (ignoring unsaved changes). |
+| `:write-quit-all!`, `:wqa!`, `:xa!` | Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes). |
| `:quit-all`, `:qa` | Close all views. |
| `:quit-all!`, `:qa!` | Force close all views ignoring unsaved changes. |
| `:cquit`, `:cq` | Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2). |
@@ -80,7 +78,7 @@
| `:log-open` | Open the helix log file. |
| `:insert-output` | Run shell command, inserting output before each selection. |
| `:append-output` | Run shell command, appending output after each selection. |
-| `:pipe`, `:\|` | Pipe each selection to the shell command. |
+| `:pipe`, `:|` | Pipe each selection to the shell command. |
| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
| `:run-shell-command`, `:sh`, `:!` | Run a shell command |
| `:reset-diff-change`, `:diffget`, `:diffg` | Reset the diff change at the cursor position. |
diff --git a/book/src/guides/README.md b/book/src/guides/README.md
index e53983d6..c25768e6 100644
--- a/book/src/guides/README.md
+++ b/book/src/guides/README.md
@@ -1,4 +1,4 @@
# Guides
This section contains guides for adding new language server configurations,
-tree-sitter grammars, textobject and rainbow bracket queries, and other similar items.
+tree-sitter grammars, textobject queries, and other similar items.
diff --git a/book/src/guides/rainbow_bracket_queries.md b/book/src/guides/rainbow_bracket_queries.md
deleted file mode 100644
index 1cba6a99..00000000
--- a/book/src/guides/rainbow_bracket_queries.md
+++ /dev/null
@@ -1,132 +0,0 @@
-# Adding Rainbow Bracket Queries
-
-Helix uses `rainbows.scm` tree-sitter query files to provide rainbow bracket
-functionality.
-
-Tree-sitter queries are documented in the tree-sitter online documentation.
-If you're writing queries for the first time, be sure to check out the section
-on [syntax highlighting queries] and on [query syntax].
-
-Rainbow queries have two captures: `@rainbow.scope` and `@rainbow.bracket`.
-`@rainbow.scope` should capture any node that increases the nesting level
-while `@rainbow.bracket` should capture any bracket nodes. Put another way:
-`@rainbow.scope` switches to the next rainbow color for all nodes in the tree
-under it while `@rainbow.bracket` paints captured nodes with the current
-rainbow color.
-
-For an example, let's add rainbow queries for the tree-sitter query (TSQ)
-language itself. These queries will go into a
-`runtime/queries/tsq/rainbows.scm` file in the repository root.
-
-First we'll add the `@rainbow.bracket` captures. TSQ only has parentheses and
-square brackets:
-
-```tsq
-["(" ")" "[" "]"] @rainbow.bracket
-```
-
-The ordering of the nodes within the alternation (square brackets) is not
-taken into consideration.
-
-> Note: Why are these nodes quoted? Most syntax highlights capture text
-> surrounded by parentheses. These are _named nodes_ and correspond to the
-> names of rules in the grammar. Brackets are usually written in tree-sitter
-> grammars as literal strings, for example:
->
-> ```js
-> {
-> // ...
-> arguments: seq("(", repeat($.argument), ")"),
-> // ...
-> }
-> ```
->
-> Nodes written as literal strings in tree-sitter grammars may be captured
-> in queries with those same literal strings.
-
-Then we'll add `@rainbow.scope` captures. The easiest way to do this is to
-view the `grammar.js` file in the tree-sitter grammar's repository. For TSQ,
-that file is [here][tsq grammar.js]. As we scroll down the `grammar.js`, we
-see that the `(alternation)`, (L36) `(group)` (L57), `(named_node)` (L59),
-`(predicate)` (L87) and `(wildcard_node)` (L97) nodes all contain literal
-parentheses or square brackets in their definitions. These nodes are all
-direct parents of brackets and happen to also be the nodes we want to change
-to the next rainbow color, so we capture them as `@rainbow.scope`.
-
-```tsq
-[
- (group)
- (named_node)
- (wildcard_node)
- (predicate)
- (alternation)
-] @rainbow.scope
-```
-
-This strategy works as a rule of thumb for most programming and configuration
-languages. Markup languages can be trickier and may take additional
-experimentation to find the correct nodes to use for scopes and brackets.
-
-The `:tree-sitter-subtree` command shows the syntax tree under the primary
-selection in S-expression format and can be a useful tool for determining how
-to write a query.
-
-### Properties
-
-The `rainbow.include-children` property may be applied to `@rainbow.scope`
-captures. By default, all `@rainbow.bracket` captures must be direct descendant
-of a node captured with `@rainbow.scope` in a syntax tree in order to be
-highlighted. The `rainbow.include-children` property disables that check and
-allows `@rainbow.bracket` captures to be highlighted if they are direct or
-indirect descendants of some node captured with `@rainbow.scope`.
-
-For example, this property is used in the HTML rainbow queries.
-
-For a document like `<a>link</a>`, the syntax tree is:
-
-```tsq
-(element ; <a>link</a>
- (start_tag ; <a>
- (tag_name)) ; a
- (text) ; link
- (end_tag ; </a>
- (tag_name))) ; a
-```
-
-If we want to highlight the `<`, `>` and `</` nodes with rainbow colors, we
-capture them as `@rainbow.bracket`:
-
-```tsq
-["<" ">" "</"] @rainbow.bracket
-```
-
-And we capture `(element)` as `@rainbow.scope` because `(element)` nodes nest
-within each other: they increment the nesting level and switch to the next
-color in the rainbow.
-
-```tsq
-(element) @rainbow.scope
-```
-
-But this combination of `@rainbow.scope` and `@rainbow.bracket` will not
-highlight any nodes. `<`, `>` and `</` are children of the `(start_tag)` and
-`(end_tag)` nodes. We can't capture `(start_tag)` and `(end_tag)` as
-`@rainbow.scope` because they don't nest other elements. We can fix this case
-by removing the requirement that `<`, `>` and `</` are direct descendants of
-`(element)` using the `rainbow.include-children` property.
-
-```tsq
-((element) @rainbow.scope
- (#set! rainbow.include-children))
-```
-
-With this property set, `<`, `>`, and `</` will highlight with rainbow colors
-even though they aren't direct descendents of the `(element)` node.
-
-`rainbow.include-children` is not necessary for the vast majority of programming
-languages. It is only necessary when the node that increments the nesting level
-(changes rainbow color) is not the direct parent of the bracket node.
-
-[syntax highlighting queries]: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#highlights
-[query syntax]: https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
-[tsq grammar.js]: https://github.com/the-mikedavis/tree-sitter-tsq/blob/48b5e9f82ae0a4727201626f33a17f69f8e0ff86/grammar.js
diff --git a/book/src/guides/tags.md b/book/src/guides/tags.md
deleted file mode 100644
index 00794962..00000000
--- a/book/src/guides/tags.md
+++ /dev/null
@@ -1,34 +0,0 @@
-## Adding tags queries
-
-See tree-sitter's documentation on [Code Navigation Systems] for more
-background on tags queries.
-
-Helix provides LSP-like features such as document and workspace symbol pickers
-out-of-the-box for languages with `tags.scm` queries based on syntax trees. To
-be analyzed a language must have a tree-sitter grammar and a `tags.scm` query
-file which pattern matches interesting nodes from syntax trees.
-
-Query files should be placed in `runtime/queries/{language}/tags.scm`
-when contributing to Helix. You may place these under your local runtime
-directory (`~/.config/helix/runtime` in Linux for example) for the sake of
-testing.
-
-The following [captures][tree-sitter-captures] are recognized:
-
-| Capture name |
-|--- |
-| `definition.class` |
-| `definition.constant` |
-| `definition.function` |
-| `definition.interface` |
-| `definition.macro` |
-| `definition.module` |
-| `definition.struct` |
-| `definition.type` |
-
-[Example query files][example-queries] can be found in the Helix GitHub
-repository.
-
-[Code Navigation Systems]: https://tree-sitter.github.io/tree-sitter/4-code-navigation.html
-[tree-sitter-captures]: https://tree-sitter.github.io/tree-sitter/using-parsers/queries/index.html
-[example-queries]: https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+path%3A%2A%2A/tags.scm&type=Code
diff --git a/book/src/guides/textobject.md b/book/src/guides/textobject.md
index 093129d4..b0efb03b 100644
--- a/book/src/guides/textobject.md
+++ b/book/src/guides/textobject.md
@@ -28,8 +28,6 @@ The following [captures][tree-sitter-captures] are recognized:
| `comment.around` |
| `entry.inside` |
| `entry.around` |
-| `xml-element.inside` |
-| `xml-element.around` |
[Example query files][textobject-examples] can be found in the helix GitHub repository.
diff --git a/book/src/jumplist.md b/book/src/jumplist.md
deleted file mode 100644
index 97b4b571..00000000
--- a/book/src/jumplist.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## Using the jumplist
-
-To help with quick navigation, Helix maintains a list of "jumps" called the jumplist.
-Whenever you make a significant movement (see next section), Helix stores your selections from before the move as a jump.
-A jump serves as a kind of checkpoint, allowing you to jump to a separate location, make edits, and return to where you were with your previous selections.
-This way, the jumplist tracks both your previous location and your selections.
-You can manually save a jump by using `Ctrl-s`.
-To jump backward in the jumplist, use `Ctrl-o`; to go forward, use `Ctrl-i`. To view and select from the full jumplist, use `Space-j` to open the jumplist picker.
-
-### What makes a jump
-The following is a non-exhaustive list of which actions add a jump to the jumplist:
-- Switching buffers
- - Using the buffer picker, going to the next/previous buffer
- - Going to the last accessed/modified file
- - Making a new file (`:new FILE`)
- - Opening a file (`:open FILE`)
- - Includes `:log-open`, `:config-open`, `:config-open-workspace`, `:tutor`
- - Navigating by pickers, global search, or the file explorer
- - `goto_file` (`gf`)
-- Big in-file movements
- - `select_regex` (`s`)
- - `split_regex` (`S`)
- - `search` (`/`)
- - `keep_selections` and `remove_selections` (`K` and `<A-K>`)
- - `goto_file_start` (`gg`)
- - `goto_file_end`
- - `goto_last_line` (`ge`)
- - `:goto 123` / `:123` / `123G`
- - `goto_definition` (`gd`)
- - `goto_declaration` (`gD`)
- - `goto_type_definition` (`gy`)
- - `goto_reference` (`gr`)
-- Other
- - `Ctrl-s` manually creates a jump
- - Trying to close a modified buffer can switch you to that buffer and create a jump
- - The debugger can create jumps as you jump stack frames
diff --git a/book/src/keymap.md b/book/src/keymap.md
index 95662f71..10257378 100644
--- a/book/src/keymap.md
+++ b/book/src/keymap.md
@@ -35,8 +35,6 @@ Normal mode is the default mode when you launch helix. You can return to it from
> NOTE: Unlike Vim, `f`, `F`, `t` and `T` are not confined to the current line.
-> Hereafter, `<n>` represents an integer by typing a sequence of digits.
-
| Key | Description | Command |
| ----- | ----------- | ------- |
| `h`, `Left` | Move left | `move_char_left` |
@@ -53,7 +51,7 @@ Normal mode is the default mode when you launch helix. You can return to it from
| `f` | Find next char | `find_next_char` |
| `T` | Find till previous char | `till_prev_char` |
| `F` | Find previous char | `find_prev_char` |
-| `<n>G`, `<n>gg` | Go to line number `<n>` | `goto_line` |
+| `G` | Go to line number `<n>` | `goto_line` |
| `Alt-.` | Repeat last motion (`f`, `t`, `m`, `[` or `]`) | `repeat_last_motion` |
| `Home` | Move to the start of the line | `goto_line_start` |
| `End` | Move to the end of the line | `goto_line_end` |
@@ -214,10 +212,8 @@ Jumps to various locations.
| Key | Description | Command |
| ----- | ----------- | ------- |
-| `<n>g`| Go to line number `<n>` | `goto_file_start` |
-| `g` | Go to the start of the file | `goto_file_start` |
-| <code>&lt;n&gt;&#124;</code> | Go to column number `<n>` | `goto_column` |
-| <code>&#124;</code> | Go to the start of line | `goto_column` |
+| `g` | Go to line number `<n>` else start of file | `goto_file_start` |
+| <code>&#124;</code> | Go to column number `<n>` else start of line | `goto_column` |
| `e` | Go to the end of the file | `goto_last_line` |
| `f` | Go to files in the selections | `goto_file` |
| `h` | Go to the start of the line | `goto_line_start` |
@@ -352,32 +348,30 @@ Displays the signature of the selected completion item. Remapping currently not
These mappings are in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaired).
-| Key | Description | Command |
-| ----- | ----------- | ------- |
-| `]d` | Go to next diagnostic (**LSP**) | `goto_next_diag` |
-| `[d` | Go to previous diagnostic (**LSP**) | `goto_prev_diag` |
-| `]D` | Go to last diagnostic in document (**LSP**) | `goto_last_diag` |
-| `[D` | Go to first diagnostic in document (**LSP**) | `goto_first_diag` |
-| `]f` | Go to next function (**TS**) | `goto_next_function` |
-| `[f` | Go to previous function (**TS**) | `goto_prev_function` |
-| `]t` | Go to next type definition (**TS**) | `goto_next_class` |
-| `[t` | Go to previous type definition (**TS**) | `goto_prev_class` |
-| `]a` | Go to next argument/parameter (**TS**) | `goto_next_parameter` |
-| `[a` | Go to previous argument/parameter (**TS**) | `goto_prev_parameter` |
-| `]c` | Go to next comment (**TS**) | `goto_next_comment` |
-| `[c` | Go to previous comment (**TS**) | `goto_prev_comment` |
-| `]T` | Go to next test (**TS**) | `goto_next_test` |
-| `[T` | Go to previous test (**TS**) | `goto_prev_test` |
-| `]p` | Go to next paragraph | `goto_next_paragraph` |
-| `[p` | Go to previous paragraph | `goto_prev_paragraph` |
-| `]g` | Go to next change | `goto_next_change` |
-| `[g` | Go to previous change | `goto_prev_change` |
-| `]G` | Go to last change | `goto_last_change` |
-| `[G` | Go to first change | `goto_first_change` |
-| `[x` | Go to next (X)HTML element | `goto_next_xml_element` |
-| `]x` | Go to previous (X)HTML element | `goto_prev_xml_element` |
-| `]Space` | Add newline below | `add_newline_below` |
-| `[Space` | Add newline above | `add_newline_above` |
+| Key | Description | Command |
+| ----- | ----------- | ------- |
+| `]d` | Go to next diagnostic (**LSP**) | `goto_next_diag` |
+| `[d` | Go to previous diagnostic (**LSP**) | `goto_prev_diag` |
+| `]D` | Go to last diagnostic in document (**LSP**) | `goto_last_diag` |
+| `[D` | Go to first diagnostic in document (**LSP**) | `goto_first_diag` |
+| `]f` | Go to next function (**TS**) | `goto_next_function` |
+| `[f` | Go to previous function (**TS**) | `goto_prev_function` |
+| `]t` | Go to next type definition (**TS**) | `goto_next_class` |
+| `[t` | Go to previous type definition (**TS**) | `goto_prev_class` |
+| `]a` | Go to next argument/parameter (**TS**) | `goto_next_parameter` |
+| `[a` | Go to previous argument/parameter (**TS**) | `goto_prev_parameter` |
+| `]c` | Go to next comment (**TS**) | `goto_next_comment` |
+| `[c` | Go to previous comment (**TS**) | `goto_prev_comment` |
+| `]T` | Go to next test (**TS**) | `goto_next_test` |
+| `[T` | Go to previous test (**TS**) | `goto_prev_test` |
+| `]p` | Go to next paragraph | `goto_next_paragraph` |
+| `[p` | Go to previous paragraph | `goto_prev_paragraph` |
+| `]g` | Go to next change | `goto_next_change` |
+| `[g` | Go to previous change | `goto_prev_change` |
+| `]G` | Go to last change | `goto_last_change` |
+| `[G` | Go to first change | `goto_first_change` |
+| `]Space` | Add newline below | `add_newline_below` |
+| `[Space` | Add newline above | `add_newline_above` |
## Insert mode
diff --git a/book/src/languages.md b/book/src/languages.md
index b47c05cf..ea18e9c3 100644
--- a/book/src/languages.md
+++ b/book/src/languages.md
@@ -71,10 +71,8 @@ These configuration keys are available:
| `text-width` | Maximum line length. Used for the `:reflow` command and soft-wrapping if `soft-wrap.wrap-at-text-width` is set, defaults to `editor.text-width` |
| `rulers` | Overrides the `editor.rulers` config key for the language. |
| `path-completion` | Overrides the `editor.path-completion` config key for the language. |
-| `word-completion` | Overrides the [`editor.word-completion`](./editor.md#editorword-completion-section) configuration for the language. |
| `workspace-lsp-roots` | Directories relative to the workspace root that are treated as LSP roots. Should only be set in `.helix/config.toml`. Overwrites the setting of the same name in `config.toml` if set. |
| `persistent-diagnostic-sources` | An array of LSP diagnostic sources assumed unchanged when the language server resends the same set of diagnostics. Helix can track the position for these diagnostics internally instead. Useful for diagnostics that are recomputed on save.
-| `rainbow-brackets` | Overrides the `editor.rainbow-brackets` config key for the language |
### File-type detection and the `file-types` key
@@ -111,7 +109,7 @@ of the formatter command. In particular, the `%{buffer_name}` variable can be pa
argument to the formatter:
```toml
-formatter = { command = "mylang-formatter" , args = ["--stdin", "--stdin-filename", "%{buffer_name}"] }
+formatter = { command = "mylang-formatter" , args = ["--stdin", "--stdin-filename %{buffer_name}"] }
```
## Language Server configuration
diff --git a/book/src/other-software.md b/book/src/other-software.md
index 941feada..a8a06259 100644
--- a/book/src/other-software.md
+++ b/book/src/other-software.md
@@ -15,8 +15,6 @@ Helix' keymap and interaction model ([Using Helix](#usage.md)) is easier to adop
| [Visual Studio Code](https://code.visualstudio.com/) | [Helix for VS Code](https://marketplace.visualstudio.com/items?itemName=jasew.vscode-helix-emulation) extension|
| [Zed](https://zed.dev/) | native via keybindings ([Bug](https://github.com/zed-industries/zed/issues/4642)) |
| [CodeMirror](https://codemirror.net/) | [codemirror-helix](https://gitlab.com/_rvidal/codemirror-helix) |
-| [Lite XL](https://lite-xl.com/) | [lite-modal-hx](https://codeberg.org/Mandarancio/lite-modal-hx) |
-| [Lapce](https://lap.dev/lapce/) | | Requested: https://github.com/lapce/lapce/issues/281 |
## Shells
diff --git a/book/src/package-managers.md b/book/src/package-managers.md
index c235d2e0..c3b1f4e7 100644
--- a/book/src/package-managers.md
+++ b/book/src/package-managers.md
@@ -2,6 +2,7 @@
- [Linux](#linux)
- [Ubuntu/Debian](#ubuntudebian)
+ - [Ubuntu (PPA)](#ubuntu-ppa)
- [Fedora/RHEL](#fedorarhel)
- [Arch Linux extra](#arch-linux-extra)
- [NixOS](#nixos)
@@ -25,11 +26,21 @@ The following third party repositories are available:
### Ubuntu/Debian
-Install the Debian package [from the release page](https://github.com/helix-editor/helix/releases/latest).
+Install the Debian package from the release page.
If you are running a system older than Ubuntu 22.04, Mint 21, or Debian 12, you can build the `.deb` file locally
[from source](./building-from-source.md#building-the-debian-package).
+### Ubuntu (PPA)
+
+Add the `PPA` for Helix:
+
+```sh
+sudo add-apt-repository ppa:maveonair/helix-editor
+sudo apt update
+sudo apt install helix
+```
+
### Fedora/RHEL
```sh
diff --git a/book/src/remapping.md b/book/src/remapping.md
index 9a9a611a..23bb80c5 100644
--- a/book/src/remapping.md
+++ b/book/src/remapping.md
@@ -89,26 +89,24 @@ Cmd-s = ":write" # Cmd or Win or Meta and 's' to write
Special keys are encoded as follows:
-| Key name | Representation |
-| --- | --- |
-| Backspace | `"backspace"` |
-| Space | `"space"` |
-| Return/Enter | `"ret"` |
-| Left | `"left"` |
-| Right | `"right"` |
-| Up | `"up"` |
-| Down | `"down"` |
-| Home | `"home"` |
-| End | `"end"` |
-| Page Up | `"pageup"` |
-| Page Down | `"pagedown"` |
-| Tab | `"tab"` |
-| Delete | `"del"` |
-| Insert | `"ins"` |
-| Null | `"null"` |
-| Escape | `"esc"` |
-| Less Than (<) | `"lt"` |
-| Greater Than (>) | `"gt"` |
+| Key name | Representation |
+| --- | --- |
+| Backspace | `"backspace"` |
+| Space | `"space"` |
+| Return/Enter | `"ret"` |
+| Left | `"left"` |
+| Right | `"right"` |
+| Up | `"up"` |
+| Down | `"down"` |
+| Home | `"home"` |
+| End | `"end"` |
+| Page Up | `"pageup"` |
+| Page Down | `"pagedown"` |
+| Tab | `"tab"` |
+| Delete | `"del"` |
+| Insert | `"ins"` |
+| Null | `"null"` |
+| Escape | `"esc"` |
Keys can be disabled by binding them to the `no_op` command.
diff --git a/book/src/textobjects.md b/book/src/textobjects.md
index c950167a..541acab9 100644
--- a/book/src/textobjects.md
+++ b/book/src/textobjects.md
@@ -24,7 +24,6 @@ function or block of code.
| `c` | Comment |
| `T` | Test |
| `g` | Change |
-| `x` | (X)HTML element |
> 💡 `f`, `t`, etc. need a tree-sitter grammar active for the current
document and a special tree-sitter query file to work properly. [Only
diff --git a/book/src/themes.md b/book/src/themes.md
index 353a4684..3ef064d6 100644
--- a/book/src/themes.md
+++ b/book/src/themes.md
@@ -2,17 +2,6 @@
To use a theme add `theme = "<name>"` to the top of your [`config.toml`](./configuration.md) file, or select it during runtime using `:theme <name>`.
-Separate themes can be configured for light and dark modes. On terminals supporting [mode 2031 dark/light detection](https://github.com/contour-terminal/contour/blob/master/docs/vt-extensions/color-palette-update-notifications.md), the theme mode is detected from the terminal.
-
-```toml
-[theme]
-dark = "catppuccin_frappe"
-light = "catppuccin_latte"
-## Optional. Used if the terminal doesn't declare a preference.
-## Defaults to the theme set for `dark` if not specified.
-# fallback = "catppuccin_frappe"
-```
-
## Creating a theme
Create a file with the name of your theme as the file name (i.e `mytheme.toml`) and place it in your `themes` directory (i.e `~/.config/helix/themes` or `%AppData%\helix\themes` on Windows). The directory might have to be created beforehand.
@@ -141,17 +130,6 @@ inherits = "boo_berry"
berry = "#2A2A4D"
```
-### Rainbow
-
-The `rainbow` key is used for rainbow highlight for matching brackets.
-The key is a list of styles.
-
-```toml
-rainbow = ["#ff0000", "#ffa500", "#fff000", { fg = "#00ff00", modifiers = ["bold"] }]
-```
-
-Colors from the palette and modifiers may be used.
-
### Scopes
The following is a list of scopes available to use for styling:
diff --git a/contrib/Helix.appdata.xml b/contrib/Helix.appdata.xml
index eb8ce9dc..b32bbebd 100644
--- a/contrib/Helix.appdata.xml
+++ b/contrib/Helix.appdata.xml
@@ -47,12 +47,6 @@
<content_rating type="oars-1.1" />
<releases>
- <release version="25.07.1" date="2025-07-18">
- <url>https://github.com/helix-editor/helix/releases/tag/25.07.1</url>
- </release>
- <release version="25.07" date="2025-07-15">
- <url>https://helix-editor.com/news/release-25-07-highlights/</url>
- </release>
<release version="25.01.1" date="2025-01-19">
<url>https://github.com/helix-editor/helix/releases/tag/25.01.1</url>
</release>
diff --git a/contrib/completion/hx.bash b/contrib/completion/hx.bash
index bad3fa05..37893bf5 100644
--- a/contrib/completion/hx.bash
+++ b/contrib/completion/hx.bash
@@ -13,8 +13,8 @@ _hx() {
return 0
;;
--health)
- languages=$(hx --health all-languages | tail -n '+2' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g')
- mapfile -t COMPREPLY < <(compgen -W """clipboard languages all-languages all $languages""" -- "$cur")
+ languages=$(hx --health | tail -n '+7' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g')
+ mapfile -t COMPREPLY < <(compgen -W """$languages""" -- "$cur")
return 0
;;
esac
diff --git a/contrib/completion/hx.fish b/contrib/completion/hx.fish
index d7ce7e89..f05dba8d 100644
--- a/contrib/completion/hx.fish
+++ b/contrib/completion/hx.fish
@@ -4,10 +4,6 @@
complete -c hx -s h -l help -d "Prints help information"
complete -c hx -l tutor -d "Loads the tutorial"
complete -c hx -l health -xa "(__hx_langs_ops)" -d "Checks for errors"
-complete -c hx -l health -xka all -d "Prints all diagnostic informations"
-complete -c hx -l health -xka all-languages -d "Lists all languages"
-complete -c hx -l health -xka languages -d "Lists user configured languages"
-complete -c hx -l health -xka clipboard -d "Prints system clipboard provider"
complete -c hx -s g -l grammar -x -a "fetch build" -d "Fetch or build tree-sitter grammars"
complete -c hx -s v -o vv -o vvv -d "Increases logging verbosity"
complete -c hx -s V -l version -d "Prints version information"
@@ -18,5 +14,5 @@ complete -c hx -l log -r -d "Specifies a file to use for logging"
complete -c hx -s w -l working-dir -d "Specify initial working directory" -xa "(__fish_complete_directories)"
function __hx_langs_ops
- hx --health all-languages | tail -n '+2' | string replace -fr '^(\S+) .*' '$1'
+ hx --health languages | tail -n '+2' | string replace -fr '^(\S+) .*' '$1'
end
diff --git a/contrib/completion/hx.nu b/contrib/completion/hx.nu
index 816b403a..e390cdad 100644
--- a/contrib/completion/hx.nu
+++ b/contrib/completion/hx.nu
@@ -5,8 +5,8 @@
# The help message won't be overridden though, so it will still be present here
def health_categories [] {
- let languages = ^hx --health all-languages | detect columns | get Language | where { $in != null }
- let completions = [ "all", "clipboard", "languages", "all-languages" ] | append $languages
+ let languages = ^hx --health languages | detect columns | get Language | filter { $in != null }
+ let completions = [ "all", "clipboard", "languages" ] | append $languages
return $completions
}
diff --git a/contrib/completion/hx.zsh b/contrib/completion/hx.zsh
index 6ffccb18..2631d228 100644
--- a/contrib/completion/hx.zsh
+++ b/contrib/completion/hx.zsh
@@ -25,7 +25,7 @@ _hx() {
case "$state" in
health)
- local languages=($(hx --health all-languages | tail -n '+2' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g;s/[✘✓]//g'))
+ local languages=($(hx --health | tail -n '+11' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g;s/[✘✓]//g'))
_values 'language' $languages
;;
grammar)
diff --git a/default.nix b/default.nix
index 137dee5a..8e501bbc 100644
--- a/default.nix
+++ b/default.nix
@@ -46,8 +46,6 @@ in
allowBuiltinFetchGit = true;
};
- propagatedBuildInputs = [ runtimeDir ];
-
nativeBuildInputs = [
installShellFiles
git
diff --git a/docs/architecture.md b/docs/architecture.md
index eb6f0c4b..0dd68ed3 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -1,12 +1,10 @@
| Crate | Description |
| ----------- | ----------- |
-| helix-stdx | Extensions to the standard library (similar to [`rust-analyzer`'s](https://github.com/rust-lang/rust-analyzer/blob/ea413f67a8f730b4211c09e103f8207c62e7dbc3/crates/stdx/Cargo.toml#L5)) |
| helix-core | Core editing primitives, functional. |
| helix-lsp | Language server client |
| helix-lsp-types | Language Server Protocol type definitions |
| helix-dap | Debug Adapter Protocol (DAP) client |
-| helix-event | Primitives for defining and handling events within the editor |
| helix-loader | Functions for building, fetching, and loading external resources |
| helix-view | UI abstractions for use in backends, imperative shell. |
| helix-term | Terminal UI |
@@ -112,17 +110,3 @@ The `main` function sets up a new `Application` that runs the event loop.
## TUI / Term
TODO: document Component and rendering related stuff
-
-## Event
-
-The `helix-event` crate defines primitives for defining and acting on events
-within the editor. "Events" cover things like opening, changing and closing of
-documents, starting and stopping of language servers and more.
-
-`helix-event` has tools for defining events and registering _hooks_ which run
-any time an event is emitted. `helix-event` also provides `AsyncHook` - a tool
-for running cancellable tasks which run after events with _debouncing_.
-
-See the `AsyncHook` type for more information. Events can be created within the
-`events!` macro. Synchronous hooks can be created with `register_hook!`. And
-editor-wide events can be sent to hooks with `helix_event::dispatch`.
diff --git a/flake.lock b/flake.lock
index 867f2830..6490b760 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1759381078,
- "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
+ "lastModified": 1740560979,
+ "narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
+ "rev": "5135c59491985879812717f4c9fea69604e7f26f",
"type": "github"
},
"original": {
@@ -29,11 +29,11 @@
]
},
"locked": {
- "lastModified": 1759631821,
- "narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=",
+ "lastModified": 1740623427,
+ "narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe",
+ "rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 5672e62f..c3b4ce5d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -16,7 +16,13 @@
...
}: let
inherit (nixpkgs) lib;
- eachSystem = lib.genAttrs lib.systems.flakeExposed;
+ systems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ "x86_64-darwin"
+ "aarch64-darwin"
+ ];
+ eachSystem = lib.genAttrs systems;
pkgsFor = eachSystem (system:
import nixpkgs {
localSystem.system = system;
@@ -71,7 +77,8 @@
rust-bin.nightly.latest.rust-analyzer
]
++ (lib.optional (stdenv.isx86_64 && stdenv.isLinux) cargo-tarpaulin)
- ++ (lib.optional stdenv.isLinux lldb);
+ ++ (lib.optional stdenv.isLinux lldb)
+ ++ (lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreFoundation);
shellHook = ''
export RUST_BACKTRACE="1"
export RUSTFLAGS="''${RUSTFLAGS:-""} ${commonRustFlagsEnv} ${platformRustFlagsEnv}"
diff --git a/grammars.nix b/grammars.nix
index 1b4da224..371cafb0 100644
--- a/grammars.nix
+++ b/grammars.nix
@@ -87,6 +87,8 @@
$CC -c src/parser.c -o parser.o $FLAGS
$CXX -shared -o $NAME.so *.o
+ ls -al
+
runHook postBuild
'';
diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml
index 4309cc14..4e825364 100644
--- a/helix-core/Cargo.toml
+++ b/helix-core/Cargo.toml
@@ -30,9 +30,9 @@ unicode-segmentation.workspace = true
# For now lets lock the version to avoid rendering glitches
# when installing without `--locked`
unicode-width = "=0.1.12"
-unicode-general-category = "1.1"
+unicode-general-category = "1.0"
slotmap.workspace = true
-tree-house = { workspace = true, features = ["fixtures"] }
+tree-house.workspace = true
once_cell = "1.21"
arc-swap = "1"
regex = "1"
@@ -44,7 +44,7 @@ log = "0.4"
anyhow = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
-toml.workspace = true
+toml = "0.8"
imara-diff = "0.2.0"
encoding_rs = "0.8"
@@ -55,7 +55,7 @@ textwrap = "0.16.2"
nucleo.workspace = true
parking_lot.workspace = true
-globset.workspace = true
+globset = "0.4.16"
regex-cursor = "0.1.5"
[dev-dependencies]
diff --git a/helix-core/src/completion.rs b/helix-core/src/completion.rs
index 11b49cfc..29c86b73 100644
--- a/helix-core/src/completion.rs
+++ b/helix-core/src/completion.rs
@@ -16,7 +16,6 @@ pub struct CompletionItem {
pub enum CompletionProvider {
Lsp(LanguageServerId),
Path,
- Word,
}
impl From<LanguageServerId> for CompletionProvider {
diff --git a/helix-core/src/diagnostic.rs b/helix-core/src/diagnostic.rs
index b9360b52..083dbb0a 100644
--- a/helix-core/src/diagnostic.rs
+++ b/helix-core/src/diagnostic.rs
@@ -20,6 +20,17 @@ impl Default for Severity {
}
}
+impl Severity {
+ pub const fn indicator(&self) -> &'static str {
+ match self {
+ Self::Hint => "○",
+ Self::Info => "●",
+ Self::Warning => "▲",
+ Self::Error => "■",
+ }
+ }
+}
+
#[derive(Debug, Eq, Hash, PartialEq, Clone, Deserialize, Serialize)]
pub enum NumberOrString {
Number(i32),
diff --git a/helix-core/src/editor_config.rs b/helix-core/src/editor_config.rs
index 2eaeaca4..714f577c 100644
--- a/helix-core/src/editor_config.rs
+++ b/helix-core/src/editor_config.rs
@@ -228,7 +228,6 @@ impl FromStr for Ini {
let glob = GlobBuilder::new(&glob_str)
.literal_separator(true)
.backslash_escape(true)
- .empty_alternates(true)
.build()?;
ini.sections.push(Section {
glob: glob.compile_matcher(),
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs
index bdf0f405..c9415d1d 100644
--- a/helix-core/src/indent.rs
+++ b/helix-core/src/indent.rs
@@ -1,4 +1,4 @@
-use std::{borrow::Cow, collections::HashMap};
+use std::{borrow::Cow, collections::HashMap, iter};
use helix_stdx::rope::RopeSliceExt;
use tree_house::TREE_SITTER_MATCH_LIMIT;
@@ -153,12 +153,6 @@ pub fn auto_detect_indent_style(document_text: &Rope) -> Option<IndentStyle> {
// Give more weight to tabs, because their presence is a very
// strong indicator.
histogram[0] *= 2;
- // Gives less weight to single indent, as single spaces are
- // often used in certain languages' comment systems and rarely
- // used as the actual document indentation.
- if histogram[1] > 1 {
- histogram[1] /= 2;
- }
histogram
};
@@ -214,10 +208,7 @@ fn whitespace_with_same_width(text: RopeSlice) -> String {
if grapheme == "\t" {
s.push('\t');
} else {
- s.extend(std::iter::repeat_n(
- ' ',
- grapheme_width(&Cow::from(grapheme)),
- ));
+ s.extend(std::iter::repeat(' ').take(grapheme_width(&Cow::from(grapheme))));
}
}
s
@@ -246,10 +237,10 @@ pub fn normalize_indentation(
original_len += 1;
}
if indent_style == IndentStyle::Tabs {
- dst.extend(std::iter::repeat_n('\t', len / tab_width));
+ dst.extend(iter::repeat('\t').take(len / tab_width));
len %= tab_width;
}
- dst.extend(std::iter::repeat_n(' ', len));
+ dst.extend(iter::repeat(' ').take(len));
original_len
}
diff --git a/helix-core/src/position.rs b/helix-core/src/position.rs
index e70cb949..3f888c57 100644
--- a/helix-core/src/position.rs
+++ b/helix-core/src/position.rs
@@ -262,14 +262,7 @@ pub fn visual_offset_from_anchor(
pub fn pos_at_coords(text: RopeSlice, coords: Position, limit_before_line_ending: bool) -> usize {
let Position { mut row, col } = coords;
if limit_before_line_ending {
- let lines = text.len_lines() - 1;
-
- row = row.min(if crate::line_ending::get_line_ending(&text).is_some() {
- // if the last line is empty, don't jump to it
- lines - 1
- } else {
- lines
- });
+ row = row.min(text.len_lines() - 1);
};
let line_start = text.line_to_char(row);
let line_end = if limit_before_line_ending {
diff --git a/helix-core/src/snippets.rs b/helix-core/src/snippets.rs
index 477c9e75..3dd3b9c3 100644
--- a/helix-core/src/snippets.rs
+++ b/helix-core/src/snippets.rs
@@ -1,6 +1,6 @@
mod active;
mod elaborate;
-pub mod parser;
+mod parser;
mod render;
#[derive(PartialEq, Eq, Hash, Debug, PartialOrd, Ord, Clone, Copy)]
diff --git a/helix-core/src/snippets/elaborate.rs b/helix-core/src/snippets/elaborate.rs
index b17c149f..012d1db7 100644
--- a/helix-core/src/snippets/elaborate.rs
+++ b/helix-core/src/snippets/elaborate.rs
@@ -361,7 +361,7 @@ impl Transform {
}
}
FormatItem::Conditional(i, ref if_, ref else_) => {
- if cap.get_group(i).is_none_or(|mat| mat.is_empty()) {
+ if cap.get_group(i).map_or(true, |mat| mat.is_empty()) {
buf.push_str(else_)
} else {
buf.push_str(if_)
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 4bc177ef..8fa185c6 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -13,7 +13,6 @@ use std::{
use anyhow::{Context, Result};
use arc_swap::{ArcSwap, Guard};
use config::{Configuration, FileType, LanguageConfiguration, LanguageServerConfiguration};
-use foldhash::HashSet;
use helix_loader::grammar::get_language;
use helix_stdx::rope::RopeSliceExt as _;
use once_cell::sync::OnceCell;
@@ -21,10 +20,7 @@ use ropey::RopeSlice;
use tree_house::{
highlighter,
query_iter::QueryIter,
- tree_sitter::{
- query::{InvalidPredicateError, UserPredicate},
- Capture, Grammar, InactiveQueryCursor, InputEdit, Node, Pattern, Query, RopeInput, Tree,
- },
+ tree_sitter::{Grammar, InactiveQueryCursor, InputEdit, Node, Query, RopeInput, Tree},
Error, InjectionLanguageMarker, LanguageConfig as SyntaxConfig, Layer,
};
@@ -32,7 +28,6 @@ use crate::{indent::IndentQuery, tree_sitter, ChangeSet, Language};
pub use tree_house::{
highlighter::{Highlight, HighlightEvent},
- query_iter::QueryIterEvent,
Error as HighlighterError, LanguageLoader, TreeCursor, TREE_SITTER_MATCH_LIMIT,
};
@@ -42,8 +37,6 @@ pub struct LanguageData {
syntax: OnceCell<Option<SyntaxConfig>>,
indent_query: OnceCell<Option<IndentQuery>>,
textobject_query: OnceCell<Option<TextObjectQuery>>,
- tag_query: OnceCell<Option<TagQuery>>,
- rainbow_query: OnceCell<Option<RainbowQuery>>,
}
impl LanguageData {
@@ -53,8 +46,6 @@ impl LanguageData {
syntax: OnceCell::new(),
indent_query: OnceCell::new(),
textobject_query: OnceCell::new(),
- tag_query: OnceCell::new(),
- rainbow_query: OnceCell::new(),
}
}
@@ -90,7 +81,7 @@ impl LanguageData {
Ok(Some(config))
}
- pub fn syntax_config(&self, loader: &Loader) -> Option<&SyntaxConfig> {
+ fn syntax_config(&self, loader: &Loader) -> Option<&SyntaxConfig> {
self.syntax
.get_or_init(|| {
Self::compile_syntax_config(&self.config, loader)
@@ -163,74 +154,6 @@ impl LanguageData {
.as_ref()
}
- /// Compiles the tags.scm query for a language.
- /// This function should only be used by this module or the xtask crate.
- pub fn compile_tag_query(
- grammar: Grammar,
- config: &LanguageConfiguration,
- ) -> Result<Option<TagQuery>> {
- let name = &config.language_id;
- let text = read_query(name, "tags.scm");
- if text.is_empty() {
- return Ok(None);
- }
- let query = Query::new(grammar, &text, |_pattern, predicate| match predicate {
- // TODO: these predicates are allowed in tags.scm queries but not yet used.
- UserPredicate::IsPropertySet { key: "local", .. } => Ok(()),
- UserPredicate::Other(pred) => match pred.name() {
- "strip!" | "select-adjacent!" => Ok(()),
- _ => Err(InvalidPredicateError::unknown(predicate)),
- },
- _ => Err(InvalidPredicateError::unknown(predicate)),
- })
- .with_context(|| format!("Failed to compile tags.scm query for '{name}'"))?;
- Ok(Some(TagQuery { query }))
- }
-
- fn tag_query(&self, loader: &Loader) -> Option<&TagQuery> {
- self.tag_query
- .get_or_init(|| {
- let grammar = self.syntax_config(loader)?.grammar;
- Self::compile_tag_query(grammar, &self.config)
- .map_err(|err| {
- log::error!("{err}");
- })
- .ok()
- .flatten()
- })
- .as_ref()
- }
-
- /// Compiles the rainbows.scm query for a language.
- /// This function should only be used by this module or the xtask crate.
- pub fn compile_rainbow_query(
- grammar: Grammar,
- config: &LanguageConfiguration,
- ) -> Result<Option<RainbowQuery>> {
- let name = &config.language_id;
- let text = read_query(name, "rainbows.scm");
- if text.is_empty() {
- return Ok(None);
- }
- let rainbow_query = RainbowQuery::new(grammar, &text)
- .with_context(|| format!("Failed to compile rainbows.scm query for '{name}'"))?;
- Ok(Some(rainbow_query))
- }
-
- fn rainbow_query(&self, loader: &Loader) -> Option<&RainbowQuery> {
- self.rainbow_query
- .get_or_init(|| {
- let grammar = self.syntax_config(loader)?.grammar;
- Self::compile_rainbow_query(grammar, &self.config)
- .map_err(|err| {
- log::error!("{err}");
- })
- .ok()
- .flatten()
- })
- .as_ref()
- }
-
fn reconfigure(&self, scopes: &[String]) {
if let Some(Some(config)) = self.syntax.get() {
reconfigure_highlights(config, scopes);
@@ -238,7 +161,7 @@ impl LanguageData {
}
}
-pub fn reconfigure_highlights(config: &SyntaxConfig, recognized_names: &[String]) {
+fn reconfigure_highlights(config: &SyntaxConfig, recognized_names: &[String]) {
config.configure(move |capture_name| {
let capture_parts: Vec<_> = capture_name.split('.').collect();
@@ -416,14 +339,6 @@ impl Loader {
self.language(lang).textobject_query(self)
}
- pub fn tag_query(&self, lang: Language) -> Option<&TagQuery> {
- self.language(lang).tag_query(self)
- }
-
- fn rainbow_query(&self, lang: Language) -> Option<&RainbowQuery> {
- self.language(lang).rainbow_query(self)
- }
-
pub fn language_server_configs(&self) -> &HashMap<String, LanguageServerConfiguration> {
&self.language_server_configs
}
@@ -512,7 +427,7 @@ impl FileTypeGlobMatcher {
#[derive(Debug)]
pub struct Syntax {
- pub inner: tree_house::Syntax,
+ inner: tree_house::Syntax,
}
const PARSE_TIMEOUT: Duration = Duration::from_millis(500); // half a second is pretty generous
@@ -562,15 +477,15 @@ impl Syntax {
self.inner.tree_for_byte_range(start, end)
}
- pub fn named_descendant_for_byte_range(&self, start: u32, end: u32) -> Option<Node<'_>> {
+ pub fn named_descendant_for_byte_range(&self, start: u32, end: u32) -> Option<Node> {
self.inner.named_descendant_for_byte_range(start, end)
}
- pub fn descendant_for_byte_range(&self, start: u32, end: u32) -> Option<Node<'_>> {
+ pub fn descendant_for_byte_range(&self, start: u32, end: u32) -> Option<Node> {
self.inner.descendant_for_byte_range(start, end)
}
- pub fn walk(&self) -> TreeCursor<'_> {
+ pub fn walk(&self) -> TreeCursor {
self.inner.walk()
}
@@ -596,92 +511,6 @@ impl Syntax {
{
QueryIter::new(&self.inner, source, loader, range)
}
-
- pub fn tags<'a>(
- &'a self,
- source: RopeSlice<'a>,
- loader: &'a Loader,
- range: impl RangeBounds<u32>,
- ) -> QueryIter<'a, 'a, impl FnMut(Language) -> Option<&'a Query> + 'a, ()> {
- self.query_iter(
- source,
- |lang| loader.tag_query(lang).map(|q| &q.query),
- range,
- )
- }
-
- pub fn rainbow_highlights(
- &self,
- source: RopeSlice,
- rainbow_length: usize,
- loader: &Loader,
- range: impl RangeBounds<u32>,
- ) -> OverlayHighlights {
- struct RainbowScope<'tree> {
- end: u32,
- node: Option<Node<'tree>>,
- highlight: Highlight,
- }
-
- let mut scope_stack = Vec::<RainbowScope>::new();
- let mut highlights = Vec::new();
- let mut query_iter = self.query_iter::<_, (), _>(
- source,
- |lang| loader.rainbow_query(lang).map(|q| &q.query),
- range,
- );
-
- while let Some(event) = query_iter.next() {
- let QueryIterEvent::Match(mat) = event else {
- continue;
- };
-
- let rainbow_query = loader
- .rainbow_query(query_iter.current_language())
- .expect("language must have a rainbow query to emit matches");
-
- let byte_range = mat.node.byte_range();
- // Pop any scopes that end before this capture begins.
- while scope_stack
- .last()
- .is_some_and(|scope| byte_range.start >= scope.end)
- {
- scope_stack.pop();
- }
-
- let capture = Some(mat.capture);
- if capture == rainbow_query.scope_capture {
- scope_stack.push(RainbowScope {
- end: byte_range.end,
- node: if rainbow_query
- .include_children_patterns
- .contains(&mat.pattern)
- {
- None
- } else {
- Some(mat.node.clone())
- },
- highlight: Highlight::new((scope_stack.len() % rainbow_length) as u32),
- });
- } else if capture == rainbow_query.bracket_capture {
- if let Some(scope) = scope_stack.last() {
- if !scope
- .node
- .as_ref()
- .is_some_and(|node| mat.node.parent().as_ref() != Some(node))
- {
- let start = source
- .byte_to_char(source.floor_char_boundary(byte_range.start as usize));
- let end =
- source.byte_to_char(source.ceil_char_boundary(byte_range.end as usize));
- highlights.push((scope.highlight, start..end));
- }
- }
- }
- }
-
- OverlayHighlights::Heterogenous { highlights }
- }
}
pub type Highlighter<'a> = highlighter::Highlighter<'a, 'a, Loader>;
@@ -1052,11 +881,6 @@ impl TextObjectQuery {
}
}
-#[derive(Debug)]
-pub struct TagQuery {
- pub query: Query,
-}
-
pub fn pretty_print_tree<W: fmt::Write>(fmt: &mut W, node: Node) -> fmt::Result {
if node.child_count() == 0 {
if node_is_visible(&node) {
@@ -1073,7 +897,7 @@ fn node_is_visible(node: &Node) -> bool {
node.is_missing() || (node.is_named() && node.grammar().node_kind_is_visible(node.kind_id()))
}
-fn format_anonymous_node_kind(kind: &str) -> Cow<'_, str> {
+fn format_anonymous_node_kind(kind: &str) -> Cow<str> {
if kind.contains('"') {
Cow::Owned(kind.replace('"', "\\\""))
} else {
@@ -1129,56 +953,6 @@ fn pretty_print_tree_impl<W: fmt::Write>(
Ok(())
}
-/// Finds the child of `node` which contains the given byte range.
-pub fn child_for_byte_range<'a>(node: &Node<'a>, range: ops::Range<u32>) -> Option<Node<'a>> {
- for child in node.children() {
- let child_range = child.byte_range();
-
- if range.start >= child_range.start && range.end <= child_range.end {
- return Some(child);
- }
- }
-
- None
-}
-
-#[derive(Debug)]
-pub struct RainbowQuery {
- query: Query,
- include_children_patterns: HashSet<Pattern>,
- scope_capture: Option<Capture>,
- bracket_capture: Option<Capture>,
-}
-
-impl RainbowQuery {
- fn new(grammar: Grammar, source: &str) -> Result<Self, tree_sitter::query::ParseError> {
- let mut include_children_patterns = HashSet::default();
-
- let query = Query::new(grammar, source, |pattern, predicate| match predicate {
- UserPredicate::SetProperty {
- key: "rainbow.include-children",
- val,
- } => {
- if val.is_some() {
- return Err(
- "property 'rainbow.include-children' does not take an argument".into(),
- );
- }
- include_children_patterns.insert(pattern);
- Ok(())
- }
- _ => Err(InvalidPredicateError::unknown(predicate)),
- })?;
-
- Ok(Self {
- include_children_patterns,
- scope_capture: query.get_capture("rainbow.scope"),
- bracket_capture: query.get_capture("rainbow.bracket"),
- query,
- })
- }
-}
-
#[cfg(test)]
mod test {
use once_cell::sync::Lazy;
@@ -1203,24 +977,7 @@ mod test {
);
let language = LOADER.language_for_name("rust").unwrap();
- dbg!(language);
let grammar = LOADER.get_config(language).unwrap().grammar;
- dbg!(grammar);
- let syntax = Syntax::new(source.slice(..), language, &LOADER).unwrap();
- let mut h = syntax.highlighter(
- "fn main() { 4 + 2; }".into(),
- &LOADER,
- 0.."fn main() { 4 + 2; }".len() as u32,
- );
-
- for n in 0..5 {
- dbg!(h.active_highlights().collect::<Vec<_>>());
- dbg!(h.next_event_offset());
- let (e, h) = h.advance();
- dbg!(h.collect::<Vec<_>>(), e);
- // panic!()
- }
-
let query = Query::new(grammar, query_str, |_, _| Ok(())).unwrap();
let textobject = TextObjectQuery::new(query);
let syntax = Syntax::new(source.slice(..), language, &LOADER).unwrap();
@@ -1385,24 +1142,4 @@ mod test {
source.len(),
);
}
- #[test]
- fn highlight() {
- let source = Rope::from_str(r#"assert_eq!(0, Some(0));"#);
- let loader = crate::config::default_lang_loader();
- loader.set_scopes(vec!["punctuation".to_string()]);
- let language = loader.language_for_name("rust").unwrap();
-
- let syntax = Syntax::new(source.slice(..), language, &loader).unwrap();
- println!(
- "{}",
- tree_house::fixtures::highlighter_fixture(
- "",
- &loader,
- |_| "punct".to_string(),
- &syntax.inner,
- source.slice(..),
- ..,
- )
- );
- }
}
diff --git a/helix-core/src/syntax/config.rs b/helix-core/src/syntax/config.rs
index d2e03078..432611bb 100644
--- a/helix-core/src/syntax/config.rs
+++ b/helix-core/src/syntax/config.rs
@@ -7,7 +7,6 @@ use serde::{ser::SerializeSeq as _, Deserialize, Serialize};
use std::{
collections::{HashMap, HashSet},
fmt::{self, Display},
- num::NonZeroU8,
path::PathBuf,
str::FromStr,
};
@@ -61,8 +60,6 @@ pub struct LanguageConfiguration {
/// If set, overrides `editor.path-completion`.
pub path_completion: Option<bool>,
- /// If set, overrides `editor.word-completion`.
- pub word_completion: Option<WordCompletion>,
#[serde(default)]
pub diagnostic_severity: Severity,
@@ -101,8 +98,6 @@ pub struct LanguageConfiguration {
pub workspace_lsp_roots: Option<Vec<PathBuf>>,
#[serde(default)]
pub persistent_diagnostic_sources: Vec<String>,
- /// Overrides the `editor.rainbow-brackets` config key for the language.
- pub rainbow_brackets: Option<bool>,
}
impl LanguageConfiguration {
@@ -270,7 +265,6 @@ pub enum LanguageServerFeature {
WorkspaceSymbols,
// Symbols, use bitflags, see above?
Diagnostics,
- PullDiagnostics,
RenameSymbol,
InlayHints,
DocumentColors,
@@ -295,7 +289,6 @@ impl Display for LanguageServerFeature {
DocumentSymbols => "document-symbols",
WorkspaceSymbols => "workspace-symbols",
Diagnostics => "diagnostics",
- PullDiagnostics => "pull-diagnostics",
RenameSymbol => "rename-symbol",
InlayHints => "inlay-hints",
DocumentColors => "document-colors",
@@ -448,7 +441,6 @@ pub enum DebugArgumentValue {
String(String),
Array(Vec<String>),
Boolean(bool),
- Table(HashMap<String, String>),
}
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
@@ -580,13 +572,6 @@ pub struct SoftWrap {
pub wrap_at_text_width: Option<bool>,
}
-#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
-#[serde(default, rename_all = "kebab-case", deny_unknown_fields)]
-pub struct WordCompletion {
- pub enable: Option<bool>,
- pub trigger_length: Option<NonZeroU8>,
-}
-
fn deserialize_regex<'de, D>(deserializer: D) -> Result<Option<rope::Regex>, D::Error>
where
D: serde::Deserializer<'de>,
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index 37be2e2e..450b4736 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -19,16 +19,6 @@ pub enum Operation {
Insert(Tendril),
}
-impl Operation {
- /// The number of characters affected by the operation.
- pub fn len_chars(&self) -> usize {
- match self {
- Self::Retain(n) | Self::Delete(n) => *n,
- Self::Insert(s) => s.chars().count(),
- }
- }
-}
-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Assoc {
Before,
@@ -361,7 +351,6 @@ impl ChangeSet {
pos += s.chars().count();
}
}
- println!("=>\n{text}");
}
true
}
@@ -521,7 +510,7 @@ impl ChangeSet {
pos
}
- pub fn changes_iter(&self) -> ChangeIterator<'_> {
+ pub fn changes_iter(&self) -> ChangeIterator {
ChangeIterator::new(self)
}
}
@@ -754,7 +743,7 @@ impl Transaction {
})
}
- pub fn changes_iter(&self) -> ChangeIterator<'_> {
+ pub fn changes_iter(&self) -> ChangeIterator {
self.changes.changes_iter()
}
}
diff --git a/helix-dap/Cargo.toml b/helix-dap/Cargo.toml
index 000ea5a8..8033c757 100644
--- a/helix-dap/Cargo.toml
+++ b/helix-dap/Cargo.toml
@@ -26,7 +26,7 @@ slotmap.workspace = true
futures-executor.workspace = true
futures-util.workspace = true
tokio-stream.workspace = true
-sonic-rs.workspace = true
+
[dev-dependencies]
fern = "0.7"
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index fe4af188..e5824a7f 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -231,11 +231,7 @@ impl Client {
}
fn next_request_id(&self) -> u64 {
- // > The `seq` for the first message sent by a client or debug adapter
- // > is 1, and for each subsequent message is 1 greater than the
- // > previous message sent by that actor
- // <https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_ProtocolMessage>
- self.request_counter.fetch_add(1, Ordering::Relaxed) + 1
+ self.request_counter.fetch_add(1, Ordering::Relaxed)
}
// Internal, called by specific DAP commands when resuming
diff --git a/helix-dap/src/lib.rs b/helix-dap/src/lib.rs
index 4cb95315..16c84f66 100644
--- a/helix-dap/src/lib.rs
+++ b/helix-dap/src/lib.rs
@@ -13,7 +13,7 @@ use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("failed to parse: {0}")]
- Parse(Box<dyn std::error::Error + Send + Sync>),
+ Parse(#[from] serde_json::Error),
#[error("IO Error: {0}")]
IO(#[from] std::io::Error),
#[error("request {0} timed out")]
@@ -29,18 +29,6 @@ pub enum Error {
}
pub type Result<T> = core::result::Result<T, Error>;
-impl From<serde_json::Error> for Error {
- fn from(value: serde_json::Error) -> Self {
- Self::Parse(Box::new(value))
- }
-}
-
-impl From<sonic_rs::Error> for Error {
- fn from(value: sonic_rs::Error) -> Self {
- Self::Parse(Box::new(value))
- }
-}
-
#[derive(Debug)]
pub enum Request {
RunInTerminal(<requests::RunInTerminal as types::Request>::Arguments),
diff --git a/helix-dap/src/transport.rs b/helix-dap/src/transport.rs
index fdd60226..8ca408df 100644
--- a/helix-dap/src/transport.rs
+++ b/helix-dap/src/transport.rs
@@ -125,14 +125,12 @@ impl Transport {
info!("[{}] <- DAP {}", id, msg);
- // NOTE: We avoid using `?` here, since it would return early on error
- // and skip clearing `content`. By returning the result directly instead,
- // we ensure `content.clear()` is always called.
- let output = sonic_rs::from_slice(content).map_err(Into::into);
+ // try parsing as output (server response) or call (server request)
+ let output: serde_json::Result<Payload> = serde_json::from_str(msg);
content.clear();
- output
+ Ok(output?)
}
async fn recv_server_error(
diff --git a/helix-event/Cargo.toml b/helix-event/Cargo.toml
index ddf30b7d..41f3b483 100644
--- a/helix-event/Cargo.toml
+++ b/helix-event/Cargo.toml
@@ -13,7 +13,7 @@ homepage.workspace = true
[dependencies]
foldhash.workspace = true
-hashbrown = "0.16"
+hashbrown = "0.15"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "sync", "parking_lot", "macros"] }
# the event registry is essentially read only but must be an rwlock so we can
# setup new events on initialization, hardware-lock-elision hugely benefits this case
diff --git a/helix-loader/Cargo.toml b/helix-loader/Cargo.toml
index acbdc5d5..dcd87e3a 100644
--- a/helix-loader/Cargo.toml
+++ b/helix-loader/Cargo.toml
@@ -19,7 +19,7 @@ helix-stdx = { path = "../helix-stdx" }
anyhow = "1"
serde = { version = "1.0", features = ["derive"] }
-toml.workspace = true
+toml = "0.8"
etcetera = "0.10"
once_cell = "1.21"
log = "0.4"
diff --git a/helix-loader/src/grammar.rs b/helix-loader/src/grammar.rs
index 11ddc0e4..362d3ba0 100644
--- a/helix-loader/src/grammar.rs
+++ b/helix-loader/src/grammar.rs
@@ -213,27 +213,6 @@ fn get_grammar_configs() -> Result<Vec<GrammarConfiguration>> {
Ok(grammars)
}
-pub fn get_grammar_names() -> Result<Option<HashSet<String>>> {
- let config: Configuration = crate::config::user_lang_config()
- .context("Could not parse languages.toml")?
- .try_into()?;
-
- let grammars = match config.grammar_selection {
- Some(GrammarSelection::Only { only: selections }) => Some(selections),
- Some(GrammarSelection::Except { except: rejections }) => Some(
- config
- .grammar
- .into_iter()
- .map(|grammar| grammar.grammar_id)
- .filter(|id| !rejections.contains(id))
- .collect(),
- ),
- None => None,
- };
-
- Ok(grammars)
-}
-
fn run_parallel<F, Res>(grammars: Vec<GrammarConfiguration>, job: F) -> Vec<(String, Result<Res>)>
where
F: Fn(GrammarConfiguration) -> Result<Res> + Send + 'static + Clone,
diff --git a/helix-loader/src/lib.rs b/helix-loader/src/lib.rs
index 705e016b..54980dd7 100644
--- a/helix-loader/src/lib.rs
+++ b/helix-loader/src/lib.rs
@@ -64,6 +64,7 @@ fn prioritize_runtime_dirs() -> Vec<PathBuf> {
if let Some(dir) = std::option_env!("HELIX_DEFAULT_RUNTIME") {
rt_dirs.push(dir.into());
}
+
// fallback to location of the executable being run
// canonicalize the path in case the executable is symlinked
let exe_rt_dir = std::env::current_exe()
@@ -72,7 +73,6 @@ fn prioritize_runtime_dirs() -> Vec<PathBuf> {
.and_then(|path| path.parent().map(|path| path.to_path_buf().join(RT_DIR)))
.unwrap();
rt_dirs.push(exe_rt_dir);
- rt_dirs.push(PathBuf::from("/usr/lib/helix/runtime/"));
rt_dirs
}
@@ -244,12 +244,7 @@ pub fn merge_toml_values(left: toml::Value, right: toml::Value, merge_depth: usi
/// Otherwise (workspace, false) is returned
pub fn find_workspace() -> (PathBuf, bool) {
let current_dir = current_working_dir();
- find_workspace_in(current_dir)
-}
-
-pub fn find_workspace_in(dir: impl AsRef<Path>) -> (PathBuf, bool) {
- let dir = dir.as_ref();
- for ancestor in dir.ancestors() {
+ for ancestor in current_dir.ancestors() {
if ancestor.join(".git").exists()
|| ancestor.join(".svn").exists()
|| ancestor.join(".jj").exists()
@@ -259,7 +254,7 @@ pub fn find_workspace_in(dir: impl AsRef<Path>) -> (PathBuf, bool) {
}
}
- (dir.to_owned(), true)
+ (current_dir, true)
}
fn default_config_file() -> PathBuf {
diff --git a/helix-lsp-types/Cargo.toml b/helix-lsp-types/Cargo.toml
index 26f004b2..b7033d15 100644
--- a/helix-lsp-types/Cargo.toml
+++ b/helix-lsp-types/Cargo.toml
@@ -22,8 +22,8 @@ license = "MIT"
[dependencies]
bitflags.workspace = true
-serde = { version = "1.0.228", features = ["derive"] }
-serde_json = "1.0.145"
+serde = { version = "1.0.219", features = ["derive"] }
+serde_json = "1.0.140"
url = {version = "2.5.4", features = ["serde"]}
[features]
diff --git a/helix-lsp-types/src/code_action.rs b/helix-lsp-types/src/code_action.rs
index ed9532f0..6cc39e0d 100644
--- a/helix-lsp-types/src/code_action.rs
+++ b/helix-lsp-types/src/code_action.rs
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
use serde_json::Value;
-use std::{borrow::Cow, marker::StructuralPartialEq, ops::DerefPure};
+use std::borrow::Cow;
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum CodeActionProviderCapability {
@@ -129,7 +129,6 @@ pub struct CodeActionParams {
/// response for CodeActionRequest
pub type CodeActionResponse = Vec<CodeActionOrCommand>;
-#[allow(clippy::large_enum_variant)] // TODO: In a separate PR attempt the `Box<CodeAction>` pattern.
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
#[serde(untagged)]
pub enum CodeActionOrCommand {
@@ -149,23 +148,8 @@ impl From<CodeAction> for CodeActionOrCommand {
}
}
-#[derive(Debug, Eq, PartialOrd, Hash, Clone, Deserialize, Serialize)]
-pub struct CodeActionKind(pub Cow<'static, str>);
-
-impl std::ops::Deref for CodeActionKind {
- type Target = str;
-
- fn deref(&self) -> &Self::Target {
- self.as_str()
- }
-}
-impl PartialEq for CodeActionKind {
- fn eq(&self, other: &Self) -> bool {
- self.0 == other.0
- }
-}
-impl StructuralPartialEq for CodeActionKind {}
-unsafe impl DerefPure for CodeActionKind {}
+#[derive(Debug, Eq, PartialEq, Hash, PartialOrd, Clone, Deserialize, Serialize)]
+pub struct CodeActionKind(Cow<'static, str>);
impl CodeActionKind {
/// Empty kind.
@@ -308,9 +292,6 @@ pub struct CodeAction {
/// @since 3.16.0
#[serde(skip_serializing_if = "Option::is_none")]
pub data: Option<Value>,
-
- #[serde(skip_serializing_if = "Option::is_none")]
- pub group: Option<String>,
}
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
diff --git a/helix-lsp-types/src/completion.rs b/helix-lsp-types/src/completion.rs
index 793252de..7c006bdb 100644
--- a/helix-lsp-types/src/completion.rs
+++ b/helix-lsp-types/src/completion.rs
@@ -24,7 +24,7 @@ impl InsertTextFormat {
/// The kind of a completion entry.
#[derive(Eq, PartialEq, Clone, Copy, Serialize, Deserialize)]
#[serde(transparent)]
-pub struct CompletionItemKind(pub i32);
+pub struct CompletionItemKind(i32);
lsp_enum! {
impl CompletionItemKind {
pub const TEXT: CompletionItemKind = CompletionItemKind(1);
diff --git a/helix-lsp-types/src/document_symbols.rs b/helix-lsp-types/src/document_symbols.rs
index a88e7376..3f482e16 100644
--- a/helix-lsp-types/src/document_symbols.rs
+++ b/helix-lsp-types/src/document_symbols.rs
@@ -98,8 +98,6 @@ pub struct DocumentSymbol {
/// The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
/// Must be contained by the the `range`.
pub selection_range: Range,
- /// For sticky context. Default to selection_range.
- pub sticky_range: Option<Range>,
/// Children of this symbol, e.g. properties of a class.
#[serde(skip_serializing_if = "Option::is_none")]
pub children: Option<Vec<DocumentSymbol>>,
diff --git a/helix-lsp-types/src/lib.rs b/helix-lsp-types/src/lib.rs
index 187369ed..fd668de5 100644
--- a/helix-lsp-types/src/lib.rs
+++ b/helix-lsp-types/src/lib.rs
@@ -15,7 +15,8 @@ able to parse any URI, such as `urn:isbn:0451450523`.
*/
#![allow(non_upper_case_globals)]
-#![feature(deref_pure_trait, structural_match)]
+#![forbid(unsafe_code)]
+
use bitflags::bitflags;
use std::{collections::HashMap, fmt::Debug};
@@ -71,9 +72,6 @@ macro_rules! lsp_enum {
$(#[$attr])*
pub const $name: $enum_type = $value;
)*
- pub const ALL: &[$typ] = &[
- $($value,)+
- ];
}
impl std::fmt::Debug for $typ {
@@ -212,16 +210,6 @@ pub enum NumberOrString {
Number(i32),
String(String),
}
-impl From<i32> for NumberOrString {
- fn from(v: i32) -> Self {
- Self::Number(v)
- }
-}
-impl From<&i32> for NumberOrString {
- fn from(&v: &i32) -> Self {
- Self::Number(v)
- }
-}
/* ----------------- Cancel support ----------------- */
@@ -586,7 +574,7 @@ pub struct TextDocumentEdit {
///
/// @since 3.16.0 - support for AnnotatedTextEdit. This is guarded by the
/// client capability `workspace.workspaceEdit.changeAnnotationSupport`
- pub edits: Vec<SnippetTextEdit>,
+ pub edits: Vec<OneOf<TextEdit, AnnotatedTextEdit>>,
}
/// Additional information that describes document changes.
@@ -709,18 +697,6 @@ pub struct DeleteFile {
pub options: Option<DeleteFileOptions>,
}
-#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct SnippetTextEdit {
- pub range: Range,
- pub new_text: String,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub insert_text_format: Option<InsertTextFormat>,
- /// The annotation id if this is an annotated
- #[serde(skip_serializing_if = "Option::is_none")]
- pub annotation_id: Option<ChangeAnnotationIdentifier>,
-}
-
/// A workspace edit represents changes to many resources managed in the workspace.
/// The edit should either provide `changes` or `documentChanges`.
/// If the client can handle versioned document edits and if `documentChanges` are present,
@@ -1265,7 +1241,7 @@ pub enum FailureHandlingKind {
/// A symbol kind.
#[derive(Eq, PartialEq, Copy, Clone, Serialize, Deserialize)]
#[serde(transparent)]
-pub struct SymbolKind(pub i32);
+pub struct SymbolKind(i32);
lsp_enum! {
impl SymbolKind {
pub const FILE: SymbolKind = SymbolKind(1);
@@ -1294,19 +1270,6 @@ impl SymbolKind {
pub const EVENT: SymbolKind = SymbolKind(24);
pub const OPERATOR: SymbolKind = SymbolKind(25);
pub const TYPE_PARAMETER: SymbolKind = SymbolKind(26);
-
- pub const MACRO: SymbolKind = SymbolKind(50);
- pub const PROC_MACRO: SymbolKind = SymbolKind(51);
- pub const BUILTIN_ATTRIBUTE: SymbolKind = SymbolKind(52);
- pub const ATTRIBUTE: SymbolKind = SymbolKind(53);
- pub const DERIVE: SymbolKind = SymbolKind(54);
- pub const DERIVE_HELPER: SymbolKind = SymbolKind(55);
- pub const TYPE_ALIAS: SymbolKind = SymbolKind(56);
- pub const LOCAL: SymbolKind = SymbolKind(57);
- pub const LABEL: SymbolKind = SymbolKind(58);
- pub const LIFETIME: SymbolKind = SymbolKind(59);
- pub const VALUE: SymbolKind = SymbolKind(60);
-
}
}
@@ -2591,7 +2554,7 @@ impl PublishDiagnosticsParams {
}
}
-#[derive(Debug, Eq, PartialEq, Deserialize, Serialize, Clone, Hash)]
+#[derive(Debug, Eq, PartialEq, Deserialize, Serialize, Clone)]
#[serde(untagged)]
pub enum Documentation {
String(String),
@@ -2608,14 +2571,14 @@ pub enum Documentation {
/// <pre><code>```${language}
/// ${value}
/// ```</code></pre>
-#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize, Hash)]
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum MarkedString {
String(String),
LanguageString(LanguageString),
}
-#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize, Hash)]
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
pub struct LanguageString {
pub language: String,
pub value: String,
@@ -2734,7 +2697,7 @@ pub struct ApplyWorkspaceEditResponse {
///
/// Please note that `MarkupKinds` must not start with a `$`. This kinds
/// are reserved for internal usage.
-#[derive(Debug, Eq, PartialEq, Deserialize, Serialize, Clone, Hash)]
+#[derive(Debug, Eq, PartialEq, Deserialize, Serialize, Clone)]
#[serde(rename_all = "lowercase")]
pub enum MarkupKind {
/// Plain text is supported as a content format
@@ -2766,7 +2729,7 @@ pub enum MarkupKind {
///
/// Please *Note* that clients might sanitize the return markdown. A client could decide to
/// remove HTML from the markdown to avoid script execution.
-#[derive(Debug, Eq, PartialEq, Deserialize, Serialize, Clone, Hash)]
+#[derive(Debug, Eq, PartialEq, Deserialize, Serialize, Clone)]
pub struct MarkupContent {
pub kind: MarkupKind,
pub value: String,
diff --git a/helix-lsp-types/src/progress.rs b/helix-lsp-types/src/progress.rs
index 61552fdb..41fa74f9 100644
--- a/helix-lsp-types/src/progress.rs
+++ b/helix-lsp-types/src/progress.rs
@@ -40,6 +40,14 @@ pub struct WorkDoneProgressCancelParams {
pub token: ProgressToken,
}
+/// Options to signal work done progress support in server capabilities.
+#[derive(Debug, Eq, PartialEq, Default, Deserialize, Serialize, Clone)]
+#[serde(rename_all = "camelCase")]
+pub struct WorkDoneProgressOptions {
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub work_done_progress: Option<bool>,
+}
+
/// An optional token that a server can use to report work done progress
#[derive(Debug, Eq, PartialEq, Default, Deserialize, Serialize, Clone)]
#[serde(rename_all = "camelCase")]
diff --git a/helix-lsp-types/src/semantic_tokens.rs b/helix-lsp-types/src/semantic_tokens.rs
index b4448aa7..842558ba 100644
--- a/helix-lsp-types/src/semantic_tokens.rs
+++ b/helix-lsp-types/src/semantic_tokens.rs
@@ -153,7 +153,7 @@ pub struct SemanticToken {
}
impl SemanticToken {
- pub fn deserialize_tokens<'de, D>(deserializer: D) -> Result<Vec<SemanticToken>, D::Error>
+ fn deserialize_tokens<'de, D>(deserializer: D) -> Result<Vec<SemanticToken>, D::Error>
where
D: serde::Deserializer<'de>,
{
@@ -177,7 +177,7 @@ impl SemanticToken {
)
}
- pub fn serialize_tokens<S>(tokens: &[SemanticToken], serializer: S) -> Result<S::Ok, S::Error>
+ fn serialize_tokens<S>(tokens: &[SemanticToken], serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
@@ -192,7 +192,7 @@ impl SemanticToken {
seq.end()
}
- pub fn deserialize_tokens_opt<'de, D>(
+ fn deserialize_tokens_opt<'de, D>(
deserializer: D,
) -> Result<Option<Vec<SemanticToken>>, D::Error>
where
@@ -208,7 +208,7 @@ impl SemanticToken {
Ok(Option::<Wrapper>::deserialize(deserializer)?.map(|wrapper| wrapper.tokens))
}
- pub fn serialize_tokens_opt<S>(
+ fn serialize_tokens_opt<S>(
data: &Option<Vec<SemanticToken>>,
serializer: S,
) -> Result<S::Ok, S::Error>
diff --git a/helix-lsp-types/src/workspace_diagnostic.rs b/helix-lsp-types/src/workspace_diagnostic.rs
index c24690f0..485dcc2b 100644
--- a/helix-lsp-types/src/workspace_diagnostic.rs
+++ b/helix-lsp-types/src/workspace_diagnostic.rs
@@ -37,7 +37,7 @@ pub struct PreviousResultId {
/// Parameters of the workspace diagnostic request.
///
/// @since 3.17.0
-#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize, Default)]
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct WorkspaceDiagnosticParams {
/// The additional identifier provided during registration.
diff --git a/helix-lsp-types/src/workspace_symbols.rs b/helix-lsp-types/src/workspace_symbols.rs
index 68e78f83..9ba80895 100644
--- a/helix-lsp-types/src/workspace_symbols.rs
+++ b/helix-lsp-types/src/workspace_symbols.rs
@@ -36,8 +36,8 @@ pub struct WorkspaceSymbolClientCapabilities {
pub resolve_support: Option<WorkspaceSymbolResolveSupportCapability>,
}
+/// The parameters of a Workspace Symbol Request.
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
pub struct WorkspaceSymbolParams {
#[serde(flatten)]
pub partial_result_params: PartialResultParams,
@@ -47,24 +47,6 @@ pub struct WorkspaceSymbolParams {
/// A non-empty query string
pub query: String,
-
- pub search_scope: Option<WorkspaceSymbolSearchScope>,
-
- pub search_kind: Option<WorkspaceSymbolSearchKind>,
-}
-
-#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)]
-#[serde(rename_all = "camelCase")]
-pub enum WorkspaceSymbolSearchScope {
- Workspace,
- WorkspaceAndDependencies,
-}
-
-#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)]
-#[serde(rename_all = "camelCase")]
-pub enum WorkspaceSymbolSearchKind {
- OnlyTypes,
- AllSymbols,
}
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
diff --git a/helix-lsp/Cargo.toml b/helix-lsp/Cargo.toml
index 6156be9a..39e750ad 100644
--- a/helix-lsp/Cargo.toml
+++ b/helix-lsp/Cargo.toml
@@ -21,14 +21,13 @@ helix-lsp-types = { path = "../helix-lsp-types" }
anyhow = "1.0"
futures-executor.workspace = true
futures-util.workspace = true
-globset.workspace = true
+globset = "0.4.16"
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
-tokio = { version = "1.48", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "sync"] }
+tokio = { version = "1.45", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "sync"] }
tokio-stream.workspace = true
parking_lot.workspace = true
arc-swap = "1"
slotmap.workspace = true
thiserror.workspace = true
-sonic-rs.workspace = true
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index 22a8dd89..afb3b3a5 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -372,7 +372,6 @@ impl Client {
Some(OneOf::Left(true) | OneOf::Right(_))
),
LanguageServerFeature::Diagnostics => true, // there's no extra server capability
- LanguageServerFeature::PullDiagnostics => capabilities.diagnostic_provider.is_some(),
LanguageServerFeature::RenameSymbol => matches!(
capabilities.rename_provider,
Some(OneOf::Left(true)) | Some(OneOf::Right(_))
@@ -603,9 +602,6 @@ impl Client {
did_rename: Some(true),
..Default::default()
}),
- diagnostic: Some(lsp::DiagnosticWorkspaceClientCapabilities {
- refresh_support: Some(true),
- }),
..Default::default()
}),
text_document: Some(lsp::TextDocumentClientCapabilities {
@@ -683,10 +679,6 @@ impl Client {
}),
..Default::default()
}),
- diagnostic: Some(lsp::DiagnosticClientCapabilities {
- dynamic_registration: Some(false),
- related_document_support: Some(true),
- }),
publish_diagnostics: Some(lsp::PublishDiagnosticsClientCapabilities {
version_support: Some(true),
tag_support: Some(lsp::TagSupport {
@@ -1237,32 +1229,6 @@ impl Client {
Some(self.call::<lsp::request::RangeFormatting>(params))
}
- pub fn text_document_diagnostic(
- &self,
- text_document: lsp::TextDocumentIdentifier,
- previous_result_id: Option<String>,
- ) -> Option<impl Future<Output = Result<lsp::DocumentDiagnosticReportResult>>> {
- let capabilities = self.capabilities();
-
- // Return early if the server does not support pull diagnostic.
- let identifier = match capabilities.diagnostic_provider.as_ref()? {
- lsp::DiagnosticServerCapabilities::Options(cap) => cap.identifier.clone(),
- lsp::DiagnosticServerCapabilities::RegistrationOptions(cap) => {
- cap.diagnostic_options.identifier.clone()
- }
- };
-
- let params = lsp::DocumentDiagnosticParams {
- text_document,
- identifier,
- previous_result_id,
- work_done_progress_params: lsp::WorkDoneProgressParams::default(),
- partial_result_params: lsp::PartialResultParams::default(),
- };
-
- Some(self.call::<lsp::request::DocumentDiagnosticRequest>(params))
- }
-
pub fn text_document_document_highlight(
&self,
text_document: lsp::TextDocumentIdentifier,
@@ -1503,7 +1469,6 @@ impl Client {
query,
work_done_progress_params: lsp::WorkDoneProgressParams::default(),
partial_result_params: lsp::PartialResultParams::default(),
- ..Default::default()
};
Some(self.call::<lsp::request::WorkspaceSymbolRequest>(params))
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 259980dd..567e8a70 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -37,7 +37,7 @@ pub enum Error {
#[error("protocol error: {0}")]
Rpc(#[from] jsonrpc::Error),
#[error("failed to parse: {0}")]
- Parse(Box<dyn std::error::Error + Send + Sync>),
+ Parse(#[from] serde_json::Error),
#[error("IO Error: {0}")]
IO(#[from] std::io::Error),
#[error("request {0} timed out")]
@@ -52,18 +52,6 @@ pub enum Error {
Other(#[from] anyhow::Error),
}
-impl From<serde_json::Error> for Error {
- fn from(value: serde_json::Error) -> Self {
- Self::Parse(Box::new(value))
- }
-}
-
-impl From<sonic_rs::Error> for Error {
- fn from(value: sonic_rs::Error) -> Self {
- Self::Parse(Box::new(value))
- }
-}
-
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum OffsetEncoding {
/// UTF-8 code units aka bytes
@@ -475,7 +463,6 @@ pub enum MethodCall {
RegisterCapability(lsp::RegistrationParams),
UnregisterCapability(lsp::UnregistrationParams),
ShowDocument(lsp::ShowDocumentParams),
- WorkspaceDiagnosticRefresh,
}
impl MethodCall {
@@ -507,7 +494,6 @@ impl MethodCall {
let params: lsp::ShowDocumentParams = params.parse()?;
Self::ShowDocument(params)
}
- lsp::request::WorkspaceDiagnosticRefresh::METHOD => Self::WorkspaceDiagnosticRefresh,
_ => {
return Err(Error::Unhandled);
}
@@ -1082,103 +1068,4 @@ mod tests {
assert!(transaction.apply(&mut source));
assert_eq!(source, "[\n \"🇺🇸\",\n \"🎄\",\n]");
}
- #[test]
- fn rahh() {
- use helix_lsp_types::*;
- let th = [
- TextEdit {
- range: Range {
- start: Position {
- line: 1,
- character: 0,
- },
- end: Position {
- line: 1,
- character: 4,
- },
- },
- new_text: "".into(),
- },
- TextEdit {
- range: Range {
- start: Position {
- line: 2,
- character: 0,
- },
- end: Position {
- line: 3,
- character: 1,
- },
- },
- new_text: "".into(),
- },
- TextEdit {
- range: Range {
- start: Position {
- line: 3,
- character: 9,
- },
- end: Position {
- line: 3,
- character: 9,
- },
- },
- new_text: "let new =\n".into(),
- },
- TextEdit {
- range: Range {
- start: Position {
- line: 3,
- character: 20,
- },
- end: Position {
- line: 3,
- character: 29,
- },
- },
- new_text: "".into(),
- },
- TextEdit {
- range: Range {
- start: Position {
- line: 3,
- character: 56,
- },
- end: Position {
- line: 4,
- character: 24,
- },
- },
- new_text: "".into(),
- },
- TextEdit {
- range: Range {
- start: Position {
- line: 6,
- character: 1,
- },
- end: Position {
- line: 6,
- character: 1,
- },
- },
- new_text: "\n".into(),
- },
- ];
- let mut source = Rope::from_str(
- "impl Editor { // 0
- pub fn open(f: &Path) { // 1
-// 2
- let new = std::fs::read_to_string(f) // 3
- .map_err(anyhow::Error::from)?; // 4
- }
-}",
- );
- println!("{}", source);
-
- let transaction =
- generate_transaction_from_edits(&source, th.to_vec(), OffsetEncoding::Utf8);
- assert!(transaction.apply(&mut source));
- println!("{}", source);
- }
}
diff --git a/helix-lsp/src/transport.rs b/helix-lsp/src/transport.rs
index fa4966c4..088c617b 100644
--- a/helix-lsp/src/transport.rs
+++ b/helix-lsp/src/transport.rs
@@ -98,7 +98,7 @@ impl Transport {
buffer.clear();
if reader.read_line(buffer).await? == 0 {
return Err(Error::StreamClosed);
- }
+ };
// debug!("<- header {:?}", buffer);
@@ -133,14 +133,12 @@ impl Transport {
info!("{language_server_name} <- {msg}");
- // NOTE: We avoid using `?` here, since it would return early on error
- // and skip clearing `content`. By returning the result directly instead,
- // we ensure `content.clear()` is always called.
- let output = sonic_rs::from_slice(content).map_err(Into::into);
+ // try parsing as output (server response) or call (server request)
+ let output: serde_json::Result<ServerMessage> = serde_json::from_str(msg);
content.clear();
- output
+ Ok(output?)
}
async fn recv_server_error(
diff --git a/helix-stdx/Cargo.toml b/helix-stdx/Cargo.toml
index 66d02925..cf0dc03f 100644
--- a/helix-stdx/Cargo.toml
+++ b/helix-stdx/Cargo.toml
@@ -19,14 +19,14 @@ which = "8.0"
regex-cursor = "0.1.5"
bitflags.workspace = true
once_cell = "1.21"
-regex-automata = "0.4.10"
+regex-automata = "0.4.9"
unicode-segmentation.workspace = true
[target.'cfg(windows)'.dependencies]
-windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Threading"] }
+windows-sys = { version = "0.60", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Threading"] }
[target.'cfg(unix)'.dependencies]
-rustix = { version = "1.1", features = ["fs"] }
+rustix = { version = "1.0", features = ["fs"] }
[dev-dependencies]
tempfile.workspace = true
diff --git a/helix-stdx/src/env.rs b/helix-stdx/src/env.rs
index 9e7781a0..b3f46c25 100644
--- a/helix-stdx/src/env.rs
+++ b/helix-stdx/src/env.rs
@@ -1,4 +1,3 @@
-//! Functions for working with the host environment.
use std::{
borrow::Cow,
ffi::{OsStr, OsString},
@@ -11,9 +10,9 @@ use once_cell::sync::Lazy;
// We keep the CWD as a static so that we can access it in places where we don't have access to the Editor
static CWD: RwLock<Option<PathBuf>> = RwLock::new(None);
-/// Get the current working directory.
-/// This information is managed internally as the call to std::env::current_dir
-/// might fail if the cwd has been deleted.
+// Get the current working directory.
+// This information is managed internally as the call to std::env::current_dir
+// might fail if the cwd has been deleted.
pub fn current_working_dir() -> PathBuf {
if let Some(path) = &*CWD.read().unwrap() {
return path.clone();
@@ -38,7 +37,6 @@ pub fn current_working_dir() -> PathBuf {
cwd
}
-/// Update the current working directory.
pub fn set_current_working_dir(path: impl AsRef<Path>) -> std::io::Result<Option<PathBuf>> {
let path = crate::path::canonicalize(path);
std::env::set_current_dir(&path)?;
@@ -47,17 +45,14 @@ pub fn set_current_working_dir(path: impl AsRef<Path>) -> std::io::Result<Option
Ok(cwd.replace(path))
}
-/// Checks if the given environment variable is set.
pub fn env_var_is_set(env_var_name: &str) -> bool {
std::env::var_os(env_var_name).is_some()
}
-/// Checks if a binary with the given name exists.
pub fn binary_exists<T: AsRef<OsStr>>(binary_name: T) -> bool {
which::which(binary_name).is_ok()
}
-/// Attempts to find a binary of the given name. See [which](https://linux.die.net/man/1/which).
pub fn which<T: AsRef<OsStr>>(
binary_name: T,
) -> Result<std::path::PathBuf, ExecutableNotFoundError> {
@@ -85,7 +80,7 @@ fn find_brace_end(src: &[u8]) -> Option<usize> {
None
}
-fn expand_impl(src: &OsStr, mut resolve: impl FnMut(&OsStr) -> Option<OsString>) -> Cow<'_, OsStr> {
+fn expand_impl(src: &OsStr, mut resolve: impl FnMut(&OsStr) -> Option<OsString>) -> Cow<OsStr> {
use regex_automata::meta::Regex;
static REGEX: Lazy<Regex> = Lazy::new(|| {
@@ -157,7 +152,7 @@ fn expand_impl(src: &OsStr, mut resolve: impl FnMut(&OsStr) -> Option<OsString>)
/// * `${<var>:-<default>}`, `${<var>-<default>}`
/// * `${<var>:=<default>}`, `${<var>=default}`
///
-pub fn expand<S: AsRef<OsStr> + ?Sized>(src: &S) -> Cow<'_, OsStr> {
+pub fn expand<S: AsRef<OsStr> + ?Sized>(src: &S) -> Cow<OsStr> {
expand_impl(src.as_ref(), |var| std::env::var_os(var))
}
diff --git a/helix-stdx/src/faccess.rs b/helix-stdx/src/faccess.rs
index b98ae153..80b668b1 100644
--- a/helix-stdx/src/faccess.rs
+++ b/helix-stdx/src/faccess.rs
@@ -1,4 +1,3 @@
-//! Functions for managine file metadata.
//! From <https://github.com/Freaky/faccess>
use std::io;
@@ -71,16 +70,6 @@ mod imp {
perms.set_mode(new_perms);
}
- #[cfg(target_os = "macos")]
- {
- use std::fs::{File, FileTimes};
- use std::os::macos::fs::FileTimesExt;
-
- let to_file = File::options().write(true).open(to)?;
- let times = FileTimes::new().set_created(from_meta.created()?);
- to_file.set_times(times)?;
- }
-
std::fs::set_permissions(to, perms)?;
Ok(())
@@ -119,13 +108,7 @@ mod imp {
use std::ffi::c_void;
- use std::os::windows::{
- ffi::OsStrExt,
- fs::{FileTimesExt, OpenOptionsExt},
- io::AsRawHandle,
- };
-
- use std::fs::{File, FileTimes};
+ use std::os::windows::{ffi::OsStrExt, fs::OpenOptionsExt, io::AsRawHandle};
struct SecurityDescriptor {
sd: PSECURITY_DESCRIPTOR,
@@ -429,10 +412,6 @@ mod imp {
let meta = std::fs::metadata(from)?;
let perms = meta.permissions();
- let to_file = File::options().write(true).open(to)?;
- let times = FileTimes::new().set_created(meta.created()?);
- to_file.set_times(times)?;
-
std::fs::set_permissions(to, perms)?;
Ok(())
diff --git a/helix-stdx/src/lib.rs b/helix-stdx/src/lib.rs
index e371f392..d09df587 100644
--- a/helix-stdx/src/lib.rs
+++ b/helix-stdx/src/lib.rs
@@ -1,6 +1,3 @@
-//! Extensions to the standard library. A collection of helper functions
-//! used throughout helix.
-
pub mod env;
pub mod faccess;
pub mod path;
diff --git a/helix-stdx/src/path.rs b/helix-stdx/src/path.rs
index 740f7bcb..53081b0f 100644
--- a/helix-stdx/src/path.rs
+++ b/helix-stdx/src/path.rs
@@ -1,5 +1,3 @@
-//! Functions for working with [Path].
-
pub use etcetera::home_dir;
use once_cell::sync::Lazy;
use regex_cursor::{engines::meta::Regex, Input};
@@ -142,7 +140,6 @@ pub fn canonicalize(path: impl AsRef<Path>) -> PathBuf {
normalize(path)
}
-/// Convert path into a relative path
pub fn get_relative_path<'a, P>(path: P) -> Cow<'a, Path>
where
P: Into<Cow<'a, Path>>,
diff --git a/helix-stdx/src/range.rs b/helix-stdx/src/range.rs
index dcf7bfc2..0b241199 100644
--- a/helix-stdx/src/range.rs
+++ b/helix-stdx/src/range.rs
@@ -1,5 +1,3 @@
-//! Provides [Range] type expanding on [RangeBounds].
-
use std::ops::{self, RangeBounds};
/// A range of `char`s within the text.
@@ -68,7 +66,6 @@ pub fn is_subset<const ALLOW_EMPTY: bool>(
}
}
-/// Similar to is_subset but requires each element of `super_set` to be matched
pub fn is_exact_subset(
mut super_set: impl Iterator<Item = Range>,
mut sub_set: impl Iterator<Item = Range>,
diff --git a/helix-stdx/src/rope.rs b/helix-stdx/src/rope.rs
index 1ba4bc53..996fee31 100644
--- a/helix-stdx/src/rope.rs
+++ b/helix-stdx/src/rope.rs
@@ -1,4 +1,3 @@
-//! Functions and types for working with [RopeSlice]
use std::fmt;
use std::ops::{Bound, RangeBounds};
@@ -9,7 +8,6 @@ use ropey::iter::Chunks;
use ropey::RopeSlice;
use unicode_segmentation::{GraphemeCursor, GraphemeIncomplete};
-/// Additional utility functions for [RopeSlice]
pub trait RopeSliceExt<'a>: Sized {
fn ends_with(self, text: &str) -> bool;
fn starts_with(self, text: &str) -> bool;
diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml
index ab9f166b..cf3c4b47 100644
--- a/helix-term/Cargo.toml
+++ b/helix-term/Cargo.toml
@@ -54,14 +54,14 @@ anyhow = "1"
once_cell = "1.21"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] }
-tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["termina", "crossterm"] }
-termina = { workspace = true, features = ["event-stream"] }
+tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["crossterm"] }
+crossterm = { version = "0.28", features = ["event-stream"] }
signal-hook = "0.3"
tokio-stream = "0.1"
futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
arc-swap = { version = "1.7.1" }
termini = "1"
-indexmap = "2.12"
+indexmap = "2.9"
# Logging
fern = "0.7"
@@ -70,11 +70,7 @@ log = "0.4"
# File picker
nucleo.workspace = true
-# MSRV: update once the MSRV is >=1.85
-ignore = "=0.4.23"
-grep-regex = "=0.1.13"
-grep-searcher = "=0.1.14"
-grep-matcher = "=0.1.7"
+ignore = "0.4"
# markdown doc rendering
pulldown-cmark = { version = "0.13", default-features = false }
# file type detection
@@ -86,20 +82,21 @@ open = "5.3.2"
url = "2.5.4"
# config
-toml.workspace = true
+toml = "0.8"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
-dashmap = "6.0"
-tree-house = { workspace = true, features = ["fixtures"] }
-
-[target.'cfg(windows)'.dependencies]
-crossterm = { version = "0.28", features = ["event-stream"] }
+# ripgrep for global search
+grep-regex = "0.1.13"
+grep-searcher = "0.1.14"
[target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }
-libc = "0.2.177"
+libc = "0.2.174"
+
+[target.'cfg(target_os = "macos")'.dependencies]
+crossterm = { version = "0.28", features = ["event-stream", "use-dev-tty", "libc"] }
[build-dependencies]
helix-loader = { path = "../helix-loader" }
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 8c1db649..17b58420 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -30,41 +30,32 @@ use crate::{
};
use log::{debug, error, info, warn};
-use std::{
- io::{stdin, IsTerminal},
- path::Path,
- sync::Arc,
-};
+#[cfg(not(feature = "integration"))]
+use std::io::stdout;
+use std::{io::stdin, path::Path, sync::Arc};
-#[cfg_attr(windows, allow(unused_imports))]
-use anyhow::{Context, Error};
+#[cfg(not(windows))]
+use anyhow::Context;
+use anyhow::Error;
+use crossterm::{event::Event as CrosstermEvent, tty::IsTty};
#[cfg(not(windows))]
use {signal_hook::consts::signal, signal_hook_tokio::Signals};
#[cfg(windows)]
type Signals = futures_util::stream::Empty<()>;
-#[cfg(all(not(windows), not(feature = "integration")))]
-use tui::backend::TerminaBackend;
-
-#[cfg(all(windows, not(feature = "integration")))]
+#[cfg(not(feature = "integration"))]
use tui::backend::CrosstermBackend;
#[cfg(feature = "integration")]
use tui::backend::TestBackend;
-#[cfg(all(not(windows), not(feature = "integration")))]
-type TerminalBackend = TerminaBackend;
-#[cfg(all(windows, not(feature = "integration")))]
+#[cfg(not(feature = "integration"))]
type TerminalBackend = CrosstermBackend<std::io::Stdout>;
+
#[cfg(feature = "integration")]
type TerminalBackend = TestBackend;
-#[cfg(not(windows))]
-type TerminalEvent = termina::Event;
-#[cfg(windows)]
-type TerminalEvent = crossterm::event::Event;
-
type Terminal = tui::terminal::Terminal<TerminalBackend>;
pub struct Application {
@@ -77,8 +68,6 @@ pub struct Application {
signals: Signals,
jobs: Jobs,
lsp_progress: LspProgressMap,
-
- theme_mode: Option<theme::Mode>,
}
#[cfg(feature = "integration")]
@@ -114,18 +103,14 @@ impl Application {
theme_parent_dirs.extend(helix_loader::runtime_dirs().iter().cloned());
let theme_loader = theme::Loader::new(&theme_parent_dirs);
- #[cfg(all(not(windows), not(feature = "integration")))]
- let backend = TerminaBackend::new((&config.editor).into())
- .context("failed to create terminal backend")?;
- #[cfg(all(windows, not(feature = "integration")))]
- let backend = CrosstermBackend::new(std::io::stdout(), (&config.editor).into());
+ #[cfg(not(feature = "integration"))]
+ let backend = CrosstermBackend::new(stdout(), &config.editor);
#[cfg(feature = "integration")]
let backend = TestBackend::new(120, 150);
- let theme_mode = backend.get_theme_mode();
let terminal = Terminal::new(backend)?;
- let area = terminal.size();
+ let area = terminal.size().expect("couldn't get terminal size");
let mut compositor = Compositor::new(area);
let config = Arc::new(ArcSwap::from_pointee(config));
let handlers = handlers::setup(config.clone());
@@ -138,12 +123,7 @@ impl Application {
})),
handlers,
);
- Self::load_configured_theme(
- &mut editor,
- &config.load(),
- terminal.backend().supports_true_color(),
- theme_mode,
- );
+ Self::load_configured_theme(&mut editor, &config.load());
let keys = Box::new(Map::new(Arc::clone(&config), |config: &Config| {
&config.keys
@@ -234,7 +214,7 @@ impl Application {
} else {
editor.new_file(Action::VerticalSplit);
}
- } else if stdin().is_terminal() || cfg!(feature = "integration") {
+ } else if stdin().is_tty() || cfg!(feature = "integration") {
editor.new_file(Action::VerticalSplit);
} else {
editor
@@ -262,7 +242,6 @@ impl Application {
signals,
jobs: Jobs::new(),
lsp_progress: LspProgressMap::new(),
- theme_mode,
};
Ok(app)
@@ -303,7 +282,7 @@ impl Application {
pub async fn event_loop<S>(&mut self, input_stream: &mut S)
where
- S: Stream<Item = std::io::Result<TerminalEvent>> + Unpin,
+ S: Stream<Item = std::io::Result<crossterm::event::Event>> + Unpin,
{
self.render().await;
@@ -316,7 +295,7 @@ impl Application {
pub async fn event_loop_until_idle<S>(&mut self, input_stream: &mut S) -> bool
where
- S: Stream<Item = std::io::Result<TerminalEvent>> + Unpin,
+ S: Stream<Item = std::io::Result<crossterm::event::Event>> + Unpin,
{
loop {
if self.editor.should_close() {
@@ -388,7 +367,7 @@ impl Application {
ConfigEvent::Update(editor_config) => {
let mut app_config = (*self.config.load().clone()).clone();
app_config.editor = *editor_config;
- if let Err(err) = self.terminal.reconfigure((&app_config.editor).into()) {
+ if let Err(err) = self.terminal.reconfigure(app_config.editor.clone().into()) {
self.editor.set_error(err.to_string());
};
self.config.store(Arc::new(app_config));
@@ -417,18 +396,11 @@ impl Application {
// the sake of locals highlighting.
let lang_loader = helix_core::config::user_lang_loader()?;
self.editor.syn_loader.store(Arc::new(lang_loader));
- Self::load_configured_theme(
- &mut self.editor,
- &default_config,
- self.terminal.backend().supports_true_color(),
- self.theme_mode,
- );
+ Self::load_configured_theme(&mut self.editor, &default_config);
// Re-parse any open documents with the new language config.
let lang_loader = self.editor.syn_loader.load();
for document in self.editor.documents.values_mut() {
- // Re-detect .editorconfig
- document.detect_editor_config();
document.detect_language(&lang_loader);
let diagnostics = Editor::doc_diagnostics(
&self.editor.language_servers,
@@ -438,7 +410,8 @@ impl Application {
document.replace_diagnostics(diagnostics, &[], None);
}
- self.terminal.reconfigure((&default_config.editor).into())?;
+ self.terminal
+ .reconfigure(default_config.editor.clone().into())?;
// Store new config
self.config.store(Arc::new(default_config));
Ok(())
@@ -455,18 +428,12 @@ impl Application {
}
/// Load the theme set in configuration
- fn load_configured_theme(
- editor: &mut Editor,
- config: &Config,
- terminal_true_color: bool,
- mode: Option<theme::Mode>,
- ) {
- let true_color = terminal_true_color || config.editor.true_color || crate::true_color();
+ fn load_configured_theme(editor: &mut Editor, config: &Config) {
+ let true_color = config.editor.true_color || crate::true_color();
let theme = config
.theme
.as_ref()
- .and_then(|theme_config| {
- let theme = theme_config.choose(mode);
+ .and_then(|theme| {
editor
.theme_loader
.load(theme)
@@ -534,7 +501,7 @@ impl Application {
// https://github.com/neovim/neovim/issues/12322
// https://github.com/neovim/neovim/pull/13084
for retries in 1..=10 {
- match self.terminal.claim() {
+ match self.claim_term().await {
Ok(()) => break,
Err(err) if retries == 10 => panic!("Failed to claim terminal: {}", err),
Err(_) => continue,
@@ -542,7 +509,7 @@ impl Application {
}
// redraw the terminal
- let area = self.terminal.size();
+ let area = self.terminal.size().expect("couldn't get terminal size");
self.compositor.resize(area);
self.terminal.clear().expect("couldn't clear terminal");
@@ -604,41 +571,24 @@ impl Application {
doc.set_last_saved_revision(doc_save_event.revision, doc_save_event.save_time);
let lines = doc_save_event.text.len_lines();
- let size = doc_save_event.text.len_bytes();
+ let mut sz = doc_save_event.text.len_bytes() as f32;
- enum Size {
- Bytes(u16),
- HumanReadable(f32, &'static str),
+ const SUFFIX: [&str; 4] = ["B", "KiB", "MiB", "GiB"];
+ let mut i = 0;
+ while i < SUFFIX.len() - 1 && sz >= 1024.0 {
+ sz /= 1024.0;
+ i += 1;
}
- impl std::fmt::Display for Size {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- Self::Bytes(bytes) => write!(f, "{bytes}B"),
- Self::HumanReadable(size, suffix) => write!(f, "{size:.1}{suffix}"),
- }
- }
- }
-
- let size = if size < 1024 {
- Size::Bytes(size as u16)
- } else {
- const SUFFIX: [&str; 4] = ["B", "KiB", "MiB", "GiB"];
- let mut size = size as f32;
- let mut i = 0;
- while i < SUFFIX.len() - 1 && size >= 1024.0 {
- size /= 1024.0;
- i += 1;
- }
- Size::HumanReadable(size, SUFFIX[i])
- };
-
self.editor
.set_doc_path(doc_save_event.doc_id, &doc_save_event.path);
// TODO: fix being overwritten by lsp
self.editor.set_status(format!(
- "'{}' written, {lines}L {size}",
+ "'{}' written, {}L {:.1}{}",
get_relative_path(&doc_save_event.path).to_string_lossy(),
+ lines,
+ sz,
+ SUFFIX[i],
));
}
@@ -683,10 +633,7 @@ impl Application {
false
}
- pub async fn handle_terminal_events(&mut self, event: std::io::Result<TerminalEvent>) {
- #[cfg(not(windows))]
- use termina::escape::csi;
-
+ pub async fn handle_terminal_events(&mut self, event: std::io::Result<CrosstermEvent>) {
let mut cx = crate::compositor::Context {
editor: &mut self.editor,
jobs: &mut self.jobs,
@@ -694,51 +641,20 @@ impl Application {
};
// Handle key events
let should_redraw = match event.unwrap() {
- #[cfg(not(windows))]
- termina::Event::WindowResized(termina::WindowSize { rows, cols, .. }) => {
- self.terminal
- .resize(Rect::new(0, 0, cols, rows))
- .expect("Unable to resize terminal");
-
- let area = self.terminal.size();
-
- self.compositor.resize(area);
-
- self.compositor
- .handle_event(&Event::Resize(cols, rows), &mut cx)
- }
- #[cfg(not(windows))]
- // Ignore keyboard release events.
- termina::Event::Key(termina::event::KeyEvent {
- kind: termina::event::KeyEventKind::Release,
- ..
- }) => false,
- #[cfg(not(windows))]
- termina::Event::Csi(csi::Csi::Mode(csi::Mode::ReportTheme(mode))) => {
- Self::load_configured_theme(
- &mut self.editor,
- &self.config.load(),
- self.terminal.backend().supports_true_color(),
- Some(mode.into()),
- );
- true
- }
- #[cfg(windows)]
- TerminalEvent::Resize(width, height) => {
+ CrosstermEvent::Resize(width, height) => {
self.terminal
.resize(Rect::new(0, 0, width, height))
.expect("Unable to resize terminal");
- let area = self.terminal.size();
+ let area = self.terminal.size().expect("couldn't get terminal size");
self.compositor.resize(area);
self.compositor
.handle_event(&Event::Resize(width, height), &mut cx)
}
- #[cfg(windows)]
// Ignore keyboard release events.
- crossterm::event::Event::Key(crossterm::event::KeyEvent {
+ CrosstermEvent::Key(crossterm::event::KeyEvent {
kind: crossterm::event::KeyEventKind::Release,
..
}) => false,
@@ -1103,26 +1019,6 @@ impl Application {
let result = self.handle_show_document(params, offset_encoding);
Ok(json!(result))
}
- Ok(MethodCall::WorkspaceDiagnosticRefresh) => {
- let language_server = language_server!().id();
-
- let documents: Vec<_> = self
- .editor
- .documents
- .values()
- .filter(|x| x.supports_language_server(language_server))
- .map(|x| x.id())
- .collect();
-
- for document in documents {
- handlers::diagnostics::request_document_diagnostics(
- &mut self.editor,
- document,
- );
- }
-
- Ok(serde_json::Value::Null)
- }
};
let language_server = language_server!();
@@ -1201,60 +1097,36 @@ impl Application {
lsp::ShowDocumentResult { success: true }
}
+ async fn claim_term(&mut self) -> std::io::Result<()> {
+ let terminal_config = self.config.load().editor.clone().into();
+ self.terminal.claim(terminal_config)
+ }
+
fn restore_term(&mut self) -> std::io::Result<()> {
+ let terminal_config = self.config.load().editor.clone().into();
use helix_view::graphics::CursorKind;
self.terminal
.backend_mut()
.show_cursor(CursorKind::Block)
.ok();
- self.terminal.restore()
- }
-
- #[cfg(all(not(feature = "integration"), not(windows)))]
- pub fn event_stream(&self) -> impl Stream<Item = std::io::Result<TerminalEvent>> + Unpin {
- use termina::{escape::csi, Terminal as _};
- let reader = self.terminal.backend().terminal().event_reader();
- termina::EventStream::new(reader, |event| {
- // Accept either non-escape sequences or theme mode updates.
- !event.is_escape()
- || matches!(
- event,
- termina::Event::Csi(csi::Csi::Mode(csi::Mode::ReportTheme(_)))
- )
- })
- }
-
- #[cfg(all(not(feature = "integration"), windows))]
- pub fn event_stream(&self) -> impl Stream<Item = std::io::Result<TerminalEvent>> + Unpin {
- crossterm::event::EventStream::new()
- }
-
- #[cfg(feature = "integration")]
- pub fn event_stream(&self) -> impl Stream<Item = std::io::Result<TerminalEvent>> + Unpin {
- use std::{
- pin::Pin,
- task::{Context, Poll},
- };
-
- /// A dummy stream that never polls as ready.
- pub struct DummyEventStream;
-
- impl Stream for DummyEventStream {
- type Item = std::io::Result<TerminalEvent>;
-
- fn poll_next(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
- Poll::Pending
- }
- }
-
- DummyEventStream
+ self.terminal.restore(terminal_config)
}
pub async fn run<S>(&mut self, input_stream: &mut S) -> Result<i32, Error>
where
- S: Stream<Item = std::io::Result<TerminalEvent>> + Unpin,
+ S: Stream<Item = std::io::Result<crossterm::event::Event>> + Unpin,
{
- self.terminal.claim()?;
+ self.claim_term().await?;
+
+ // Exit the alternate screen and disable raw mode before panicking
+ let hook = std::panic::take_hook();
+ std::panic::set_hook(Box::new(move |info| {
+ // We can't handle errors properly inside this closure. And it's
+ // probably not a good idea to `unwrap()` inside a panic handler.
+ // So we just ignore the `Result`.
+ let _ = TerminalBackend::force_restore();
+ hook(info);
+ }));
self.event_loop(input_stream).await;
diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs
index 090c1192..9b1b4409 100644
--- a/helix-term/src/args.rs
+++ b/helix-term/src/args.rs
@@ -102,7 +102,6 @@ impl Args {
}
}
}
- "+" => line_number = usize::MAX,
arg if arg.starts_with('+') => {
match arg[1..].parse::<usize>() {
Ok(n) => line_number = n.saturating_sub(1),
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 430d4430..2cbdeb45 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1,6 +1,5 @@
pub(crate) mod dap;
pub(crate) mod lsp;
-pub(crate) mod syntax;
pub(crate) mod typed;
pub use dap::*;
@@ -12,7 +11,6 @@ use helix_stdx::{
};
use helix_vcs::{FileChange, Hunk};
pub use lsp::*;
-pub use syntax::*;
use tui::{
text::{Span, Spans},
widgets::Cell,
@@ -22,8 +20,7 @@ pub use typed::*;
use helix_core::{
char_idx_at_visual_offset,
chars::char_is_word,
- command_line::{self, Args},
- comment,
+ command_line, comment,
doc_formatter::TextFormat,
encoding, find_workspace,
graphemes::{self, next_grapheme_boundary},
@@ -47,7 +44,6 @@ use helix_core::{
use helix_view::{
document::{FormatterError, Mode, SCRATCH_BUFFER_NAME},
editor::Action,
- expansion,
info::Info,
input::KeyEvent,
keyboard::KeyCode,
@@ -409,13 +405,9 @@ impl MappableCommand {
buffer_picker, "Open buffer picker",
jumplist_picker, "Open jumplist picker",
symbol_picker, "Open symbol picker",
- syntax_symbol_picker, "Open symbol picker from syntax information",
- lsp_or_syntax_symbol_picker, "Open symbol picker from LSP or syntax information",
changed_file_picker, "Open changed file picker",
select_references_to_symbol_under_cursor, "Select symbol references",
workspace_symbol_picker, "Open workspace symbol picker",
- syntax_workspace_symbol_picker, "Open workspace symbol picker from syntax information",
- lsp_or_syntax_workspace_symbol_picker, "Open workspace symbol picker from LSP or syntax information",
diagnostics_picker, "Open diagnostic picker",
workspace_diagnostics_picker, "Open workspace diagnostic picker",
last_picker, "Open last picker",
@@ -474,8 +466,6 @@ impl MappableCommand {
smart_tab, "Insert tab if all cursors have all whitespace to their left; otherwise, run a separate command.",
insert_tab, "Insert tab char",
insert_newline, "Insert newline char",
- insert_char_interactive, "Insert an interactively-chosen char",
- append_char_interactive, "Append an interactively-chosen char",
delete_char_backward, "Delete previous char",
delete_char_forward, "Delete next char",
delete_word_backward, "Delete previous word",
@@ -575,8 +565,6 @@ impl MappableCommand {
goto_prev_comment, "Goto previous comment",
goto_next_test, "Goto next test",
goto_prev_test, "Goto previous test",
- goto_next_xml_element, "Goto next (X)HTML element",
- goto_prev_xml_element, "Goto previous (X)HTML element",
goto_next_entry, "Goto next pairing",
goto_prev_entry, "Goto previous pairing",
goto_next_paragraph, "Goto next paragraph",
@@ -3201,11 +3189,9 @@ fn buffer_picker(cx: &mut Context) {
.into()
}),
];
- let initial_cursor = if items.len() <= 1 { 0 } else { 1 };
let picker = Picker::new(columns, 2, items, (), |cx, meta, action| {
cx.editor.switch(meta.id, action);
})
- .with_initial_cursor(initial_cursor)
.with_preview(|editor, meta| {
let doc = &editor.documents.get(&meta.id)?;
let lines = doc.selections().values().next().map(|selection| {
@@ -3740,13 +3726,11 @@ fn open(cx: &mut Context, open: Open, comment_continuation: CommentContinuation)
.map(|token| token.len() + 1) // `+ 1` for the extra space added
.unwrap_or_default();
for i in 0..count {
- // pos -> beginning of reference line,
- // + (i * (line_ending_len + indent_len + comment_len)) -> beginning of i'th line from pos (possibly including comment token)
+ // pos -> beginning of reference line,
+ // + (i * (1+indent_len + comment_len)) -> beginning of i'th line from pos (possibly including comment token)
// + indent_len + comment_len -> -> indent for i'th line
ranges.push(Range::point(
- pos + (i * (doc.line_ending.len_chars() + indent_len + comment_len))
- + indent_len
- + comment_len,
+ pos + (i * (1 + indent_len + comment_len)) + indent_len + comment_len,
));
}
@@ -3870,7 +3854,6 @@ fn goto_column_impl(cx: &mut Context, movement: Movement) {
let pos = graphemes::nth_next_grapheme_boundary(text, line_start, count - 1).min(line_end);
range.put_cursor(text, pos, movement == Movement::Extend)
});
- push_jump(view, doc);
doc.set_selection(view.id, selection);
}
@@ -3892,7 +3875,6 @@ fn goto_last_modification(cx: &mut Context) {
.selection(view.id)
.clone()
.transform(|range| range.put_cursor(text, pos, cx.editor.mode == Mode::Select));
- push_jump(view, doc);
doc.set_selection(view.id, selection);
}
}
@@ -3944,7 +3926,6 @@ fn goto_first_diag(cx: &mut Context) {
Some(diag) => Selection::single(diag.range.start, diag.range.end),
None => return,
};
- push_jump(view, doc);
doc.set_selection(view.id, selection);
view.diagnostics_handler
.immediately_show_diagnostic(doc, view.id);
@@ -3956,7 +3937,6 @@ fn goto_last_diag(cx: &mut Context) {
Some(diag) => Selection::single(diag.range.start, diag.range.end),
None => return,
};
- push_jump(view, doc);
doc.set_selection(view.id, selection);
view.diagnostics_handler
.immediately_show_diagnostic(doc, view.id);
@@ -3980,7 +3960,6 @@ fn goto_next_diag(cx: &mut Context) {
Some(diag) => Selection::single(diag.range.start, diag.range.end),
None => return,
};
- push_jump(view, doc);
doc.set_selection(view.id, selection);
view.diagnostics_handler
.immediately_show_diagnostic(doc, view.id);
@@ -4010,7 +3989,6 @@ fn goto_prev_diag(cx: &mut Context) {
Some(diag) => Selection::single(diag.range.end, diag.range.start),
None => return,
};
- push_jump(view, doc);
doc.set_selection(view.id, selection);
view.diagnostics_handler
.immediately_show_diagnostic(doc, view.id);
@@ -4041,7 +4019,6 @@ fn goto_first_change_impl(cx: &mut Context, reverse: bool) {
};
if hunk != Hunk::NONE {
let range = hunk_range(hunk, doc.text().slice(..));
- push_jump(view, doc);
doc.set_selection(view.id, Selection::single(range.anchor, range.head));
}
}
@@ -4097,7 +4074,6 @@ fn goto_next_change_impl(cx: &mut Context, direction: Direction) {
}
});
- push_jump(view, doc);
doc.set_selection(view.id, selection)
};
cx.editor.apply_motion(motion);
@@ -4118,7 +4094,7 @@ fn hunk_range(hunk: Hunk, text: RopeSlice) -> Range {
}
pub mod insert {
- use crate::{events::PostInsertChar, key};
+ use crate::events::PostInsertChar;
use super::*;
pub type Hook = fn(&Rope, &Selection, char) -> Option<Transaction>;
@@ -4197,15 +4173,11 @@ pub mod insert {
}
pub fn insert_tab(cx: &mut Context) {
- insert_tab_impl(cx, 1)
- }
-
- fn insert_tab_impl(cx: &mut Context, count: usize) {
let (view, doc) = current!(cx.editor);
// TODO: round out to nearest indentation level (for example a line with 3 spaces should
// indent by one to reach 4 spaces).
- let indent = Tendril::from(doc.indent_style.as_str().repeat(count));
+ let indent = Tendril::from(doc.indent_style.as_str());
let transaction = Transaction::insert(
doc.text(),
&doc.selection(view.id).clone().cursors(doc.text().slice(..)),
@@ -4214,49 +4186,6 @@ pub mod insert {
doc.apply(&transaction, view.id);
}
- pub fn append_char_interactive(cx: &mut Context) {
- // Save the current mode, so we can restore it later.
- let mode = cx.editor.mode;
- append_mode(cx);
- insert_selection_interactive(cx, mode);
- }
-
- pub fn insert_char_interactive(cx: &mut Context) {
- let mode = cx.editor.mode;
- insert_mode(cx);
- insert_selection_interactive(cx, mode);
- }
-
- fn insert_selection_interactive(cx: &mut Context, old_mode: Mode) {
- let count = cx.count();
-
- // need to wait for next key
- cx.on_next_key(move |cx, event| {
- match event {
- KeyEvent {
- code: KeyCode::Char(ch),
- ..
- } => {
- for _ in 0..count {
- insert::insert_char(cx, ch)
- }
- }
- key!(Enter) => {
- if count != 1 {
- cx.editor
- .set_error("inserting multiple newlines not yet supported");
- return;
- }
- insert_newline(cx)
- }
- key!(Tab) => insert_tab_impl(cx, count),
- _ => (),
- };
- // Restore the old mode.
- cx.editor.mode = old_mode;
- });
- }
-
pub fn insert_newline(cx: &mut Context) {
let config = cx.editor.config();
let (view, doc) = current_ref!(cx.editor);
@@ -5380,7 +5309,6 @@ fn rotate_selections_last(cx: &mut Context) {
doc.set_selection(view.id, selection);
}
-#[derive(Debug)]
enum ReorderStrategy {
RotateForward,
RotateBackward,
@@ -5393,50 +5321,34 @@ fn reorder_selection_contents(cx: &mut Context, strategy: ReorderStrategy) {
let text = doc.text().slice(..);
let selection = doc.selection(view.id);
-
- let mut ranges: Vec<_> = selection
+ let mut fragments: Vec<_> = selection
.slices(text)
.map(|fragment| fragment.chunks().collect())
.collect();
- let rotate_by = count.map_or(1, |count| count.get().min(ranges.len()));
-
- let primary_index = match strategy {
- ReorderStrategy::RotateForward => {
- ranges.rotate_right(rotate_by);
- // Like `usize::wrapping_add`, but provide a custom range from `0` to `ranges.len()`
- (selection.primary_index() + ranges.len() + rotate_by) % ranges.len()
- }
- ReorderStrategy::RotateBackward => {
- ranges.rotate_left(rotate_by);
- // Like `usize::wrapping_sub`, but provide a custom range from `0` to `ranges.len()`
- (selection.primary_index() + ranges.len() - rotate_by) % ranges.len()
- }
- ReorderStrategy::Reverse => {
- if rotate_by % 2 == 0 {
- // nothing changed, if we reverse something an even
- // amount of times, the output will be the same
- return;
- }
- ranges.reverse();
- // -1 to turn 1-based len into 0-based index
- (ranges.len() - 1) - selection.primary_index()
- }
- };
+ let group = count
+ .map(|count| count.get())
+ .unwrap_or(fragments.len()) // default to rotating everything as one group
+ .min(fragments.len());
+
+ for chunk in fragments.chunks_mut(group) {
+ // TODO: also modify main index
+ match strategy {
+ ReorderStrategy::RotateForward => chunk.rotate_right(1),
+ ReorderStrategy::RotateBackward => chunk.rotate_left(1),
+ ReorderStrategy::Reverse => chunk.reverse(),
+ };
+ }
let transaction = Transaction::change(
doc.text(),
selection
.ranges()
.iter()
- .zip(ranges)
+ .zip(fragments)
.map(|(range, fragment)| (range.from(), range.to(), Some(fragment))),
);
- doc.set_selection(
- view.id,
- Selection::new(selection.ranges().into(), primary_index),
- );
doc.apply(&transaction, view.id);
}
@@ -5920,7 +5832,6 @@ fn goto_ts_object_impl(cx: &mut Context, object: &'static str, direction: Direct
}
});
- push_jump(view, doc);
doc.set_selection(view.id, selection);
} else {
editor.set_status("Syntax-tree is not available in current buffer");
@@ -5969,14 +5880,6 @@ fn goto_prev_test(cx: &mut Context) {
goto_ts_object_impl(cx, "test", Direction::Backward)
}
-fn goto_next_xml_element(cx: &mut Context) {
- goto_ts_object_impl(cx, "xml-element", Direction::Forward)
-}
-
-fn goto_prev_xml_element(cx: &mut Context) {
- goto_ts_object_impl(cx, "xml-element", Direction::Backward)
-}
-
fn goto_next_entry(cx: &mut Context) {
goto_ts_object_impl(cx, "entry", Direction::Forward)
}
@@ -6044,7 +5947,6 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
'c' => textobject_treesitter("comment", range),
'T' => textobject_treesitter("test", range),
'e' => textobject_treesitter("entry", range),
- 'x' => textobject_treesitter("xml-element", range),
'p' => textobject::textobject_paragraph(text, range, objtype, count),
'm' => textobject::textobject_pair_surround_closest(
doc.syntax(),
@@ -6089,7 +5991,6 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
("e", "Data structure entry (tree-sitter)"),
("m", "Closest surrounding pair (tree-sitter)"),
("g", "Change"),
- ("x", "(X)HTML element (tree-sitter)"),
(" ", "... or any character acting as a pair"),
];
@@ -6267,52 +6168,64 @@ enum ShellBehavior {
}
fn shell_pipe(cx: &mut Context) {
- shell_prompt_for_behavior(cx, "pipe:".into(), ShellBehavior::Replace);
+ shell_prompt(cx, "pipe:".into(), ShellBehavior::Replace);
}
fn shell_pipe_to(cx: &mut Context) {
- shell_prompt_for_behavior(cx, "pipe-to:".into(), ShellBehavior::Ignore);
+ shell_prompt(cx, "pipe-to:".into(), ShellBehavior::Ignore);
}
fn shell_insert_output(cx: &mut Context) {
- shell_prompt_for_behavior(cx, "insert-output:".into(), ShellBehavior::Insert);
+ shell_prompt(cx, "insert-output:".into(), ShellBehavior::Insert);
}
fn shell_append_output(cx: &mut Context) {
- shell_prompt_for_behavior(cx, "append-output:".into(), ShellBehavior::Append);
+ shell_prompt(cx, "append-output:".into(), ShellBehavior::Append);
}
fn shell_keep_pipe(cx: &mut Context) {
- shell_prompt(cx, "keep-pipe:".into(), |cx, args| {
- let shell = &cx.editor.config().shell;
- let (view, doc) = current!(cx.editor);
- let selection = doc.selection(view.id);
+ ui::prompt(
+ cx,
+ "keep-pipe:".into(),
+ Some('|'),
+ ui::completers::none,
+ move |cx, input: &str, event: PromptEvent| {
+ let shell = &cx.editor.config().shell;
+ if event != PromptEvent::Validate {
+ return;
+ }
+ if input.is_empty() {
+ return;
+ }
+ let (view, doc) = current!(cx.editor);
+ let selection = doc.selection(view.id);
- let mut ranges = SmallVec::with_capacity(selection.len());
- let old_index = selection.primary_index();
- let mut index: Option<usize> = None;
- let text = doc.text().slice(..);
+ let mut ranges = SmallVec::with_capacity(selection.len());
+ let old_index = selection.primary_index();
+ let mut index: Option<usize> = None;
+ let text = doc.text().slice(..);
- for (i, range) in selection.ranges().iter().enumerate() {
- let fragment = range.slice(text);
- if let Err(err) = shell_impl(shell, args.join(" ").as_str(), Some(fragment.into())) {
- log::debug!("Shell command failed: {}", err);
- } else {
- ranges.push(*range);
- if i >= old_index && index.is_none() {
- index = Some(ranges.len() - 1);
+ for (i, range) in selection.ranges().iter().enumerate() {
+ let fragment = range.slice(text);
+ if let Err(err) = shell_impl(shell, input, Some(fragment.into())) {
+ log::debug!("Shell command failed: {}", err);
+ } else {
+ ranges.push(*range);
+ if i >= old_index && index.is_none() {
+ index = Some(ranges.len() - 1);
+ }
}
}
- }
- if ranges.is_empty() {
- cx.editor.set_error("No selections remaining");
- return;
- }
+ if ranges.is_empty() {
+ cx.editor.set_error("No selections remaining");
+ return;
+ }
- let index = index.unwrap_or_else(|| ranges.len() - 1);
- doc.set_selection(view.id, Selection::new(ranges, index));
- });
+ let index = index.unwrap_or_else(|| ranges.len() - 1);
+ doc.set_selection(view.id, Selection::new(ranges, index));
+ },
+ );
}
fn shell_impl(shell: &[String], cmd: &str, input: Option<Rope>) -> anyhow::Result<Tendril> {
@@ -6467,35 +6380,25 @@ fn shell(cx: &mut compositor::Context, cmd: &str, behavior: &ShellBehavior) {
view.ensure_cursor_in_view(doc, config.scrolloff);
}
-fn shell_prompt<F>(cx: &mut Context, prompt: Cow<'static, str>, mut callback_fn: F)
-where
- F: FnMut(&mut compositor::Context, Args) + 'static,
-{
+fn shell_prompt(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
ui::prompt(
cx,
prompt,
Some('|'),
- |editor, input| complete_command_args(editor, SHELL_SIGNATURE, &SHELL_COMPLETER, input, 0),
- move |cx, input, event| {
- if event != PromptEvent::Validate || input.is_empty() {
+ ui::completers::shell,
+ move |cx, input: &str, event: PromptEvent| {
+ if event != PromptEvent::Validate {
return;
}
- match Args::parse(input, SHELL_SIGNATURE, true, |token| {
- expansion::expand(cx.editor, token).map_err(|err| err.into())
- }) {
- Ok(args) => callback_fn(cx, args),
- Err(err) => cx.editor.set_error(err.to_string()),
+ if input.is_empty() {
+ return;
}
+
+ shell(cx, input, &behavior);
},
);
}
-fn shell_prompt_for_behavior(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
- shell_prompt(cx, prompt, move |cx, args| {
- shell(cx, args.join(" ").as_str(), &behavior)
- })
-}
-
fn suspend(_cx: &mut Context) {
#[cfg(not(windows))]
{
@@ -6825,10 +6728,6 @@ fn jump_to_word(cx: &mut Context, behaviour: Movement) {
// Calculate the jump candidates: ranges for any visible words with two or
// more characters.
let alphabet = &cx.editor.config().jump_label_alphabet;
- if alphabet.is_empty() {
- return;
- }
-
let jump_label_limit = alphabet.len() * alphabet.len();
let mut words = Vec::with_capacity(jump_label_limit);
let (view, doc) = current_ref!(cx.editor);
@@ -6918,34 +6817,3 @@ fn jump_to_word(cx: &mut Context, behaviour: Movement) {
}
jump_to_label(cx, words, behaviour)
}
-
-fn lsp_or_syntax_symbol_picker(cx: &mut Context) {
- let doc = doc!(cx.editor);
-
- if doc
- .language_servers_with_feature(LanguageServerFeature::DocumentSymbols)
- .next()
- .is_some()
- {
- lsp::symbol_picker(cx);
- } else if doc.syntax().is_some() {
- syntax_symbol_picker(cx);
- } else {
- cx.editor
- .set_error("No language server supporting document symbols or syntax info available");
- }
-}
-
-fn lsp_or_syntax_workspace_symbol_picker(cx: &mut Context) {
- let doc = doc!(cx.editor);
-
- if doc
- .language_servers_with_feature(LanguageServerFeature::WorkspaceSymbols)
- .next()
- .is_some()
- {
- lsp::workspace_symbol_picker(cx);
- } else {
- syntax_workspace_symbol_picker(cx);
- }
-}
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs
index 074bef6d..f6f11d12 100644
--- a/helix-term/src/commands/dap.rs
+++ b/helix-term/src/commands/dap.rs
@@ -164,13 +164,6 @@ pub fn dap_start_impl(
arr.iter().map(|v| v.replace(&pattern, &param)).collect(),
),
DebugArgumentValue::Boolean(_) => value,
- DebugArgumentValue::Table(map) => DebugArgumentValue::Table(
- map.into_iter()
- .map(|(mk, mv)| {
- (mk.replace(&pattern, &param), mv.replace(&pattern, &param))
- })
- .collect(),
- ),
};
}
}
@@ -189,9 +182,6 @@ pub fn dap_start_impl(
DebugArgumentValue::Boolean(bool) => {
args.insert(k, to_value(bool).unwrap());
}
- DebugArgumentValue::Table(map) => {
- args.insert(k, to_value(map).unwrap());
- }
}
}
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 0494db3e..a6d4b424 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -100,7 +100,7 @@ struct PickerDiagnostic {
diag: lsp::Diagnostic,
}
-fn location_to_file_location(location: &Location) -> Option<FileLocation<'_>> {
+fn location_to_file_location(location: &Location) -> Option<FileLocation> {
let path = location.uri.as_path()?;
let line = Some((
location.range.start.line as usize,
@@ -231,13 +231,6 @@ fn diag_picker(
}
}
- flat_diag.sort_by(|a, b| {
- a.diag
- .severity
- .unwrap_or(lsp::DiagnosticSeverity::HINT)
- .cmp(&b.diag.severity.unwrap_or(lsp::DiagnosticSeverity::HINT))
- });
-
let styles = DiagnosticStyles {
hint: cx.editor.theme.get("hint"),
info: cx.editor.theme.get("info"),
@@ -589,7 +582,7 @@ struct CodeActionOrCommandItem {
impl ui::menu::Item for CodeActionOrCommandItem {
type Data = ();
- fn format(&self, _data: &Self::Data) -> Row<'_> {
+ fn format(&self, _data: &Self::Data) -> Row {
match &self.lsp_item {
lsp::CodeActionOrCommand::CodeAction(action) => action.title.as_str().into(),
lsp::CodeActionOrCommand::Command(command) => command.title.as_str().into(),
@@ -814,9 +807,7 @@ pub fn code_action(cx: &mut Context) {
});
picker.move_down(); // pre-select the first item
- let popup = Popup::new("code-action", picker)
- .with_scrollbar(false)
- .auto_close(true);
+ let popup = Popup::new("code-action", picker).with_scrollbar(false);
compositor.replace_or_push("code-action", popup);
};
@@ -935,13 +926,7 @@ where
}
let call = move |editor: &mut Editor, compositor: &mut Compositor| {
if locations.is_empty() {
- editor.set_error(match feature {
- LanguageServerFeature::GotoDeclaration => "No declaration found.",
- LanguageServerFeature::GotoDefinition => "No definition found.",
- LanguageServerFeature::GotoTypeDefinition => "No type definition found.",
- LanguageServerFeature::GotoImplementation => "No implementation found.",
- _ => "No location found.",
- });
+ editor.set_error("No definition found.");
} else {
goto_impl(editor, compositor, locations);
}
@@ -1146,7 +1131,7 @@ pub fn rename_symbol(cx: &mut Context) {
let Some(language_server) = doc
.language_servers_with_feature(LanguageServerFeature::RenameSymbol)
- .find(|ls| language_server_id.is_none_or(|id| id == ls.id()))
+ .find(|ls| language_server_id.map_or(true, |id| id == ls.id()))
else {
cx.editor
.set_error("No configured language server supports symbol renaming");
diff --git a/helix-term/src/commands/syntax.rs b/helix-term/src/commands/syntax.rs
deleted file mode 100644
index fec222ce..00000000
--- a/helix-term/src/commands/syntax.rs
+++ /dev/null
@@ -1,446 +0,0 @@
-use std::{
- collections::HashSet,
- iter,
- path::{Path, PathBuf},
- sync::Arc,
-};
-
-use dashmap::DashMap;
-use futures_util::FutureExt;
-use grep_regex::RegexMatcherBuilder;
-use grep_searcher::{sinks, BinaryDetection, SearcherBuilder};
-use helix_core::{
- syntax::{Loader, QueryIterEvent},
- Rope, RopeSlice, Selection, Syntax, Uri,
-};
-use helix_stdx::{
- path,
- rope::{self, RopeSliceExt},
-};
-use helix_view::{
- align_view,
- document::{from_reader, SCRATCH_BUFFER_NAME},
- Align, Document, DocumentId, Editor,
-};
-use ignore::{DirEntry, WalkBuilder, WalkState};
-
-use crate::{
- filter_picker_entry,
- ui::{
- overlay::overlaid,
- picker::{Injector, PathOrId},
- Picker, PickerColumn,
- },
-};
-
-use super::Context;
-
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
-enum TagKind {
- Class,
- Constant,
- Function,
- Interface,
- Macro,
- Module,
- Struct,
- Type,
-}
-
-impl TagKind {
- fn as_str(&self) -> &'static str {
- match self {
- Self::Class => "class",
- Self::Constant => "constant",
- Self::Function => "function",
- Self::Interface => "interface",
- Self::Macro => "macro",
- Self::Module => "module",
- Self::Struct => "struct",
- Self::Type => "type",
- }
- }
-
- fn from_name(name: &str) -> Option<Self> {
- match name {
- "class" => Some(TagKind::Class),
- "constant" => Some(TagKind::Constant),
- "function" => Some(TagKind::Function),
- "interface" => Some(TagKind::Interface),
- "macro" => Some(TagKind::Macro),
- "module" => Some(TagKind::Module),
- "struct" => Some(TagKind::Struct),
- "type" => Some(TagKind::Type),
- _ => None,
- }
- }
-}
-
-// NOTE: Uri is cheap to clone and DocumentId is Copy
-#[derive(Debug, Clone)]
-enum UriOrDocumentId {
- Uri(Uri),
- Id(DocumentId),
-}
-
-impl UriOrDocumentId {
- fn path_or_id(&self) -> Option<PathOrId<'_>> {
- match self {
- Self::Id(id) => Some(PathOrId::Id(*id)),
- Self::Uri(uri) => uri.as_path().map(PathOrId::Path),
- }
- }
-}
-
-#[derive(Debug)]
-struct Tag {
- kind: TagKind,
- name: String,
- start: usize,
- end: usize,
- start_line: usize,
- end_line: usize,
- doc: UriOrDocumentId,
-}
-
-fn tags_iter<'a>(
- syntax: &'a Syntax,
- loader: &'a Loader,
- text: RopeSlice<'a>,
- doc: UriOrDocumentId,
- pattern: Option<&'a rope::Regex>,
-) -> impl Iterator<Item = Tag> + 'a {
- let mut tags_iter = syntax.tags(text, loader, ..);
-
- iter::from_fn(move || loop {
- let QueryIterEvent::Match(mat) = tags_iter.next()? else {
- continue;
- };
- let query = &loader
- .tag_query(tags_iter.current_language())
- .expect("must have a tags query to emit matches")
- .query;
- let Some(kind) = query
- .capture_name(mat.capture)
- .strip_prefix("definition.")
- .and_then(TagKind::from_name)
- else {
- continue;
- };
- let range = mat.node.byte_range();
- if pattern.is_some_and(|pattern| {
- !pattern.is_match(text.regex_input_at_bytes(range.start as usize..range.end as usize))
- }) {
- continue;
- }
- let start = text.byte_to_char(range.start as usize);
- let end = text.byte_to_char(range.end as usize);
- return Some(Tag {
- kind,
- name: text.slice(start..end).to_string(),
- start,
- end,
- start_line: text.char_to_line(start),
- end_line: text.char_to_line(end),
- doc: doc.clone(),
- });
- })
-}
-
-pub fn syntax_symbol_picker(cx: &mut Context) {
- let doc = doc!(cx.editor);
- let Some(syntax) = doc.syntax() else {
- cx.editor
- .set_error("Syntax tree is not available on this buffer");
- return;
- };
- let doc_id = doc.id();
- let text = doc.text().slice(..);
- let loader = cx.editor.syn_loader.load();
- let tags = tags_iter(syntax, &loader, text, UriOrDocumentId::Id(doc.id()), None);
-
- let columns = vec![
- PickerColumn::new("kind", |tag: &Tag, _| tag.kind.as_str().into()),
- PickerColumn::new("name", |tag: &Tag, _| tag.name.as_str().into()),
- ];
-
- let picker = Picker::new(
- columns,
- 1, // name
- tags,
- (),
- move |cx, tag, action| {
- cx.editor.switch(doc_id, action);
- let view = view_mut!(cx.editor);
- let doc = doc_mut!(cx.editor, &doc_id);
- doc.set_selection(view.id, Selection::single(tag.start, tag.end));
- if action.align_view(view, doc.id()) {
- align_view(doc, view, Align::Center)
- }
- },
- )
- .with_preview(|_editor, tag| {
- Some((tag.doc.path_or_id()?, Some((tag.start_line, tag.end_line))))
- })
- .truncate_start(false);
-
- cx.push_layer(Box::new(overlaid(picker)));
-}
-
-pub fn syntax_workspace_symbol_picker(cx: &mut Context) {
- #[derive(Debug)]
- struct SearchState {
- searcher_builder: SearcherBuilder,
- walk_builder: WalkBuilder,
- regex_matcher_builder: RegexMatcherBuilder,
- rope_regex_builder: rope::RegexBuilder,
- search_root: PathBuf,
- /// A cache of files that have been parsed in prior searches.
- syntax_cache: DashMap<PathBuf, Option<(Rope, Syntax)>>,
- }
-
- let mut searcher_builder = SearcherBuilder::new();
- searcher_builder.binary_detection(BinaryDetection::quit(b'\x00'));
-
- // Search from the workspace that the currently focused document is within. This behaves like global
- // search most of the time but helps when you have two projects open in splits.
- let search_root = if let Some(path) = doc!(cx.editor).path() {
- helix_loader::find_workspace_in(path).0
- } else {
- helix_loader::find_workspace().0
- };
-
- let absolute_root = search_root
- .canonicalize()
- .unwrap_or_else(|_| search_root.clone());
-
- let config = cx.editor.config();
- let dedup_symlinks = config.file_picker.deduplicate_links;
-
- let mut walk_builder = WalkBuilder::new(&search_root);
- walk_builder
- .hidden(config.file_picker.hidden)
- .parents(config.file_picker.parents)
- .ignore(config.file_picker.ignore)
- .follow_links(config.file_picker.follow_symlinks)
- .git_ignore(config.file_picker.git_ignore)
- .git_global(config.file_picker.git_global)
- .git_exclude(config.file_picker.git_exclude)
- .max_depth(config.file_picker.max_depth)
- .filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks))
- .add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
- .add_custom_ignore_filename(".helix/ignore");
-
- let mut regex_matcher_builder = RegexMatcherBuilder::new();
- regex_matcher_builder.case_smart(config.search.smart_case);
- let mut rope_regex_builder = rope::RegexBuilder::new();
- rope_regex_builder.syntax(rope::Config::new().case_insensitive(config.search.smart_case));
- let state = SearchState {
- searcher_builder,
- walk_builder,
- regex_matcher_builder,
- rope_regex_builder,
- search_root,
- syntax_cache: DashMap::default(),
- };
- let reg = cx.register.unwrap_or('/');
- cx.editor.registers.last_search_register = reg;
- let columns = vec![
- PickerColumn::new("kind", |tag: &Tag, _| tag.kind.as_str().into()),
- PickerColumn::new("name", |tag: &Tag, _| tag.name.as_str().into()).without_filtering(),
- PickerColumn::new("path", |tag: &Tag, state: &SearchState| {
- match &tag.doc {
- UriOrDocumentId::Uri(uri) => {
- if let Some(path) = uri.as_path() {
- let path = if let Ok(stripped) = path.strip_prefix(&state.search_root) {
- stripped
- } else {
- path
- };
- path.to_string_lossy().into()
- } else {
- uri.to_string().into()
- }
- }
- // This picker only uses `Id` for scratch buffers for better display.
- UriOrDocumentId::Id(_) => SCRATCH_BUFFER_NAME.into(),
- }
- }),
- ];
-
- let get_tags = |query: &str,
- editor: &mut Editor,
- state: Arc<SearchState>,
- injector: &Injector<_, _>| {
- if query.len() < 3 {
- return async { Ok(()) }.boxed();
- }
- // Attempt to find the tag in any open documents.
- let pattern = match state.rope_regex_builder.build(query) {
- Ok(pattern) => pattern,
- Err(err) => return async { Err(anyhow::anyhow!(err)) }.boxed(),
- };
- let loader = editor.syn_loader.load();
- for doc in editor.documents() {
- let Some(syntax) = doc.syntax() else { continue };
- let text = doc.text().slice(..);
- let uri_or_id = doc
- .uri()
- .map(UriOrDocumentId::Uri)
- .unwrap_or_else(|| UriOrDocumentId::Id(doc.id()));
- for tag in tags_iter(syntax, &loader, text.slice(..), uri_or_id, Some(&pattern)) {
- if injector.push(tag).is_err() {
- return async { Ok(()) }.boxed();
- }
- }
- }
- if !state.search_root.exists() {
- return async { Err(anyhow::anyhow!("Current working directory does not exist")) }
- .boxed();
- }
- let matcher = match state.regex_matcher_builder.build(query) {
- Ok(matcher) => {
- // Clear any "Failed to compile regex" errors out of the statusline.
- editor.clear_status();
- matcher
- }
- Err(err) => {
- log::info!(
- "Failed to compile search pattern in workspace symbol search: {}",
- err
- );
- return async { Err(anyhow::anyhow!("Failed to compile regex")) }.boxed();
- }
- };
- let pattern = Arc::new(pattern);
- let injector = injector.clone();
- let loader = editor.syn_loader.load();
- let documents: HashSet<_> = editor
- .documents()
- .filter_map(Document::path)
- .cloned()
- .collect();
- async move {
- let searcher = state.searcher_builder.build();
- state.walk_builder.build_parallel().run(|| {
- let mut searcher = searcher.clone();
- let matcher = matcher.clone();
- let injector = injector.clone();
- let loader = loader.clone();
- let documents = &documents;
- let pattern = pattern.clone();
- let syntax_cache = &state.syntax_cache;
- Box::new(move |entry: Result<DirEntry, ignore::Error>| -> WalkState {
- let entry = match entry {
- Ok(entry) => entry,
- Err(_) => return WalkState::Continue,
- };
- match entry.file_type() {
- Some(entry) if entry.is_file() => {}
- // skip everything else
- _ => return WalkState::Continue,
- };
- let path = entry.path();
- // If this document is open, skip it because we've already processed it above.
- if documents.contains(path) {
- return WalkState::Continue;
- };
- let mut quit = false;
- let sink = sinks::UTF8(|_line, _content| {
- if !syntax_cache.contains_key(path) {
- // Read the file into a Rope and attempt to recognize the language
- // and parse it with tree-sitter. Save the Rope and Syntax for future
- // queries.
- syntax_cache.insert(path.to_path_buf(), syntax_for_path(path, &loader));
- };
- let entry = syntax_cache.get(path).unwrap();
- let Some((text, syntax)) = entry.value() else {
- // If the file couldn't be parsed, move on.
- return Ok(false);
- };
- let uri = Uri::from(path::normalize(path));
- for tag in tags_iter(
- syntax,
- &loader,
- text.slice(..),
- UriOrDocumentId::Uri(uri),
- Some(&pattern),
- ) {
- if injector.push(tag).is_err() {
- quit = true;
- break;
- }
- }
- // Quit after seeing the first regex match. We only care to find files
- // that contain the pattern and then we run the tags query within
- // those. The location and contents of a match are irrelevant - it's
- // only important _if_ a file matches.
- Ok(false)
- });
- if let Err(err) = searcher.search_path(&matcher, path, sink) {
- log::info!("Workspace syntax search error: {}, {}", path.display(), err);
- }
- if quit {
- WalkState::Quit
- } else {
- WalkState::Continue
- }
- })
- });
- Ok(())
- }
- .boxed()
- };
- let picker = Picker::new(
- columns,
- 1, // name
- [],
- state,
- move |cx, tag, action| {
- let doc_id = match &tag.doc {
- UriOrDocumentId::Id(id) => *id,
- UriOrDocumentId::Uri(uri) => match cx.editor.open(uri.as_path().expect(""), action) {
- Ok(id) => id,
- Err(e) => {
- cx.editor
- .set_error(format!("Failed to open file '{uri:?}': {e}"));
- return;
- }
- }
- };
- let doc = doc_mut!(cx.editor, &doc_id);
- let view = view_mut!(cx.editor);
- let len_chars = doc.text().len_chars();
- if tag.start >= len_chars || tag.end > len_chars {
- cx.editor.set_error("The location you jumped to does not exist anymore because the file has changed.");
- return;
- }
- doc.set_selection(view.id, Selection::single(tag.start, tag.end));
- if action.align_view(view, doc.id()) {
- align_view(doc, view, Align::Center)
- }
- },
- )
- .with_dynamic_query(get_tags, Some(275))
- .with_preview(move |_editor, tag| {
- Some((
- tag.doc.path_or_id()?,
- Some((tag.start_line, tag.end_line)),
- ))
- })
- .truncate_start(false);
- cx.push_layer(Box::new(overlaid(picker)));
-}
-
-/// Create a Rope and language config for a given existing path without creating a full Document.
-fn syntax_for_path(path: &Path, loader: &Loader) -> Option<(Rope, Syntax)> {
- let mut file = std::fs::File::open(path).ok()?;
- let (rope, _encoding, _has_bom) = from_reader(&mut file, None).ok()?;
- let text = rope.slice(..);
- let language = loader
- .language_for_filename(path)
- .or_else(|| loader.language_for_shebang(text))?;
- Syntax::new(text, language, loader)
- .ok()
- .map(|syntax| (rope, syntax))
-}
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 867ca4ac..e1bb8ee3 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -29,6 +29,15 @@ pub struct TypableCommand {
pub signature: Signature,
}
+impl TypableCommand {
+ fn completer_for_argument_number(&self, n: usize) -> &Completer {
+ match self.completer.positional_args.get(n) {
+ Some(completer) => completer,
+ _ => &self.completer.var_args,
+ }
+ }
+}
+
#[derive(Clone)]
pub struct CommandCompleter {
// Arguments with specific completion methods based on their position.
@@ -59,51 +68,6 @@ impl CommandCompleter {
var_args: completer,
}
}
-
- fn for_argument_number(&self, n: usize) -> &Completer {
- match self.positional_args.get(n) {
- Some(completer) => completer,
- _ => &self.var_args,
- }
- }
-}
-
-fn exit(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow::Result<()> {
- if event != PromptEvent::Validate {
- return Ok(());
- }
-
- if doc!(cx.editor).is_modified() {
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: false,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )?;
- }
- cx.block_try_flush_writes()?;
- quit(cx, Args::default(), event)
-}
-
-fn force_exit(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow::Result<()> {
- if event != PromptEvent::Validate {
- return Ok(());
- }
-
- if doc!(cx.editor).is_modified() {
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )?;
- }
- cx.block_try_flush_writes()?;
- quit(cx, Args::default(), event)
}
fn quit(cx: &mut compositor::Context, _args: Args, event: PromptEvent) -> anyhow::Result<()> {
@@ -140,10 +104,6 @@ fn open(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow:
return Ok(());
}
- open_impl(cx, args, Action::Replace)
-}
-
-fn open_impl(cx: &mut compositor::Context, args: Args, action: Action) -> anyhow::Result<()> {
for arg in args {
let (path, pos) = crate::args::parse_file(&arg);
let path = helix_stdx::path::expand_tilde(path);
@@ -153,8 +113,7 @@ fn open_impl(cx: &mut compositor::Context, args: Args, action: Action) -> anyhow
let callback = async move {
let call: job::Callback = job::Callback::EditorCompositor(Box::new(
move |editor: &mut Editor, compositor: &mut Compositor| {
- let picker =
- ui::file_picker(editor, path.into_owned()).with_default_action(action);
+ let picker = ui::file_picker(editor, path.into_owned());
compositor.push(Box::new(overlaid(picker)));
},
));
@@ -163,7 +122,7 @@ fn open_impl(cx: &mut compositor::Context, args: Args, action: Action) -> anyhow
cx.jobs.callback(callback);
} else {
// Otherwise, just open the file
- let _ = cx.editor.open(&path, action)?;
+ let _ = cx.editor.open(&path, Action::Replace)?;
let (view, doc) = current!(cx.editor);
let pos = Selection::point(pos_at_coords(doc.text().slice(..), pos, true));
doc.set_selection(view.id, pos);
@@ -271,51 +230,38 @@ fn force_buffer_close(
buffer_close_by_ids_impl(cx, &document_ids, true)
}
-fn buffer_gather_others_impl(editor: &mut Editor, skip_visible: bool) -> Vec<DocumentId> {
- if skip_visible {
- let visible_document_ids = editor
- .tree
- .views()
- .map(|view| &view.0.doc)
- .collect::<HashSet<_>>();
- editor
- .documents()
- .map(|doc| doc.id())
- .filter(|doc_id| !visible_document_ids.contains(doc_id))
- .collect()
- } else {
- let current_document = &doc!(editor).id();
- editor
- .documents()
- .map(|doc| doc.id())
- .filter(|doc_id| doc_id != current_document)
- .collect()
- }
+fn buffer_gather_others_impl(editor: &mut Editor) -> Vec<DocumentId> {
+ let current_document = &doc!(editor).id();
+ editor
+ .documents()
+ .map(|doc| doc.id())
+ .filter(|doc_id| doc_id != current_document)
+ .collect()
}
fn buffer_close_others(
cx: &mut compositor::Context,
- args: Args,
+ _args: Args,
event: PromptEvent,
) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
return Ok(());
}
- let document_ids = buffer_gather_others_impl(cx.editor, args.has_flag("skip-visible"));
+ let document_ids = buffer_gather_others_impl(cx.editor);
buffer_close_by_ids_impl(cx, &document_ids, false)
}
fn force_buffer_close_others(
cx: &mut compositor::Context,
- args: Args,
+ _args: Args,
event: PromptEvent,
) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
return Ok(());
}
- let document_ids = buffer_gather_others_impl(cx.editor, args.has_flag("skip-visible"));
+ let document_ids = buffer_gather_others_impl(cx.editor);
buffer_close_by_ids_impl(cx, &document_ids, true)
}
@@ -375,11 +321,7 @@ fn buffer_previous(
Ok(())
}
-fn write_impl(
- cx: &mut compositor::Context,
- path: Option<&str>,
- options: WriteOptions,
-) -> anyhow::Result<()> {
+fn write_impl(cx: &mut compositor::Context, path: Option<&str>, force: bool) -> anyhow::Result<()> {
let config = cx.editor.config();
let jobs = &mut cx.jobs;
let (view, doc) = current!(cx.editor);
@@ -398,14 +340,14 @@ fn write_impl(
doc.append_changes_to_history(view);
let (view, doc) = current_ref!(cx.editor);
- let fmt = if config.auto_format && options.auto_format {
+ let fmt = if config.auto_format {
doc.auto_format(cx.editor).map(|fmt| {
let callback = make_format_callback(
doc.id(),
doc.version(),
view.id,
fmt,
- Some((path.map(Into::into), options.force)),
+ Some((path.map(Into::into), force)),
);
jobs.add(Job::with_callback(callback).wait_before_exiting());
@@ -416,7 +358,7 @@ fn write_impl(
if fmt.is_none() {
let id = doc.id();
- cx.editor.save(id, path, options.force)?;
+ cx.editor.save(id, path, force)?;
}
Ok(())
@@ -481,25 +423,12 @@ fn insert_final_newline(doc: &mut Document, view_id: ViewId) {
}
}
-#[derive(Debug, Clone, Copy)]
-pub struct WriteOptions {
- pub force: bool,
- pub auto_format: bool,
-}
-
fn write(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
return Ok(());
}
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: false,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )
+ write_impl(cx, args.first(), false)
}
fn force_write(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow::Result<()> {
@@ -507,14 +436,7 @@ fn force_write(cx: &mut compositor::Context, args: Args, event: PromptEvent) ->
return Ok(());
}
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )
+ write_impl(cx, args.first(), true)
}
fn write_buffer_close(
@@ -526,14 +448,7 @@ fn write_buffer_close(
return Ok(());
}
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: false,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )?;
+ write_impl(cx, args.first(), false)?;
let document_ids = buffer_gather_paths_impl(cx.editor, args);
buffer_close_by_ids_impl(cx, &document_ids, false)
@@ -548,14 +463,7 @@ fn force_write_buffer_close(
return Ok(());
}
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )?;
+ write_impl(cx, args.first(), true)?;
let document_ids = buffer_gather_paths_impl(cx.editor, args);
buffer_close_by_ids_impl(cx, &document_ids, false)
@@ -736,14 +644,7 @@ fn write_quit(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> a
return Ok(());
}
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: false,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )?;
+ write_impl(cx, args.first(), false)?;
cx.block_try_flush_writes()?;
quit(cx, Args::default(), event)
}
@@ -757,14 +658,7 @@ fn force_write_quit(
return Ok(());
}
- write_impl(
- cx,
- args.first(),
- WriteOptions {
- force: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )?;
+ write_impl(cx, args.first(), true)?;
cx.block_try_flush_writes()?;
force_quit(cx, Args::default(), event)
}
@@ -886,7 +780,7 @@ pub fn write_all_impl(
Ok(())
}
-fn write_all(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow::Result<()> {
+fn write_all(cx: &mut compositor::Context, _args: Args, event: PromptEvent) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
return Ok(());
}
@@ -896,14 +790,14 @@ fn write_all(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> an
WriteAllOptions {
force: false,
write_scratch: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
+ auto_format: true,
},
)
}
fn force_write_all(
cx: &mut compositor::Context,
- args: Args,
+ _args: Args,
event: PromptEvent,
) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
@@ -915,14 +809,14 @@ fn force_write_all(
WriteAllOptions {
force: true,
write_scratch: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
+ auto_format: true,
},
)
}
fn write_all_quit(
cx: &mut compositor::Context,
- args: Args,
+ _args: Args,
event: PromptEvent,
) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
@@ -933,7 +827,7 @@ fn write_all_quit(
WriteAllOptions {
force: false,
write_scratch: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
+ auto_format: true,
},
)?;
quit_all_impl(cx, false)
@@ -941,7 +835,7 @@ fn write_all_quit(
fn force_write_all_quit(
cx: &mut compositor::Context,
- args: Args,
+ _args: Args,
event: PromptEvent,
) -> anyhow::Result<()> {
if event != PromptEvent::Validate {
@@ -952,7 +846,7 @@ fn force_write_all_quit(
WriteAllOptions {
force: true,
write_scratch: true,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
+ auto_format: true,
},
);
quit_all_impl(cx, true)
@@ -1510,14 +1404,7 @@ fn update(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyho
let (_view, doc) = current!(cx.editor);
if doc.is_modified() {
- write_impl(
- cx,
- None,
- WriteOptions {
- force: false,
- auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name),
- },
- )
+ write(cx, args, event)
} else {
Ok(())
}
@@ -1856,7 +1743,10 @@ fn vsplit(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyho
if args.is_empty() {
split(cx.editor, Action::VerticalSplit);
} else {
- open_impl(cx, args, Action::VerticalSplit)?;
+ for arg in args {
+ cx.editor
+ .open(&PathBuf::from(arg.as_ref()), Action::VerticalSplit)?;
+ }
}
Ok(())
@@ -1870,7 +1760,10 @@ fn hsplit(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyho
if args.is_empty() {
split(cx.editor, Action::HorizontalSplit);
} else {
- open_impl(cx, args, Action::HorizontalSplit)?;
+ for arg in args {
+ cx.editor
+ .open(&PathBuf::from(arg.as_ref()), Action::HorizontalSplit)?;
+ }
}
Ok(())
@@ -2570,16 +2463,7 @@ fn move_buffer(cx: &mut compositor::Context, args: Args, event: PromptEvent) ->
.path()
.context("Scratch buffer cannot be moved. Use :write instead")?
.clone();
- let new_path: PathBuf = args.first().unwrap().into();
-
- // if new_path is a directory, append the original file name
- // to move the file into that directory.
- let new_path = old_path
- .file_name()
- .filter(|_| new_path.is_dir())
- .map(|old_file_name| new_path.join(old_file_name))
- .unwrap_or(new_path);
-
+ let new_path = args.first().unwrap().to_string();
if let Err(err) = cx.editor.move_path(&old_path, new_path.as_ref()) {
bail!("Could not move file: {err}");
}
@@ -2678,67 +2562,25 @@ fn noop(_cx: &mut compositor::Context, _args: Args, _event: PromptEvent) -> anyh
Ok(())
}
-/// This command accepts a single boolean --skip-visible flag and no positionals.
-const BUFFER_CLOSE_OTHERS_SIGNATURE: Signature = Signature {
- positionals: (0, Some(0)),
- flags: &[Flag {
- name: "skip-visible",
- alias: Some('s'),
- doc: "don't close buffers that are visible",
- ..Flag::DEFAULT
- }],
- ..Signature::DEFAULT
-};
-
// TODO: SHELL_SIGNATURE should specify var args for arguments, so that just completers::filename can be used,
// but Signature does not yet allow for var args.
/// This command handles all of its input as-is with no quoting or flags.
-pub const SHELL_SIGNATURE: Signature = Signature {
+const SHELL_SIGNATURE: Signature = Signature {
positionals: (1, Some(2)),
raw_after: Some(1),
..Signature::DEFAULT
};
-pub const SHELL_COMPLETER: CommandCompleter = CommandCompleter::positional(&[
+const SHELL_COMPLETER: CommandCompleter = CommandCompleter::positional(&[
// Command name
completers::program,
// Shell argument(s)
completers::repeating_filenames,
]);
-const WRITE_NO_FORMAT_FLAG: Flag = Flag {
- name: "no-format",
- doc: "skip auto-formatting",
- ..Flag::DEFAULT
-};
-
pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
TypableCommand {
- name: "exit",
- aliases: &["x", "xit"],
- doc: "Write changes to disk if the buffer is modified and then quit. Accepts an optional path (:exit some/path.txt).",
- fun: exit,
- completer: CommandCompleter::positional(&[completers::filename]),
- signature: Signature {
- positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
- ..Signature::DEFAULT
- },
- },
- TypableCommand {
- name: "exit!",
- aliases: &["x!", "xit!"],
- doc: "Force write changes to disk, creating necessary subdirectories, if the buffer is modified and then quit. Accepts an optional path (:exit! some/path.txt).",
- fun: force_exit,
- completer: CommandCompleter::positional(&[completers::filename]),
- signature: Signature {
- positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
- ..Signature::DEFAULT
- },
- },
- TypableCommand {
name: "quit",
aliases: &["q"],
doc: "Close the current view.",
@@ -2799,7 +2641,10 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
doc: "Close all buffers but the currently focused one.",
fun: buffer_close_others,
completer: CommandCompleter::none(),
- signature: BUFFER_CLOSE_OTHERS_SIGNATURE,
+ signature: Signature {
+ positionals: (0, Some(0)),
+ ..Signature::DEFAULT
+ },
},
TypableCommand {
name: "buffer-close-others!",
@@ -2807,7 +2652,10 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
doc: "Force close all buffers but the currently focused one.",
fun: force_buffer_close_others,
completer: CommandCompleter::none(),
- signature: BUFFER_CLOSE_OTHERS_SIGNATURE,
+ signature: Signature {
+ positionals: (0, Some(0)),
+ ..Signature::DEFAULT
+ },
},
TypableCommand {
name: "buffer-close-all",
@@ -2861,7 +2709,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::positional(&[completers::filename]),
signature: Signature {
positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -2873,7 +2720,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::positional(&[completers::filename]),
signature: Signature {
positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -2885,7 +2731,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::positional(&[completers::filename]),
signature: Signature {
positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -2897,7 +2742,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::positional(&[completers::filename]),
signature: Signature {
positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -2972,25 +2816,23 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
},
TypableCommand {
name: "write-quit",
- aliases: &["wq"],
+ aliases: &["wq", "x"],
doc: "Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt)",
fun: write_quit,
completer: CommandCompleter::positional(&[completers::filename]),
signature: Signature {
positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
TypableCommand {
name: "write-quit!",
- aliases: &["wq!"],
+ aliases: &["wq!", "x!"],
doc: "Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt)",
fun: force_write_quit,
completer: CommandCompleter::positional(&[completers::filename]),
signature: Signature {
positionals: (0, Some(1)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -3002,7 +2844,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::none(),
signature: Signature {
positionals: (0, Some(0)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -3014,7 +2855,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::none(),
signature: Signature {
positionals: (0, Some(0)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -3026,19 +2866,17 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::none(),
signature: Signature {
positionals: (0, Some(0)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
TypableCommand {
name: "write-quit-all!",
aliases: &["wqa!", "xa!"],
- doc: "Forcefully write changes from all buffers to disk, creating necessary subdirectories, and close all views (ignoring unsaved changes).",
+ doc: "Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes).",
fun: force_write_all_quit,
completer: CommandCompleter::none(),
signature: Signature {
positionals: (0, Some(0)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -3303,7 +3141,6 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
completer: CommandCompleter::none(),
signature: Signature {
positionals: (0, Some(0)),
- flags: &[WRITE_NO_FORMAT_FLAG],
..Signature::DEFAULT
},
},
@@ -3802,7 +3639,7 @@ pub(super) fn command_mode(cx: &mut Context) {
cx.push_layer(Box::new(prompt));
}
-fn command_line_doc(input: &str) -> Option<Cow<'_, str>> {
+fn command_line_doc(input: &str) -> Option<Cow<str>> {
let (command, _, _) = command_line::split(input);
let command = TYPABLE_COMMAND_MAP.get(command)?;
@@ -3891,15 +3728,14 @@ fn complete_command_line(editor: &Editor, input: &str) -> Vec<ui::prompt::Comple
.get(command)
.map_or_else(Vec::new, |cmd| {
let args_offset = command.len() + 1;
- complete_command_args(editor, cmd.signature, &cmd.completer, rest, args_offset)
+ complete_command_args(editor, cmd, rest, args_offset)
})
}
}
-pub fn complete_command_args(
+fn complete_command_args(
editor: &Editor,
- signature: Signature,
- completer: &CommandCompleter,
+ command: &TypableCommand,
input: &str,
offset: usize,
) -> Vec<ui::prompt::Completion> {
@@ -3911,7 +3747,7 @@ pub fn complete_command_args(
let cursor = input.len();
let prefix = &input[..cursor];
let mut tokenizer = Tokenizer::new(prefix, false);
- let mut args = Args::new(signature, false);
+ let mut args = Args::new(command.signature, false);
let mut final_token = None;
let mut is_last_token = true;
@@ -3955,7 +3791,7 @@ pub fn complete_command_args(
.len()
.checked_sub(1)
.expect("completion state to be positional");
- let completer = completer.for_argument_number(n);
+ let completer = command.completer_for_argument_number(n);
completer(editor, &token.content)
.into_iter()
@@ -3964,7 +3800,7 @@ pub fn complete_command_args(
}
CompletionState::Flag(_) => fuzzy_match(
token.content.trim_start_matches('-'),
- signature.flags.iter().map(|flag| flag.name),
+ command.signature.flags.iter().map(|flag| flag.name),
false,
)
.into_iter()
@@ -3989,7 +3825,7 @@ pub fn complete_command_args(
.len()
.checked_sub(1)
.expect("completion state to be positional");
- completer.for_argument_number(n)
+ command.completer_for_argument_number(n)
});
complete_expand(editor, &token, arg_completer, offset + token.content_start)
}
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index 266a8aec..28c8651a 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -136,11 +136,6 @@ impl Compositor {
Some(self.layers.remove(idx))
}
- pub fn remove_type<T: 'static>(&mut self) {
- let type_name = std::any::type_name::<T>();
- self.layers
- .retain(|component| component.type_name() != type_name);
- }
pub fn handle_event(&mut self, event: &Event, cx: &mut Context) -> bool {
// If it is a key event, a macro is being recorded, and a macro isn't being replayed,
// push the key event to the recording.
diff --git a/helix-term/src/config.rs b/helix-term/src/config.rs
index dd051984..bcba8d8e 100644
--- a/helix-term/src/config.rs
+++ b/helix-term/src/config.rs
@@ -1,7 +1,7 @@
use crate::keymap;
use crate::keymap::{merge_keys, KeyTrie};
use helix_loader::merge_toml_values;
-use helix_view::{document::Mode, theme};
+use helix_view::document::Mode;
use serde::Deserialize;
use std::collections::HashMap;
use std::fmt::Display;
@@ -11,7 +11,7 @@ use toml::de::Error as TomlError;
#[derive(Debug, Clone, PartialEq)]
pub struct Config {
- pub theme: Option<theme::Config>,
+ pub theme: Option<String>,
pub keys: HashMap<Mode, KeyTrie>,
pub editor: helix_view::editor::Config,
}
@@ -19,7 +19,7 @@ pub struct Config {
#[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ConfigRaw {
- pub theme: Option<theme::Config>,
+ pub theme: Option<String>,
pub keys: Option<HashMap<Mode, KeyTrie>>,
pub editor: Option<toml::Value>,
}
diff --git a/helix-term/src/handlers.rs b/helix-term/src/handlers.rs
index 18297bfe..c7d71526 100644
--- a/helix-term/src/handlers.rs
+++ b/helix-term/src/handlers.rs
@@ -1,24 +1,21 @@
use std::sync::Arc;
use arc_swap::ArcSwap;
-use diagnostics::PullAllDocumentsDiagnosticHandler;
use helix_event::AsyncHook;
use crate::config::Config;
use crate::events;
use crate::handlers::auto_save::AutoSaveHandler;
-use crate::handlers::diagnostics::PullDiagnosticsHandler;
use crate::handlers::signature_help::SignatureHelpHandler;
-pub use helix_view::handlers::{word_index, Handlers};
+pub use helix_view::handlers::Handlers;
use self::document_colors::DocumentColorsHandler;
mod auto_save;
pub mod completion;
-pub mod diagnostics;
+mod diagnostics;
mod document_colors;
-mod prompt;
mod signature_help;
mod snippet;
@@ -29,18 +26,12 @@ pub fn setup(config: Arc<ArcSwap<Config>>) -> Handlers {
let signature_hints = SignatureHelpHandler::new().spawn();
let auto_save = AutoSaveHandler::new().spawn();
let document_colors = DocumentColorsHandler::default().spawn();
- let word_index = word_index::Handler::spawn();
- let pull_diagnostics = PullDiagnosticsHandler::default().spawn();
- let pull_all_documents_diagnostics = PullAllDocumentsDiagnosticHandler::default().spawn();
let handlers = Handlers {
completions: helix_view::handlers::completion::CompletionHandler::new(event_tx),
signature_hints,
auto_save,
document_colors,
- word_index,
- pull_diagnostics,
- pull_all_documents_diagnostics,
};
helix_view::handlers::register_hooks(&handlers);
@@ -50,6 +41,5 @@ pub fn setup(config: Arc<ArcSwap<Config>>) -> Handlers {
diagnostics::register_hooks(&handlers);
snippet::register_hooks(&handlers);
document_colors::register_hooks(&handlers);
- prompt::register_hooks(&handlers);
handlers
}
diff --git a/helix-term/src/handlers/completion.rs b/helix-term/src/handlers/completion.rs
index 22bb0ce0..5017399b 100644
--- a/helix-term/src/handlers/completion.rs
+++ b/helix-term/src/handlers/completion.rs
@@ -30,7 +30,6 @@ mod item;
mod path;
mod request;
mod resolve;
-mod word;
async fn handle_response(
requests: &mut JoinSet<CompletionResponse>,
@@ -83,7 +82,7 @@ async fn replace_completions(
fn show_completion(
editor: &mut Editor,
compositor: &mut Compositor,
- mut items: Vec<CompletionItem>,
+ items: Vec<CompletionItem>,
context: HashMap<CompletionProvider, ResponseContext>,
trigger: Trigger,
) {
@@ -102,7 +101,6 @@ fn show_completion(
if ui.completion.is_some() {
return;
}
- word::retain_valid_completions(trigger, doc, view.id, &mut items);
editor.handlers.completions.active_completions = context;
let completion_area = ui.set_completion(editor, items, trigger.pos, size);
diff --git a/helix-term/src/handlers/completion/item.rs b/helix-term/src/handlers/completion/item.rs
index 136d72db..7a473b02 100644
--- a/helix-term/src/handlers/completion/item.rs
+++ b/helix-term/src/handlers/completion/item.rs
@@ -67,7 +67,6 @@ impl LspCompletionItem {
}
}
-#[allow(clippy::large_enum_variant)] // TODO: In a separate PR attempt the `Box<LspCompletionItem>` pattern.
#[derive(Debug, PartialEq, Clone)]
pub enum CompletionItem {
Lsp(LspCompletionItem),
diff --git a/helix-term/src/handlers/completion/request.rs b/helix-term/src/handlers/completion/request.rs
index fd65cd4d..51a3129a 100644
--- a/helix-term/src/handlers/completion/request.rs
+++ b/helix-term/src/handlers/completion/request.rs
@@ -28,8 +28,6 @@ use crate::job::{dispatch, dispatch_blocking};
use crate::ui;
use crate::ui::editor::InsertEvent;
-use super::word;
-
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub(super) enum TriggerKind {
Auto,
@@ -87,7 +85,7 @@ impl helix_event::AsyncHook for CompletionHandler {
if self
.trigger
.or(self.in_flight)
- .is_none_or(|trigger| trigger.doc != doc || trigger.view != view)
+ .map_or(true, |trigger| trigger.doc != doc || trigger.view != view)
{
self.trigger = Some(Trigger {
pos: trigger_pos,
@@ -244,15 +242,10 @@ fn request_completions(
doc.selection(view.id).clone(),
doc,
handle.clone(),
- savepoint.clone(),
+ savepoint,
) {
requests.spawn_blocking(path_completion_request);
}
- if let Some(word_completion_request) =
- word::completion(editor, trigger, handle.clone(), savepoint)
- {
- requests.spawn_blocking(word_completion_request);
- }
let ui = compositor.find::<ui::EditorView>().unwrap();
ui.last_insert.1.push(InsertEvent::RequestCompletion);
diff --git a/helix-term/src/handlers/completion/word.rs b/helix-term/src/handlers/completion/word.rs
deleted file mode 100644
index aa204bf8..00000000
--- a/helix-term/src/handlers/completion/word.rs
+++ /dev/null
@@ -1,134 +0,0 @@
-use std::{borrow::Cow, sync::Arc};
-
-use helix_core::{
- self as core, chars::char_is_word, completion::CompletionProvider, movement, Transaction,
-};
-use helix_event::TaskHandle;
-use helix_stdx::rope::RopeSliceExt as _;
-use helix_view::{
- document::SavePoint, handlers::completion::ResponseContext, Document, Editor, ViewId,
-};
-
-use super::{request::TriggerKind, CompletionItem, CompletionItems, CompletionResponse, Trigger};
-
-const COMPLETION_KIND: &str = "word";
-
-pub(super) fn completion(
- editor: &Editor,
- trigger: Trigger,
- handle: TaskHandle,
- savepoint: Arc<SavePoint>,
-) -> Option<impl FnOnce() -> CompletionResponse> {
- if !doc!(editor).word_completion_enabled() {
- return None;
- }
- let config = editor.config().word_completion;
- let doc_config = doc!(editor)
- .language_config()
- .and_then(|config| config.word_completion);
- let trigger_length = doc_config
- .and_then(|c| c.trigger_length)
- .unwrap_or(config.trigger_length)
- .get() as usize;
-
- let (view, doc) = current_ref!(editor);
- let rope = doc.text().clone();
- let word_index = editor.handlers.word_index().clone();
- let text = doc.text().slice(..);
- let selection = doc.selection(view.id).clone();
- let pos = selection.primary().cursor(text);
-
- let cursor = movement::move_prev_word_start(text, core::Range::point(pos), 1);
- if cursor.head == pos {
- return None;
- }
- if trigger.kind != TriggerKind::Manual
- && text
- .slice(cursor.head..)
- .graphemes()
- .take(trigger_length)
- .take_while(|g| g.chars().all(char_is_word))
- .count()
- != trigger_length
- {
- return None;
- }
-
- let typed_word_range = cursor.head..pos;
- let typed_word = text.slice(typed_word_range.clone());
- let edit_diff = if typed_word
- .char(typed_word.len_chars().saturating_sub(1))
- .is_whitespace()
- {
- 0
- } else {
- typed_word.len_chars()
- };
-
- if handle.is_canceled() {
- return None;
- }
-
- let future = move || {
- let text = rope.slice(..);
- let typed_word: Cow<_> = text.slice(typed_word_range).into();
- let items = word_index
- .matches(&typed_word)
- .into_iter()
- .filter(|word| word.as_str() != typed_word.as_ref())
- .map(|word| {
- let transaction = Transaction::change_by_selection(&rope, &selection, |range| {
- let cursor = range.cursor(text);
- (cursor - edit_diff, cursor, Some((&word).into()))
- });
- CompletionItem::Other(core::CompletionItem {
- transaction,
- label: word.into(),
- kind: Cow::Borrowed(COMPLETION_KIND),
- documentation: None,
- provider: CompletionProvider::Word,
- })
- })
- .collect();
-
- CompletionResponse {
- items: CompletionItems::Other(items),
- provider: CompletionProvider::Word,
- context: ResponseContext {
- is_incomplete: false,
- priority: 0,
- savepoint,
- },
- }
- };
-
- Some(future)
-}
-
-pub(super) fn retain_valid_completions(
- trigger: Trigger,
- doc: &Document,
- view_id: ViewId,
- items: &mut Vec<CompletionItem>,
-) {
- if trigger.kind == TriggerKind::Manual {
- return;
- }
-
- let text = doc.text().slice(..);
- let cursor = doc.selection(view_id).primary().cursor(text);
- if text
- .get_char(cursor.saturating_sub(1))
- .is_some_and(|ch| ch.is_whitespace())
- {
- items.retain(|item| {
- !matches!(
- item,
- CompletionItem::Other(core::CompletionItem {
- provider: CompletionProvider::Word,
- ..
- })
- )
- });
- }
-}
diff --git a/helix-term/src/handlers/diagnostics.rs b/helix-term/src/handlers/diagnostics.rs
index aa154eb6..3e44d416 100644
--- a/helix-term/src/handlers/diagnostics.rs
+++ b/helix-term/src/handlers/diagnostics.rs
@@ -1,28 +1,12 @@
-use futures_util::stream::FuturesUnordered;
-use std::collections::HashSet;
-use std::mem;
-use std::time::Duration;
-use tokio::time::Instant;
-use tokio_stream::StreamExt;
-
-use helix_core::diagnostic::DiagnosticProvider;
-use helix_core::syntax::config::LanguageServerFeature;
-use helix_core::Uri;
-use helix_event::{cancelable_future, register_hook, send_blocking};
-use helix_lsp::{lsp, LanguageServerId};
+use helix_event::{register_hook, send_blocking};
use helix_view::document::Mode;
-use helix_view::events::{
- DiagnosticsDidChange, DocumentDidChange, DocumentDidOpen, LanguageServerInitialized,
-};
+use helix_view::events::DiagnosticsDidChange;
use helix_view::handlers::diagnostics::DiagnosticEvent;
-use helix_view::handlers::lsp::{PullAllDocumentsDiagnosticsEvent, PullDiagnosticsEvent};
use helix_view::handlers::Handlers;
-use helix_view::{DocumentId, Editor};
use crate::events::OnModeSwitch;
-use crate::job;
-pub(super) fn register_hooks(handlers: &Handlers) {
+pub(super) fn register_hooks(_handlers: &Handlers) {
register_hook!(move |event: &mut DiagnosticsDidChange<'_>| {
if event.editor.mode != Mode::Insert {
for (view, _) in event.editor.tree.views_mut() {
@@ -37,265 +21,4 @@ pub(super) fn register_hooks(handlers: &Handlers) {
}
Ok(())
});
-
- let tx = handlers.pull_diagnostics.clone();
- let tx_all_documents = handlers.pull_all_documents_diagnostics.clone();
- register_hook!(move |event: &mut DocumentDidChange<'_>| {
- if event
- .doc
- .has_language_server_with_feature(LanguageServerFeature::PullDiagnostics)
- && !event.ghost_transaction
- {
- // Cancel the ongoing request, if present.
- event.doc.pull_diagnostic_controller.cancel();
- let document_id = event.doc.id();
- send_blocking(&tx, PullDiagnosticsEvent { document_id });
-
- let inter_file_dependencies_language_servers = event
- .doc
- .language_servers_with_feature(LanguageServerFeature::PullDiagnostics)
- .filter(|language_server| {
- language_server
- .capabilities()
- .diagnostic_provider
- .as_ref()
- .is_some_and(|diagnostic_provider| match diagnostic_provider {
- lsp::DiagnosticServerCapabilities::Options(options) => {
- options.inter_file_dependencies
- }
-
- lsp::DiagnosticServerCapabilities::RegistrationOptions(options) => {
- options.diagnostic_options.inter_file_dependencies
- }
- })
- })
- .map(|language_server| language_server.id())
- .collect();
-
- send_blocking(
- &tx_all_documents,
- PullAllDocumentsDiagnosticsEvent {
- language_servers: inter_file_dependencies_language_servers,
- },
- );
- }
- Ok(())
- });
-
- register_hook!(move |event: &mut DocumentDidOpen<'_>| {
- request_document_diagnostics(event.editor, event.doc);
-
- Ok(())
- });
-
- register_hook!(move |event: &mut LanguageServerInitialized<'_>| {
- let doc_ids: Vec<_> = event.editor.documents.keys().copied().collect();
-
- for doc_id in doc_ids {
- request_document_diagnostics(event.editor, doc_id);
- }
-
- Ok(())
- });
-}
-
-#[derive(Debug, Default)]
-pub(super) struct PullDiagnosticsHandler {
- document_ids: HashSet<DocumentId>,
-}
-
-impl helix_event::AsyncHook for PullDiagnosticsHandler {
- type Event = PullDiagnosticsEvent;
-
- fn handle_event(
- &mut self,
- event: Self::Event,
- _timeout: Option<tokio::time::Instant>,
- ) -> Option<tokio::time::Instant> {
- self.document_ids.insert(event.document_id);
- Some(Instant::now() + Duration::from_millis(250))
- }
-
- fn finish_debounce(&mut self) {
- let document_ids = mem::take(&mut self.document_ids);
- job::dispatch_blocking(move |editor, _| {
- for document_id in document_ids {
- request_document_diagnostics(editor, document_id);
- }
- })
- }
-}
-
-#[derive(Debug, Default)]
-pub(super) struct PullAllDocumentsDiagnosticHandler {
- language_servers: HashSet<LanguageServerId>,
-}
-
-impl helix_event::AsyncHook for PullAllDocumentsDiagnosticHandler {
- type Event = PullAllDocumentsDiagnosticsEvent;
-
- fn handle_event(
- &mut self,
- event: Self::Event,
- _timeout: Option<tokio::time::Instant>,
- ) -> Option<tokio::time::Instant> {
- self.language_servers.extend(&event.language_servers);
- Some(Instant::now() + Duration::from_secs(1))
- }
-
- fn finish_debounce(&mut self) {
- let language_servers = mem::take(&mut self.language_servers);
- job::dispatch_blocking(move |editor, _| {
- let documents: Vec<_> = editor.documents.keys().copied().collect();
-
- for document in documents {
- request_document_diagnostics_for_language_severs(
- editor,
- document,
- language_servers.clone(),
- );
- }
- })
- }
-}
-
-fn request_document_diagnostics_for_language_severs(
- editor: &mut Editor,
- doc_id: DocumentId,
- language_servers: HashSet<LanguageServerId>,
-) {
- let Some(doc) = editor.document_mut(doc_id) else {
- return;
- };
-
- let cancel = doc.pull_diagnostic_controller.restart();
-
- let mut futures: FuturesUnordered<_> = language_servers
- .iter()
- .filter_map(|x| doc.language_servers().find(|y| &y.id() == x))
- .filter_map(|language_server| {
- let future = language_server
- .text_document_diagnostic(doc.identifier(), doc.previous_diagnostic_id.clone())?;
-
- let identifier = language_server
- .capabilities()
- .diagnostic_provider
- .as_ref()
- .and_then(|diagnostic_provider| match diagnostic_provider {
- lsp::DiagnosticServerCapabilities::Options(options) => {
- options.identifier.clone()
- }
- lsp::DiagnosticServerCapabilities::RegistrationOptions(options) => {
- options.diagnostic_options.identifier.clone()
- }
- });
-
- let language_server_id = language_server.id();
- let provider = DiagnosticProvider::Lsp {
- server_id: language_server_id,
- identifier,
- };
- let uri = doc.uri()?;
-
- Some(async move {
- let result = future.await;
-
- (result, provider, uri)
- })
- })
- .collect();
-
- if futures.is_empty() {
- return;
- }
-
- tokio::spawn(async move {
- let mut retry_language_servers = HashSet::new();
- loop {
- match cancelable_future(futures.next(), &cancel).await {
- Some(Some((Ok(result), provider, uri))) => {
- job::dispatch(move |editor, _| {
- handle_pull_diagnostics_response(editor, result, provider, uri, doc_id);
- })
- .await;
- }
- Some(Some((Err(err), DiagnosticProvider::Lsp { server_id, .. }, _))) => {
- let parsed_cancellation_data = if let helix_lsp::Error::Rpc(error) = err {
- error.data.and_then(|data| {
- serde_json::from_value::<lsp::DiagnosticServerCancellationData>(data)
- .ok()
- })
- } else {
- log::error!("Pull diagnostic request failed: {err}");
- continue;
- };
- if parsed_cancellation_data.is_some_and(|data| data.retrigger_request) {
- retry_language_servers.insert(server_id);
- }
- }
- Some(None) => break,
- // The request was cancelled.
- None => return,
- }
- }
-
- if !retry_language_servers.is_empty() {
- tokio::time::sleep(Duration::from_millis(500)).await;
-
- job::dispatch(move |editor, _| {
- request_document_diagnostics_for_language_severs(
- editor,
- doc_id,
- retry_language_servers,
- );
- })
- .await;
- }
- });
-}
-
-pub fn request_document_diagnostics(editor: &mut Editor, doc_id: DocumentId) {
- let Some(doc) = editor.document(doc_id) else {
- return;
- };
-
- let language_servers = doc
- .language_servers_with_feature(LanguageServerFeature::PullDiagnostics)
- .map(|language_servers| language_servers.id())
- .collect();
-
- request_document_diagnostics_for_language_severs(editor, doc_id, language_servers);
-}
-
-fn handle_pull_diagnostics_response(
- editor: &mut Editor,
- result: lsp::DocumentDiagnosticReportResult,
- provider: DiagnosticProvider,
- uri: Uri,
- document_id: DocumentId,
-) {
- match result {
- lsp::DocumentDiagnosticReportResult::Report(report) => {
- let result_id = match report {
- lsp::DocumentDiagnosticReport::Full(report) => {
- editor.handle_lsp_diagnostics(
- &provider,
- uri,
- None,
- report.full_document_diagnostic_report.items,
- );
-
- report.full_document_diagnostic_report.result_id
- }
- lsp::DocumentDiagnosticReport::Unchanged(report) => {
- Some(report.unchanged_document_diagnostic_report.result_id)
- }
- };
-
- if let Some(doc) = editor.document_mut(document_id) {
- doc.previous_diagnostic_id = result_id;
- };
- }
- lsp::DocumentDiagnosticReportResult::Partial(_) => {}
- };
}
diff --git a/helix-term/src/handlers/prompt.rs b/helix-term/src/handlers/prompt.rs
deleted file mode 100644
index 2270f58b..00000000
--- a/helix-term/src/handlers/prompt.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-use helix_event::register_hook;
-use helix_view::events::DocumentFocusLost;
-use helix_view::handlers::Handlers;
-
-use crate::job::{self};
-use crate::ui;
-
-pub(super) fn register_hooks(_handlers: &Handlers) {
- register_hook!(move |_event: &mut DocumentFocusLost<'_>| {
- job::dispatch_blocking(move |_, compositor| {
- if compositor.find::<ui::Prompt>().is_some() {
- compositor.remove_type::<ui::Prompt>();
- }
- });
- Ok(())
- });
-}
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
index 52112bf9..180e0652 100644
--- a/helix-term/src/health.rs
+++ b/helix-term/src/health.rs
@@ -1,33 +1,22 @@
use crate::config::{Config, ConfigLoadError};
+use crossterm::{
+ style::{Color, StyledContent, Stylize},
+ tty::IsTty,
+};
use helix_core::config::{default_lang_config, user_lang_config};
use helix_loader::grammar::load_runtime_file;
-use std::{
- collections::HashSet,
- io::{IsTerminal, Write},
-};
-use termina::{
- style::{ColorSpec, StyleExt as _, Stylized},
- Terminal as _,
-};
+use std::io::Write;
#[derive(Copy, Clone)]
pub enum TsFeature {
Highlight,
TextObject,
AutoIndent,
- Tags,
- RainbowBracket,
}
impl TsFeature {
pub fn all() -> &'static [Self] {
- &[
- Self::Highlight,
- Self::TextObject,
- Self::AutoIndent,
- Self::Tags,
- Self::RainbowBracket,
- ]
+ &[Self::Highlight, Self::TextObject, Self::AutoIndent]
}
pub fn runtime_filename(&self) -> &'static str {
@@ -35,8 +24,6 @@ impl TsFeature {
Self::Highlight => "highlights.scm",
Self::TextObject => "textobjects.scm",
Self::AutoIndent => "indents.scm",
- Self::Tags => "tags.scm",
- Self::RainbowBracket => "rainbows.scm",
}
}
@@ -45,8 +32,6 @@ impl TsFeature {
Self::Highlight => "Syntax Highlighting",
Self::TextObject => "Treesitter Textobjects",
Self::AutoIndent => "Auto Indent",
- Self::Tags => "Code Navigation Tags",
- Self::RainbowBracket => "Rainbow Brackets",
}
}
@@ -55,8 +40,6 @@ impl TsFeature {
Self::Highlight => "Highlight",
Self::TextObject => "Textobject",
Self::AutoIndent => "Indent",
- Self::Tags => "Tags",
- Self::RainbowBracket => "Rainbow",
}
}
}
@@ -151,15 +134,6 @@ pub fn clipboard() -> std::io::Result<()> {
}
pub fn languages_all() -> std::io::Result<()> {
- languages(None)
-}
-
-pub fn languages_selection() -> std::io::Result<()> {
- let selection = helix_loader::grammar::get_grammar_names().unwrap_or_default();
- languages(selection)
-}
-
-fn languages(selection: Option<HashSet<String>>) -> std::io::Result<()> {
let stdout = std::io::stdout();
let mut stdout = stdout.lock();
@@ -186,24 +160,21 @@ fn languages(selection: Option<HashSet<String>>) -> std::io::Result<()> {
headings.push(feat.short_title())
}
- let terminal_cols = termina::PlatformTerminal::new()
- .and_then(|terminal| terminal.get_dimensions())
- .map(|size| size.cols)
- .unwrap_or(80);
+ let terminal_cols = crossterm::terminal::size().map(|(c, _)| c).unwrap_or(80);
let column_width = terminal_cols as usize / headings.len();
- let is_terminal = std::io::stdout().is_terminal();
+ let is_terminal = std::io::stdout().is_tty();
- let fit = |s: &str| -> Stylized<'static> {
+ let fit = |s: &str| -> StyledContent<String> {
format!(
"{:column_width$}",
s.get(..column_width - 2)
.map(|s| format!("{}…", s))
.unwrap_or_else(|| s.to_string())
)
- .stylized()
+ .stylize()
};
- let color = |s: Stylized<'static>, c: ColorSpec| if is_terminal { s.foreground(c) } else { s };
- let bold = |s: Stylized<'static>| if is_terminal { s.bold() } else { s };
+ let color = |s: StyledContent<String>, c: Color| if is_terminal { s.with(c) } else { s };
+ let bold = |s: StyledContent<String>| if is_terminal { s.bold() } else { s };
for heading in headings {
write!(stdout, "{}", bold(fit(heading)))?;
@@ -216,22 +187,15 @@ fn languages(selection: Option<HashSet<String>>) -> std::io::Result<()> {
let check_binary_with_name = |cmd: Option<(&str, &str)>| match cmd {
Some((name, cmd)) => match helix_stdx::env::which(cmd) {
- Ok(_) => color(fit(&format!("✓ {}", name)), ColorSpec::BRIGHT_GREEN),
- Err(_) => color(fit(&format!("✘ {}", name)), ColorSpec::BRIGHT_RED),
+ Ok(_) => color(fit(&format!("✓ {}", name)), Color::Green),
+ Err(_) => color(fit(&format!("✘ {}", name)), Color::Red),
},
- None => color(fit("None"), ColorSpec::BRIGHT_YELLOW),
+ None => color(fit("None"), Color::Yellow),
};
let check_binary = |cmd: Option<&str>| check_binary_with_name(cmd.map(|cmd| (cmd, cmd)));
for lang in &syn_loader_conf.language {
- if selection
- .as_ref()
- .is_some_and(|s| !s.contains(&lang.language_id))
- {
- continue;
- }
-
write!(stdout, "{}", fit(&lang.language_id))?;
let mut cmds = lang.language_servers.iter().filter_map(|ls| {
@@ -253,8 +217,8 @@ fn languages(selection: Option<HashSet<String>>) -> std::io::Result<()> {
for ts_feat in TsFeature::all() {
match load_runtime_file(&lang.language_id, ts_feat.runtime_filename()).is_ok() {
- true => write!(stdout, "{}", color(fit("✓"), ColorSpec::BRIGHT_GREEN))?,
- false => write!(stdout, "{}", color(fit("✘"), ColorSpec::BRIGHT_RED))?,
+ true => write!(stdout, "{}", color(fit("✓"), Color::Green))?,
+ false => write!(stdout, "{}", color(fit("✘"), Color::Red))?,
}
}
@@ -266,14 +230,6 @@ fn languages(selection: Option<HashSet<String>>) -> std::io::Result<()> {
}
}
- if selection.is_some() {
- writeln!(
- stdout,
- "\nThis list is filtered according to the 'use-grammars' option in languages.toml file.\n\
- To see the full list, use the '--health all' or '--health all-languages' option."
- )?;
- }
-
Ok(())
}
@@ -365,8 +321,8 @@ fn probe_parser(grammar_name: &str) -> std::io::Result<()> {
write!(stdout, "Tree-sitter parser: ")?;
match helix_loader::grammar::get_language(grammar_name) {
- Ok(Some(_)) => writeln!(stdout, "{}", "✓".green()),
- Ok(None) | Err(_) => writeln!(stdout, "{}", "None".yellow()),
+ Ok(_) => writeln!(stdout, "{}", "✓".green()),
+ Err(_) => writeln!(stdout, "{}", "None".yellow()),
}
}
@@ -435,16 +391,9 @@ fn probe_treesitter_feature(lang: &str, feature: TsFeature) -> std::io::Result<(
pub fn print_health(health_arg: Option<String>) -> std::io::Result<()> {
match health_arg.as_deref() {
- Some("languages") => languages_selection()?,
- Some("all-languages") => languages_all()?,
+ Some("languages") => languages_all()?,
Some("clipboard") => clipboard()?,
- None => {
- general()?;
- clipboard()?;
- writeln!(std::io::stdout().lock())?;
- languages_selection()?;
- }
- Some("all") => {
+ None | Some("all") => {
general()?;
clipboard()?;
writeln!(std::io::stdout().lock())?;
diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs
index 5bbbd3f4..82baf336 100644
--- a/helix-term/src/keymap/default.rs
+++ b/helix-term/src/keymap/default.rs
@@ -120,7 +120,6 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"e" => goto_prev_entry,
"T" => goto_prev_test,
"p" => goto_prev_paragraph,
- "x" => goto_prev_xml_element,
"space" => add_newline_above,
},
"]" => { "Right bracket"
@@ -135,7 +134,6 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"e" => goto_next_entry,
"T" => goto_next_test,
"p" => goto_next_paragraph,
- "x" => goto_next_xml_element,
"space" => add_newline_below,
},
@@ -229,8 +227,8 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"E" => file_explorer_in_current_buffer_directory,
"b" => buffer_picker,
"j" => jumplist_picker,
- "s" => lsp_or_syntax_symbol_picker,
- "S" => lsp_or_syntax_workspace_symbol_picker,
+ "s" => symbol_picker,
+ "S" => workspace_symbol_picker,
"d" => diagnostics_picker,
"D" => workspace_diagnostics_picker,
"g" => changed_file_picker,
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index bdca0c01..31ab85cf 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -1,4 +1,5 @@
use anyhow::{Context, Error, Result};
+use crossterm::event::EventStream;
use helix_loader::VERSION_AND_GIT_HASH;
use helix_term::application::Application;
use helix_term::args::Args;
@@ -56,27 +57,24 @@ USAGE:
hx [FLAGS] [files]...
ARGS:
- <files>... Set the input file to use, position can also be specified via file[:row[:col]]
+ <files>... Sets the input file to use, position can also be specified via file[:row[:col]]
FLAGS:
- -h, --help Print help information
- --tutor Load the tutorial
- --health [CATEGORY] Check for potential errors in editor setup
- CATEGORY can be a language or one of 'clipboard', 'languages',
- 'all-languages' or 'all'. 'languages' is filtered according to
- user config, 'all-languages' and 'all' are not. If not specified,
- the default is the same as 'all', but with languages filtering.
- -g, --grammar {{fetch|build}} Fetch or builds tree-sitter grammars listed in languages.toml
- -c, --config <file> Specify a file to use for configuration
- -v Increase logging verbosity each use for up to 3 times
- --log <file> Specify a file to use for logging
+ -h, --help Prints help information
+ --tutor Loads the tutorial
+ --health [CATEGORY] Checks for potential errors in editor setup
+ CATEGORY can be a language or one of 'clipboard', 'languages'
+ or 'all'. 'all' is the default if not specified.
+ -g, --grammar {{fetch|build}} Fetches or builds tree-sitter grammars listed in languages.toml
+ -c, --config <file> Specifies a file to use for configuration
+ -v Increases logging verbosity each use for up to 3 times
+ --log <file> Specifies a file to use for logging
(default file: {})
- -V, --version Print version information
- --vsplit Split all given files vertically into different windows
- --hsplit Split all given files horizontally into different windows
+ -V, --version Prints version information
+ --vsplit Splits all given files vertically into different windows
+ --hsplit Splits all given files horizontally into different windows
-w, --working-dir <path> Specify an initial working directory
- +[N] Open the first given file at line number N, or the last line, if
- N is not specified.
+ +N Open the first given file at line number N
",
env!("CARGO_PKG_NAME"),
VERSION_AND_GIT_HASH,
@@ -151,9 +149,8 @@ FLAGS:
// TODO: use the thread local executor to spawn the application task separately from the work pool
let mut app = Application::new(args, config, lang_loader).context("unable to start Helix")?;
- let mut events = app.event_stream();
- let exit_code = app.run(&mut events).await?;
+ let exit_code = app.run(&mut EventStream::new()).await?;
Ok(exit_code)
}
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs
index c0d3294f..e17762bf 100644
--- a/helix-term/src/ui/completion.rs
+++ b/helix-term/src/ui/completion.rs
@@ -1,9 +1,9 @@
-use crate::handlers::completion::LspCompletionItem;
use crate::ui::{menu, Markdown, Menu, Popup, PromptEvent};
use crate::{
compositor::{Component, Context, Event, EventResult},
handlers::completion::{
- trigger_auto_completion, CompletionItem, CompletionResponse, ResolveHandler,
+ trigger_auto_completion, CompletionItem, CompletionResponse, LspCompletionItem,
+ ResolveHandler,
},
};
use helix_core::snippets::{ActiveSnippet, RenderedSnippet, Snippet};
@@ -28,7 +28,7 @@ use std::cmp::Reverse;
impl menu::Item for CompletionItem {
type Data = Style;
- fn format(&self, dir_style: &Self::Data) -> menu::Row<'_> {
+ fn format(&self, dir_style: &Self::Data) -> menu::Row {
let deprecated = match self {
CompletionItem::Lsp(LspCompletionItem { item, .. }) => {
item.deprecated.unwrap_or_default()
diff --git a/helix-term/src/ui/document.rs b/helix-term/src/ui/document.rs
index de85268a..524d829c 100644
--- a/helix-term/src/ui/document.rs
+++ b/helix-term/src/ui/document.rs
@@ -214,7 +214,7 @@ impl<'a> TextRenderer<'a> {
let tab_width = doc.tab_width();
let tab = if ws_render.tab() == WhitespaceRenderValue::All {
std::iter::once(ws_chars.tab)
- .chain(std::iter::repeat_n(ws_chars.tabpad, tab_width - 1))
+ .chain(std::iter::repeat(ws_chars.tabpad).take(tab_width - 1))
.collect()
} else {
" ".repeat(tab_width)
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index b25af107..9343d55d 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -127,18 +127,6 @@ impl EditorView {
&text_annotations,
));
- if doc
- .language_config()
- .and_then(|config| config.rainbow_brackets)
- .unwrap_or(config.rainbow_brackets)
- {
- if let Some(overlay) =
- Self::doc_rainbow_highlights(doc, view_offset.anchor, inner.height, theme, &loader)
- {
- overlays.push(overlay);
- }
- }
-
Self::doc_diagnostics_highlights_into(doc, theme, &mut overlays);
if is_focused {
@@ -316,27 +304,6 @@ impl EditorView {
text_annotations.collect_overlay_highlights(range)
}
- pub fn doc_rainbow_highlights(
- doc: &Document,
- anchor: usize,
- height: u16,
- theme: &Theme,
- loader: &syntax::Loader,
- ) -> Option<OverlayHighlights> {
- let syntax = doc.syntax()?;
- let text = doc.text().slice(..);
- let row = text.char_to_line(anchor.min(text.len_chars()));
- let visible_range = Self::viewport_byte_range(text, row, height);
- let start = syntax::child_for_byte_range(
- &syntax.tree().root_node(),
- visible_range.start as u32..visible_range.end as u32,
- )
- .map_or(visible_range.start as u32, |node| node.start_byte());
- let range = start..visible_range.end as u32;
-
- Some(syntax.rainbow_highlights(text, theme.rainbow_length(), loader, range))
- }
-
/// Get highlight spans for document diagnostics
pub fn doc_diagnostics_highlights_into(
doc: &Document,
@@ -538,7 +505,7 @@ impl EditorView {
};
spans.push((selection_scope, range.anchor..selection_end));
// add block cursors
- // skip primary cursor if terminal is unfocused - terminal cursor is used in that case
+ // skip primary cursor if terminal is unfocused - crossterm cursor is used in that case
if !selection_is_primary || (cursor_is_block && is_terminal_focused) {
spans.push((cursor_scope, cursor_start..range.head));
}
@@ -546,7 +513,7 @@ impl EditorView {
// Reverse case.
let cursor_end = next_grapheme_boundary(text, range.head);
// add block cursors
- // skip primary cursor if terminal is unfocused - terminal cursor is used in that case
+ // skip primary cursor if terminal is unfocused - crossterm cursor is used in that case
if !selection_is_primary || (cursor_is_block && is_terminal_focused) {
spans.push((cursor_scope, range.head..cursor_end));
}
@@ -1159,8 +1126,6 @@ impl EditorView {
let editor = &mut cxt.editor;
if let Some((pos, view_id)) = pos_and_view(editor, row, column, true) {
- editor.focus(view_id);
-
let prev_view_id = view!(editor).id;
let doc = doc_mut!(editor, &view!(editor, view_id).doc);
@@ -1184,6 +1149,7 @@ impl EditorView {
self.clear_completion(editor);
}
+ editor.focus(view_id);
editor.ensure_cursor_in_view(view_id);
return EventResult::Consumed(None);
@@ -1631,7 +1597,7 @@ impl Component for EditorView {
if self.terminal_focused {
(pos, CursorKind::Hidden)
} else {
- // use terminal cursor when terminal loses focus
+ // use crossterm cursor when terminal loses focus
(pos, CursorKind::Underline)
}
}
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs
index 6bef59d1..ae58d75e 100644
--- a/helix-term/src/ui/markdown.rs
+++ b/helix-term/src/ui/markdown.rs
@@ -90,13 +90,7 @@ pub fn highlighted_code_block<'a>(
if pos == start {
continue;
}
- // The highlighter should always move forward.
- // If the highlighter malfunctions, bail on syntax highlighting and log an error.
- debug_assert!(pos > start);
- if pos < start {
- log::error!("Failed to highlight '{language}': {text:?}");
- return styled_multiline_text(text, code_style);
- }
+ assert!(pos > start);
let style = syntax_highlight_stack
.iter()
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index 41cf96ac..76e50229 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -13,7 +13,7 @@ pub trait Item: Sync + Send + 'static {
/// Additional editor state that is used for label calculation.
type Data: Sync + Send + 'static;
- fn format(&self, data: &Self::Data) -> Row<'_>;
+ fn format(&self, data: &Self::Data) -> Row;
}
pub type MenuCallback<T> = Box<dyn Fn(&mut Editor, Option<&T>, MenuEvent)>;
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 58b6fc00..106bfbfb 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -185,22 +185,6 @@ pub fn raw_regex_prompt(
cx.push_layer(Box::new(prompt));
}
-/// We want to exclude files that the editor can't handle yet
-fn get_excluded_types() -> ignore::types::Types {
- use ignore::types::TypesBuilder;
- let mut type_builder = TypesBuilder::new();
- type_builder
- .add(
- "compressed",
- "*.{zip,gz,bz2,zst,lzo,sz,tgz,tbz2,lz,lz4,lzma,lzo,z,Z,xz,7z,rar,cab}",
- )
- .expect("Invalid type definition");
- type_builder.negate("all");
- type_builder
- .build()
- .expect("failed to build excluded_types")
-}
-
#[derive(Debug)]
pub struct FilePickerData {
root: PathBuf,
@@ -209,7 +193,7 @@ pub struct FilePickerData {
type FilePicker = Picker<PathBuf, FilePickerData>;
pub fn file_picker(editor: &Editor, root: PathBuf) -> FilePicker {
- use ignore::WalkBuilder;
+ use ignore::{types::TypesBuilder, WalkBuilder};
use std::time::Instant;
let config = editor.config();
@@ -224,8 +208,7 @@ pub fn file_picker(editor: &Editor, root: PathBuf) -> FilePicker {
let absolute_root = root.canonicalize().unwrap_or_else(|_| root.clone());
let mut walk_builder = WalkBuilder::new(&root);
-
- let mut files = walk_builder
+ walk_builder
.hidden(config.file_picker.hidden)
.parents(config.file_picker.parents)
.ignore(config.file_picker.ignore)
@@ -235,18 +218,31 @@ pub fn file_picker(editor: &Editor, root: PathBuf) -> FilePicker {
.git_exclude(config.file_picker.git_exclude)
.sort_by_file_name(|name1, name2| name1.cmp(name2))
.max_depth(config.file_picker.max_depth)
- .filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks))
- .add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
- .add_custom_ignore_filename(".helix/ignore")
- .types(get_excluded_types())
+ .filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks));
+
+ walk_builder.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"));
+ walk_builder.add_custom_ignore_filename(".helix/ignore");
+
+ // We want to exclude files that the editor can't handle yet
+ let mut type_builder = TypesBuilder::new();
+ type_builder
+ .add(
+ "compressed",
+ "*.{zip,gz,bz2,zst,lzo,sz,tgz,tbz2,lz,lz4,lzma,lzo,z,Z,xz,7z,rar,cab}",
+ )
+ .expect("Invalid type definition");
+ type_builder.negate("all");
+ let excluded_types = type_builder
.build()
- .filter_map(|entry| {
- let entry = entry.ok()?;
- if !entry.file_type()?.is_file() {
- return None;
- }
- Some(entry.into_path())
- });
+ .expect("failed to build excluded_types");
+ walk_builder.types(excluded_types);
+ let mut files = walk_builder.build().filter_map(|entry| {
+ let entry = entry.ok()?;
+ if !entry.file_type()?.is_file() {
+ return None;
+ }
+ Some(entry.into_path())
+ });
log::debug!("file_picker init {:?}", Instant::now().duration_since(now));
let columns = [PickerColumn::new(
@@ -308,7 +304,7 @@ type FileExplorer = Picker<(PathBuf, bool), (PathBuf, Style)>;
pub fn file_explorer(root: PathBuf, editor: &Editor) -> Result<FileExplorer, std::io::Error> {
let directory_style = editor.theme.get("ui.text.directory");
- let directory_content = directory_content(&root, editor)?;
+ let directory_content = directory_content(&root)?;
let columns = [PickerColumn::new(
"path",
@@ -354,64 +350,24 @@ pub fn file_explorer(root: PathBuf, editor: &Editor) -> Result<FileExplorer, std
Ok(picker)
}
-fn directory_content(root: &Path, editor: &Editor) -> Result<Vec<(PathBuf, bool)>, std::io::Error> {
- use ignore::WalkBuilder;
-
- let config = editor.config();
-
- let mut walk_builder = WalkBuilder::new(root);
-
- let mut content: Vec<(PathBuf, bool)> = walk_builder
- .hidden(config.file_explorer.hidden)
- .parents(config.file_explorer.parents)
- .ignore(config.file_explorer.ignore)
- .follow_links(config.file_explorer.follow_symlinks)
- .git_ignore(config.file_explorer.git_ignore)
- .git_global(config.file_explorer.git_global)
- .git_exclude(config.file_explorer.git_exclude)
- .max_depth(Some(1))
- .add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
- .add_custom_ignore_filename(".helix/ignore")
- .types(get_excluded_types())
- .build()
- .filter_map(|entry| {
- entry
- .map(|entry| {
- let is_dir = entry
- .file_type()
- .is_some_and(|file_type| file_type.is_dir());
- let mut path = entry.path().to_path_buf();
- if is_dir && path != root && config.file_explorer.flatten_dirs {
- while let Some(single_child_directory) = get_child_if_single_dir(&path) {
- path = single_child_directory;
- }
- }
- (path, is_dir)
- })
- .ok()
- .filter(|entry| entry.0 != root)
+fn directory_content(path: &Path) -> Result<Vec<(PathBuf, bool)>, std::io::Error> {
+ let mut content: Vec<_> = std::fs::read_dir(path)?
+ .flatten()
+ .map(|entry| {
+ (
+ entry.path(),
+ entry.file_type().is_ok_and(|file_type| file_type.is_dir()),
+ )
})
.collect();
content.sort_by(|(path1, is_dir1), (path2, is_dir2)| (!is_dir1, path1).cmp(&(!is_dir2, path2)));
-
- if root.parent().is_some() {
- content.insert(0, (root.join(".."), true));
+ if path.parent().is_some() {
+ content.insert(0, (path.join(".."), true));
}
-
Ok(content)
}
-fn get_child_if_single_dir(path: &Path) -> Option<PathBuf> {
- let mut entries = path.read_dir().ok()?;
- let entry = entries.next()?.ok()?;
- if entries.next().is_none() && entry.file_type().is_ok_and(|file_type| file_type.is_dir()) {
- Some(entry.path())
- } else {
- None
- }
-}
-
pub mod completers {
use super::Utf8PathBuf;
use crate::ui::prompt::Completion;
@@ -736,8 +692,7 @@ pub mod completers {
.flatten()
.filter_map(|res| {
let entry = res.ok()?;
- let metadata = entry.metadata().ok()?;
- if metadata.is_file() || metadata.is_symlink() {
+ if entry.metadata().ok()?.is_file() {
entry.file_name().into_string().ok()
} else {
None
@@ -784,27 +739,3 @@ pub mod completers {
completions
}
}
-
-#[cfg(test)]
-mod tests {
- use std::fs::{create_dir, File};
-
- use super::*;
-
- #[test]
- fn test_get_child_if_single_dir() {
- let root = tempfile::tempdir().unwrap();
-
- assert_eq!(get_child_if_single_dir(root.path()), None);
-
- let dir = root.path().join("dir1");
- create_dir(&dir).unwrap();
-
- assert_eq!(get_child_if_single_dir(root.path()), Some(dir));
-
- let file = root.path().join("file");
- File::create(file).unwrap();
-
- assert_eq!(get_child_if_single_dir(root.path()), None);
- }
-}
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index 4f77f8b9..3f3aaba2 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -258,7 +258,6 @@ pub struct Picker<T: 'static + Send + Sync, D: 'static> {
widths: Vec<Constraint>,
callback_fn: PickerCallback<T>,
- default_action: Action,
pub truncate_start: bool,
/// Caches paths to documents
@@ -309,10 +308,7 @@ impl<T: 'static + Send + Sync, D: 'static + Send + Sync> Picker<T, D> {
F: Fn(&mut Context, &T, Action) + 'static,
{
let columns: Arc<[_]> = columns.into_iter().collect();
- let matcher_columns = columns
- .iter()
- .filter(|col: &&Column<T, D>| col.filter)
- .count() as u32;
+ let matcher_columns = columns.iter().filter(|col| col.filter).count() as u32;
assert!(matcher_columns > 0);
let matcher = Nucleo::new(
Config::DEFAULT,
@@ -386,7 +382,6 @@ impl<T: 'static + Send + Sync, D: 'static + Send + Sync> Picker<T, D> {
truncate_start: true,
show_preview: true,
callback_fn: Box::new(callback_fn),
- default_action: Action::Replace,
completion_height: 0,
widths,
preview_cache: HashMap::new(),
@@ -429,11 +424,6 @@ impl<T: 'static + Send + Sync, D: 'static + Send + Sync> Picker<T, D> {
self
}
- pub fn with_initial_cursor(mut self, cursor: u32) -> Self {
- self.cursor = cursor;
- self
- }
-
pub fn with_dynamic_query(
mut self,
callback: DynQueryCallback<T, D>,
@@ -450,11 +440,6 @@ impl<T: 'static + Send + Sync, D: 'static + Send + Sync> Picker<T, D> {
self
}
- pub fn with_default_action(mut self, action: Action) -> Self {
- self.default_action = action;
- self
- }
-
/// Move the cursor by a number of lines, either down (`Forward`) or up (`Backward`)
pub fn move_by(&mut self, amount: u32, direction: Direction) {
let len = self.matcher.snapshot().matched_item_count();
@@ -610,15 +595,11 @@ impl<T: 'static + Send + Sync, D: 'static + Send + Sync> Picker<T, D> {
let preview = std::fs::metadata(&path)
.and_then(|metadata| {
if metadata.is_dir() {
- let files = super::directory_content(&path, editor)?;
+ let files = super::directory_content(&path)?;
let file_names: Vec<_> = files
.iter()
- .filter_map(|(file_path, is_dir)| {
- let name = file_path
- .strip_prefix(&path)
- .map(|p| Some(p.as_os_str()))
- .unwrap_or_else(|_| file_path.file_name())?
- .to_string_lossy();
+ .filter_map(|(path, is_dir)| {
+ let name = path.file_name()?.to_string_lossy();
if *is_dir {
Some((format!("{}/", name), true))
} else {
@@ -900,7 +881,7 @@ impl<T: 'static + Send + Sync, D: 'static + Send + Sync> Picker<T, D> {
if let Some((preview, range)) = self.get_preview(cx.editor) {
let doc = match preview.document() {
Some(doc)
- if range.is_none_or(|(start, end)| {
+ if range.map_or(true, |(start, end)| {
start <= end && end <= doc.text().len_lines()
}) =>
{
@@ -1048,23 +1029,23 @@ impl<I: 'static + Send + Sync, D: 'static + Send + Sync> Component for Picker<I,
let close_fn = |picker: &mut Self| {
// if the picker is very large don't store it as last_picker to avoid
// excessive memory consumption
- let callback: compositor::Callback =
- if picker.matcher.snapshot().item_count() > 1_000_000 {
- Box::new(|compositor: &mut Compositor, _ctx| {
- // remove the layer
- compositor.pop();
- })
- } else {
- // stop streaming in new items in the background, really we should
- // be restarting the stream somehow once the picker gets
- // reopened instead (like for an FS crawl) that would also remove the
- // need for the special case above but that is pretty tricky
- picker.version.fetch_add(1, atomic::Ordering::Relaxed);
- Box::new(|compositor: &mut Compositor, _ctx| {
- // remove the layer
- compositor.last_picker = compositor.pop();
- })
- };
+ let callback: compositor::Callback = if picker.matcher.snapshot().item_count() > 100_000
+ {
+ Box::new(|compositor: &mut Compositor, _ctx| {
+ // remove the layer
+ compositor.pop();
+ })
+ } else {
+ // stop streaming in new items in the background, really we should
+ // be restarting the stream somehow once the picker gets
+ // reopened instead (like for an FS crawl) that would also remove the
+ // need for the special case above but that is pretty tricky
+ picker.version.fetch_add(1, atomic::Ordering::Relaxed);
+ Box::new(|compositor: &mut Compositor, _ctx| {
+ // remove the layer
+ compositor.last_picker = compositor.pop();
+ })
+ };
EventResult::Consumed(Some(callback))
};
@@ -1090,7 +1071,7 @@ impl<I: 'static + Send + Sync, D: 'static + Send + Sync> Component for Picker<I,
key!(Esc) | ctrl!('c') => return close_fn(self),
alt!(Enter) => {
if let Some(option) = self.selection() {
- (self.callback_fn)(ctx, option, self.default_action);
+ (self.callback_fn)(ctx, option, Action::Replace);
}
}
key!(Enter) => {
@@ -1114,7 +1095,7 @@ impl<I: 'static + Send + Sync, D: 'static + Send + Sync> Component for Picker<I,
self.handle_prompt_change(true);
} else {
if let Some(option) = self.selection() {
- (self.callback_fn)(ctx, option, self.default_action);
+ (self.callback_fn)(ctx, option, Action::Replace);
}
if let Some(history_register) = self.prompt.history_register() {
if let Err(err) = ctx
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index d2448335..ff4ca1fc 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -779,7 +779,8 @@ impl Component for Prompt {
col += self.line[self.cursor..]
.graphemes(true)
.next()
- .map_or(0, |g| g.width());
+ .unwrap()
+ .width();
}
let line = area.height as usize - 1;
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs
index 88c75fe1..4c96c816 100644
--- a/helix-term/src/ui/statusline.rs
+++ b/helix-term/src/ui/statusline.rs
@@ -1,5 +1,7 @@
+use std::borrow::Cow;
+
use helix_core::indent::IndentStyle;
-use helix_core::{coords_at_pos, encoding, unicode::width::UnicodeWidthStr, Position};
+use helix_core::{coords_at_pos, encoding, Position};
use helix_lsp::lsp::DiagnosticSeverity;
use helix_view::document::DEFAULT_LANGUAGE_NAME;
use helix_view::{
@@ -156,7 +158,6 @@ where
helix_view::editor::StatusLineElement::Spacer => render_spacer,
helix_view::editor::StatusLineElement::VersionControl => render_version_control,
helix_view::editor::StatusLineElement::Register => render_register,
- helix_view::editor::StatusLineElement::CurrentWorkingDirectory => render_cwd,
}
}
@@ -167,16 +168,18 @@ where
let visible = context.focused;
let config = context.editor.config();
let modenames = &config.statusline.mode;
- let mode_str = match context.editor.mode() {
- Mode::Insert => &modenames.insert,
- Mode::Select => &modenames.select,
- Mode::Normal => &modenames.normal,
- };
let content = if visible {
- format!(" {mode_str} ")
+ Cow::Owned(format!(
+ " {} ",
+ match context.editor.mode() {
+ Mode::Insert => &modenames.insert,
+ Mode::Select => &modenames.select,
+ Mode::Normal => &modenames.normal,
+ }
+ ))
} else {
// If not focused, explicitly leave an empty space instead of returning None.
- " ".repeat(mode_str.width() + 2)
+ Cow::Borrowed(" ")
};
let style = if visible && config.color_modes {
match context.editor.mode() {
@@ -234,24 +237,36 @@ where
for sev in &context.editor.config().statusline.diagnostics {
match sev {
Severity::Hint if hints > 0 => {
- write(context, Span::styled("●", context.editor.theme.get("hint")));
+ write(
+ context,
+ Span::styled(Severity::Hint.indicator(), context.editor.theme.get("hint")),
+ );
write(context, format!(" {} ", hints).into());
}
Severity::Info if info > 0 => {
- write(context, Span::styled("●", context.editor.theme.get("info")));
+ write(
+ context,
+ Span::styled(Severity::Info.indicator(), context.editor.theme.get("info")),
+ );
write(context, format!(" {} ", info).into());
}
Severity::Warning if warnings > 0 => {
write(
context,
- Span::styled("●", context.editor.theme.get("warning")),
+ Span::styled(
+ Severity::Warning.indicator(),
+ context.editor.theme.get("warning"),
+ ),
);
write(context, format!(" {} ", warnings).into());
}
Severity::Error if errors > 0 => {
write(
context,
- Span::styled("●", context.editor.theme.get("error")),
+ Span::styled(
+ Severity::Error.indicator(),
+ context.editor.theme.get("error"),
+ ),
);
write(context, format!(" {} ", errors).into());
}
@@ -301,24 +316,36 @@ where
for sev in sevs_to_show {
match sev {
Severity::Hint if hints > 0 => {
- write(context, Span::styled("●", context.editor.theme.get("hint")));
+ write(
+ context,
+ Span::styled(Severity::Hint.indicator(), context.editor.theme.get("hint")),
+ );
write(context, format!(" {} ", hints).into());
}
Severity::Info if info > 0 => {
- write(context, Span::styled("●", context.editor.theme.get("info")));
+ write(
+ context,
+ Span::styled(Severity::Info.indicator(), context.editor.theme.get("info")),
+ );
write(context, format!(" {} ", info).into());
}
Severity::Warning if warnings > 0 => {
write(
context,
- Span::styled("●", context.editor.theme.get("warning")),
+ Span::styled(
+ Severity::Warning.indicator(),
+ context.editor.theme.get("warning"),
+ ),
);
write(context, format!(" {} ", warnings).into());
}
Severity::Error if errors > 0 => {
write(
context,
- Span::styled("●", context.editor.theme.get("error")),
+ Span::styled(
+ Severity::Error.indicator(),
+ context.editor.theme.get("error"),
+ ),
);
write(context, format!(" {} ", errors).into());
}
@@ -570,16 +597,3 @@ where
},
);
}
-
-fn render_cwd<'a, F>(context: &mut RenderContext<'a>, write: F)
-where
- F: Fn(&mut RenderContext<'a>, Span<'a>) + Copy,
-{
- let cwd = helix_stdx::env::current_working_dir();
- let cwd = cwd
- .file_name()
- .unwrap_or_default()
- .to_string_lossy()
- .to_string();
- write(context, cwd.into())
-}
diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs
index 90ff4cf0..20e8ac9a 100644
--- a/helix-term/tests/test/commands.rs
+++ b/helix-term/tests/test/commands.rs
@@ -4,8 +4,6 @@ use super::*;
mod insert;
mod movement;
-mod reverse_selection_contents;
-mod rotate_selection_contents;
mod write;
#[tokio::test(flavor = "multi_thread")]
diff --git a/helix-term/tests/test/commands/reverse_selection_contents.rs b/helix-term/tests/test/commands/reverse_selection_contents.rs
deleted file mode 100644
index 043a03c3..00000000
--- a/helix-term/tests/test/commands/reverse_selection_contents.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-use super::*;
-
-const A: &str = indoc! {"
- #(a|)#
- #(b|)#
- #(c|)#
- #[d|]#
- #(e|)#"
-};
-const A_REV: &str = indoc! {"
- #(e|)#
- #[d|]#
- #(c|)#
- #(b|)#
- #(a|)#"
-};
-const B: &str = indoc! {"
- #(a|)#
- #(b|)#
- #[c|]#
- #(d|)#
- #(e|)#"
-};
-const B_REV: &str = indoc! {"
- #(e|)#
- #(d|)#
- #[c|]#
- #(b|)#
- #(a|)#"
-};
-
-const CMD: &str = "<space>?reverse_selection_contents<ret>";
-
-#[tokio::test(flavor = "multi_thread")]
-async fn reverse_selection_contents() -> anyhow::Result<()> {
- test((A, CMD, A_REV)).await?;
- test((B, CMD, B_REV)).await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn reverse_selection_contents_with_count() -> anyhow::Result<()> {
- test((B, format!("2{CMD}"), B)).await?;
- test((B, format!("3{CMD}"), B_REV)).await?;
- test((B, format!("4{CMD}"), B)).await?;
-
- Ok(())
-}
diff --git a/helix-term/tests/test/commands/rotate_selection_contents.rs b/helix-term/tests/test/commands/rotate_selection_contents.rs
deleted file mode 100644
index b1930005..00000000
--- a/helix-term/tests/test/commands/rotate_selection_contents.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-use super::*;
-
-// Progression: A -> B -> C -> D
-// as we press `A-)`
-const A: &str = indoc! {"
- #(a|)#
- #(b|)#
- #(c|)#
- #[d|]#
- #(e|)#"
-};
-
-const B: &str = indoc! {"
- #(e|)#
- #(a|)#
- #(b|)#
- #(c|)#
- #[d|]#"
-};
-
-const C: &str = indoc! {"
- #[d|]#
- #(e|)#
- #(a|)#
- #(b|)#
- #(c|)#"
-};
-
-const D: &str = indoc! {"
- #(c|)#
- #[d|]#
- #(e|)#
- #(a|)#
- #(b|)#"
-};
-
-#[tokio::test(flavor = "multi_thread")]
-async fn rotate_selection_contents_forward_repeated() -> anyhow::Result<()> {
- test((A, "<A-)>", B)).await?;
- test((B, "<A-)>", C)).await?;
- test((C, "<A-)>", D)).await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn rotate_selection_contents_forward_with_count() -> anyhow::Result<()> {
- test((A, "2<A-)>", C)).await?;
- test((A, "3<A-)>", D)).await?;
- test((B, "2<A-)>", D)).await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn rotate_selection_contents_backward_repeated() -> anyhow::Result<()> {
- test((D, "<A-(>", C)).await?;
- test((C, "<A-(>", B)).await?;
- test((B, "<A-(>", A)).await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn rotate_selection_contents_backward_with_count() -> anyhow::Result<()> {
- test((D, "2<A-(>", B)).await?;
- test((D, "3<A-(>", A)).await?;
- test((C, "2<A-(>", A)).await?;
-
- Ok(())
-}
diff --git a/helix-term/tests/test/commands/write.rs b/helix-term/tests/test/commands/write.rs
index 4f44cd36..4b78e14c 100644
--- a/helix-term/tests/test/commands/write.rs
+++ b/helix-term/tests/test/commands/write.rs
@@ -10,100 +10,6 @@ use helix_view::doc;
use super::*;
#[tokio::test(flavor = "multi_thread")]
-async fn test_exit_w_buffer_w_path() -> anyhow::Result<()> {
- let mut file = tempfile::NamedTempFile::new()?;
- let mut app = helpers::AppBuilder::new()
- .with_file(file.path(), None)
- .build()?;
- // Check for write operation on given path and edited buffer
- test_key_sequence(
- &mut app,
- Some("iBecause of the obvious threat to untold numbers of citizens due to the crisis that is even now developing, this radio station will remain on the air day and night.<ret><esc>:x<ret>"),
- None,
- true,
- )
- .await?;
-
- reload_file(&mut file).unwrap();
- let mut file_content = String::new();
- file.as_file_mut().read_to_string(&mut file_content)?;
-
- assert_eq!(
- LineFeedHandling::Native.apply("Because of the obvious threat to untold numbers of citizens due to the crisis that is even now developing, this radio station will remain on the air day and night.\n"),
- file_content
- );
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn test_exit_wo_buffer_w_path() -> anyhow::Result<()> {
- let mut file = tempfile::NamedTempFile::new()?;
- let mut app = helpers::AppBuilder::new()
- .with_file(file.path(), None)
- .build()?;
-
- helpers::run_event_loop_until_idle(&mut app).await;
-
- file.as_file_mut()
- .write_all("extremely important content".as_bytes())?;
- file.as_file_mut().flush()?;
- file.as_file_mut().sync_all()?;
-
- test_key_sequence(&mut app, Some(":x<ret>"), None, true).await?;
-
- reload_file(&mut file).unwrap();
- let mut file_content = String::new();
- file.read_to_string(&mut file_content)?;
- // check that nothing is written to file
- assert_eq!("extremely important content", file_content);
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn test_exit_wo_buffer_wo_path() -> anyhow::Result<()> {
- test_key_sequence(
- &mut AppBuilder::new().build()?,
- Some(":x<ret>"),
- Some(&|app| {
- assert!(!app.editor.is_err());
- }),
- true,
- )
- .await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn test_exit_w_buffer_wo_file() -> anyhow::Result<()> {
- let mut file = tempfile::NamedTempFile::new()?;
- test_key_sequence(
- // try to write without destination
- &mut AppBuilder::new().build()?,
- Some("itest<esc>:x<ret>"),
- None,
- false,
- )
- .await?;
- test_key_sequence(
- // try to write with path succeeds
- &mut AppBuilder::new().build()?,
- Some(format!("iMicCheck<esc>:x {}<ret>", file.path().to_string_lossy()).as_ref()),
- Some(&|app| {
- assert!(!app.editor.is_err());
- }),
- true,
- )
- .await?;
-
- helpers::assert_file_has_content(&mut file, &LineFeedHandling::Native.apply("MicCheck"))?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
async fn test_write_quit_fail() -> anyhow::Result<()> {
let file = helpers::new_readonly_tempfile()?;
let mut app = helpers::AppBuilder::new()
@@ -238,7 +144,7 @@ async fn test_overwrite_protection() -> anyhow::Result<()> {
file.as_file_mut().flush()?;
file.as_file_mut().sync_all()?;
- test_key_sequence(&mut app, Some("iOverwriteData<esc>:x<ret>"), None, false).await?;
+ test_key_sequence(&mut app, Some(":x<ret>"), None, false).await?;
reload_file(&mut file).unwrap();
let mut file_content = String::new();
@@ -866,70 +772,3 @@ async fn edit_file_with_content(file_content: &[u8]) -> anyhow::Result<()> {
Ok(())
}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn test_move_file_when_given_dir_and_filename() -> anyhow::Result<()> {
- let dir = tempfile::tempdir()?;
- let source_file = tempfile::NamedTempFile::new_in(&dir)?;
- let target_file = dir.path().join("new_name.ext");
-
- let mut app = helpers::AppBuilder::new()
- .with_file(source_file.path(), None)
- .build()?;
-
- test_key_sequence(
- &mut app,
- Some(format!(":move {}<ret>", target_file.to_string_lossy()).as_ref()),
- None,
- false,
- )
- .await?;
-
- assert!(
- target_file.is_file(),
- "target file '{}' should have been created",
- target_file.display()
- );
- assert!(
- !source_file.path().exists(),
- "Source file '{}' should have been removed",
- source_file.path().display()
- );
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn test_move_file_when_given_dir_only() -> anyhow::Result<()> {
- let source_dir = tempfile::tempdir()?;
- let target_dir = tempfile::tempdir()?;
- let source_file = source_dir.path().join("file.ext");
- std::fs::File::create(&source_file)?;
-
- let mut app = helpers::AppBuilder::new()
- .with_file(&source_file, None)
- .build()?;
-
- test_key_sequence(
- &mut app,
- Some(format!(":move {}<ret>", target_dir.path().to_string_lossy()).as_ref()),
- None,
- false,
- )
- .await?;
-
- let target_file = target_dir.path().join("file.ext");
-
- assert!(
- target_file.is_file(),
- "target file '{}' should have been created",
- target_file.display()
- );
- assert!(
- !source_file.exists(),
- "Source file '{}' should have been removed",
- source_file.display()
- );
-
- Ok(())
-}
diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs
index 567422c3..ef910852 100644
--- a/helix-term/tests/test/helpers.rs
+++ b/helix-term/tests/test/helpers.rs
@@ -6,17 +6,13 @@ use std::{
};
use anyhow::bail;
+use crossterm::event::{Event, KeyEvent};
use helix_core::{diagnostic::Severity, test, Selection, Transaction};
use helix_term::{application::Application, args::Args, config::Config, keymap::merge_keys};
use helix_view::{current_ref, doc, editor::LspConfig, input::parse_macro, Editor};
use tempfile::NamedTempFile;
use tokio_stream::wrappers::UnboundedReceiverStream;
-#[cfg(windows)]
-use crossterm::event::{Event, KeyEvent};
-#[cfg(not(windows))]
-use termina::event::{Event, KeyEvent};
-
/// Specify how to set up the input text with line feeds
#[derive(Clone, Debug)]
pub enum LineFeedHandling {
diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml
index bcf890f5..2b5767a5 100644
--- a/helix-tui/Cargo.toml
+++ b/helix-tui/Cargo.toml
@@ -12,7 +12,7 @@ repository.workspace = true
homepage.workspace = true
[features]
-default = ["termina", "crossterm"]
+default = ["crossterm"]
[dependencies]
helix-view = { path = "../helix-view", features = ["term"] }
@@ -21,10 +21,7 @@ helix-core = { path = "../helix-core" }
bitflags.workspace = true
cassowary = "0.3"
unicode-segmentation.workspace = true
-termina = { workspace = true, optional = true }
+crossterm = { version = "0.28", optional = true }
termini = "1.0"
once_cell = "1.21"
log = "~0.4"
-
-[target.'cfg(windows)'.dependencies]
-crossterm = { version = "0.28", optional = true }
diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs
index 3b53c21f..e8947ee0 100644
--- a/helix-tui/src/backend/crossterm.rs
+++ b/helix-tui/src/backend/crossterm.rs
@@ -14,7 +14,10 @@ use crossterm::{
terminal::{self, Clear, ClearType},
Command,
};
-use helix_view::graphics::{Color, CursorKind, Modifier, Rect, UnderlineStyle};
+use helix_view::{
+ editor::Config as EditorConfig,
+ graphics::{Color, CursorKind, Modifier, Rect, UnderlineStyle},
+};
use once_cell::sync::OnceCell;
use std::{
fmt,
@@ -71,17 +74,17 @@ impl Capabilities {
/// on the $TERM environment variable. If detection fails, returns
/// a default value where no capability is supported, or just undercurl
/// if config.undercurl is set.
- pub fn from_env_or_default(config: &Config) -> Self {
+ pub fn from_env_or_default(config: &EditorConfig) -> Self {
match termini::TermInfo::from_env() {
Err(_) => Capabilities {
- has_extended_underlines: config.force_enable_extended_underlines,
+ has_extended_underlines: config.undercurl,
..Capabilities::default()
},
Ok(t) => Capabilities {
// Smulx, VTE: https://unix.stackexchange.com/a/696253/246284
// Su (used by kitty): https://sw.kovidgoyal.net/kitty/underlines
// WezTerm supports underlines but a lot of distros don't properly install its terminfo
- has_extended_underlines: config.force_enable_extended_underlines
+ has_extended_underlines: config.undercurl
|| t.extended_cap("Smulx").is_some()
|| t.extended_cap("Su").is_some()
|| vte_version() >= Some(5102)
@@ -92,10 +95,8 @@ impl Capabilities {
}
}
-/// Terminal backend supporting a wide variety of terminals
pub struct CrosstermBackend<W: Write> {
buffer: W,
- config: Config,
capabilities: Capabilities,
supports_keyboard_enhancement_protocol: OnceCell<bool>,
mouse_capture_enabled: bool,
@@ -106,15 +107,14 @@ impl<W> CrosstermBackend<W>
where
W: Write,
{
- pub fn new(buffer: W, config: Config) -> CrosstermBackend<W> {
+ pub fn new(buffer: W, config: &EditorConfig) -> CrosstermBackend<W> {
// helix is not usable without colors, but crossterm will disable
// them by default if NO_COLOR is set in the environment. Override
// this behaviour.
crossterm::style::force_color_output(true);
CrosstermBackend {
buffer,
- capabilities: Capabilities::from_env_or_default(&config),
- config,
+ capabilities: Capabilities::from_env_or_default(config),
supports_keyboard_enhancement_protocol: OnceCell::new(),
mouse_capture_enabled: false,
supports_bracketed_paste: true,
@@ -156,7 +156,7 @@ impl<W> Backend for CrosstermBackend<W>
where
W: Write,
{
- fn claim(&mut self) -> io::Result<()> {
+ fn claim(&mut self, config: Config) -> io::Result<()> {
terminal::enable_raw_mode()?;
execute!(
self.buffer,
@@ -172,7 +172,7 @@ where
Ok(_) => (),
};
execute!(self.buffer, terminal::Clear(terminal::ClearType::All))?;
- if self.config.enable_mouse_capture {
+ if config.enable_mouse_capture {
execute!(self.buffer, EnableMouseCapture)?;
self.mouse_capture_enabled = true;
}
@@ -197,16 +197,15 @@ where
}
self.mouse_capture_enabled = config.enable_mouse_capture;
}
- self.config = config;
Ok(())
}
- fn restore(&mut self) -> io::Result<()> {
+ fn restore(&mut self, config: Config) -> io::Result<()> {
// reset cursor shape
self.buffer
.write_all(self.capabilities.reset_cursor_command.as_bytes())?;
- if self.config.enable_mouse_capture {
+ if config.enable_mouse_capture {
execute!(self.buffer, DisableMouseCapture)?;
}
if self.supports_keyboard_enhancement_protocol() {
@@ -223,6 +222,20 @@ where
terminal::disable_raw_mode()
}
+ fn force_restore() -> io::Result<()> {
+ let mut stdout = io::stdout();
+
+ // reset cursor shape
+ write!(stdout, "\x1B[0 q")?;
+ // Ignore errors on disabling, this might trigger on windows if we call
+ // disable without calling enable previously
+ let _ = execute!(stdout, DisableMouseCapture);
+ let _ = execute!(stdout, PopKeyboardEnhancementFlags);
+ let _ = execute!(stdout, DisableBracketedPaste);
+ execute!(stdout, DisableFocusChange, terminal::LeaveAlternateScreen)?;
+ terminal::disable_raw_mode()
+ }
+
fn draw<'a, I>(&mut self, content: I) -> io::Result<()>
where
I: Iterator<Item = (u16, u16, &'a Cell)>,
@@ -302,6 +315,11 @@ where
execute!(self.buffer, Show, shape)
}
+ fn get_cursor(&mut self) -> io::Result<(u16, u16)> {
+ crossterm::cursor::position()
+ .map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))
+ }
+
fn set_cursor(&mut self, x: u16, y: u16) -> io::Result<()> {
execute!(self.buffer, MoveTo(x, y))
}
@@ -320,14 +338,6 @@ where
fn flush(&mut self) -> io::Result<()> {
self.buffer.flush()
}
-
- fn supports_true_color(&self) -> bool {
- false
- }
-
- fn get_theme_mode(&self) -> Option<helix_view::theme::Mode> {
- None
- }
}
#[derive(Debug)]
diff --git a/helix-tui/src/backend/mod.rs b/helix-tui/src/backend/mod.rs
index 368a1b66..6994bc6f 100644
--- a/helix-tui/src/backend/mod.rs
+++ b/helix-tui/src/backend/mod.rs
@@ -1,48 +1,30 @@
-//! Provides interface for controlling the terminal
-
use std::io;
use crate::{buffer::Cell, terminal::Config};
use helix_view::graphics::{CursorKind, Rect};
-#[cfg(all(feature = "termina", not(windows)))]
-mod termina;
-#[cfg(all(feature = "termina", not(windows)))]
-pub use self::termina::TerminaBackend;
-
-#[cfg(all(feature = "termina", windows))]
+#[cfg(feature = "crossterm")]
mod crossterm;
-#[cfg(all(feature = "termina", windows))]
+#[cfg(feature = "crossterm")]
pub use self::crossterm::CrosstermBackend;
mod test;
pub use self::test::TestBackend;
-/// Representation of a terminal backend.
pub trait Backend {
- /// Claims the terminal for TUI use.
- fn claim(&mut self) -> Result<(), io::Error>;
- /// Update terminal configuration.
+ fn claim(&mut self, config: Config) -> Result<(), io::Error>;
fn reconfigure(&mut self, config: Config) -> Result<(), io::Error>;
- /// Restores the terminal to a normal state, undoes `claim`
- fn restore(&mut self) -> Result<(), io::Error>;
- /// Draws styled text to the terminal
+ fn restore(&mut self, config: Config) -> Result<(), io::Error>;
+ fn force_restore() -> Result<(), io::Error>;
fn draw<'a, I>(&mut self, content: I) -> Result<(), io::Error>
where
I: Iterator<Item = (u16, u16, &'a Cell)>;
- /// Hides the cursor
fn hide_cursor(&mut self) -> Result<(), io::Error>;
- /// Sets the cursor to the given shape
fn show_cursor(&mut self, kind: CursorKind) -> Result<(), io::Error>;
- /// Sets the cursor to the given position
+ fn get_cursor(&mut self) -> Result<(u16, u16), io::Error>;
fn set_cursor(&mut self, x: u16, y: u16) -> Result<(), io::Error>;
- /// Clears the terminal
fn clear(&mut self) -> Result<(), io::Error>;
- /// Gets the size of the terminal in cells
fn size(&self) -> Result<Rect, io::Error>;
- /// Flushes the terminal buffer
fn flush(&mut self) -> Result<(), io::Error>;
- fn supports_true_color(&self) -> bool;
- fn get_theme_mode(&self) -> Option<helix_view::theme::Mode>;
}
diff --git a/helix-tui/src/backend/termina.rs b/helix-tui/src/backend/termina.rs
deleted file mode 100644
index ad1c7c68..00000000
--- a/helix-tui/src/backend/termina.rs
+++ /dev/null
@@ -1,649 +0,0 @@
-use std::io::{self, Write as _};
-
-use helix_view::{
- editor::KittyKeyboardProtocolConfig,
- graphics::{CursorKind, Rect, UnderlineStyle},
- theme::{self, Color, Modifier},
-};
-use termina::{
- escape::{
- csi::{self, Csi, SgrAttributes, SgrModifiers},
- dcs::{self, Dcs},
- },
- style::{CursorStyle, RgbColor},
- Event, OneBased, PlatformTerminal, Terminal as _, WindowSize,
-};
-
-use crate::{buffer::Cell, terminal::Config};
-
-use super::Backend;
-
-// These macros are helpers to set/unset modes like bracketed paste or enter/exit the alternate
-// screen.
-macro_rules! decset {
- ($mode:ident) => {
- Csi::Mode(csi::Mode::SetDecPrivateMode(csi::DecPrivateMode::Code(
- csi::DecPrivateModeCode::$mode,
- )))
- };
-}
-macro_rules! decreset {
- ($mode:ident) => {
- Csi::Mode(csi::Mode::ResetDecPrivateMode(csi::DecPrivateMode::Code(
- csi::DecPrivateModeCode::$mode,
- )))
- };
-}
-
-fn term_program() -> Option<String> {
- // Some terminals don't set $TERM_PROGRAM
- match std::env::var("TERM_PROGRAM") {
- Err(_) => std::env::var("TERM").ok(),
- Ok(term_program) => Some(term_program),
- }
-}
-fn vte_version() -> Option<usize> {
- std::env::var("VTE_VERSION").ok()?.parse().ok()
-}
-
-#[derive(Debug, Default, Clone, Copy)]
-struct Capabilities {
- kitty_keyboard: KittyKeyboardSupport,
- synchronized_output: bool,
- true_color: bool,
- extended_underlines: bool,
- theme_mode: Option<theme::Mode>,
-}
-
-#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
-enum KittyKeyboardSupport {
- /// The terminal doesn't support the protocol.
- #[default]
- None,
- /// The terminal supports the protocol but we haven't checked yet whether it has full or
- /// partial support for the flags we require.
- Some,
- /// The terminal only supports some of the flags we require.
- Partial,
- /// The terminal supports all flags require.
- Full,
-}
-
-#[derive(Debug)]
-pub struct TerminaBackend {
- terminal: PlatformTerminal,
- config: Config,
- capabilities: Capabilities,
- reset_cursor_command: String,
- is_synchronized_output_set: bool,
-}
-
-impl TerminaBackend {
- pub fn new(config: Config) -> io::Result<Self> {
- let mut terminal = PlatformTerminal::new()?;
- let (capabilities, reset_cursor_command) =
- Self::detect_capabilities(&mut terminal, &config)?;
-
- // In the case of a panic, reset the terminal eagerly. If we didn't do this and instead
- // relied on `Drop`, the backtrace would be lost because it is printed before we would
- // clear and exit the alternate screen.
- let hook_reset_cursor_command = reset_cursor_command.clone();
- terminal.set_panic_hook(move |term| {
- let _ = write!(
- term,
- "{}{}{}{}{}{}{}{}{}{}{}",
- Csi::Keyboard(csi::Keyboard::PopFlags(1)),
- decreset!(MouseTracking),
- decreset!(ButtonEventMouse),
- decreset!(AnyEventMouse),
- decreset!(RXVTMouse),
- decreset!(SGRMouse),
- &hook_reset_cursor_command,
- decreset!(BracketedPaste),
- decreset!(FocusTracking),
- Csi::Edit(csi::Edit::EraseInDisplay(csi::EraseInDisplay::EraseDisplay)),
- decreset!(ClearAndEnableAlternateScreen),
- );
- });
-
- Ok(Self {
- terminal,
- config,
- capabilities,
- reset_cursor_command,
- is_synchronized_output_set: false,
- })
- }
-
- pub fn terminal(&self) -> &PlatformTerminal {
- &self.terminal
- }
-
- fn detect_capabilities(
- terminal: &mut PlatformTerminal,
- config: &Config,
- ) -> io::Result<(Capabilities, String)> {
- use std::time::{Duration, Instant};
-
- // Colibri "midnight"
- const TEST_COLOR: RgbColor = RgbColor::new(59, 34, 76);
-
- terminal.enter_raw_mode()?;
-
- let mut capabilities = Capabilities::default();
- let start = Instant::now();
-
- capabilities.kitty_keyboard = match config.kitty_keyboard_protocol {
- KittyKeyboardProtocolConfig::Disabled => KittyKeyboardSupport::None,
- KittyKeyboardProtocolConfig::Enabled => KittyKeyboardSupport::Full,
- KittyKeyboardProtocolConfig::Auto => {
- write!(terminal, "{}", Csi::Keyboard(csi::Keyboard::QueryFlags))?;
- KittyKeyboardSupport::None
- }
- };
-
- // Many terminal extensions can be detected by querying the terminal for the state of the
- // extension and then sending a request for the primary device attributes (which is
- // consistently supported by all terminals). If we receive the status of the feature (for
- // example the current Kitty keyboard flags) then we know that the feature is supported.
- // If we only receive the device attributes then we know it is not.
- write!(
- terminal,
- "{}{}{}{}{}{}{}",
- // Synchronized output
- Csi::Mode(csi::Mode::QueryDecPrivateMode(csi::DecPrivateMode::Code(
- csi::DecPrivateModeCode::SynchronizedOutput
- ))),
- // Mode 2031 theme updates. Query the current theme.
- Csi::Mode(csi::Mode::QueryTheme),
- // True color and while we're at it, extended underlines:
- // <https://github.com/termstandard/colors?tab=readme-ov-file#querying-the-terminal>
- Csi::Sgr(csi::Sgr::Background(TEST_COLOR.into())),
- Csi::Sgr(csi::Sgr::UnderlineColor(TEST_COLOR.into())),
- Dcs::Request(dcs::DcsRequest::GraphicRendition),
- Csi::Sgr(csi::Sgr::Reset),
- // Finally request the primary device attributes
- Csi::Device(csi::Device::RequestPrimaryDeviceAttributes),
- )?;
- terminal.flush()?;
-
- let device_attributes = |event: &Event| {
- matches!(
- event,
- Event::Csi(Csi::Device(csi::Device::DeviceAttributes(_)))
- )
- };
- // TODO: tune this poll constant? Does it need to be longer when on an SSH connection?
- let poll_duration = Duration::from_millis(100);
- if terminal.poll(device_attributes, Some(poll_duration))? {
- while terminal.poll(Event::is_escape, Some(Duration::ZERO))? {
- match terminal.read(Event::is_escape)? {
- Event::Csi(Csi::Keyboard(csi::Keyboard::ReportFlags(_))) => {
- capabilities.kitty_keyboard = KittyKeyboardSupport::Some;
- }
- Event::Csi(Csi::Mode(csi::Mode::ReportDecPrivateMode {
- mode: csi::DecPrivateMode::Code(csi::DecPrivateModeCode::SynchronizedOutput),
- setting: csi::DecModeSetting::Set | csi::DecModeSetting::Reset,
- })) => {
- capabilities.synchronized_output = true;
- }
- Event::Csi(Csi::Mode(csi::Mode::ReportTheme(mode))) => {
- capabilities.theme_mode = Some(mode.into());
- }
- Event::Dcs(dcs::Dcs::Response {
- value: dcs::DcsResponse::GraphicRendition(sgrs),
- ..
- }) => {
- capabilities.true_color =
- sgrs.contains(&csi::Sgr::Background(TEST_COLOR.into()));
- capabilities.extended_underlines =
- sgrs.contains(&csi::Sgr::UnderlineColor(TEST_COLOR.into()));
- }
- _ => (),
- }
- }
-
- let end = Instant::now();
- log::debug!(
- "Detected terminal capabilities in {:?}: {capabilities:?}",
- end.duration_since(start)
- );
- } else {
- log::debug!("Failed to detect terminal capabilities within {poll_duration:?}. Using default capabilities only");
- }
-
- capabilities.extended_underlines |= config.force_enable_extended_underlines;
-
- let mut reset_cursor_command =
- Csi::Cursor(csi::Cursor::CursorStyle(CursorStyle::Default)).to_string();
- if let Ok(t) = termini::TermInfo::from_env() {
- capabilities.extended_underlines |= t.extended_cap("Smulx").is_some()
- || t.extended_cap("Su").is_some()
- || vte_version() >= Some(5102)
- // HACK: once WezTerm can support DECRQSS/DECRPSS for SGR we can remove this line.
- // <https://github.com/wezterm/wezterm/pull/6856>
- || matches!(term_program().as_deref(), Some("WezTerm"));
-
- if let Some(termini::Value::Utf8String(se_str)) = t.extended_cap("Se") {
- reset_cursor_command.push_str(se_str);
- };
- reset_cursor_command.push_str(
- t.utf8_string_cap(termini::StringCapability::CursorNormal)
- .unwrap_or(""),
- );
- log::debug!(
- "Cursor reset escape sequence detected from terminfo: {reset_cursor_command:?}"
- );
- } else {
- log::debug!("terminfo could not be read, using default cursor reset escape sequence: {reset_cursor_command:?}");
- }
-
- terminal.enter_cooked_mode()?;
-
- Ok((capabilities, reset_cursor_command))
- }
-
- fn enable_mouse_capture(&mut self) -> io::Result<()> {
- if self.config.enable_mouse_capture {
- write!(
- self.terminal,
- "{}{}{}{}{}",
- decset!(MouseTracking),
- decset!(ButtonEventMouse),
- decset!(AnyEventMouse),
- decset!(RXVTMouse),
- decset!(SGRMouse),
- )?;
- }
- Ok(())
- }
-
- fn disable_mouse_capture(&mut self) -> io::Result<()> {
- if self.config.enable_mouse_capture {
- write!(
- self.terminal,
- "{}{}{}{}{}",
- decreset!(MouseTracking),
- decreset!(ButtonEventMouse),
- decreset!(AnyEventMouse),
- decreset!(RXVTMouse),
- decreset!(SGRMouse),
- )?;
- }
- Ok(())
- }
-
- fn enable_extensions(&mut self) -> io::Result<()> {
- const KEYBOARD_FLAGS: csi::KittyKeyboardFlags =
- csi::KittyKeyboardFlags::DISAMBIGUATE_ESCAPE_CODES
- .union(csi::KittyKeyboardFlags::REPORT_ALTERNATE_KEYS);
-
- match self.capabilities.kitty_keyboard {
- KittyKeyboardSupport::None | KittyKeyboardSupport::Partial => (),
- KittyKeyboardSupport::Full => {
- write!(
- self.terminal,
- "{}",
- Csi::Keyboard(csi::Keyboard::PushFlags(KEYBOARD_FLAGS))
- )?;
- }
- KittyKeyboardSupport::Some => {
- write!(
- self.terminal,
- "{}{}",
- // Enable the flags we need.
- Csi::Keyboard(csi::Keyboard::PushFlags(KEYBOARD_FLAGS)),
- // Then request the current flags. We need to check if the terminal enabled
- // all of the flags we require.
- Csi::Keyboard(csi::Keyboard::QueryFlags),
- )?;
- self.terminal.flush()?;
-
- let event = self.terminal.read(|event| {
- matches!(
- event,
- Event::Csi(Csi::Keyboard(csi::Keyboard::ReportFlags(_)))
- )
- })?;
- let Event::Csi(Csi::Keyboard(csi::Keyboard::ReportFlags(flags))) = event else {
- unreachable!();
- };
- if flags != KEYBOARD_FLAGS {
- log::info!("Turning off enhanced keyboard support because the terminal enabled different flags. Requested {KEYBOARD_FLAGS:?} but got {flags:?}");
- write!(
- self.terminal,
- "{}",
- Csi::Keyboard(csi::Keyboard::PopFlags(1))
- )?;
- self.terminal.flush()?;
- self.capabilities.kitty_keyboard = KittyKeyboardSupport::Partial;
- } else {
- log::debug!(
- "The terminal fully supports the requested keyboard enhancement flags"
- );
- self.capabilities.kitty_keyboard = KittyKeyboardSupport::Full;
- }
- }
- }
-
- if self.capabilities.theme_mode.is_some() {
- // Enable mode 2031 theme mode notifications:
- write!(self.terminal, "{}", decset!(Theme))?;
- }
-
- Ok(())
- }
-
- fn disable_extensions(&mut self) -> io::Result<()> {
- if self.capabilities.kitty_keyboard == KittyKeyboardSupport::Full {
- write!(
- self.terminal,
- "{}",
- Csi::Keyboard(csi::Keyboard::PopFlags(1))
- )?;
- }
-
- if self.capabilities.theme_mode.is_some() {
- // Mode 2031 theme notifications.
- write!(self.terminal, "{}", decreset!(Theme))?;
- }
-
- Ok(())
- }
-
- // See <https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036>.
- // Synchronized output sequences tell the terminal when we are "starting to render" and
- // stopping, enabling to make better choices about when it draws a frame. This avoids all
- // kinds of ugly visual artifacts like tearing and flashing (i.e. the background color
- // after clearing the terminal).
-
- fn start_synchronized_render(&mut self) -> io::Result<()> {
- if self.capabilities.synchronized_output && !self.is_synchronized_output_set {
- write!(self.terminal, "{}", decset!(SynchronizedOutput))?;
- self.is_synchronized_output_set = true;
- }
- Ok(())
- }
-
- fn end_sychronized_render(&mut self) -> io::Result<()> {
- if self.is_synchronized_output_set {
- write!(self.terminal, "{}", decreset!(SynchronizedOutput))?;
- self.is_synchronized_output_set = false;
- }
- Ok(())
- }
-}
-
-impl Backend for TerminaBackend {
- fn claim(&mut self) -> io::Result<()> {
- self.terminal.enter_raw_mode()?;
-
- write!(
- self.terminal,
- "{}{}{}{}",
- // Enter an alternate screen.
- decset!(ClearAndEnableAlternateScreen),
- decset!(BracketedPaste),
- decset!(FocusTracking),
- // Clear the buffer. `ClearAndEnableAlternateScreen` **should** do this but some
- // things like mosh are buggy. See <https://github.com/helix-editor/helix/pull/1944>.
- Csi::Edit(csi::Edit::EraseInDisplay(csi::EraseInDisplay::EraseDisplay)),
- )?;
- self.enable_mouse_capture()?;
- self.enable_extensions()?;
-
- Ok(())
- }
-
- fn reconfigure(&mut self, mut config: Config) -> io::Result<()> {
- std::mem::swap(&mut self.config, &mut config);
- if self.config.enable_mouse_capture != config.enable_mouse_capture {
- if self.config.enable_mouse_capture {
- self.enable_mouse_capture()?;
- } else {
- self.disable_mouse_capture()?;
- }
- }
- self.capabilities.extended_underlines |= self.config.force_enable_extended_underlines;
- Ok(())
- }
-
- fn restore(&mut self) -> io::Result<()> {
- self.disable_extensions()?;
- self.disable_mouse_capture()?;
- write!(
- self.terminal,
- "{}{}{}{}",
- &self.reset_cursor_command,
- decreset!(BracketedPaste),
- decreset!(FocusTracking),
- decreset!(ClearAndEnableAlternateScreen),
- )?;
- self.terminal.flush()?;
- self.terminal.enter_cooked_mode()?;
- Ok(())
- }
-
- fn draw<'a, I>(&mut self, content: I) -> io::Result<()>
- where
- I: Iterator<Item = (u16, u16, &'a Cell)>,
- {
- self.start_synchronized_render()?;
-
- let mut fg = Color::Reset;
- let mut bg = Color::Reset;
- let mut underline_color = Color::Reset;
- let mut underline_style = UnderlineStyle::Reset;
- let mut modifier = Modifier::empty();
- let mut last_pos: Option<(u16, u16)> = None;
- for (x, y, cell) in content {
- // Move the cursor if the previous location was not (x - 1, y)
- if !matches!(last_pos, Some(p) if x == p.0 + 1 && y == p.1) {
- write!(
- self.terminal,
- "{}",
- Csi::Cursor(csi::Cursor::Position {
- col: OneBased::from_zero_based(x),
- line: OneBased::from_zero_based(y),
- })
- )?;
- }
- last_pos = Some((x, y));
-
- let mut attributes = SgrAttributes::default();
- if cell.fg != fg {
- attributes.foreground = Some(cell.fg.into());
- fg = cell.fg;
- }
- if cell.bg != bg {
- attributes.background = Some(cell.bg.into());
- bg = cell.bg;
- }
- if cell.modifier != modifier {
- attributes.modifiers = diff_modifiers(modifier, cell.modifier);
- modifier = cell.modifier;
- }
-
- // Set underline style and color separately from SgrAttributes. Some terminals seem
- // to not like underline colors and styles being intermixed with other SGRs.
- let mut new_underline_style = cell.underline_style;
- if self.capabilities.extended_underlines {
- if cell.underline_color != underline_color {
- write!(
- self.terminal,
- "{}",
- Csi::Sgr(csi::Sgr::UnderlineColor(cell.underline_color.into()))
- )?;
- underline_color = cell.underline_color;
- }
- } else {
- match new_underline_style {
- UnderlineStyle::Reset | UnderlineStyle::Line => (),
- _ => new_underline_style = UnderlineStyle::Line,
- }
- }
- if new_underline_style != underline_style {
- write!(
- self.terminal,
- "{}",
- Csi::Sgr(csi::Sgr::Underline(new_underline_style.into()))
- )?;
- underline_style = new_underline_style;
- }
-
- // `attributes` will be empty if nothing changed between two cells. Empty
- // `SgrAttributes` behave the same as a `Sgr::Reset` rather than a 'no-op' though so
- // we should avoid writing them if they're empty.
- if !attributes.is_empty() {
- write!(
- self.terminal,
- "{}",
- Csi::Sgr(csi::Sgr::Attributes(attributes))
- )?;
- }
-
- write!(self.terminal, "{}", &cell.symbol)?;
- }
-
- write!(self.terminal, "{}", Csi::Sgr(csi::Sgr::Reset))?;
-
- self.end_sychronized_render()?;
-
- Ok(())
- }
-
- fn hide_cursor(&mut self) -> io::Result<()> {
- write!(self.terminal, "{}", decreset!(ShowCursor))?;
- self.flush()
- }
-
- fn show_cursor(&mut self, kind: CursorKind) -> io::Result<()> {
- let style = match kind {
- CursorKind::Block => CursorStyle::SteadyBlock,
- CursorKind::Bar => CursorStyle::SteadyBar,
- CursorKind::Underline => CursorStyle::SteadyUnderline,
- CursorKind::Hidden => unreachable!(),
- };
- write!(
- self.terminal,
- "{}{}",
- decset!(ShowCursor),
- Csi::Cursor(csi::Cursor::CursorStyle(style)),
- )?;
- self.flush()
- }
-
- fn set_cursor(&mut self, x: u16, y: u16) -> io::Result<()> {
- let col = OneBased::from_zero_based(x);
- let line = OneBased::from_zero_based(y);
- write!(
- self.terminal,
- "{}",
- Csi::Cursor(csi::Cursor::Position { line, col })
- )?;
- self.flush()
- }
-
- fn clear(&mut self) -> io::Result<()> {
- self.start_synchronized_render()?;
- write!(
- self.terminal,
- "{}",
- Csi::Edit(csi::Edit::EraseInDisplay(csi::EraseInDisplay::EraseDisplay))
- )?;
- self.flush()
- }
-
- fn size(&self) -> io::Result<Rect> {
- let WindowSize { rows, cols, .. } = self.terminal.get_dimensions()?;
- Ok(Rect::new(0, 0, cols, rows))
- }
-
- fn flush(&mut self) -> io::Result<()> {
- self.terminal.flush()
- }
-
- fn supports_true_color(&self) -> bool {
- self.capabilities.true_color
- }
-
- fn get_theme_mode(&self) -> Option<theme::Mode> {
- self.capabilities.theme_mode
- }
-}
-
-impl Drop for TerminaBackend {
- fn drop(&mut self) {
- // Avoid resetting the terminal while panicking because we set a panic hook above in
- // `Self::new`.
- if !std::thread::panicking() {
- let _ = self.disable_extensions();
- let _ = self.disable_mouse_capture();
- let _ = write!(
- self.terminal,
- "{}{}{}{}",
- &self.reset_cursor_command,
- decreset!(BracketedPaste),
- decreset!(FocusTracking),
- decreset!(ClearAndEnableAlternateScreen),
- );
- // NOTE: Drop for Platform terminal resets the mode and flushes the buffer when not
- // panicking.
- }
- }
-}
-
-fn diff_modifiers(from: Modifier, to: Modifier) -> SgrModifiers {
- let mut modifiers = SgrModifiers::default();
-
- let removed = from - to;
- if removed.contains(Modifier::REVERSED) {
- modifiers |= SgrModifiers::NO_REVERSE;
- }
- if removed.contains(Modifier::BOLD) && !to.contains(Modifier::DIM) {
- modifiers |= SgrModifiers::INTENSITY_NORMAL;
- }
- if removed.contains(Modifier::DIM) {
- modifiers |= SgrModifiers::INTENSITY_NORMAL;
- }
- if removed.contains(Modifier::ITALIC) {
- modifiers |= SgrModifiers::NO_ITALIC;
- }
- if removed.contains(Modifier::CROSSED_OUT) {
- modifiers |= SgrModifiers::NO_STRIKE_THROUGH;
- }
- if removed.contains(Modifier::HIDDEN) {
- modifiers |= SgrModifiers::NO_INVISIBLE;
- }
- if removed.contains(Modifier::SLOW_BLINK) || removed.contains(Modifier::RAPID_BLINK) {
- modifiers |= SgrModifiers::BLINK_NONE;
- }
-
- let added = to - from;
- if added.contains(Modifier::REVERSED) {
- modifiers |= SgrModifiers::REVERSE;
- }
- if added.contains(Modifier::BOLD) {
- modifiers |= SgrModifiers::INTENSITY_BOLD;
- }
- if added.contains(Modifier::DIM) {
- modifiers |= SgrModifiers::INTENSITY_DIM;
- }
- if added.contains(Modifier::ITALIC) {
- modifiers |= SgrModifiers::ITALIC;
- }
- if added.contains(Modifier::CROSSED_OUT) {
- modifiers |= SgrModifiers::STRIKE_THROUGH;
- }
- if added.contains(Modifier::HIDDEN) {
- modifiers |= SgrModifiers::INVISIBLE;
- }
- if added.contains(Modifier::SLOW_BLINK) {
- modifiers |= SgrModifiers::BLINK_SLOW;
- }
- if added.contains(Modifier::RAPID_BLINK) {
- modifiers |= SgrModifiers::BLINK_RAPID;
- }
-
- modifiers
-}
diff --git a/helix-tui/src/backend/test.rs b/helix-tui/src/backend/test.rs
index b048cefc..771cc309 100644
--- a/helix-tui/src/backend/test.rs
+++ b/helix-tui/src/backend/test.rs
@@ -107,7 +107,7 @@ impl TestBackend {
}
impl Backend for TestBackend {
- fn claim(&mut self) -> Result<(), io::Error> {
+ fn claim(&mut self, _config: Config) -> Result<(), io::Error> {
Ok(())
}
@@ -115,7 +115,11 @@ impl Backend for TestBackend {
Ok(())
}
- fn restore(&mut self) -> Result<(), io::Error> {
+ fn restore(&mut self, _config: Config) -> Result<(), io::Error> {
+ Ok(())
+ }
+
+ fn force_restore() -> Result<(), io::Error> {
Ok(())
}
@@ -139,6 +143,10 @@ impl Backend for TestBackend {
Ok(())
}
+ fn get_cursor(&mut self) -> Result<(u16, u16), io::Error> {
+ Ok(self.pos)
+ }
+
fn set_cursor(&mut self, x: u16, y: u16) -> Result<(), io::Error> {
self.pos = (x, y);
Ok(())
@@ -156,12 +164,4 @@ impl Backend for TestBackend {
fn flush(&mut self) -> Result<(), io::Error> {
Ok(())
}
-
- fn supports_true_color(&self) -> bool {
- false
- }
-
- fn get_theme_mode(&self) -> Option<helix_view::theme::Mode> {
- None
- }
}
diff --git a/helix-tui/src/buffer.rs b/helix-tui/src/buffer.rs
index 4f57e8e5..2cd30324 100644
--- a/helix-tui/src/buffer.rs
+++ b/helix-tui/src/buffer.rs
@@ -1,4 +1,3 @@
-//! Contents of a terminal screen. A [Buffer] is made up of [Cell]s.
use crate::text::{Span, Spans};
use helix_core::unicode::width::UnicodeWidthStr;
use std::cmp::min;
@@ -6,7 +5,7 @@ use unicode_segmentation::UnicodeSegmentation;
use helix_view::graphics::{Color, Modifier, Rect, Style, UnderlineStyle};
-/// One cell of the terminal. Contains one stylized grapheme.
+/// A buffer cell
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Cell {
pub symbol: String,
@@ -18,33 +17,28 @@ pub struct Cell {
}
impl Cell {
- /// Set the cell's grapheme
pub fn set_symbol(&mut self, symbol: &str) -> &mut Cell {
self.symbol.clear();
self.symbol.push_str(symbol);
self
}
- /// Set the cell's grapheme to a [char]
pub fn set_char(&mut self, ch: char) -> &mut Cell {
self.symbol.clear();
self.symbol.push(ch);
self
}
- /// Set the foreground [Color]
pub fn set_fg(&mut self, color: Color) -> &mut Cell {
self.fg = color;
self
}
- /// Set the background [Color]
pub fn set_bg(&mut self, color: Color) -> &mut Cell {
self.bg = color;
self
}
- /// Set the [Style] of the cell
pub fn set_style(&mut self, style: Style) -> &mut Cell {
if let Some(c) = style.fg {
self.fg = c;
@@ -64,7 +58,6 @@ impl Cell {
self
}
- /// Returns the current style of the cell
pub fn style(&self) -> Style {
Style::default()
.fg(self.fg)
@@ -74,7 +67,6 @@ impl Cell {
.add_modifier(self.modifier)
}
- /// Resets the cell to a default blank state
pub fn reset(&mut self) {
self.symbol.clear();
self.symbol.push(' ');
@@ -503,8 +495,6 @@ impl Buffer {
(x_offset as u16, y)
}
- /// Print at most the first `width` characters of a [Spans] if enough space is available
- /// until the end of the line. Appends a `…` at the end of truncated lines.
pub fn set_spans_truncated(&mut self, x: u16, y: u16, spans: &Spans, width: u16) -> (u16, u16) {
// prevent panic if out of range
if !self.in_bounds(x, y) || width == 0 {
@@ -546,8 +536,6 @@ impl Buffer {
(x_offset as u16, y)
}
- /// Print at most the first `width` characters of a [Spans] if enough space is available
- /// until the end of the line
pub fn set_spans(&mut self, x: u16, y: u16, spans: &Spans, width: u16) -> (u16, u16) {
let mut remaining_width = width;
let mut x = x;
@@ -569,8 +557,6 @@ impl Buffer {
(x, y)
}
- /// Print at most the first `width` characters of a [Span] if enough space is available
- /// until the end of the line
pub fn set_span(&mut self, x: u16, y: u16, span: &Span, width: u16) -> (u16, u16) {
self.set_stringn(x, y, span.content.as_ref(), width as usize, span.style)
}
@@ -587,7 +573,6 @@ impl Buffer {
}
}
- /// Set all cells in the [area](Rect) to the given [Style]
pub fn set_style(&mut self, area: Rect, style: Style) {
for y in area.top()..area.bottom() {
for x in area.left()..area.right() {
diff --git a/helix-tui/src/layout.rs b/helix-tui/src/layout.rs
index 83edc615..50a16415 100644
--- a/helix-tui/src/layout.rs
+++ b/helix-tui/src/layout.rs
@@ -1,5 +1,3 @@
-//! Layout engine for terminal
-
use std::cell::RefCell;
use std::collections::HashMap;
@@ -9,7 +7,6 @@ use cassowary::{Constraint as CassowaryConstraint, Expression, Solver, Variable}
use helix_view::graphics::{Margin, Rect};
-/// Enum of all corners
#[derive(Debug, Hash, Clone, Copy, PartialEq, Eq)]
pub enum Corner {
TopLeft,
@@ -18,14 +15,12 @@ pub enum Corner {
BottomLeft,
}
-/// Direction a [Rect] should be split
#[derive(Debug, Hash, Clone, PartialEq, Eq)]
pub enum Direction {
Horizontal,
Vertical,
}
-/// Describes requirements of a [Rect] to be split
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Constraint {
// TODO: enforce range 0 - 100
@@ -51,7 +46,6 @@ impl Constraint {
}
}
-/// How content should be aligned
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Alignment {
Left,
@@ -59,7 +53,6 @@ pub enum Alignment {
Right,
}
-/// Description of a how a [Rect] should be split
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Layout {
direction: Direction,
@@ -82,7 +75,6 @@ impl Default for Layout {
}
impl Layout {
- /// Returns a layout with the given [Constraint]s.
pub fn constraints<C>(mut self, constraints: C) -> Layout
where
C: Into<Vec<Constraint>>,
@@ -91,25 +83,21 @@ impl Layout {
self
}
- /// Returns a layout wit the given margins on all sides.
pub const fn margin(mut self, margin: u16) -> Layout {
self.margin = Margin::all(margin);
self
}
- /// Returns a layout with the given horizontal margins.
pub const fn horizontal_margin(mut self, horizontal: u16) -> Layout {
self.margin.horizontal = horizontal;
self
}
- /// Returns a layout with the given vertical margins.
pub const fn vertical_margin(mut self, vertical: u16) -> Layout {
self.margin.vertical = vertical;
self
}
- /// Returns a layout with the given [Direction].
pub const fn direction(mut self, direction: Direction) -> Layout {
self.direction = direction;
self
diff --git a/helix-tui/src/lib.rs b/helix-tui/src/lib.rs
index 91e7d7bd..59327d7c 100644
--- a/helix-tui/src/lib.rs
+++ b/helix-tui/src/lib.rs
@@ -1,3 +1,133 @@
+//! [tui](https://github.com/fdehau/tui-rs) is a library used to build rich
+//! terminal users interfaces and dashboards.
+//!
+//! ![](https://raw.githubusercontent.com/fdehau/tui-rs/master/assets/demo.gif)
+//!
+//! # Get started
+//!
+//! ## Adding `tui` as a dependency
+//!
+//! ```toml
+//! [dependencies]
+//! tui = "0.15"
+//! crossterm = "0.19"
+//! ```
+//!
+//! The same logic applies for all other available backends.
+//!
+//! ## Creating a `Terminal`
+//!
+//! Every application using `tui` should start by instantiating a `Terminal`. It is a light
+//! abstraction over available backends that provides basic functionalities such as clearing the
+//! screen, hiding the cursor, etc.
+//!
+//! ```rust,no_run
+//! use std::io;
+//! use helix_tui::Terminal;
+//! use helix_tui::backend::CrosstermBackend;
+//! use helix_view::editor::Config;
+//!
+//! fn main() -> Result<(), io::Error> {
+//! let stdout = io::stdout();
+//! let config = Config::default();
+//! let backend = CrosstermBackend::new(stdout, &config);
+//! let mut terminal = Terminal::new(backend)?;
+//! Ok(())
+//! }
+//! ```
+//!
+//! You may also refer to the examples to find out how to create a `Terminal` for each available
+//! backend.
+//!
+//! ## Building a User Interface (UI)
+//!
+//! Every component of your interface will be implementing the `Widget` trait. The library comes
+//! with a predefined set of widgets that should meet most of your use cases. You are also free to
+//! implement your own.
+//!
+//! Each widget follows a builder pattern API providing a default configuration along with methods
+//! to customize them. The widget is then rendered using the `Frame::render_widget` which take
+//! your widget instance an area to draw to.
+//!
+//! The following example renders a block of the size of the terminal:
+//!
+//! ```rust,no_run
+//! use std::io;
+//! use crossterm::terminal;
+//! use helix_tui::Terminal;
+//! use helix_tui::backend::CrosstermBackend;
+//! use helix_tui::widgets::{Widget, Block, Borders};
+//! use helix_tui::layout::{Layout, Constraint, Direction};
+//! use helix_view::editor::Config;
+//!
+//! fn main() -> Result<(), io::Error> {
+//! terminal::enable_raw_mode().unwrap();
+//! let stdout = io::stdout();
+//! let config = Config::default();
+//! let backend = CrosstermBackend::new(stdout, &config);
+//! let mut terminal = Terminal::new(backend)?;
+//! // terminal.draw(|f| {
+//! // let size = f.size();
+//! // let block = Block::default()
+//! // .title("Block")
+//! // .borders(Borders::ALL);
+//! // f.render_widget(block, size);
+//! // })?;
+//! Ok(())
+//! }
+//! ```
+//!
+//! ## Layout
+//!
+//! The library comes with a basic yet useful layout management object called `Layout`. As you may
+//! see below and in the examples, the library makes heavy use of the builder pattern to provide
+//! full customization. And `Layout` is no exception:
+//!
+//! ```rust,no_run
+//! use std::io;
+//! use crossterm::terminal;
+//! use helix_tui::Terminal;
+//! use helix_tui::backend::CrosstermBackend;
+//! use helix_tui::widgets::{Widget, Block, Borders};
+//! use helix_tui::layout::{Layout, Constraint, Direction};
+//! use helix_view::editor::Config;
+//!
+//! fn main() -> Result<(), io::Error> {
+//! terminal::enable_raw_mode().unwrap();
+//! let stdout = io::stdout();
+//! let config = Config::default();
+//! let backend = CrosstermBackend::new(stdout, &config);
+//! let mut terminal = Terminal::new(backend)?;
+//! // terminal.draw(|f| {
+//! // let chunks = Layout::default()
+//! // .direction(Direction::Vertical)
+//! // .margin(1)
+//! // .constraints(
+//! // [
+//! // Constraint::Percentage(10),
+//! // Constraint::Percentage(80),
+//! // Constraint::Percentage(10)
+//! // ].as_ref()
+//! // )
+//! // .split(f.size());
+//! // let block = Block::default()
+//! // .title("Block")
+//! // .borders(Borders::ALL);
+//! // f.render_widget(block, chunks[0]);
+//! // let block = Block::default()
+//! // .title("Block 2")
+//! // .borders(Borders::ALL);
+//! // f.render_widget(block, chunks[1]);
+//! // })?;
+//! Ok(())
+//! }
+//! ```
+//!
+//! This let you describe responsive terminal UI by nesting layouts. You should note that by
+//! default the computed layout tries to fill the available space completely. So if for any reason
+//! you might need a blank space somewhere, try to pass an additional constraint and don't use the
+//! corresponding area.
+
pub mod backend;
pub mod buffer;
pub mod layout;
diff --git a/helix-tui/src/symbols.rs b/helix-tui/src/symbols.rs
index 118354df..040e77f6 100644
--- a/helix-tui/src/symbols.rs
+++ b/helix-tui/src/symbols.rs
@@ -1,5 +1,3 @@
-//! Common TUI symbols including blocks, bars, braille, lines
-
pub mod block {
pub const FULL: &str = "█";
pub const SEVEN_EIGHTHS: &str = "▉";
diff --git a/helix-tui/src/terminal.rs b/helix-tui/src/terminal.rs
index 5e4007fc..d2a911cf 100644
--- a/helix-tui/src/terminal.rs
+++ b/helix-tui/src/terminal.rs
@@ -1,8 +1,5 @@
-//! Terminal interface provided through the [Terminal] type.
-//! Frontend for [Backend]
-
use crate::{backend::Backend, buffer::Buffer};
-use helix_view::editor::{Config as EditorConfig, KittyKeyboardProtocolConfig};
+use helix_view::editor::Config as EditorConfig;
use helix_view::graphics::{CursorKind, Rect};
use std::io;
@@ -20,20 +17,15 @@ pub struct Viewport {
resize_behavior: ResizeBehavior,
}
-/// Terminal configuration
#[derive(Debug)]
pub struct Config {
pub enable_mouse_capture: bool,
- pub force_enable_extended_underlines: bool,
- pub kitty_keyboard_protocol: KittyKeyboardProtocolConfig,
}
-impl From<&EditorConfig> for Config {
- fn from(config: &EditorConfig) -> Self {
+impl From<EditorConfig> for Config {
+ fn from(config: EditorConfig) -> Self {
Self {
enable_mouse_capture: config.mouse,
- force_enable_extended_underlines: config.undercurl,
- kitty_keyboard_protocol: config.kitty_keyboard_protocol,
}
}
}
@@ -55,7 +47,7 @@ pub struct TerminalOptions {
pub viewport: Viewport,
}
-/// Interface to the terminal backed by crossterm
+/// Interface to the terminal backed by Termion
#[derive(Debug)]
pub struct Terminal<B>
where
@@ -73,14 +65,6 @@ where
viewport: Viewport,
}
-/// Default terminal size: 80 columns, 24 lines
-pub const DEFAULT_TERMINAL_SIZE: Rect = Rect {
- x: 0,
- y: 0,
- width: 80,
- height: 24,
-};
-
impl<B> Terminal<B>
where
B: Backend,
@@ -88,7 +72,7 @@ where
/// Wrapper around Terminal initialization. Each buffer is initialized with a blank string and
/// default colors for the foreground and the background
pub fn new(backend: B) -> io::Result<Terminal<B>> {
- let size = backend.size().unwrap_or(DEFAULT_TERMINAL_SIZE);
+ let size = backend.size()?;
Terminal::with_options(
backend,
TerminalOptions {
@@ -114,16 +98,16 @@ where
})
}
- pub fn claim(&mut self) -> io::Result<()> {
- self.backend.claim()
+ pub fn claim(&mut self, config: Config) -> io::Result<()> {
+ self.backend.claim(config)
}
pub fn reconfigure(&mut self, config: Config) -> io::Result<()> {
self.backend.reconfigure(config)
}
- pub fn restore(&mut self) -> io::Result<()> {
- self.backend.restore()
+ pub fn restore(&mut self, config: Config) -> io::Result<()> {
+ self.backend.restore(config)
}
// /// Get a Frame object which provides a consistent view into the terminal state for rendering.
@@ -167,7 +151,7 @@ where
/// Queries the backend for size and resizes if it doesn't match the previous size.
pub fn autoresize(&mut self) -> io::Result<Rect> {
- let size = self.size();
+ let size = self.size()?;
if size != self.viewport.area {
self.resize(size)?;
};
@@ -230,6 +214,10 @@ where
Ok(())
}
+ pub fn get_cursor(&mut self) -> io::Result<(u16, u16)> {
+ self.backend.get_cursor()
+ }
+
pub fn set_cursor(&mut self, x: u16, y: u16) -> io::Result<()> {
self.backend.set_cursor(x, y)
}
@@ -243,7 +231,7 @@ where
}
/// Queries the real size of the backend.
- pub fn size(&self) -> Rect {
- self.backend.size().unwrap_or(DEFAULT_TERMINAL_SIZE)
+ pub fn size(&self) -> io::Result<Rect> {
+ self.backend.size()
}
}
diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs
index a9c36503..c4313e15 100644
--- a/helix-tui/src/text.rs
+++ b/helix-tui/src/text.rs
@@ -10,7 +10,7 @@
//! These types form a hierarchy: [`Spans`] is a collection of [`Span`] and each line of [`Text`]
//! is a [`Spans`].
//!
-//! Keep in mind that a lot of widgets will use those types to advertise what kind of string is
+//! Keep it mind that a lot of widgets will use those types to advertise what kind of string is
//! supported for their properties. Moreover, `tui` provides convenient `From` implementations so
//! that you can start by using simple `String` or `&str` and then promote them to the previous
//! primitives when you need additional styling capabilities.
@@ -374,30 +374,6 @@ impl<'a> Text<'a> {
self.lines.len()
}
- /// Patch text with a new style. Only updates fields that are in the new style.
- ///
- /// # Examples
- ///
- /// ```rust
- /// # use helix_tui::text::Text;
- /// # use helix_view::graphics::{Color, Style};
- /// let style1 = Style::default().fg(Color::Yellow);
- /// let style2 = Style::default().fg(Color::Yellow).bg(Color::Black);
- /// let mut half_styled_text = Text::styled(String::from("The first line\nThe second line"), style1);
- /// let full_styled_text = Text::styled(String::from("The first line\nThe second line"), style2);
- /// assert_ne!(half_styled_text, full_styled_text);
- ///
- /// half_styled_text.patch_style(Style::default().bg(Color::Black));
- /// assert_eq!(half_styled_text, full_styled_text);
- /// ```
- pub fn patch_style(&mut self, style: Style) {
- for line in &mut self.lines {
- for span in &mut line.0 {
- span.style = span.style.patch(style);
- }
- }
- }
-
/// Apply a new style to existing text.
///
/// # Examples
@@ -410,13 +386,13 @@ impl<'a> Text<'a> {
/// let styled_text = Text::styled(String::from("The first line\nThe second line"), style);
/// assert_ne!(raw_text, styled_text);
///
- /// raw_text.set_style(style);
+ /// raw_text.patch_style(style);
/// assert_eq!(raw_text, styled_text);
/// ```
- pub fn set_style(&mut self, style: Style) {
+ pub fn patch_style(&mut self, style: Style) {
for line in &mut self.lines {
for span in &mut line.0 {
- span.style = style;
+ span.style = span.style.patch(style);
}
}
}
diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs
index 5f4667b7..9c67a376 100644
--- a/helix-tui/src/widgets/table.rs
+++ b/helix-tui/src/widgets/table.rs
@@ -37,14 +37,8 @@ pub struct Cell<'a> {
impl Cell<'_> {
/// Set the `Style` of this cell.
pub fn style(mut self, style: Style) -> Self {
- self.set_style(style);
- self
- }
-
- /// Set the `Style` of this cell.
- pub fn set_style(&mut self, style: Style) {
self.style = style;
- self.content.patch_style(style);
+ self
}
}
@@ -337,7 +331,6 @@ impl<'a> Table<'a> {
}
}
-/// Track [Table] scroll offset and selection
#[derive(Debug, Default, Clone)]
pub struct TableState {
pub offset: usize,
@@ -459,9 +452,6 @@ impl Table<'_> {
};
if is_selected {
buf.set_style(table_row_area, self.highlight_style);
- for cell in &mut table_row.cells {
- cell.set_style(self.highlight_style);
- }
}
let mut col = table_row_start_col;
for (width, cell) in columns_widths.iter().zip(table_row.cells.iter()) {
diff --git a/helix-tui/tests/text.rs b/helix-tui/tests/text.rs
deleted file mode 100644
index c5fbde8d..00000000
--- a/helix-tui/tests/text.rs
+++ /dev/null
@@ -1,128 +0,0 @@
-use helix_tui::text::{Span, Spans, StyledGrapheme, Text};
-use helix_view::graphics::{Color, Modifier, Style};
-
-// Text
-#[test]
-fn text_width() {
- let text = Text::from("The first line\nThe second line");
- assert_eq!(15, text.width());
-}
-
-#[test]
-fn text_height() {
- let text = Text::from("The first line\nThe second line");
- assert_eq!(2, text.height());
-}
-
-#[test]
-fn patch_style() {
- let style1 = Style::default().fg(Color::Yellow);
- let style2 = Style::default().fg(Color::Yellow).bg(Color::Black);
- let mut half_styled_text =
- Text::styled(String::from("The first line\nThe second line"), style1);
- let full_styled_text = Text::styled(String::from("The first line\nThe second line"), style2);
- assert_ne!(half_styled_text, full_styled_text);
-
- half_styled_text.patch_style(Style::default().bg(Color::Black));
- assert_eq!(half_styled_text, full_styled_text);
-}
-
-#[test]
-fn set_style() {
- let style = Style::default()
- .fg(Color::Yellow)
- .add_modifier(Modifier::ITALIC);
- let mut raw_text = Text::raw("The first line\nThe second line");
- let styled_text = Text::styled(String::from("The first line\nThe second line"), style);
- assert_ne!(raw_text, styled_text);
-
- raw_text.set_style(style);
- assert_eq!(raw_text, styled_text);
-}
-
-#[test]
-fn text_extend() {
- let style = Style::default()
- .fg(Color::Yellow)
- .add_modifier(Modifier::ITALIC);
- let mut text = Text::from("The first line\nThe second line");
- assert_eq!(2, text.height());
-
- // Adding two more unstyled lines
- text.extend(Text::raw("These are two\nmore lines!"));
- assert_eq!(4, text.height());
-
- // Adding a final two styled lines
- text.extend(Text::styled("Some more lines\nnow with more style!", style));
- assert_eq!(6, text.height());
-}
-
-// Span
-
-#[test]
-fn styled_graphemes() {
- let style = Style::default().fg(Color::Yellow);
- let span = Span::styled("Text", style);
- let style = Style::default().fg(Color::Green).bg(Color::Black);
- let styled_graphemes = span.styled_graphemes(style);
- assert_eq!(
- vec![
- StyledGrapheme {
- symbol: "T",
- style: Style {
- fg: Some(Color::Yellow),
- bg: Some(Color::Black),
- underline_color: None,
- underline_style: None,
- add_modifier: Modifier::empty(),
- sub_modifier: Modifier::empty(),
- },
- },
- StyledGrapheme {
- symbol: "e",
- style: Style {
- fg: Some(Color::Yellow),
- bg: Some(Color::Black),
- underline_color: None,
- underline_style: None,
- add_modifier: Modifier::empty(),
- sub_modifier: Modifier::empty(),
- },
- },
- StyledGrapheme {
- symbol: "x",
- style: Style {
- fg: Some(Color::Yellow),
- bg: Some(Color::Black),
- underline_color: None,
- underline_style: None,
- add_modifier: Modifier::empty(),
- sub_modifier: Modifier::empty(),
- },
- },
- StyledGrapheme {
- symbol: "t",
- style: Style {
- fg: Some(Color::Yellow),
- bg: Some(Color::Black),
- underline_color: None,
- underline_style: None,
- add_modifier: Modifier::empty(),
- sub_modifier: Modifier::empty(),
- },
- },
- ],
- styled_graphemes.collect::<Vec<StyledGrapheme>>()
- );
-}
-
-// Spans
-
-#[test]
-fn spans_width() {
- let spans = Spans::from(vec![
- Span::styled("My", Style::default().fg(Color::Yellow)),
- Span::raw(" text"),
- ]);
- assert_eq!(7, spans.width());
-}
diff --git a/helix-vcs/Cargo.toml b/helix-vcs/Cargo.toml
index 3c9b1c7f..d8936686 100644
--- a/helix-vcs/Cargo.toml
+++ b/helix-vcs/Cargo.toml
@@ -9,6 +9,8 @@ categories.workspace = true
repository.workspace = true
homepage.workspace = true
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
[dependencies]
helix-core = { path = "../helix-core" }
helix-event = { path = "../helix-event" }
@@ -17,7 +19,7 @@ tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "sync", "p
parking_lot.workspace = true
arc-swap = { version = "1.7.1" }
-gix = { version = "0.74.1", features = ["attributes", "status"], default-features = false, optional = true }
+gix = { version = "0.72.1", features = ["attributes", "status"], default-features = false, optional = true }
imara-diff = "0.2.0"
anyhow = "1"
diff --git a/helix-vcs/src/diff.rs b/helix-vcs/src/diff.rs
index d87f3ce7..6ec29813 100644
--- a/helix-vcs/src/diff.rs
+++ b/helix-vcs/src/diff.rs
@@ -35,7 +35,6 @@ struct DiffInner {
hunks: Vec<Hunk>,
}
-/// Representation of a diff that can be updated.
#[derive(Clone, Debug)]
pub struct DiffHandle {
channel: UnboundedSender<Event>,
@@ -66,13 +65,11 @@ impl DiffHandle {
(differ, handle)
}
- /// Switch base and modified texts' roles
pub fn invert(&mut self) {
self.inverted = !self.inverted;
}
- /// Load the actual diff
- pub fn load(&self) -> Diff<'_> {
+ pub fn load(&self) -> Diff {
Diff {
diff: self.diff.read(),
inverted: self.inverted,
@@ -92,7 +89,6 @@ impl DiffHandle {
self.update_document_impl(doc, self.inverted, Some(RenderLock { lock, timeout }))
}
- /// Updates the base text of the diff. Returns if the update was successful.
pub fn update_diff_base(&self, diff_base: Rope) -> bool {
self.update_document_impl(diff_base, !self.inverted, None)
}
@@ -132,7 +128,6 @@ pub struct Diff<'a> {
}
impl Diff<'_> {
- /// Returns the base [Rope] of the [Diff]
pub fn diff_base(&self) -> &Rope {
if self.inverted {
&self.diff.doc
@@ -141,7 +136,6 @@ impl Diff<'_> {
}
}
- /// Returns the [Rope] being compared against
pub fn doc(&self) -> &Rope {
if self.inverted {
&self.diff.diff_base
@@ -172,7 +166,6 @@ impl Diff<'_> {
self.len() == 0
}
- /// Gives the index of the first hunk after the given line, if one exists.
pub fn next_hunk(&self, line: u32) -> Option<u32> {
let hunk_range = if self.inverted {
|hunk: &Hunk| hunk.before.clone()
@@ -199,7 +192,6 @@ impl Diff<'_> {
}
}
- /// Gives the index of the first hunk before the given line, if one exists.
pub fn prev_hunk(&self, line: u32) -> Option<u32> {
let hunk_range = if self.inverted {
|hunk: &Hunk| hunk.before.clone()
@@ -243,7 +235,6 @@ impl Diff<'_> {
}
}
- /// Returns the index of the hunk containing the given line if it exists.
pub fn hunk_at(&self, line: u32, include_removal: bool) -> Option<u32> {
let hunk_range = if self.inverted {
|hunk: &Hunk| hunk.before.clone()
diff --git a/helix-vcs/src/diff/line_cache.rs b/helix-vcs/src/diff/line_cache.rs
index 187ac540..4a03a8f5 100644
--- a/helix-vcs/src/diff/line_cache.rs
+++ b/helix-vcs/src/diff/line_cache.rs
@@ -128,7 +128,7 @@ impl InternedRopeLines {
/// Returns the `InternedInput` for performing the diff.
/// If `diff_base` or `doc` is so large that performing a diff could slow the editor
/// this function returns `None`.
- pub fn interned_lines(&self) -> Option<&InternedInput<RopeSlice<'_>>> {
+ pub fn interned_lines(&self) -> Option<&InternedInput<RopeSlice>> {
if self.is_too_large() {
None
} else {
diff --git a/helix-vcs/src/diff/worker.rs b/helix-vcs/src/diff/worker.rs
index 0caab36f..3471b4cb 100644
--- a/helix-vcs/src/diff/worker.rs
+++ b/helix-vcs/src/diff/worker.rs
@@ -102,7 +102,7 @@ struct EventAccumulator {
render_lock: Option<RenderLock>,
}
-impl EventAccumulator {
+impl<'a> EventAccumulator {
fn new() -> EventAccumulator {
EventAccumulator {
diff_base: None,
diff --git a/helix-vcs/src/git.rs b/helix-vcs/src/git.rs
index 6544c35c..1be71afa 100644
--- a/helix-vcs/src/git.rs
+++ b/helix-vcs/src/git.rs
@@ -162,7 +162,7 @@ fn status(repo: &Repository, f: impl Fn(Result<FileChange>) -> bool) -> Result<(
} => {
let path = work_dir.join(rela_path.to_path()?);
match status {
- EntryStatus::Conflict { .. } => FileChange::Conflict { path },
+ EntryStatus::Conflict(_) => FileChange::Conflict { path },
EntryStatus::Change(Change::Removed) => FileChange::Deleted { path },
EntryStatus::Change(Change::Modification { .. }) => {
FileChange::Modified { path }
diff --git a/helix-vcs/src/lib.rs b/helix-vcs/src/lib.rs
index 4c5f2036..539be779 100644
--- a/helix-vcs/src/lib.rs
+++ b/helix-vcs/src/lib.rs
@@ -1,7 +1,3 @@
-//! `helix_vcs` provides types for working with diffs from a Version Control System (VCS).
-//! Currently `git` is the only supported provider for diffs, but this architecture allows
-//! for other providers to be added in the future.
-
use anyhow::{anyhow, bail, Result};
use arc_swap::ArcSwap;
use std::{
@@ -20,16 +16,12 @@ mod status;
pub use status::FileChange;
-/// Contains all active diff providers. Diff providers are compiled in via features. Currently
-/// only `git` is supported.
#[derive(Clone)]
pub struct DiffProviderRegistry {
providers: Vec<DiffProvider>,
}
impl DiffProviderRegistry {
- /// Get the given file from the VCS. This provides the unedited document as a "base"
- /// for a diff to be created.
pub fn get_diff_base(&self, file: &Path) -> Option<Vec<u8>> {
self.providers
.iter()
@@ -43,7 +35,6 @@ impl DiffProviderRegistry {
})
}
- /// Get the current name of the current [HEAD](https://stackoverflow.com/questions/2304087/what-is-head-in-git).
pub fn get_current_head_name(&self, file: &Path) -> Option<Arc<ArcSwap<Box<str>>>> {
self.providers
.iter()
@@ -84,7 +75,6 @@ impl Default for DiffProviderRegistry {
let providers = vec![
#[cfg(feature = "git")]
DiffProvider::Git,
- DiffProvider::None,
];
DiffProviderRegistry { providers }
}
@@ -95,7 +85,7 @@ impl Default for DiffProviderRegistry {
///
/// `Copy` is simply to ensure the `clone()` call is the simplest it can be.
#[derive(Copy, Clone)]
-enum DiffProvider {
+pub enum DiffProvider {
#[cfg(feature = "git")]
Git,
None,
diff --git a/helix-vcs/src/status.rs b/helix-vcs/src/status.rs
index 0240cad1..f3433490 100644
--- a/helix-vcs/src/status.rs
+++ b/helix-vcs/src/status.rs
@@ -1,16 +1,18 @@
use std::path::{Path, PathBuf};
-/// States for a file having been changed.
pub enum FileChange {
- /// Not tracked by the VCS.
- Untracked { path: PathBuf },
- /// File has been modified.
- Modified { path: PathBuf },
- /// File modification is in conflict with a different update.
- Conflict { path: PathBuf },
- /// File has been deleted.
- Deleted { path: PathBuf },
- /// File has been renamed.
+ Untracked {
+ path: PathBuf,
+ },
+ Modified {
+ path: PathBuf,
+ },
+ Conflict {
+ path: PathBuf,
+ },
+ Deleted {
+ path: PathBuf,
+ },
Renamed {
from_path: PathBuf,
to_path: PathBuf,
diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml
index 24dd0f2a..bcee1a0a 100644
--- a/helix-view/Cargo.toml
+++ b/helix-view/Cargo.toml
@@ -12,7 +12,7 @@ homepage.workspace = true
[features]
default = []
-term = ["termina", "crossterm"]
+term = ["crossterm"]
unicode-lines = []
[dependencies]
@@ -26,7 +26,7 @@ helix-vcs = { path = "../helix-vcs" }
bitflags.workspace = true
anyhow = "1"
-termina = { workspace = true, optional = true }
+crossterm = { version = "0.28", optional = true }
tempfile.workspace = true
@@ -46,21 +46,18 @@ chardetng = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
-toml.workspace = true
+toml = "0.8"
log = "~0.4"
parking_lot.workspace = true
thiserror.workspace = true
-kstring = "2.0"
-
[target.'cfg(windows)'.dependencies]
clipboard-win = { version = "5.4", features = ["std"] }
-crossterm = { version = "0.28", optional = true }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
-rustix = { version = "1.1", features = ["fs"] }
+rustix = { version = "1.0", features = ["fs"] }
[dev-dependencies]
helix-tui = { path = "../helix-tui" }
diff --git a/helix-view/src/annotations/diagnostics.rs b/helix-view/src/annotations/diagnostics.rs
index dc141462..7802ca63 100644
--- a/helix-view/src/annotations/diagnostics.rs
+++ b/helix-view/src/annotations/diagnostics.rs
@@ -109,7 +109,7 @@ impl InlineDiagnosticsConfig {
impl Default for InlineDiagnosticsConfig {
fn default() -> Self {
InlineDiagnosticsConfig {
- cursor_line: DiagnosticFilter::Enable(Severity::Warning),
+ cursor_line: DiagnosticFilter::Disable,
other_lines: DiagnosticFilter::Disable,
min_diagnostic_width: 40,
prefix_len: 1,
@@ -186,7 +186,7 @@ impl<'a> InlineDiagnosticAccumulator<'a> {
.doc
.diagnostics
.get(self.idx)
- .is_none_or(|diag| diag.range.start != grapheme.char_idx)
+ .map_or(true, |diag| diag.range.start != grapheme.char_idx)
{
return false;
}
diff --git a/helix-view/src/base64.rs b/helix-view/src/base64.rs
new file mode 100644
index 00000000..13ee919d
--- /dev/null
+++ b/helix-view/src/base64.rs
@@ -0,0 +1,163 @@
+// A minimal base64 implementation to keep from pulling in a crate for just that. It's based on
+// https://github.com/marshallpierce/rust-base64 but without all the customization options.
+// The biggest portion comes from
+// https://github.com/marshallpierce/rust-base64/blob/a675443d327e175f735a37f574de803d6a332591/src/engine/naive.rs#L42
+// Thanks, rust-base64!
+
+// The MIT License (MIT)
+
+// Copyright (c) 2015 Alice Maz
+
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+use std::ops::{BitAnd, BitOr, Shl, Shr};
+
+const PAD_BYTE: u8 = b'=';
+const ENCODE_TABLE: &[u8] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".as_bytes();
+const LOW_SIX_BITS: u32 = 0x3F;
+
+pub fn encode(input: &[u8]) -> String {
+ let rem = input.len() % 3;
+ let complete_chunks = input.len() / 3;
+ let remainder_chunk = usize::from(rem != 0);
+ let encoded_size = (complete_chunks + remainder_chunk) * 4;
+
+ let mut output = vec![0; encoded_size];
+
+ // complete chunks first
+ let complete_chunk_len = input.len() - rem;
+
+ let mut input_index = 0_usize;
+ let mut output_index = 0_usize;
+ while input_index < complete_chunk_len {
+ let chunk = &input[input_index..input_index + 3];
+
+ // populate low 24 bits from 3 bytes
+ let chunk_int: u32 =
+ (chunk[0] as u32).shl(16) | (chunk[1] as u32).shl(8) | (chunk[2] as u32);
+ // encode 4x 6-bit output bytes
+ output[output_index] = ENCODE_TABLE[chunk_int.shr(18) as usize];
+ output[output_index + 1] = ENCODE_TABLE[chunk_int.shr(12_u8).bitand(LOW_SIX_BITS) as usize];
+ output[output_index + 2] = ENCODE_TABLE[chunk_int.shr(6_u8).bitand(LOW_SIX_BITS) as usize];
+ output[output_index + 3] = ENCODE_TABLE[chunk_int.bitand(LOW_SIX_BITS) as usize];
+
+ input_index += 3;
+ output_index += 4;
+ }
+
+ // then leftovers
+ if rem == 2 {
+ let chunk = &input[input_index..input_index + 2];
+
+ // high six bits of chunk[0]
+ output[output_index] = ENCODE_TABLE[chunk[0].shr(2) as usize];
+ // bottom 2 bits of [0], high 4 bits of [1]
+ output[output_index + 1] = ENCODE_TABLE
+ [(chunk[0].shl(4_u8).bitor(chunk[1].shr(4_u8)) as u32).bitand(LOW_SIX_BITS) as usize];
+ // bottom 4 bits of [1], with the 2 bottom bits as zero
+ output[output_index + 2] =
+ ENCODE_TABLE[(chunk[1].shl(2_u8) as u32).bitand(LOW_SIX_BITS) as usize];
+ output[output_index + 3] = PAD_BYTE;
+ } else if rem == 1 {
+ let byte = input[input_index];
+ output[output_index] = ENCODE_TABLE[byte.shr(2) as usize];
+ output[output_index + 1] =
+ ENCODE_TABLE[(byte.shl(4_u8) as u32).bitand(LOW_SIX_BITS) as usize];
+ output[output_index + 2] = PAD_BYTE;
+ output[output_index + 3] = PAD_BYTE;
+ }
+ String::from_utf8(output).expect("Invalid UTF8")
+}
+
+#[cfg(test)]
+mod tests {
+ fn compare_encode(expected: &str, target: &[u8]) {
+ assert_eq!(expected, super::encode(target));
+ }
+
+ #[test]
+ fn encode_rfc4648_0() {
+ compare_encode("", b"");
+ }
+
+ #[test]
+ fn encode_rfc4648_1() {
+ compare_encode("Zg==", b"f");
+ }
+
+ #[test]
+ fn encode_rfc4648_2() {
+ compare_encode("Zm8=", b"fo");
+ }
+
+ #[test]
+ fn encode_rfc4648_3() {
+ compare_encode("Zm9v", b"foo");
+ }
+
+ #[test]
+ fn encode_rfc4648_4() {
+ compare_encode("Zm9vYg==", b"foob");
+ }
+
+ #[test]
+ fn encode_rfc4648_5() {
+ compare_encode("Zm9vYmE=", b"fooba");
+ }
+
+ #[test]
+ fn encode_rfc4648_6() {
+ compare_encode("Zm9vYmFy", b"foobar");
+ }
+
+ #[test]
+ fn encode_all_ascii() {
+ let mut ascii = Vec::<u8>::with_capacity(128);
+
+ for i in 0..128 {
+ ascii.push(i);
+ }
+
+ compare_encode(
+ "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7P\
+ D0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn8\
+ =",
+ &ascii,
+ );
+ }
+
+ #[test]
+ fn encode_all_bytes() {
+ let mut bytes = Vec::<u8>::with_capacity(256);
+
+ for i in 0..255 {
+ bytes.push(i);
+ }
+ bytes.push(255); //bug with "overflowing" ranges?
+
+ compare_encode(
+ "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7P\
+ D0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn\
+ +AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6\
+ /wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==",
+ &bytes,
+ );
+ }
+}
diff --git a/helix-view/src/clipboard.rs b/helix-view/src/clipboard.rs
index 2641d98f..1cf63348 100644
--- a/helix-view/src/clipboard.rs
+++ b/helix-view/src/clipboard.rs
@@ -193,7 +193,7 @@ mod external {
Self::Wayland => builtin_name("wayland", &WL_CLIPBOARD),
Self::XClip => builtin_name("x-clip", &XCLIP),
Self::XSel => builtin_name("x-sel", &XSEL),
- Self::Win32Yank => builtin_name("win32-yank", &WIN32),
+ Self::Win32Yank => builtin_name("win-32-yank", &WIN32),
Self::Tmux => builtin_name("tmux", &TMUX),
Self::Termux => builtin_name("termux", &TERMUX),
#[cfg(windows)]
@@ -292,17 +292,10 @@ mod external {
},
#[cfg(feature = "term")]
Self::Termcode => {
- use std::io::Write;
- use termina::escape::osc::{self, Osc};
- let selection = match clipboard_type {
- ClipboardType::Clipboard => osc::Selection::CLIPBOARD,
- ClipboardType::Selection => osc::Selection::PRIMARY,
- };
- // NOTE: it would be ideal to have the terminal execute this but it _should_
- // work to send this over stdout instead.
- let mut stdout = std::io::stdout().lock();
- write!(stdout, "{}", Osc::SetSelection(selection, content))?;
- stdout.flush()?;
+ crossterm::queue!(
+ std::io::stdout(),
+ osc52::SetClipboardCommand::new(content, clipboard_type)
+ )?;
Ok(())
}
Self::Custom(command_provider) => match clipboard_type {
@@ -407,6 +400,43 @@ mod external {
paste => "termux-clipboard-set";
}
+ #[cfg(feature = "term")]
+ mod osc52 {
+ use {super::ClipboardType, crate::base64};
+
+ pub struct SetClipboardCommand {
+ encoded_content: String,
+ clipboard_type: ClipboardType,
+ }
+
+ impl SetClipboardCommand {
+ pub fn new(content: &str, clipboard_type: ClipboardType) -> Self {
+ Self {
+ encoded_content: base64::encode(content.as_bytes()),
+ clipboard_type,
+ }
+ }
+ }
+
+ impl crossterm::Command for SetClipboardCommand {
+ fn write_ansi(&self, f: &mut impl std::fmt::Write) -> std::fmt::Result {
+ let kind = match &self.clipboard_type {
+ ClipboardType::Clipboard => "c",
+ ClipboardType::Selection => "p",
+ };
+ // Send an OSC 52 set command: https://terminalguide.namepad.de/seq/osc-52/
+ write!(f, "\x1b]52;{};{}\x1b\\", kind, &self.encoded_content)
+ }
+ #[cfg(windows)]
+ fn execute_winapi(&self) -> std::result::Result<(), std::io::Error> {
+ Err(std::io::Error::new(
+ std::io::ErrorKind::Other,
+ "OSC clipboard codes not supported by winapi.",
+ ))
+ }
+ }
+ }
+
fn execute_command(
cmd: &Command,
input: Option<&str>,
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index e52dbe0f..fb89e2e0 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -204,14 +204,11 @@ pub struct Document {
pub readonly: bool,
- pub previous_diagnostic_id: Option<String>,
-
/// Annotations for LSP document color swatches
pub color_swatches: Option<DocumentColorSwatches>,
// NOTE: ideally this would live on the handler for color swatches. This is blocked on a
// large refactor that would make `&mut Editor` available on the `DocumentDidChange` event.
pub color_swatch_controller: TaskController,
- pub pull_diagnostic_controller: TaskController,
// NOTE: this field should eventually go away - we should use the Editor's syn_loader instead
// of storing a copy on every doc. Then we can remove the surrounding `Arc` and use the
@@ -731,8 +728,6 @@ impl Document {
color_swatches: None,
color_swatch_controller: TaskController::new(),
syn_loader,
- previous_diagnostic_id: None,
- pull_diagnostic_controller: TaskController::new(),
}
}
@@ -980,12 +975,11 @@ impl Document {
};
let identifier = self.path().map(|_| self.identifier());
- let language_servers: Vec<_> = self.language_servers.values().cloned().collect();
+ let language_servers = self.language_servers.clone();
// mark changes up to now as saved
let current_rev = self.get_current_revision();
let doc_id = self.id();
- let atomic_save = self.config.load().atomic_save;
let encoding_with_bom_info = (self.encoding, self.has_bom);
let last_saved_time = self.last_saved_time;
@@ -1035,7 +1029,7 @@ impl Document {
// Assume it is a hardlink to prevent data loss if the metadata cant be read (e.g. on certain Windows configurations)
let is_hardlink = helix_stdx::faccess::hardlink_count(&write_path).unwrap_or(2) > 1;
- let backup = if path.exists() && atomic_save {
+ let backup = if path.exists() {
let path_ = write_path.clone();
// hacks: we use tempfile to handle the complex task of creating
// non clobbered temporary path for us we don't want
@@ -1124,7 +1118,7 @@ impl Document {
text: text.clone(),
};
- for language_server in language_servers {
+ for (_, language_server) in language_servers {
if !language_server.is_initialized() {
continue;
}
@@ -1178,7 +1172,7 @@ impl Document {
}
}
- pub fn detect_editor_config(&mut self) {
+ pub(crate) fn detect_editor_config(&mut self) {
if self.config.load().editor_config {
if let Some(path) = self.path.as_ref() {
self.editor_config = EditorConfig::find(path);
@@ -1660,7 +1654,7 @@ impl Document {
let savepoint_idx = self
.savepoints
.iter()
- .position(|savepoint_ref| std::ptr::eq(savepoint_ref.as_ptr(), savepoint))
+ .position(|savepoint_ref| savepoint_ref.as_ptr() == savepoint as *const _)
.expect("Savepoint must belong to this document");
let savepoint_ref = self.savepoints.remove(savepoint_idx);
@@ -1815,12 +1809,6 @@ impl Document {
self.version
}
- pub fn word_completion_enabled(&self) -> bool {
- self.language_config()
- .and_then(|lang_config| lang_config.word_completion.and_then(|c| c.enable))
- .unwrap_or_else(|| self.config.load().word_completion.enable)
- }
-
pub fn path_completion_enabled(&self) -> bool {
self.language_config()
.and_then(|lang_config| lang_config.path_completion)
@@ -2289,10 +2277,6 @@ impl Document {
pub fn reset_all_inlay_hints(&mut self) {
self.inlay_hints = Default::default();
}
-
- pub fn has_language_server_with_feature(&self, feature: LanguageServerFeature) -> bool {
- self.language_servers_with_feature(feature).next().is_some()
- }
}
#[derive(Debug, Default)]
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 7f8cff9c..2e5c60cf 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -221,49 +221,6 @@ impl Default for FilePickerConfig {
}
}
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
-#[serde(rename_all = "kebab-case", default, deny_unknown_fields)]
-pub struct FileExplorerConfig {
- /// IgnoreOptions
- /// Enables ignoring hidden files.
- /// Whether to hide hidden files in file explorer and global search results. Defaults to false.
- pub hidden: bool,
- /// Enables following symlinks.
- /// Whether to follow symbolic links in file picker and file or directory completions. Defaults to false.
- pub follow_symlinks: bool,
- /// Enables reading ignore files from parent directories. Defaults to false.
- pub parents: bool,
- /// Enables reading `.ignore` files.
- /// Whether to hide files listed in .ignore in file picker and global search results. Defaults to false.
- pub ignore: bool,
- /// Enables reading `.gitignore` files.
- /// Whether to hide files listed in .gitignore in file picker and global search results. Defaults to false.
- pub git_ignore: bool,
- /// Enables reading global .gitignore, whose path is specified in git's config: `core.excludefile` option.
- /// Whether to hide files listed in global .gitignore in file picker and global search results. Defaults to false.
- pub git_global: bool,
- /// Enables reading `.git/info/exclude` files.
- /// Whether to hide files listed in .git/info/exclude in file picker and global search results. Defaults to false.
- pub git_exclude: bool,
- /// Whether to flatten single-child directories in file explorer. Defaults to true.
- pub flatten_dirs: bool,
-}
-
-impl Default for FileExplorerConfig {
- fn default() -> Self {
- Self {
- hidden: false,
- follow_symlinks: false,
- parents: false,
- ignore: false,
- git_ignore: false,
- git_global: false,
- git_exclude: false,
- flatten_dirs: true,
- }
- }
-}
-
fn serialize_alphabet<S>(alphabet: &[char], serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
@@ -321,9 +278,6 @@ pub struct Config {
/// either absolute or relative to the current opened document or current working directory (if the buffer is not yet saved).
/// Defaults to true.
pub path_completion: bool,
- /// Configures completion of words from open buffers.
- /// Defaults to enabled with a trigger length of 7.
- pub word_completion: WordCompletion,
/// Automatic formatting on save. Defaults to true.
pub auto_format: bool,
/// Default register used for yank/paste. Defaults to '"'
@@ -361,7 +315,6 @@ pub struct Config {
/// Whether to display infoboxes. Defaults to true.
pub auto_info: bool,
pub file_picker: FilePickerConfig,
- pub file_explorer: FileExplorerConfig,
/// Configuration of the statusline elements
pub statusline: StatusLineConfig,
/// Shape for cursor in each mode
@@ -392,10 +345,6 @@ pub struct Config {
pub default_line_ending: LineEndingConfig,
/// Whether to automatically insert a trailing line-ending on write if missing. Defaults to `true`.
pub insert_final_newline: bool,
- /// Whether to use atomic operations to write documents to disk.
- /// This prevents data loss if the editor is interrupted while writing the file, but may
- /// confuse some file watching/hot reloading programs. Defaults to `true`.
- pub atomic_save: bool,
/// Whether to automatically remove all trailing line-endings after the final one on write.
/// Defaults to `false`.
pub trim_final_newlines: bool,
@@ -423,19 +372,6 @@ pub struct Config {
/// Whether to read settings from [EditorConfig](https://editorconfig.org) files. Defaults to
/// `true`.
pub editor_config: bool,
- /// Whether to render rainbow colors for matching brackets. Defaults to `false`.
- pub rainbow_brackets: bool,
- /// Whether to enable Kitty Keyboard Protocol
- pub kitty_keyboard_protocol: KittyKeyboardProtocolConfig,
-}
-
-#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize, Clone, Copy)]
-#[serde(rename_all = "kebab-case")]
-pub enum KittyKeyboardProtocolConfig {
- #[default]
- Auto,
- Disabled,
- Enabled,
}
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq, PartialOrd, Ord)]
@@ -685,9 +621,6 @@ pub enum StatusLineElement {
/// Indicator for selected register
Register,
-
- /// The base of current working directory
- CurrentWorkingDirectory,
}
// Cursor shape is read and used on every rendered frame and so needs
@@ -1037,22 +970,6 @@ pub enum PopupBorderConfig {
Menu,
}
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
-#[serde(default, rename_all = "kebab-case", deny_unknown_fields)]
-pub struct WordCompletion {
- pub enable: bool,
- pub trigger_length: NonZeroU8,
-}
-
-impl Default for WordCompletion {
- fn default() -> Self {
- Self {
- enable: true,
- trigger_length: NonZeroU8::new(7).unwrap(),
- }
- }
-}
-
impl Default for Config {
fn default() -> Self {
Self {
@@ -1072,7 +989,6 @@ impl Default for Config {
auto_pairs: AutoPairConfig::default(),
auto_completion: true,
path_completion: true,
- word_completion: WordCompletion::default(),
auto_format: true,
default_yank_register: '"',
auto_save: AutoSave::default(),
@@ -1082,7 +998,6 @@ impl Default for Config {
completion_trigger_len: 2,
auto_info: true,
file_picker: FilePickerConfig::default(),
- file_explorer: FileExplorerConfig::default(),
statusline: StatusLineConfig::default(),
cursor_shape: CursorShapeConfig::default(),
true_color: false,
@@ -1105,7 +1020,6 @@ impl Default for Config {
workspace_lsp_roots: Vec::new(),
default_line_ending: LineEndingConfig::default(),
insert_final_newline: true,
- atomic_save: true,
trim_final_newlines: false,
trim_trailing_whitespace: false,
smart_tab: Some(SmartTabConfig::default()),
@@ -1113,11 +1027,9 @@ impl Default for Config {
indent_heuristic: IndentationHeuristic::default(),
jump_label_alphabet: ('a'..='z').collect(),
inline_diagnostics: InlineDiagnosticsConfig::default(),
- end_of_line_diagnostics: DiagnosticFilter::Enable(Severity::Hint),
+ end_of_line_diagnostics: DiagnosticFilter::Disable,
clipboard_provider: ClipboardProvider::default(),
editor_config: true,
- rainbow_brackets: false,
- kitty_keyboard_protocol: Default::default(),
}
}
}
@@ -1644,7 +1556,7 @@ impl Editor {
doc.language_servers.iter().filter(|(name, doc_ls)| {
language_servers
.get(*name)
- .is_none_or(|ls| ls.id() != doc_ls.id())
+ .map_or(true, |ls| ls.id() != doc_ls.id())
});
for (_, language_server) in doc_language_servers_not_in_registry {
@@ -1654,7 +1566,7 @@ impl Editor {
let language_servers_not_in_doc = language_servers.iter().filter(|(name, ls)| {
doc.language_servers
.get(*name)
- .is_none_or(|doc_ls| ls.id() != doc_ls.id())
+ .map_or(true, |doc_ls| ls.id() != doc_ls.id())
});
for (_, language_server) in language_servers_not_in_doc {
@@ -2044,29 +1956,28 @@ impl Editor {
}
pub fn focus(&mut self, view_id: ViewId) {
- if self.tree.focus == view_id {
- return;
- }
+ let prev_id = std::mem::replace(&mut self.tree.focus, view_id);
- // Reset mode to normal and ensure any pending changes are committed in the old document.
- self.enter_normal_mode();
- let (view, doc) = current!(self);
- doc.append_changes_to_history(view);
- self.ensure_cursor_in_view(view_id);
- // Update jumplist selections with new document changes.
- for (view, _focused) in self.tree.views_mut() {
+ // if leaving the view: mode should reset and the cursor should be
+ // within view
+ if prev_id != view_id {
+ self.enter_normal_mode();
+ self.ensure_cursor_in_view(view_id);
+
+ // Update jumplist selections with new document changes.
+ for (view, _focused) in self.tree.views_mut() {
+ let doc = doc_mut!(self, &view.doc);
+ view.sync_changes(doc);
+ }
+ let view = view!(self, view_id);
let doc = doc_mut!(self, &view.doc);
- view.sync_changes(doc);
+ doc.mark_as_focused();
+ let focus_lost = self.tree.get(prev_id).doc;
+ dispatch(DocumentFocusLost {
+ editor: self,
+ doc: focus_lost,
+ });
}
-
- let prev_id = std::mem::replace(&mut self.tree.focus, view_id);
- doc_mut!(self).mark_as_focused();
-
- let focus_lost = self.tree.get(prev_id).doc;
- dispatch(DocumentFocusLost {
- editor: self,
- doc: focus_lost,
- });
}
pub fn focus_next(&mut self) {
diff --git a/helix-view/src/expansion.rs b/helix-view/src/expansion.rs
index 6a41ae43..99baf4bf 100644
--- a/helix-view/src/expansion.rs
+++ b/helix-view/src/expansion.rs
@@ -33,18 +33,10 @@ pub enum Variable {
BufferName,
/// A string containing the line-ending of the currently focused document.
LineEnding,
- /// Curreng working directory
- CurrentWorkingDirectory,
- /// Nearest ancestor directory of the current working directory that contains `.git`, `.svn`, `jj` or `.helix`
- WorkspaceDirectory,
// The name of current buffers language as set in `languages.toml`
Language,
// Primary selection
Selection,
- // The one-indexed line number of the start of the primary selection in the currently focused document.
- SelectionLineStart,
- // The one-indexed line number of the end of the primary selection in the currently focused document.
- SelectionLineEnd,
}
impl Variable {
@@ -53,12 +45,8 @@ impl Variable {
Self::CursorColumn,
Self::BufferName,
Self::LineEnding,
- Self::CurrentWorkingDirectory,
- Self::WorkspaceDirectory,
Self::Language,
Self::Selection,
- Self::SelectionLineStart,
- Self::SelectionLineEnd,
];
pub const fn as_str(&self) -> &'static str {
@@ -67,12 +55,8 @@ impl Variable {
Self::CursorColumn => "cursor_column",
Self::BufferName => "buffer_name",
Self::LineEnding => "line_ending",
- Self::CurrentWorkingDirectory => "current_working_directory",
- Self::WorkspaceDirectory => "workspace_directory",
Self::Language => "language",
Self::Selection => "selection",
- Self::SelectionLineStart => "selection_line_start",
- Self::SelectionLineEnd => "selection_line_end",
}
}
@@ -82,12 +66,8 @@ impl Variable {
"cursor_column" => Some(Self::CursorColumn),
"buffer_name" => Some(Self::BufferName),
"line_ending" => Some(Self::LineEnding),
- "workspace_directory" => Some(Self::WorkspaceDirectory),
- "current_working_directory" => Some(Self::CurrentWorkingDirectory),
"language" => Some(Self::Language),
"selection" => Some(Self::Selection),
- "selection_line_start" => Some(Self::SelectionLineStart),
- "selection_line_end" => Some(Self::SelectionLineEnd),
_ => None,
}
}
@@ -245,17 +225,6 @@ fn expand_variable(editor: &Editor, variable: Variable) -> Result<Cow<'static, s
}
}
Variable::LineEnding => Ok(Cow::Borrowed(doc.line_ending.as_str())),
- Variable::CurrentWorkingDirectory => Ok(std::borrow::Cow::Owned(
- helix_stdx::env::current_working_dir()
- .to_string_lossy()
- .to_string(),
- )),
- Variable::WorkspaceDirectory => Ok(std::borrow::Cow::Owned(
- helix_loader::find_workspace()
- .0
- .to_string_lossy()
- .to_string(),
- )),
Variable::Language => Ok(match doc.language_name() {
Some(lang) => Cow::Owned(lang.to_owned()),
None => Cow::Borrowed("text"),
@@ -263,13 +232,5 @@ fn expand_variable(editor: &Editor, variable: Variable) -> Result<Cow<'static, s
Variable::Selection => Ok(Cow::Owned(
doc.selection(view.id).primary().fragment(text).to_string(),
)),
- Variable::SelectionLineStart => {
- let start_line = doc.selection(view.id).primary().line_range(text).0;
- Ok(Cow::Owned((start_line + 1).to_string()))
- }
- Variable::SelectionLineEnd => {
- let end_line = doc.selection(view.id).primary().line_range(text).1;
- Ok(Cow::Owned((end_line + 1).to_string()))
- }
}
}
diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs
index 3a4eee3d..3cd3c862 100644
--- a/helix-view/src/graphics.rs
+++ b/helix-view/src/graphics.rs
@@ -289,33 +289,6 @@ impl Color {
}
#[cfg(feature = "term")]
-impl From<Color> for termina::style::ColorSpec {
- fn from(color: Color) -> Self {
- match color {
- Color::Reset => Self::Reset,
- Color::Black => Self::BLACK,
- Color::Red => Self::RED,
- Color::Green => Self::GREEN,
- Color::Yellow => Self::YELLOW,
- Color::Blue => Self::BLUE,
- Color::Magenta => Self::MAGENTA,
- Color::Cyan => Self::CYAN,
- Color::Gray => Self::BRIGHT_BLACK,
- Color::White => Self::BRIGHT_WHITE,
- Color::LightRed => Self::BRIGHT_RED,
- Color::LightGreen => Self::BRIGHT_GREEN,
- Color::LightBlue => Self::BRIGHT_BLUE,
- Color::LightYellow => Self::BRIGHT_YELLOW,
- Color::LightMagenta => Self::BRIGHT_MAGENTA,
- Color::LightCyan => Self::BRIGHT_CYAN,
- Color::LightGray => Self::WHITE,
- Color::Indexed(i) => Self::PaletteIndex(i),
- Color::Rgb(r, g, b) => termina::style::RgbColor::new(r, g, b).into(),
- }
- }
-}
-
-#[cfg(all(feature = "term", windows))]
impl From<Color> for crossterm::style::Color {
fn from(color: Color) -> Self {
use crossterm::style::Color as CColor;
@@ -343,6 +316,7 @@ impl From<Color> for crossterm::style::Color {
}
}
}
+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum UnderlineStyle {
Reset,
@@ -369,20 +343,6 @@ impl FromStr for UnderlineStyle {
}
#[cfg(feature = "term")]
-impl From<UnderlineStyle> for termina::style::Underline {
- fn from(style: UnderlineStyle) -> Self {
- match style {
- UnderlineStyle::Reset => Self::None,
- UnderlineStyle::Line => Self::Single,
- UnderlineStyle::Curl => Self::Curly,
- UnderlineStyle::Dotted => Self::Dotted,
- UnderlineStyle::Dashed => Self::Dashed,
- UnderlineStyle::DoubleLine => Self::Double,
- }
- }
-}
-
-#[cfg(all(feature = "term", windows))]
impl From<UnderlineStyle> for crossterm::style::Attribute {
fn from(style: UnderlineStyle) -> Self {
match style {
diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs
index 7506e515..896c6094 100644
--- a/helix-view/src/gutter.rs
+++ b/helix-view/src/gutter.rs
@@ -69,18 +69,19 @@ pub fn diagnostic<'doc>(
.iter()
.take_while(|d| {
d.line == line
- && d.provider.language_server_id().is_none_or(|id| {
+ && d.provider.language_server_id().map_or(true, |id| {
doc.language_servers_with_feature(LanguageServerFeature::Diagnostics)
.any(|ls| ls.id() == id)
})
});
diagnostics_on_line.max_by_key(|d| d.severity).map(|d| {
- write!(out, "●").ok();
- match d.severity {
- Some(Severity::Error) => error,
- Some(Severity::Warning) | None => warning,
- Some(Severity::Info) => info,
- Some(Severity::Hint) => hint,
+ let severity = d.severity();
+ out.push_str(severity.indicator());
+ match severity {
+ Severity::Error => error,
+ Severity::Warning => warning,
+ Severity::Info => info,
+ Severity::Hint => hint,
}
})
},
diff --git a/helix-view/src/handlers.rs b/helix-view/src/handlers.rs
index 6f3ad1ed..258ed89e 100644
--- a/helix-view/src/handlers.rs
+++ b/helix-view/src/handlers.rs
@@ -9,7 +9,6 @@ pub mod completion;
pub mod dap;
pub mod diagnostics;
pub mod lsp;
-pub mod word_index;
#[derive(Debug)]
pub enum AutoSaveEvent {
@@ -23,9 +22,6 @@ pub struct Handlers {
pub signature_hints: Sender<lsp::SignatureHelpEvent>,
pub auto_save: Sender<AutoSaveEvent>,
pub document_colors: Sender<lsp::DocumentColorsEvent>,
- pub word_index: word_index::Handler,
- pub pull_diagnostics: Sender<lsp::PullDiagnosticsEvent>,
- pub pull_all_documents_diagnostics: Sender<lsp::PullAllDocumentsDiagnosticsEvent>,
}
impl Handlers {
@@ -50,13 +46,8 @@ impl Handlers {
};
send_blocking(&self.signature_hints, event)
}
-
- pub fn word_index(&self) -> &word_index::WordIndex {
- &self.word_index.index
- }
}
pub fn register_hooks(handlers: &Handlers) {
lsp::register_hooks(handlers);
- word_index::register_hooks(handlers);
}
diff --git a/helix-view/src/handlers/lsp.rs b/helix-view/src/handlers/lsp.rs
index 96ab4626..c1041b2a 100644
--- a/helix-view/src/handlers/lsp.rs
+++ b/helix-view/src/handlers/lsp.rs
@@ -1,5 +1,4 @@
use std::collections::btree_map::Entry;
-use std::collections::HashSet;
use std::fmt::Display;
use crate::editor::Action;
@@ -31,14 +30,6 @@ pub enum SignatureHelpEvent {
RequestComplete { open: bool },
}
-pub struct PullDiagnosticsEvent {
- pub document_id: DocumentId,
-}
-
-pub struct PullAllDocumentsDiagnosticsEvent {
- pub language_servers: HashSet<LanguageServerId>,
-}
-
#[derive(Debug)]
pub struct ApplyEditError {
pub kind: ApplyEditErrorKind,
@@ -364,7 +355,7 @@ impl Editor {
&& diagnostic
.source
.as_ref()
- .is_none_or(|source| !unchanged_diag_sources.contains(source))
+ .map_or(true, |source| !unchanged_diag_sources.contains(source))
};
let diagnostics = Self::doc_diagnostics_with_filter(
&self.language_servers,
diff --git a/helix-view/src/handlers/word_index.rs b/helix-view/src/handlers/word_index.rs
deleted file mode 100644
index 9c3f8338..00000000
--- a/helix-view/src/handlers/word_index.rs
+++ /dev/null
@@ -1,509 +0,0 @@
-//! Indexing of words from open buffers.
-//!
-//! This provides an eventually consistent set of words used in any open buffers. This set is
-//! later used for lexical completion.
-
-use std::{borrow::Cow, collections::HashMap, iter, mem, sync::Arc, time::Duration};
-
-use helix_core::{
- chars::char_is_word, fuzzy::fuzzy_match, movement, ChangeSet, Range, Rope, RopeSlice,
-};
-use helix_event::{register_hook, AsyncHook};
-use helix_stdx::rope::RopeSliceExt as _;
-use parking_lot::RwLock;
-use tokio::{sync::mpsc, time::Instant};
-
-use crate::{
- events::{ConfigDidChange, DocumentDidChange, DocumentDidClose, DocumentDidOpen},
- DocumentId,
-};
-
-use super::Handlers;
-
-#[derive(Debug)]
-struct Change {
- old_text: Rope,
- text: Rope,
- changes: ChangeSet,
-}
-
-#[derive(Debug)]
-enum Event {
- Insert(Rope),
- Update(DocumentId, Change),
- Delete(DocumentId, Rope),
- /// Clear the entire word index.
- /// This is used to clear memory when the feature is turned off.
- Clear,
-}
-
-#[derive(Debug)]
-pub struct Handler {
- pub(super) index: WordIndex,
- /// A sender into an async hook which debounces updates to the index.
- hook: mpsc::Sender<Event>,
- /// A sender to a tokio task which coordinates the indexing of documents.
- ///
- /// See [WordIndex::run]. A supervisor-like task is in charge of spawning tasks to update the
- /// index. This ensures that consecutive edits to a document trigger the correct order of
- /// insertions and deletions into the word set.
- coordinator: mpsc::UnboundedSender<Event>,
-}
-
-impl Handler {
- pub fn spawn() -> Self {
- let index = WordIndex::default();
- let (tx, rx) = mpsc::unbounded_channel();
- tokio::spawn(index.clone().run(rx));
- Self {
- hook: Hook {
- changes: HashMap::default(),
- coordinator: tx.clone(),
- }
- .spawn(),
- index,
- coordinator: tx,
- }
- }
-}
-
-#[derive(Debug)]
-struct Hook {
- changes: HashMap<DocumentId, Change>,
- coordinator: mpsc::UnboundedSender<Event>,
-}
-
-const DEBOUNCE: Duration = Duration::from_secs(1);
-
-impl AsyncHook for Hook {
- type Event = Event;
-
- fn handle_event(&mut self, event: Self::Event, timeout: Option<Instant>) -> Option<Instant> {
- match event {
- Event::Insert(_) => unreachable!("inserts are sent to the worker directly"),
- Event::Update(doc, change) => {
- if let Some(pending_change) = self.changes.get_mut(&doc) {
- // If there is already a change waiting for this document, merge the two
- // changes together by composing the changesets and saving the new `text`.
- pending_change.changes =
- mem::take(&mut pending_change.changes).compose(change.changes);
- pending_change.text = change.text;
- Some(Instant::now() + DEBOUNCE)
- } else if !is_changeset_significant(&change.changes) {
- // If the changeset is fairly large, debounce before updating the index.
- self.changes.insert(doc, change);
- Some(Instant::now() + DEBOUNCE)
- } else {
- // Otherwise if the change is small, queue the update to the index immediately.
- self.coordinator.send(Event::Update(doc, change)).unwrap();
- timeout
- }
- }
- Event::Delete(doc, text) => {
- // If there are pending changes that haven't been indexed since the last debounce,
- // forget them and delete the old text.
- if let Some(change) = self.changes.remove(&doc) {
- self.coordinator
- .send(Event::Delete(doc, change.old_text))
- .unwrap();
- } else {
- self.coordinator.send(Event::Delete(doc, text)).unwrap();
- }
- timeout
- }
- Event::Clear => unreachable!("clear is sent to the worker directly"),
- }
- }
-
- fn finish_debounce(&mut self) {
- for (doc, change) in self.changes.drain() {
- self.coordinator.send(Event::Update(doc, change)).unwrap();
- }
- }
-}
-
-/// Minimum number of grapheme clusters required to include a word in the index
-const MIN_WORD_GRAPHEMES: usize = 3;
-/// Maximum word length allowed (in chars)
-const MAX_WORD_LEN: usize = 50;
-
-type Word = kstring::KString;
-
-#[derive(Debug, Default)]
-struct WordIndexInner {
- /// Reference counted storage for words.
- ///
- /// Words are very likely to be reused many times. Instead of storing duplicates we keep a
- /// reference count of times a word is used. When the reference count drops to zero the word
- /// is removed from the index.
- words: HashMap<Word, u32>,
-}
-
-impl WordIndexInner {
- fn words(&self) -> impl Iterator<Item = &Word> {
- self.words.keys()
- }
-
- fn insert(&mut self, word: RopeSlice) {
- let word: Cow<str> = word.into();
- if let Some(rc) = self.words.get_mut(word.as_ref()) {
- *rc = rc.saturating_add(1);
- } else {
- let word = match word {
- Cow::Owned(s) => Word::from_string(s),
- Cow::Borrowed(s) => Word::from_ref(s),
- };
- self.words.insert(word, 1);
- }
- }
-
- fn remove(&mut self, word: RopeSlice) {
- let word: Cow<str> = word.into();
- match self.words.get_mut(word.as_ref()) {
- Some(1) => {
- self.words.remove(word.as_ref());
- }
- Some(n) => *n -= 1,
- None => (),
- }
- }
-
- fn clear(&mut self) {
- std::mem::take(&mut self.words);
- }
-}
-
-#[derive(Debug, Default, Clone)]
-pub struct WordIndex {
- inner: Arc<RwLock<WordIndexInner>>,
-}
-
-impl WordIndex {
- pub fn matches(&self, pattern: &str) -> Vec<String> {
- let inner = self.inner.read();
- let mut matches = fuzzy_match(pattern, inner.words(), false);
- matches.sort_unstable_by_key(|(_, score)| *score);
- matches
- .into_iter()
- .map(|(word, _)| word.to_string())
- .collect()
- }
-
- fn add_document(&self, text: &Rope) {
- let mut inner = self.inner.write();
- for word in words(text.slice(..)) {
- inner.insert(word);
- }
- }
-
- fn update_document(&self, old_text: &Rope, text: &Rope, changes: &ChangeSet) {
- let mut inner = self.inner.write();
- for (old_window, new_window) in changed_windows(old_text.slice(..), text.slice(..), changes)
- {
- for word in words(new_window) {
- inner.insert(word);
- }
- for word in words(old_window) {
- inner.remove(word);
- }
- }
- }
-
- fn remove_document(&self, text: &Rope) {
- let mut inner = self.inner.write();
- for word in words(text.slice(..)) {
- inner.remove(word);
- }
- }
-
- fn clear(&self) {
- let mut inner = self.inner.write();
- inner.clear();
- }
-
- /// Coordinate the indexing of documents.
- ///
- /// This task wraps a MPSC queue and spawns blocking tasks which update the index. Updates
- /// are applied one-by-one to ensure that changes to the index are **serialized**:
- /// updates to each document must be applied in-order.
- async fn run(self, mut events: mpsc::UnboundedReceiver<Event>) {
- while let Some(event) = events.recv().await {
- let this = self.clone();
- tokio::task::spawn_blocking(move || match event {
- Event::Insert(text) => {
- this.add_document(&text);
- }
- Event::Update(
- _doc,
- Change {
- old_text,
- text,
- changes,
- ..
- },
- ) => {
- this.update_document(&old_text, &text, &changes);
- }
- Event::Delete(_doc, text) => {
- this.remove_document(&text);
- }
- Event::Clear => {
- this.clear();
- }
- })
- .await
- .unwrap();
- }
- }
-}
-
-fn words(text: RopeSlice) -> impl Iterator<Item = RopeSlice> {
- let mut cursor = Range::point(0);
- if text
- .get_char(cursor.anchor)
- .is_some_and(|ch| !ch.is_whitespace())
- {
- let cursor_word_end = movement::move_next_word_end(text, cursor, 1);
- if cursor_word_end.anchor == 0 {
- cursor = cursor_word_end;
- }
- }
-
- iter::from_fn(move || {
- while cursor.head <= text.len_chars() {
- let mut word = None;
- if text
- .slice(..cursor.head)
- .graphemes_rev()
- .take(MIN_WORD_GRAPHEMES)
- .take_while(|g| g.chars().all(char_is_word))
- .count()
- == MIN_WORD_GRAPHEMES
- {
- cursor.anchor += text
- .chars_at(cursor.anchor)
- .take_while(|&c| !char_is_word(c))
- .count();
- let slice = cursor.slice(text);
- if slice.len_chars() <= MAX_WORD_LEN {
- word = Some(slice);
- }
- }
- let head = cursor.head;
- cursor = movement::move_next_word_end(text, cursor, 1);
- if cursor.head == head {
- cursor.head = usize::MAX;
- }
- if word.is_some() {
- return word;
- }
- }
- None
- })
-}
-
-/// Finds areas of the old and new texts around each operation in `changes`.
-///
-/// The window is larger than the changed area and can encompass multiple insert/delete operations
-/// if they are grouped closely together.
-///
-/// The ranges of the old and new text should usually be of different sizes. For example a
-/// deletion of "foo" surrounded by large retain sections would give a longer window into the
-/// `old_text` and shorter window of `new_text`. Vice-versa for an insertion. A full replacement
-/// of a word though would give two slices of the same size.
-fn changed_windows<'a>(
- old_text: RopeSlice<'a>,
- new_text: RopeSlice<'a>,
- changes: &'a ChangeSet,
-) -> impl Iterator<Item = (RopeSlice<'a>, RopeSlice<'a>)> {
- use helix_core::Operation::*;
-
- let mut operations = changes.changes().iter().peekable();
- let mut old_pos = 0;
- let mut new_pos = 0;
- iter::from_fn(move || loop {
- let operation = operations.next()?;
- let old_start = old_pos;
- let new_start = new_pos;
- let len = operation.len_chars();
- match operation {
- Retain(_) => {
- old_pos += len;
- new_pos += len;
- continue;
- }
- Insert(_) => new_pos += len,
- Delete(_) => old_pos += len,
- }
-
- // Scan ahead until a `Retain` is found which would end a window.
- while let Some(o) = operations.next_if(|op| !matches!(op, Retain(n) if *n > MAX_WORD_LEN)) {
- let len = o.len_chars();
- match o {
- Retain(_) => {
- old_pos += len;
- new_pos += len;
- }
- Delete(_) => old_pos += len,
- Insert(_) => new_pos += len,
- }
- }
-
- let old_window = old_start.saturating_sub(MAX_WORD_LEN)
- ..(old_pos + MAX_WORD_LEN).min(old_text.len_chars());
- let new_window = new_start.saturating_sub(MAX_WORD_LEN)
- ..(new_pos + MAX_WORD_LEN).min(new_text.len_chars());
-
- return Some((old_text.slice(old_window), new_text.slice(new_window)));
- })
-}
-
-/// Estimates whether a changeset is significant or small.
-fn is_changeset_significant(changes: &ChangeSet) -> bool {
- use helix_core::Operation::*;
-
- let mut diff = 0;
- for operation in changes.changes() {
- match operation {
- Retain(_) => continue,
- Delete(_) | Insert(_) => diff += operation.len_chars(),
- }
- }
-
- // This is arbitrary and could be tuned further:
- diff > 1_000
-}
-
-pub(crate) fn register_hooks(handlers: &Handlers) {
- let coordinator = handlers.word_index.coordinator.clone();
- register_hook!(move |event: &mut DocumentDidOpen<'_>| {
- let doc = doc!(event.editor, &event.doc);
- if doc.word_completion_enabled() {
- coordinator.send(Event::Insert(doc.text().clone())).unwrap();
- }
- Ok(())
- });
-
- let tx = handlers.word_index.hook.clone();
- register_hook!(move |event: &mut DocumentDidChange<'_>| {
- if !event.ghost_transaction && event.doc.word_completion_enabled() {
- helix_event::send_blocking(
- &tx,
- Event::Update(
- event.doc.id(),
- Change {
- old_text: event.old_text.clone(),
- text: event.doc.text().clone(),
- changes: event.changes.clone(),
- },
- ),
- );
- }
- Ok(())
- });
-
- let tx = handlers.word_index.hook.clone();
- register_hook!(move |event: &mut DocumentDidClose<'_>| {
- if event.doc.word_completion_enabled() {
- helix_event::send_blocking(
- &tx,
- Event::Delete(event.doc.id(), event.doc.text().clone()),
- );
- }
- Ok(())
- });
-
- let coordinator = handlers.word_index.coordinator.clone();
- register_hook!(move |event: &mut ConfigDidChange<'_>| {
- // The feature has been turned off. Clear the index and reclaim any used memory.
- if event.old.word_completion.enable && !event.new.word_completion.enable {
- coordinator.send(Event::Clear).unwrap();
- }
-
- // The feature has been turned on. Index open documents.
- if !event.old.word_completion.enable && event.new.word_completion.enable {
- for doc in event.editor.documents() {
- if doc.word_completion_enabled() {
- coordinator.send(Event::Insert(doc.text().clone())).unwrap();
- }
- }
- }
-
- Ok(())
- });
-}
-
-#[cfg(test)]
-mod tests {
- use std::collections::HashSet;
-
- use super::*;
- use helix_core::diff::compare_ropes;
-
- impl WordIndex {
- fn words(&self) -> HashSet<String> {
- let inner = self.inner.read();
- inner.words().map(|w| w.to_string()).collect()
- }
- }
-
- #[track_caller]
- fn assert_words<I: ToString, T: IntoIterator<Item = I>>(text: &str, expected: T) {
- let text = Rope::from_str(text);
- let index = WordIndex::default();
- index.add_document(&text);
- let actual = index.words();
- let expected: HashSet<_> = expected.into_iter().map(|i| i.to_string()).collect();
- assert_eq!(expected, actual);
- }
-
- #[test]
- fn parse() {
- assert_words("one two three", ["one", "two", "three"]);
- assert_words("a foo c", ["foo"]);
- }
-
- #[track_caller]
- fn assert_diff<S, R, I>(before: &str, after: &str, expect_removed: R, expect_inserted: I)
- where
- S: ToString,
- R: IntoIterator<Item = S>,
- I: IntoIterator<Item = S>,
- {
- let before = Rope::from_str(before);
- let after = Rope::from_str(after);
- let diff = compare_ropes(&before, &after);
- let expect_removed: HashSet<_> =
- expect_removed.into_iter().map(|i| i.to_string()).collect();
- let expect_inserted: HashSet<_> =
- expect_inserted.into_iter().map(|i| i.to_string()).collect();
-
- let index = WordIndex::default();
- index.add_document(&before);
- let words_before = index.words();
- index.update_document(&before, &after, diff.changes());
- let words_after = index.words();
-
- let actual_removed = words_before.difference(&words_after).cloned().collect();
- let actual_inserted = words_after.difference(&words_before).cloned().collect();
-
- eprintln!("\"{before}\" {words_before:?} => \"{after}\" {words_after:?}");
- assert_eq!(
- expect_removed, actual_removed,
- "expected {expect_removed:?} to be removed, instead {actual_removed:?} was"
- );
- assert_eq!(
- expect_inserted, actual_inserted,
- "expected {expect_inserted:?} to be inserted, instead {actual_inserted:?} was"
- );
- }
-
- #[test]
- fn diff() {
- assert_diff("one two three", "one five three", ["two"], ["five"]);
- assert_diff("one two three", "one to three", ["two"], []);
- assert_diff("one two three", "one three", ["two"], []);
- assert_diff("one two three", "one t{o three", ["two"], []);
- assert_diff("one foo three", "one fooo three", ["foo"], ["fooo"]);
- }
-}
diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs
index 539680a6..d359db70 100644
--- a/helix-view/src/input.rs
+++ b/helix-view/src/input.rs
@@ -1,4 +1,4 @@
-//! Input event handling, currently backed by termina.
+//! Input event handling, currently backed by crossterm.
use anyhow::{anyhow, Error};
use helix_core::unicode::{segmentation::UnicodeSegmentation, width::UnicodeWidthStr};
use serde::de::{self, Deserialize, Deserializer};
@@ -65,7 +65,7 @@ pub enum MouseButton {
pub struct KeyEvent {
pub code: KeyCode,
pub modifiers: KeyModifiers,
- // TODO: termina now supports kind & state if terminal supports kitty's extended protocol
+ // TODO: crossterm now supports kind & state if terminal supports kitty's extended protocol
}
impl KeyEvent {
@@ -459,117 +459,6 @@ impl<'de> Deserialize<'de> for KeyEvent {
}
#[cfg(feature = "term")]
-impl From<termina::event::Event> for Event {
- fn from(event: termina::event::Event) -> Self {
- match event {
- termina::event::Event::Key(key) => Self::Key(key.into()),
- termina::event::Event::Mouse(mouse) => Self::Mouse(mouse.into()),
- termina::event::Event::WindowResized(termina::WindowSize { rows, cols, .. }) => {
- Self::Resize(cols, rows)
- }
- termina::event::Event::FocusIn => Self::FocusGained,
- termina::event::Event::FocusOut => Self::FocusLost,
- termina::event::Event::Paste(s) => Self::Paste(s),
- _ => unreachable!(),
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::MouseEvent> for MouseEvent {
- fn from(
- termina::event::MouseEvent {
- kind,
- column,
- row,
- modifiers,
- }: termina::event::MouseEvent,
- ) -> Self {
- Self {
- kind: kind.into(),
- column,
- row,
- modifiers: modifiers.into(),
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::MouseEventKind> for MouseEventKind {
- fn from(kind: termina::event::MouseEventKind) -> Self {
- match kind {
- termina::event::MouseEventKind::Down(button) => Self::Down(button.into()),
- termina::event::MouseEventKind::Up(button) => Self::Up(button.into()),
- termina::event::MouseEventKind::Drag(button) => Self::Drag(button.into()),
- termina::event::MouseEventKind::Moved => Self::Moved,
- termina::event::MouseEventKind::ScrollDown => Self::ScrollDown,
- termina::event::MouseEventKind::ScrollUp => Self::ScrollUp,
- termina::event::MouseEventKind::ScrollLeft => Self::ScrollLeft,
- termina::event::MouseEventKind::ScrollRight => Self::ScrollRight,
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::MouseButton> for MouseButton {
- fn from(button: termina::event::MouseButton) -> Self {
- match button {
- termina::event::MouseButton::Left => MouseButton::Left,
- termina::event::MouseButton::Right => MouseButton::Right,
- termina::event::MouseButton::Middle => MouseButton::Middle,
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::KeyEvent> for KeyEvent {
- fn from(
- termina::event::KeyEvent {
- code, modifiers, ..
- }: termina::event::KeyEvent,
- ) -> Self {
- if code == termina::event::KeyCode::BackTab {
- // special case for BackTab -> Shift-Tab
- let mut modifiers: KeyModifiers = modifiers.into();
- modifiers.insert(KeyModifiers::SHIFT);
- Self {
- code: KeyCode::Tab,
- modifiers,
- }
- } else {
- Self {
- code: code.into(),
- modifiers: modifiers.into(),
- }
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<KeyEvent> for termina::event::KeyEvent {
- fn from(KeyEvent { code, modifiers }: KeyEvent) -> Self {
- if code == KeyCode::Tab && modifiers.contains(KeyModifiers::SHIFT) {
- // special case for Shift-Tab -> BackTab
- let mut modifiers = modifiers;
- modifiers.remove(KeyModifiers::SHIFT);
- termina::event::KeyEvent {
- code: termina::event::KeyCode::BackTab,
- modifiers: modifiers.into(),
- kind: termina::event::KeyEventKind::Press,
- state: termina::event::KeyEventState::NONE,
- }
- } else {
- termina::event::KeyEvent {
- code: code.into(),
- modifiers: modifiers.into(),
- kind: termina::event::KeyEventKind::Press,
- state: termina::event::KeyEventState::NONE,
- }
- }
- }
-}
-
-#[cfg(all(feature = "term", windows))]
impl From<crossterm::event::Event> for Event {
fn from(event: crossterm::event::Event) -> Self {
match event {
@@ -583,7 +472,7 @@ impl From<crossterm::event::Event> for Event {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::MouseEvent> for MouseEvent {
fn from(
crossterm::event::MouseEvent {
@@ -602,7 +491,7 @@ impl From<crossterm::event::MouseEvent> for MouseEvent {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::MouseEventKind> for MouseEventKind {
fn from(kind: crossterm::event::MouseEventKind) -> Self {
match kind {
@@ -618,7 +507,7 @@ impl From<crossterm::event::MouseEventKind> for MouseEventKind {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::MouseButton> for MouseButton {
fn from(button: crossterm::event::MouseButton) -> Self {
match button {
@@ -629,7 +518,7 @@ impl From<crossterm::event::MouseButton> for MouseButton {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::KeyEvent> for KeyEvent {
fn from(
crossterm::event::KeyEvent {
@@ -653,7 +542,7 @@ impl From<crossterm::event::KeyEvent> for KeyEvent {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<KeyEvent> for crossterm::event::KeyEvent {
fn from(KeyEvent { code, modifiers }: KeyEvent) -> Self {
if code == KeyCode::Tab && modifiers.contains(KeyModifiers::SHIFT) {
@@ -676,6 +565,7 @@ impl From<KeyEvent> for crossterm::event::KeyEvent {
}
}
}
+
pub fn parse_macro(keys_str: &str) -> anyhow::Result<Vec<KeyEvent>> {
use anyhow::Context;
let mut keys_res: anyhow::Result<_> = Ok(Vec::new());
diff --git a/helix-view/src/keyboard.rs b/helix-view/src/keyboard.rs
index 53d85889..d816a52e 100644
--- a/helix-view/src/keyboard.rs
+++ b/helix-view/src/keyboard.rs
@@ -13,54 +13,6 @@ bitflags! {
}
#[cfg(feature = "term")]
-impl From<KeyModifiers> for termina::event::Modifiers {
- fn from(key_modifiers: KeyModifiers) -> Self {
- use termina::event::Modifiers as CKeyModifiers;
-
- let mut result = CKeyModifiers::NONE;
-
- if key_modifiers.contains(KeyModifiers::SHIFT) {
- result.insert(CKeyModifiers::SHIFT);
- }
- if key_modifiers.contains(KeyModifiers::CONTROL) {
- result.insert(CKeyModifiers::CONTROL);
- }
- if key_modifiers.contains(KeyModifiers::ALT) {
- result.insert(CKeyModifiers::ALT);
- }
- if key_modifiers.contains(KeyModifiers::SUPER) {
- result.insert(CKeyModifiers::SUPER);
- }
-
- result
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::Modifiers> for KeyModifiers {
- fn from(val: termina::event::Modifiers) -> Self {
- use termina::event::Modifiers as CKeyModifiers;
-
- let mut result = KeyModifiers::NONE;
-
- if val.contains(CKeyModifiers::SHIFT) {
- result.insert(KeyModifiers::SHIFT);
- }
- if val.contains(CKeyModifiers::CONTROL) {
- result.insert(KeyModifiers::CONTROL);
- }
- if val.contains(CKeyModifiers::ALT) {
- result.insert(KeyModifiers::ALT);
- }
- if val.contains(CKeyModifiers::SUPER) {
- result.insert(KeyModifiers::SUPER);
- }
-
- result
- }
-}
-
-#[cfg(all(feature = "term", windows))]
impl From<KeyModifiers> for crossterm::event::KeyModifiers {
fn from(key_modifiers: KeyModifiers) -> Self {
use crossterm::event::KeyModifiers as CKeyModifiers;
@@ -84,7 +36,7 @@ impl From<KeyModifiers> for crossterm::event::KeyModifiers {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::KeyModifiers> for KeyModifiers {
fn from(val: crossterm::event::KeyModifiers) -> Self {
use crossterm::event::KeyModifiers as CKeyModifiers;
@@ -107,6 +59,7 @@ impl From<crossterm::event::KeyModifiers> for KeyModifiers {
result
}
}
+
/// Represents a media key (as part of [`KeyCode::Media`]).
#[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Clone, Copy, Hash)]
pub enum MediaKeyCode {
@@ -139,52 +92,6 @@ pub enum MediaKeyCode {
}
#[cfg(feature = "term")]
-impl From<MediaKeyCode> for termina::event::MediaKeyCode {
- fn from(media_key_code: MediaKeyCode) -> Self {
- use termina::event::MediaKeyCode as CMediaKeyCode;
-
- match media_key_code {
- MediaKeyCode::Play => CMediaKeyCode::Play,
- MediaKeyCode::Pause => CMediaKeyCode::Pause,
- MediaKeyCode::PlayPause => CMediaKeyCode::PlayPause,
- MediaKeyCode::Reverse => CMediaKeyCode::Reverse,
- MediaKeyCode::Stop => CMediaKeyCode::Stop,
- MediaKeyCode::FastForward => CMediaKeyCode::FastForward,
- MediaKeyCode::Rewind => CMediaKeyCode::Rewind,
- MediaKeyCode::TrackNext => CMediaKeyCode::TrackNext,
- MediaKeyCode::TrackPrevious => CMediaKeyCode::TrackPrevious,
- MediaKeyCode::Record => CMediaKeyCode::Record,
- MediaKeyCode::LowerVolume => CMediaKeyCode::LowerVolume,
- MediaKeyCode::RaiseVolume => CMediaKeyCode::RaiseVolume,
- MediaKeyCode::MuteVolume => CMediaKeyCode::MuteVolume,
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::MediaKeyCode> for MediaKeyCode {
- fn from(val: termina::event::MediaKeyCode) -> Self {
- use termina::event::MediaKeyCode as CMediaKeyCode;
-
- match val {
- CMediaKeyCode::Play => MediaKeyCode::Play,
- CMediaKeyCode::Pause => MediaKeyCode::Pause,
- CMediaKeyCode::PlayPause => MediaKeyCode::PlayPause,
- CMediaKeyCode::Reverse => MediaKeyCode::Reverse,
- CMediaKeyCode::Stop => MediaKeyCode::Stop,
- CMediaKeyCode::FastForward => MediaKeyCode::FastForward,
- CMediaKeyCode::Rewind => MediaKeyCode::Rewind,
- CMediaKeyCode::TrackNext => MediaKeyCode::TrackNext,
- CMediaKeyCode::TrackPrevious => MediaKeyCode::TrackPrevious,
- CMediaKeyCode::Record => MediaKeyCode::Record,
- CMediaKeyCode::LowerVolume => MediaKeyCode::LowerVolume,
- CMediaKeyCode::RaiseVolume => MediaKeyCode::RaiseVolume,
- CMediaKeyCode::MuteVolume => MediaKeyCode::MuteVolume,
- }
- }
-}
-
-#[cfg(all(feature = "term", windows))]
impl From<MediaKeyCode> for crossterm::event::MediaKeyCode {
fn from(media_key_code: MediaKeyCode) -> Self {
use crossterm::event::MediaKeyCode as CMediaKeyCode;
@@ -207,7 +114,7 @@ impl From<MediaKeyCode> for crossterm::event::MediaKeyCode {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::MediaKeyCode> for MediaKeyCode {
fn from(val: crossterm::event::MediaKeyCode) -> Self {
use crossterm::event::MediaKeyCode as CMediaKeyCode;
@@ -229,6 +136,7 @@ impl From<crossterm::event::MediaKeyCode> for MediaKeyCode {
}
}
}
+
/// Represents a media key (as part of [`KeyCode::Modifier`]).
#[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Clone, Copy, Hash)]
pub enum ModifierKeyCode {
@@ -263,54 +171,6 @@ pub enum ModifierKeyCode {
}
#[cfg(feature = "term")]
-impl From<ModifierKeyCode> for termina::event::ModifierKeyCode {
- fn from(modifier_key_code: ModifierKeyCode) -> Self {
- use termina::event::ModifierKeyCode as CModifierKeyCode;
-
- match modifier_key_code {
- ModifierKeyCode::LeftShift => CModifierKeyCode::LeftShift,
- ModifierKeyCode::LeftControl => CModifierKeyCode::LeftControl,
- ModifierKeyCode::LeftAlt => CModifierKeyCode::LeftAlt,
- ModifierKeyCode::LeftSuper => CModifierKeyCode::LeftSuper,
- ModifierKeyCode::LeftHyper => CModifierKeyCode::LeftHyper,
- ModifierKeyCode::LeftMeta => CModifierKeyCode::LeftMeta,
- ModifierKeyCode::RightShift => CModifierKeyCode::RightShift,
- ModifierKeyCode::RightControl => CModifierKeyCode::RightControl,
- ModifierKeyCode::RightAlt => CModifierKeyCode::RightAlt,
- ModifierKeyCode::RightSuper => CModifierKeyCode::RightSuper,
- ModifierKeyCode::RightHyper => CModifierKeyCode::RightHyper,
- ModifierKeyCode::RightMeta => CModifierKeyCode::RightMeta,
- ModifierKeyCode::IsoLevel3Shift => CModifierKeyCode::IsoLevel3Shift,
- ModifierKeyCode::IsoLevel5Shift => CModifierKeyCode::IsoLevel5Shift,
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::ModifierKeyCode> for ModifierKeyCode {
- fn from(val: termina::event::ModifierKeyCode) -> Self {
- use termina::event::ModifierKeyCode as CModifierKeyCode;
-
- match val {
- CModifierKeyCode::LeftShift => ModifierKeyCode::LeftShift,
- CModifierKeyCode::LeftControl => ModifierKeyCode::LeftControl,
- CModifierKeyCode::LeftAlt => ModifierKeyCode::LeftAlt,
- CModifierKeyCode::LeftSuper => ModifierKeyCode::LeftSuper,
- CModifierKeyCode::LeftHyper => ModifierKeyCode::LeftHyper,
- CModifierKeyCode::LeftMeta => ModifierKeyCode::LeftMeta,
- CModifierKeyCode::RightShift => ModifierKeyCode::RightShift,
- CModifierKeyCode::RightControl => ModifierKeyCode::RightControl,
- CModifierKeyCode::RightAlt => ModifierKeyCode::RightAlt,
- CModifierKeyCode::RightSuper => ModifierKeyCode::RightSuper,
- CModifierKeyCode::RightHyper => ModifierKeyCode::RightHyper,
- CModifierKeyCode::RightMeta => ModifierKeyCode::RightMeta,
- CModifierKeyCode::IsoLevel3Shift => ModifierKeyCode::IsoLevel3Shift,
- CModifierKeyCode::IsoLevel5Shift => ModifierKeyCode::IsoLevel5Shift,
- }
- }
-}
-
-#[cfg(all(feature = "term", windows))]
impl From<ModifierKeyCode> for crossterm::event::ModifierKeyCode {
fn from(modifier_key_code: ModifierKeyCode) -> Self {
use crossterm::event::ModifierKeyCode as CModifierKeyCode;
@@ -334,7 +194,7 @@ impl From<ModifierKeyCode> for crossterm::event::ModifierKeyCode {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::ModifierKeyCode> for ModifierKeyCode {
fn from(val: crossterm::event::ModifierKeyCode) -> Self {
use crossterm::event::ModifierKeyCode as CModifierKeyCode;
@@ -357,6 +217,7 @@ impl From<crossterm::event::ModifierKeyCode> for ModifierKeyCode {
}
}
}
+
/// Represents a key.
#[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Clone, Copy, Hash)]
pub enum KeyCode {
@@ -419,79 +280,6 @@ pub enum KeyCode {
}
#[cfg(feature = "term")]
-impl From<KeyCode> for termina::event::KeyCode {
- fn from(key_code: KeyCode) -> Self {
- use termina::event::KeyCode as CKeyCode;
-
- match key_code {
- KeyCode::Backspace => CKeyCode::Backspace,
- KeyCode::Enter => CKeyCode::Enter,
- KeyCode::Left => CKeyCode::Left,
- KeyCode::Right => CKeyCode::Right,
- KeyCode::Up => CKeyCode::Up,
- KeyCode::Down => CKeyCode::Down,
- KeyCode::Home => CKeyCode::Home,
- KeyCode::End => CKeyCode::End,
- KeyCode::PageUp => CKeyCode::PageUp,
- KeyCode::PageDown => CKeyCode::PageDown,
- KeyCode::Tab => CKeyCode::Tab,
- KeyCode::Delete => CKeyCode::Delete,
- KeyCode::Insert => CKeyCode::Insert,
- KeyCode::F(f_number) => CKeyCode::Function(f_number),
- KeyCode::Char(character) => CKeyCode::Char(character),
- KeyCode::Null => CKeyCode::Null,
- KeyCode::Esc => CKeyCode::Escape,
- KeyCode::CapsLock => CKeyCode::CapsLock,
- KeyCode::ScrollLock => CKeyCode::ScrollLock,
- KeyCode::NumLock => CKeyCode::NumLock,
- KeyCode::PrintScreen => CKeyCode::PrintScreen,
- KeyCode::Pause => CKeyCode::Pause,
- KeyCode::Menu => CKeyCode::Menu,
- KeyCode::KeypadBegin => CKeyCode::KeypadBegin,
- KeyCode::Media(media_key_code) => CKeyCode::Media(media_key_code.into()),
- KeyCode::Modifier(modifier_key_code) => CKeyCode::Modifier(modifier_key_code.into()),
- }
- }
-}
-
-#[cfg(feature = "term")]
-impl From<termina::event::KeyCode> for KeyCode {
- fn from(val: termina::event::KeyCode) -> Self {
- use termina::event::KeyCode as CKeyCode;
-
- match val {
- CKeyCode::Backspace => KeyCode::Backspace,
- CKeyCode::Enter => KeyCode::Enter,
- CKeyCode::Left => KeyCode::Left,
- CKeyCode::Right => KeyCode::Right,
- CKeyCode::Up => KeyCode::Up,
- CKeyCode::Down => KeyCode::Down,
- CKeyCode::Home => KeyCode::Home,
- CKeyCode::End => KeyCode::End,
- CKeyCode::PageUp => KeyCode::PageUp,
- CKeyCode::PageDown => KeyCode::PageDown,
- CKeyCode::Tab => KeyCode::Tab,
- CKeyCode::BackTab => unreachable!("BackTab should have been handled on KeyEvent level"),
- CKeyCode::Delete => KeyCode::Delete,
- CKeyCode::Insert => KeyCode::Insert,
- CKeyCode::Function(f_number) => KeyCode::F(f_number),
- CKeyCode::Char(character) => KeyCode::Char(character),
- CKeyCode::Null => KeyCode::Null,
- CKeyCode::Escape => KeyCode::Esc,
- CKeyCode::CapsLock => KeyCode::CapsLock,
- CKeyCode::ScrollLock => KeyCode::ScrollLock,
- CKeyCode::NumLock => KeyCode::NumLock,
- CKeyCode::PrintScreen => KeyCode::PrintScreen,
- CKeyCode::Pause => KeyCode::Pause,
- CKeyCode::Menu => KeyCode::Menu,
- CKeyCode::KeypadBegin => KeyCode::KeypadBegin,
- CKeyCode::Media(media_key_code) => KeyCode::Media(media_key_code.into()),
- CKeyCode::Modifier(modifier_key_code) => KeyCode::Modifier(modifier_key_code.into()),
- }
- }
-}
-
-#[cfg(all(feature = "term", windows))]
impl From<KeyCode> for crossterm::event::KeyCode {
fn from(key_code: KeyCode) -> Self {
use crossterm::event::KeyCode as CKeyCode;
@@ -527,7 +315,7 @@ impl From<KeyCode> for crossterm::event::KeyCode {
}
}
-#[cfg(all(feature = "term", windows))]
+#[cfg(feature = "term")]
impl From<crossterm::event::KeyCode> for KeyCode {
fn from(val: crossterm::event::KeyCode) -> Self {
use crossterm::event::KeyCode as CKeyCode;
diff --git a/helix-view/src/lib.rs b/helix-view/src/lib.rs
index a7e9f461..e30a2338 100644
--- a/helix-view/src/lib.rs
+++ b/helix-view/src/lib.rs
@@ -2,6 +2,7 @@
pub mod macros;
pub mod annotations;
+pub mod base64;
pub mod clipboard;
pub mod document;
pub mod editor;
diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs
index 173a40f3..61d490ff 100644
--- a/helix-view/src/theme.rs
+++ b/helix-view/src/theme.rs
@@ -35,75 +35,6 @@ pub static BASE16_DEFAULT_THEME: Lazy<Theme> = Lazy::new(|| Theme {
..Theme::from(BASE16_DEFAULT_THEME_DATA.clone())
});
-#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
-pub enum Mode {
- Dark,
- Light,
-}
-
-#[cfg(feature = "term")]
-impl From<termina::escape::csi::ThemeMode> for Mode {
- fn from(mode: termina::escape::csi::ThemeMode) -> Self {
- match mode {
- termina::escape::csi::ThemeMode::Dark => Self::Dark,
- termina::escape::csi::ThemeMode::Light => Self::Light,
- }
- }
-}
-
-#[derive(Debug, Clone, PartialEq, Eq)]
-pub struct Config {
- light: String,
- dark: String,
- /// A theme to choose when the terminal did not declare either light or dark mode.
- /// When not specified the dark theme is preferred.
- fallback: Option<String>,
-}
-
-impl Config {
- pub fn choose(&self, preference: Option<Mode>) -> &str {
- match preference {
- Some(Mode::Light) => &self.light,
- Some(Mode::Dark) => &self.dark,
- None => self.fallback.as_ref().unwrap_or(&self.dark),
- }
- }
-}
-
-impl<'de> Deserialize<'de> for Config {
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- #[derive(Deserialize)]
- #[serde(untagged, deny_unknown_fields, rename_all = "kebab-case")]
- enum InnerConfig {
- Constant(String),
- Adaptive {
- dark: String,
- light: String,
- fallback: Option<String>,
- },
- }
-
- let inner = InnerConfig::deserialize(deserializer)?;
-
- let (light, dark, fallback) = match inner {
- InnerConfig::Constant(theme) => (theme.clone(), theme.clone(), None),
- InnerConfig::Adaptive {
- light,
- dark,
- fallback,
- } => (light, dark, fallback),
- };
-
- Ok(Self {
- light,
- dark,
- fallback,
- })
- }
-}
#[derive(Clone, Debug)]
pub struct Loader {
/// Theme directories to search from highest to lowest priority
@@ -296,7 +227,6 @@ pub struct Theme {
// tree-sitter highlight styles are stored in a Vec to optimize lookups
scopes: Vec<String>,
highlights: Vec<Style>,
- rainbow_length: usize,
}
impl From<Value> for Theme {
@@ -323,20 +253,12 @@ impl<'de> Deserialize<'de> for Theme {
}
}
-#[allow(clippy::type_complexity)]
fn build_theme_values(
mut values: Map<String, Value>,
-) -> (
- HashMap<String, Style>,
- Vec<String>,
- Vec<Style>,
- usize,
- Vec<String>,
-) {
+) -> (HashMap<String, Style>, Vec<String>, Vec<Style>, Vec<String>) {
let mut styles = HashMap::new();
let mut scopes = Vec::new();
let mut highlights = Vec::new();
- let mut rainbow_length = 0;
let mut warnings = Vec::new();
@@ -355,27 +277,6 @@ fn build_theme_values(
styles.reserve(values.len());
scopes.reserve(values.len());
highlights.reserve(values.len());
-
- for (i, style) in values
- .remove("rainbow")
- .and_then(|value| match palette.parse_style_array(value) {
- Ok(styles) => Some(styles),
- Err(err) => {
- warnings.push(err);
- None
- }
- })
- .unwrap_or_else(default_rainbow)
- .into_iter()
- .enumerate()
- {
- let name = format!("rainbow.{i}");
- styles.insert(name.clone(), style);
- scopes.push(name);
- highlights.push(style);
- rainbow_length += 1;
- }
-
for (name, style_value) in values {
let mut style = Style::default();
if let Err(err) = palette.parse_style(&mut style, style_value) {
@@ -388,19 +289,9 @@ fn build_theme_values(
highlights.push(style);
}
- (styles, scopes, highlights, rainbow_length, warnings)
+ (styles, scopes, highlights, warnings)
}
-fn default_rainbow() -> Vec<Style> {
- vec![
- Style::default().fg(Color::Red),
- Style::default().fg(Color::Yellow),
- Style::default().fg(Color::Green),
- Style::default().fg(Color::Blue),
- Style::default().fg(Color::Cyan),
- Style::default().fg(Color::Magenta),
- ]
-}
impl Theme {
/// To allow `Highlight` to represent arbitrary RGB colors without turning it into an enum,
/// we interpret the last 256^3 numbers as RGB.
@@ -409,7 +300,7 @@ impl Theme {
/// Interpret a Highlight with the RGB foreground
fn decode_rgb_highlight(highlight: Highlight) -> Option<(u8, u8, u8)> {
(highlight.get() > Self::RGB_START).then(|| {
- let [b, g, r, ..] = (highlight.get() + 1).to_le_bytes();
+ let [b, g, r, ..] = (highlight.get() + 1).to_ne_bytes();
(r, g, b)
})
}
@@ -418,7 +309,7 @@ impl Theme {
pub fn rgb_highlight(r: u8, g: u8, b: u8) -> Highlight {
// -1 because highlight is "non-max": u32::MAX is reserved for the null pointer
// optimization.
- Highlight::new(u32::from_le_bytes([b, g, r, u8::MAX]) - 1)
+ Highlight::new(u32::from_ne_bytes([b, g, r, u8::MAX]) - 1)
}
#[inline]
@@ -491,10 +382,6 @@ impl Theme {
})
}
- pub fn rainbow_length(&self) -> usize {
- self.rainbow_length
- }
-
fn from_toml(value: Value) -> (Self, Vec<String>) {
if let Value::Table(table) = value {
Theme::from_keys(table)
@@ -505,14 +392,12 @@ impl Theme {
}
fn from_keys(toml_keys: Map<String, Value>) -> (Self, Vec<String>) {
- let (styles, scopes, highlights, rainbow_length, load_errors) =
- build_theme_values(toml_keys);
+ let (styles, scopes, highlights, load_errors) = build_theme_values(toml_keys);
let theme = Self {
styles,
scopes,
highlights,
- rainbow_length,
..Default::default()
};
(theme, load_errors)
@@ -656,21 +541,6 @@ impl ThemePalette {
}
Ok(())
}
-
- fn parse_style_array(&self, value: Value) -> Result<Vec<Style>, String> {
- let mut styles = Vec::new();
-
- for v in value
- .as_array()
- .ok_or_else(|| format!("Could not parse value as an array: '{value}'"))?
- {
- let mut style = Style::default();
- self.parse_style(&mut style, v.clone())?;
- styles.push(style);
- }
-
- Ok(styles)
- }
}
impl TryFrom<Value> for ThemePalette {
diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs
index d596b35a..aba947a2 100644
--- a/helix-view/src/tree.rs
+++ b/helix-view/src/tree.rs
@@ -441,7 +441,7 @@ impl Tree {
}
}
- pub fn traverse(&self) -> Traverse<'_> {
+ pub fn traverse(&self) -> Traverse {
Traverse::new(self)
}
diff --git a/languages.toml b/languages.toml
index 2d1074aa..536962e1 100644
--- a/languages.toml
+++ b/languages.toml
@@ -32,32 +32,26 @@ csharp-ls = { command = "csharp-ls" }
cuelsp = { command = "cuelsp" }
dart = { command = "dart", args = ["language-server", "--client-id=helix"] }
dhall-lsp-server = { command = "dhall-lsp-server" }
-djlsp = { command = "djlsp" }
docker-langserver = { command = "docker-langserver", args = ["--stdio"] }
docker-compose-langserver = { command = "docker-compose-langserver", args = ["--stdio"]}
dot-language-server = { command = "dot-language-server", args = ["--stdio"] }
-dts-lsp = { command = "dts-lsp" }
earthlyls = { command = "earthlyls" }
-eiffel-language-server = {command = "eiffel-language-server"}
elixir-ls = { command = "elixir-ls", config = { elixirLS.dialyzerEnabled = false } }
elm-language-server = { command = "elm-language-server" }
elp = { command = "elp", args = ["server"] }
elvish = { command = "elvish", args = ["-lsp"] }
erlang-ls = { command = "erlang_ls" }
-expert = { command = "expert" }
fennel-ls = { command = "fennel-ls" }
fish-lsp = { command = "fish-lsp", args = ["start"], environment = { fish_lsp_show_client_popups = "false" } }
forc = { command = "forc", args = ["lsp"] }
forth-lsp = { command = "forth-lsp" }
fortls = { command = "fortls", args = ["--lowercase_intrinsics"] }
fsharp-ls = { command = "fsautocomplete", config = { AutomaticWorkspaceInit = true } }
-gitlab-ci-ls = { command = "gitlab-ci-ls" }
gleam = { command = "gleam", args = ["lsp"] }
glsl_analyzer = { command = "glsl_analyzer" }
graphql-language-service = { command = "graphql-lsp", args = ["server", "-m", "stream"] }
harper-ls = { command = "harper-ls", args = ["--stdio"] }
haskell-language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] }
-hdls = { command = "hdls" }
hyprls = { command = "hyprls" }
idris2-lsp = { command = "idris2-lsp" }
intelephense = { command = "intelephense", args = ["--stdio"] }
@@ -69,9 +63,8 @@ julia = { command = "julia", timeout = 60, args = [ "--startup-file=no", "--hist
just-lsp = { command = "just-lsp" }
koka = { command = "koka", args = ["--language-server", "--lsstdio"] }
koto-ls = { command = "koto-ls" }
-kotlin-lsp = { command = "kotlin-lsp", args = ["--stdio"] }
kotlin-language-server = { command = "kotlin-language-server" }
-lean = { command = "lake", args = ["serve"] }
+lean = { command = "lean", args = [ "--server", "--memory=1024" ] }
ltex-ls = { command = "ltex-ls" }
ltex-ls-plus = { command = "ltex-ls-plus" }
markdoc-ls = { command = "markdoc-ls", args = ["--stdio"] }
@@ -117,7 +110,6 @@ ruby-lsp = { command = "ruby-lsp" }
serve-d = { command = "serve-d" }
slangd = { command = "slangd" }
slint-lsp = { command = "slint-lsp", args = [] }
-systemd-lsp = { command = "systemd-lsp" }
solargraph = { command = "solargraph", args = ["stdio"] }
solc = { command = "solc", args = ["--lsp"] }
sourcekit-lsp = { command = "sourcekit-lsp" }
@@ -143,7 +135,6 @@ vscode-html-language-server = { command = "vscode-html-language-server", args =
vscode-json-language-server = { command = "vscode-json-language-server", args = ["--stdio"], config = { provideFormatter = true, json = { validate = { enable = true } } } }
vuels = { command = "vue-language-server", args = ["--stdio"], config = { typescript = { tsdk = "node_modules/typescript/lib/" } } }
wgsl-analyzer = { command = "wgsl-analyzer" }
-wikitext-lsp = { command = "wikitext-lsp", args = ["--stdio"]}
yaml-language-server = { command = "yaml-language-server", args = ["--stdio"] }
yls = { command = "yls", args = ["-vv"] }
zls = { command = "zls" }
@@ -280,14 +271,6 @@ mode = "location"
command = "clarinet"
args = ["lsp"]
-[language-server.docker-language-server]
-command = "docker-language-server"
-args = ["start", "--stdio"]
-
-[language-server.kcl-lsp]
-command = "kcl-language-server"
-args = ["server", "--stdio"]
-
[[language]]
name = "rust"
scope = "source.rust"
@@ -344,7 +327,7 @@ args = { attachCommands = [ "platform select remote-gdb-server", "platform conne
[[grammar]]
name = "rust"
-source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "261b20226c04ef601adbdf185a800512a5f66291" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "1f63b33efee17e833e0ea29266dd3d713e27e321" }
[[language]]
name = "sway"
@@ -364,20 +347,7 @@ source = { git = "https://github.com/FuelLabs/tree-sitter-sway", rev = "e491a005
name = "toml"
scope = "source.toml"
injection-regex = "toml"
-file-types = [
- "toml",
- { glob = "pdm.lock" },
- { glob = "poetry.lock" },
- { glob = "Cargo.lock" },
- { glob = "uv.lock" },
- { glob = "containers.conf" },
- { glob = "containers.conf.d/*.conf" },
- { glob = "containers.conf.modules/*.conf" },
- { glob = "mounts.conf" },
- { glob = "policy.conf" },
- { glob = "registries.conf" },
- { glob = "storage.conf" },
-]
+file-types = ["toml", { glob = "pdm.lock" }, { glob = "poetry.lock" }, { glob = "Cargo.lock" }, { glob = "uv.lock" }]
comment-token = "#"
language-servers = [ "taplo", "tombi" ]
indent = { tab-width = 2, unit = " " }
@@ -428,17 +398,6 @@ name = "textproto"
source = { git = "https://github.com/PorterAtGoogle/tree-sitter-textproto", rev = "568471b80fd8793d37ed01865d8c2208a9fefd1b"}
[[language]]
-name = "eiffel"
-scope = "source.eiffel"
-file-types = ["e"]
-comment-token = "--"
-language-servers = ["eiffel-language-server"]
-
-[[grammar]]
-name = "eiffel"
-source = { git = "https://github.com/imustafin/tree-sitter-eiffel", rev = "d934fb44f1d22bb76be6b56a7b2425ab3b1daf8b" }
-
-[[language]]
name = "elixir"
scope = "source.elixir"
injection-regex = "(elixir|ex)"
@@ -446,7 +405,7 @@ file-types = ["ex", "exs", { glob = "mix.lock" }]
shebangs = ["elixir"]
roots = ["mix.exs", "mix.lock"]
comment-token = "#"
-language-servers = [ "elixir-ls", "expert" ]
+language-servers = [ "elixir-ls" ]
indent = { tab-width = 2, unit = " " }
[[grammar]]
@@ -484,18 +443,6 @@ name = "fish"
source = { git = "https://github.com/ram02z/tree-sitter-fish", rev = "a78aef9abc395c600c38a037ac779afc7e3cc9e0" }
[[language]]
-name = "flatbuffers"
-scope = "source.flatbuffers"
-injection-regex = "(flatbuffers?|fbs)"
-file-types = ["fbs"]
-comment-token = "//"
-indent = { tab-width = 2, unit = " " }
-
-[[grammar]]
-name = "flatbuffers"
-source = { git = "https://github.com/yuanchenxi95/tree-sitter-flatbuffers", rev = "95e6f9ef101ea97e870bf6eebc0bd1fdfbaf5490" }
-
-[[language]]
name = "mint"
scope = "source.mint"
injection-regex = "mint"
@@ -565,6 +512,7 @@ file-types = [
"css.map",
{ glob = ".jslintrc" },
"jsonl",
+ "jsonld",
{ glob = ".vuerc" },
{ glob = "composer.lock" },
{ glob = ".watchmanconfig" },
@@ -605,17 +553,6 @@ language-servers = [ "vscode-json-language-server" ]
auto-format = true
indent = { tab-width = 2, unit = " " }
-# https://www.w3.org/TR/json-ld/
-[[language]]
-name = "json-ld"
-scope = "source.json-ld"
-injection-regex = "json-ld"
-grammar = "json"
-file-types = ["jsonld"]
-language-servers = ["vscode-json-language-server"]
-auto-format = true
-indent = { tab-width = 2, unit = " " }
-
[[language]]
name = "json5"
scope = "source.json5"
@@ -665,7 +602,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote
[[grammar]]
name = "c"
-source = { git = "https://github.com/tree-sitter/tree-sitter-c", rev = "7fa1be1b694b6e763686793d97da01f36a0e5c12" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-c", rev = "7175a6dd5fc1cee660dce6fe23f6043d75af424a" }
[[language]]
name = "cpp"
@@ -724,7 +661,7 @@ scope = "source.csharp"
injection-regex = "c-?sharp"
file-types = ["cs", "csx", "cake"]
roots = ["sln", "csproj"]
-comment-tokens = ["//", "///"]
+comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
indent = { tab-width = 4, unit = "\t" }
language-servers = [ "omnisharp" ]
@@ -828,7 +765,7 @@ args = { mode = "core", program = "{0}", coreFilePath = "{1}" }
[[grammar]]
name = "go"
-source = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "12fe553fdaaa7449f764bc876fd777704d4fb752" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "64457ea6b73ef5422ed1687178d4545c3e91334a" }
[[language]]
name = "gomod"
@@ -873,16 +810,6 @@ name = "gowork"
source = { git = "https://github.com/omertuc/tree-sitter-go-work", rev = "6dd9dd79fb51e9f2abc829d5e97b15015b6a8ae2" }
[[language]]
-name = "go-format-string"
-scope = "source.go-format-string"
-file-types = []
-injection-regex = "go-format-string"
-
-[[grammar]]
-name = "go-format-string"
-source = { git = "https://codeberg.org/kpbaks/tree-sitter-go-format-string", rev = "06587ea641155db638f46a32c959d68796cd36bb" }
-
-[[language]]
name = "javascript"
scope = "source.js"
injection-regex = "(js|javascript)"
@@ -910,7 +837,7 @@ args = { program = "{0}", skipFiles = [ "<node_internals>/**" ] }
[[grammar]]
name = "javascript"
-source = { git = "https://github.com/tree-sitter/tree-sitter-javascript", rev = "3a837b6f3658ca3618f2022f8707e29739c91364" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-javascript", rev = "f772967f7b7bc7c28f845be2420a38472b16a8ee" }
[[language]]
name = "jsx"
@@ -940,7 +867,7 @@ indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "typescript"
-source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "75b3874edb2dc714fb1fd77a32013d0f8699989f", subpath = "typescript" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "b1bf4825d9eaa0f3bdeb1e52f099533328acfbdf", subpath = "typescript" }
[[language]]
name = "typespec"
@@ -973,7 +900,7 @@ indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "tsx"
-source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "75b3874edb2dc714fb1fd77a32013d0f8699989f", subpath = "tsx" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "b1bf4825d9eaa0f3bdeb1e52f099533328acfbdf", subpath = "tsx" }
[[language]]
name = "css"
@@ -987,7 +914,7 @@ indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "css"
-source = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "6e327db434fec0ee90f006697782e43ec855adf5" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "769203d0f9abe1a9a691ac2b9fe4bb4397a73c51" }
[[language]]
name = "scss"
@@ -1018,26 +945,6 @@ name = "html"
source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "cbb91a0ff3621245e890d1c50cc811bffb77a26b" }
[[language]]
-name = "htmldjango"
-scope = "source.htmldjango"
-injection-regex = "htmldjango"
-language-servers = ["djlsp", "vscode-html-language-server", "superhtml"]
-file-types = []
-roots = ["manage.py"]
-
-[language.auto-pairs]
-'"' = '"'
-'(' = ')'
-'[' = ']'
-'{' = '}'
-'%' = '%'
-'<' = '>'
-
-[[grammar]]
-name = "htmldjango"
-source = { git = "https://github.com/interdependence/tree-sitter-htmldjango", rev = "3a643167ad9afac5d61e092f08ff5b054576fadf" }
-
-[[language]]
name = "python"
scope = "source.python"
injection-regex = "py(thon)?"
@@ -1082,7 +989,6 @@ shebangs = []
comment-token = "#"
language-servers = [ "nil", "nixd" ]
indent = { tab-width = 2, unit = " " }
-formatter = { command = "nixfmt" }
[[grammar]]
name = "nix"
@@ -1128,7 +1034,6 @@ file-types = [
{ glob = "Scanfile" },
{ glob = "Snapfile" },
{ glob = "Gymfile" },
- { glob = ".irbrc" },
]
shebangs = ["ruby"]
comment-token = "#"
@@ -1167,9 +1072,7 @@ file-types = [
"zshrc_Apple_Terminal",
{ glob = "i3/config" },
{ glob = "sway/config" },
- { glob = ".tmux.conf" },
{ glob = "tmux.conf" },
- { glob = ".sh_history" },
{ glob = ".bash_history" },
{ glob = ".bash_login" },
{ glob = ".bash_logout" },
@@ -1184,9 +1087,6 @@ file-types = [
{ glob = ".zimrc" },
{ glob = "APKBUILD" },
{ glob = ".bash_aliases" },
- { glob = "bash_completion" },
- { glob = "bash-completion/completions/*" },
- { glob = "bash_completion.d/*" },
{ glob = ".Renviron" },
{ glob = ".xprofile" },
{ glob = ".xsession" },
@@ -1194,10 +1094,6 @@ file-types = [
{ glob = ".yashrc" },
{ glob = ".yash_profile" },
{ glob = ".hushlogin" },
- { glob = ".xinitrc" }, # ~/.xinitrc
- { glob = "xinitrc" }, # /etc/X11/xinit/xinitrc
- { glob = ".xserverrc" }, # ~/.xserverrc
- { glob = "xserverrc" }, # /etc/X11/xinit/xserverrc
]
shebangs = ["sh", "bash", "dash", "zsh"]
comment-token = "#"
@@ -1245,7 +1141,7 @@ roots = ["composer.json", "index.php"]
[[grammar]]
name = "blade"
-source = { git = "https://github.com/EmranMR/tree-sitter-blade", rev = "59ce5b68e288002e3aee6cf5a379bbef21adbe6c" }
+source = { git = "https://github.com/EmranMR/tree-sitter-blade", rev = "4c66efe1e05c639c555ee70092021b8223d2f440" }
[[language]]
name = "twig"
@@ -1304,7 +1200,7 @@ name = "lean"
scope = "source.lean"
injection-regex = "lean"
file-types = ["lean"]
-roots = [ "lakefile.lean", "lakefile.toml" ]
+roots = [ "lakefile.lean" ]
comment-token = "--"
block-comment-tokens = { start = "/-", end = "-/" }
language-servers = [ "lean" ]
@@ -1476,16 +1372,6 @@ language-servers = [ "lua-language-server" ]
name = "lua"
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-lua", rev = "88e446476a1e97a8724dff7a23e2d709855077f2" }
-[[language]]
-name = "luap"
-scope = "source.luap"
-file-types = []
-injection-regex = "luap"
-
-[[grammar]]
-name = "luap"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-luap", rev = "c134aaec6acf4fa95fe4aa0dc9aba3eacdbbe55a" }
-
[[grammar]]
name = "teal"
source = { git = "https://github.com/euclidianAce/tree-sitter-teal", rev = "3db655924b2ff1c54fdf6371b5425ea6b5dccefe" }
@@ -1512,7 +1398,7 @@ language-servers = [ "svelteserver" ]
[[grammar]]
name = "svelte"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-svelte", rev = "ae5199db47757f785e43a14b332118a5474de1a2" }
+source = { git = "https://github.com/Himujjal/tree-sitter-svelte", rev = "60ea1d673a1a3eeeb597e098d9ada9ed0c79ef4b" }
[[language]]
name = "vue"
@@ -1538,18 +1424,12 @@ file-types = [
{ glob = ".clangd" },
{ glob = ".clang-format" },
{ glob = ".clang-tidy" },
- { glob = ".gem/credentials" },
- { glob = ".kube/config" },
- { glob = ".kube/kuberc" },
- { glob = "yarn.lock" },
"sublime-syntax"
]
comment-token = "#"
indent = { tab-width = 2, unit = " " }
language-servers = [ "yaml-language-server", "ansible-language-server" ]
injection-regex = "yml|yaml"
-formatter = { command = "yamlfmt", args = ['-'] }
-auto-format = true
[[grammar]]
name = "yaml"
@@ -1569,8 +1449,7 @@ name = "haskell"
scope = "source.haskell"
injection-regex = "hs|haskell"
file-types = ["hs", "hs-boot", "hsc"]
-roots = ["Setup.hs", "stack.yaml", "cabal.project", "hie.yaml"]
-shebangs = ["runhaskell", "stack"]
+roots = ["Setup.hs", "stack.yaml", "cabal.project"]
comment-token = "--"
block-comment-tokens = { start = "{-", end = "-}" }
language-servers = [ "haskell-language-server" ]
@@ -1645,7 +1524,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote
[[grammar]]
name = "zig"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-zig", rev = "6479aa13f32f701c383083d8b28360ebd682fb7d" }
+source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-zig", rev = "eb7d58c2dc4fbeea4745019dee8df013034ae66b" }
[[language]]
name = "prolog"
@@ -1723,22 +1602,7 @@ source = { git = "https://github.com/theHamsta/tree-sitter-glsl", rev = "88408ff
[[language]]
name = "perl"
scope = "source.perl"
-file-types =[
- "pl",
- "pm",
- "t",
- "psgi",
- "raku",
- "rakumod",
- "rakutest",
- "rakudoc",
- "nqp",
- "p6",
- "pl6",
- "pm6",
- {glob = "latexmkrc"},
- {glob = ".latexmkrc"},
-]
+file-types = ["pl", "pm", "t", "psgi", "raku", "rakumod", "rakutest", "rakudoc", "nqp", "p6", "pl6", "pm6"]
shebangs = ["perl"]
comment-token = "#"
language-servers = [ "perlnavigator" ]
@@ -1761,8 +1625,8 @@ source = { git = "https://github.com/tree-sitter-perl/tree-sitter-pod", rev = "0
[[language]]
name = "racket"
scope = "source.racket"
-file-types = ["rkt", "rktd", "rktl", "scrbl", "zuo"]
-shebangs = ["racket", "zuo"]
+file-types = ["rkt", "rktd", "rktl", "scrbl"]
+shebangs = ["racket"]
comment-token = ";"
indent = { tab-width = 2, unit = " " }
block-comment-tokens = { start = "#|", end = "|#" }
@@ -1875,7 +1739,7 @@ injection-regex = "mail|eml|email"
[[grammar]]
name = "mail"
-source = { git = "https://codeberg.org/ficd/tree-sitter-mail", rev = "8e60f38efbae1cc5f22833ae13c5500dd0f3b12f" }
+source = { git = "https://github.com/ficcdaf/tree-sitter-mail", rev = "8e60f38efbae1cc5f22833ae13c5500dd0f3b12f" }
[[language]]
name = "markdown"
@@ -1886,18 +1750,6 @@ roots = [".marksman.toml"]
language-servers = [ "marksman", "markdown-oxide" ]
indent = { tab-width = 2, unit = " " }
block-comment-tokens = { start = "<!--", end = "-->" }
-word-completion.trigger-length = 4
-
-[language.auto-pairs]
-'(' = ')'
-'{' = '}'
-'[' = ']'
-'"' = '"'
-"'" = "'"
-'`' = '`'
-'‘' = '’'
-'«' = '»'
-'“' = '”'
[[grammar]]
name = "markdown"
@@ -1984,8 +1836,8 @@ file-types = [
{ glob = "containerfile.*" },
]
comment-token = "#"
-indent = { tab-width = 4, unit = " " }
-language-servers = [ "docker-langserver", "docker-language-server" ]
+indent = { tab-width = 2, unit = " " }
+language-servers = [ "docker-langserver" ]
[[grammar]]
name = "dockerfile"
@@ -1994,9 +1846,9 @@ source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev =
[[language]]
name = "docker-compose"
scope = "source.yaml.docker-compose"
-roots = ["docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml"]
-language-servers = [ "docker-compose-langserver", "yaml-language-server", "docker-language-server" ]
-file-types = [{ glob = "docker-compose.yaml" }, { glob = "docker-compose.yml" }, { glob = "compose.yaml" }, { glob = "compose.yml" }]
+roots = ["docker-compose.yaml", "docker-compose.yml"]
+language-servers = [ "docker-compose-langserver", "yaml-language-server" ]
+file-types = [{ glob = "docker-compose.yaml" }, { glob = "docker-compose.yml" }]
comment-token = "#"
indent = { tab-width = 2, unit = " " }
grammar = "yaml"
@@ -2006,24 +1858,13 @@ name = "git-commit"
scope = "git.commitmsg"
file-types = [{ glob = "COMMIT_EDITMSG" }, { glob = "MERGE_MSG" }]
comment-token = "#"
-indent = { tab-width = 4, unit = " " }
+indent = { tab-width = 2, unit = " " }
rulers = [51, 73]
text-width = 72
-grammar = "gitcommit"
[[grammar]]
-name = "gitcommit"
-source = { git = "https://github.com/gbprod/tree-sitter-gitcommit", rev = "a716678c0f00645fed1e6f1d0eb221481dbd6f6d" }
-
-[[language]]
-name = "git-notes"
-scope = "git.notesmsg"
-file-types = [{ glob = "NOTES_EDITMSG" }]
-comment-token = "#"
-indent = { tab-width = 4, unit = " " }
-rulers = [73]
-text-width = 72
-grammar = "gitcommit"
+name = "git-commit"
+source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "6f193a66e9aa872760823dff020960c6cedc37b3" }
[[language]]
name = "diff"
@@ -2062,7 +1903,7 @@ source = { git = "https://github.com/tree-sitter/tree-sitter-regex", rev = "e1cf
[[language]]
name = "git-config"
scope = "source.gitconfig"
-file-types = ["gitconfig", { glob = ".gitmodules" }, { glob = "gitconfig" }, { glob = ".gitconfig" }, { glob = ".git/config" }, { glob = ".config/git/config" }]
+file-types = ["gitconfig", { glob = ".gitmodules" }, { glob = ".gitconfig" }, { glob = ".git/config" }, { glob = ".config/git/config" }]
injection-regex = "git-config"
comment-token = "#"
indent = { tab-width = 4, unit = "\t" }
@@ -2086,7 +1927,7 @@ source = { git = "https://github.com/mtoohey31/tree-sitter-gitattributes", rev =
[[language]]
name = "git-ignore"
scope = "source.gitignore"
-file-types = [{ glob = ".gitignore_global" }, { glob = "git/ignore" }, { glob = ".git/info/exclude" }, { glob = ".ignore" }, { glob = "CODEOWNERS" }, { glob = ".config/helix/ignore" }, { glob = ".helix/ignore" }, { glob = ".*ignore" }, { glob = ".git-blame-ignore-revs" }]
+file-types = [{ glob = ".gitignore_global" }, { glob = "git/ignore" }, { glob = ".ignore" }, { glob = "CODEOWNERS" }, { glob = ".config/helix/ignore" }, { glob = ".helix/ignore" }, { glob = ".*ignore" }, { glob = ".git-blame-ignore-revs" }]
injection-regex = "git-ignore"
comment-token = "#"
grammar = "gitignore"
@@ -2161,10 +2002,7 @@ roots = ["rebar.config"]
shebangs = ["escript"]
comment-token = "%%"
indent = { tab-width = 4, unit = " " }
-language-servers = [
- { name = "erlang-ls", except-features = ["document-symbols", "workspace-symbols"] },
- { name = "elp", except-features = ["document-symbols", "workspace-symbols"] }
-]
+language-servers = [ "erlang-ls", "elp" ]
[[grammar]]
name = "erlang"
@@ -2250,7 +2088,7 @@ auto-format = true
[[grammar]]
name = "gleam"
-source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "dae1551a9911b24f41d876c23f2ab05ece0a9d4c" }
+source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "ee93c639dc82148d716919df336ad612fd33538e" }
[[language]]
name = "quarto"
@@ -2371,7 +2209,7 @@ file-types = ["heex"]
roots = ["mix.exs", "mix.lock"]
block-comment-tokens = { start = "<!--", end = "-->" }
indent = { tab-width = 2, unit = " " }
-language-servers = [ "elixir-ls", "expert" ]
+language-servers = [ "elixir-ls" ]
[[grammar]]
name = "heex"
@@ -2433,7 +2271,7 @@ language-servers = [ "nu-lsp" ]
[[grammar]]
name = "nu"
-source = { git = "https://github.com/nushell/tree-sitter-nu", rev = "cc4624fbc6ec3563d98fbe8f215a8b8e10b16f32" }
+source = { git = "https://github.com/nushell/tree-sitter-nu", rev = "358c4f509eb97f0148bbd25ad36acc729819b9c1" }
[[language]]
name = "vala"
@@ -2469,7 +2307,6 @@ file-types = ["dts", "dtsi"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
indent = { tab-width = 4, unit = "\t" }
-language-servers = [ "dts-lsp" ]
[[grammar]]
name = "devicetree"
@@ -2539,7 +2376,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote
[[grammar]]
name = "odin"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-odin", rev = "6c6b07e354a52f8f2a9bc776cbc262a74e74fd26" }
+source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-odin", rev = "b5f668ef8918aab13812ce73acd89fe191fb8c5e" }
[[language]]
name = "meson"
@@ -2571,7 +2408,6 @@ injection-regex = "scheme"
file-types = ["ss", "scm", "sld"]
shebangs = ["scheme", "guile", "chicken"]
comment-token = ";"
-block-comment-tokens = { start = "#|", end = "|#" }
indent = { tab-width = 2, unit = " " }
[language.auto-pairs]
@@ -2603,7 +2439,7 @@ source = {git = "https://github.com/vlang/v-analyzer", subpath = "tree_sitter_v"
[[language]]
name = "verilog"
scope = "source.verilog"
-file-types = ["v", "vh"]
+file-types = ["v", "vh", "sv", "svh"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
language-servers = [ "svlangserver" ]
@@ -2615,19 +2451,6 @@ name = "verilog"
source = { git = "https://github.com/tree-sitter/tree-sitter-verilog", rev = "4457145e795b363f072463e697dfe2f6973c9a52" }
[[language]]
-name = "systemverilog"
-scope = "source.systemverilog"
-file-types = ["sv", "svh"]
-comment-token = "//"
-block-comment-tokens = { start = "/*", end = "*/" }
-indent = { tab-width = 2, unit = " " }
-language-servers = ["verible-verilog-ls"]
-
-[[grammar]]
-name = "systemverilog"
-source = { git = "https://github.com/gmlarumbe/tree-sitter-systemverilog", rev = "3bd2c5d2f60ed7b07c2177b34e2976ad9a87c659" }
-
-[[language]]
name = "edoc"
scope = "source.edoc"
file-types = ["edoc", "edoc.in"]
@@ -2695,7 +2518,7 @@ source = { git = "https://github.com/sogaiu/tree-sitter-clojure", rev = "e57c569
name = "starlark"
scope = "source.starlark"
injection-regex = "(starlark|bzl|bazel|buck)"
-file-types = ["bzl", "bazel", "star", { glob = "BUILD" }, { glob = "BUCK" }, { glob = "BUILD.*" }, { glob = "Tiltfile" }, { glob = "WORKSPACE" }, { glob = "WORKSPACE.bzlmod" }, { glob = "PACKAGE" }]
+file-types = ["bzl", "bazel", "star", { glob = "BUILD" }, { glob = "BUCK" }, { glob = "BUILD.*" }, { glob = "Tiltfile" }, { glob = "WORKSPACE" }, { glob = "WORKSPACE.bzlmod" }]
comment-token = "#"
indent = { tab-width = 4, unit = " " }
language-servers = [ "starpls" ]
@@ -2730,7 +2553,7 @@ language-servers = [ "idris2-lsp" ]
name = "fortran"
scope = "source.fortran"
injection-regex = "fortran"
-file-types = ["f", "for", "f90", "f95", "f03", "F", "F90", "F95", "F03"]
+file-types = ["f", "for", "f90", "f95", "f03"]
roots = ["fpm.toml"]
comment-token = "!"
indent = { tab-width = 4, unit = " "}
@@ -2738,7 +2561,7 @@ language-servers = [ "fortls" ]
[[grammar]]
name = "fortran"
-source = { git = "https://github.com/stadelmanma/tree-sitter-fortran", rev = "8334abca785db3a041292e3b3b818a82a55b238f" }
+source = { git = "https://github.com/stadelmanma/tree-sitter-fortran", rev = "f0f2f100952a353e64e26b0fa710b4c296d7af13" }
[[language]]
name = "ungrammar"
@@ -3000,89 +2823,70 @@ name = "xml"
scope = "source.xml"
injection-regex = "xml"
file-types = [
- "ascx",
+ "xml",
+ "mobileconfig",
+ "plist",
+ "xib",
+ "storyboard",
+ "svg",
+ "xsd",
+ "gml",
+ "xaml",
+ "gir",
+ "rss",
"atom",
- "axaml",
+ "opml",
+ "policy",
+ "ascx",
"axml",
+ "axaml",
"bpmn",
- "checkstyle",
"cpt",
"csl",
"csproj.user",
"dita",
"ditamap",
"dtml",
- "fods",
- "fodt",
"fxml",
- "gir",
- "glif",
- "gml",
- "gpx",
"iml",
"isml",
"jmx",
- "kml",
"launch",
"menu",
- "mobileconfig",
- "mpd",
- "musicxml",
"mxml",
- "ncx",
"nuspec",
- "opml",
"osc",
"osm",
- "plist",
- "policy",
"pt",
"publishsettings",
"pubxml",
"pubxml.user",
"rbxlx",
"rbxmx",
- "resx",
"rng",
- "rss",
"shproj",
- "smil",
- "storyboard",
- "sublime-snippet",
- "svg",
"tld",
+ { glob = "*.tm[Tt]heme" },
"tmx",
- "ui",
"vbproj.user",
"vcxproj",
"vcxproj.filters",
- "wixproj",
"wsdl",
"wxi",
"wxs",
- "xaml",
"xbl",
- "xib",
"xlf",
"xliff",
- "xml",
- "xmp",
- "xoml",
"xpdl",
- "xrc",
- "xsd",
+ "xul",
+ "xoml",
+ "musicxml",
+ "glif",
+ "ui",
+ "sublime-snippet",
"xsl",
"mpd",
- "smil",
- "gpx",
- "fodt",
- "fods",
- "itermcolors",
- "terminal",
- "xul",
- { glob = "*.tm[Ll]anguage" },
- { glob = "*.tm[Pp]references" },
- { glob = "*.tm[Tt]heme" },
+ "smil"
]
block-comment-tokens = { start = "<!--", end = "-->" }
indent = { tab-width = 2, unit = " " }
@@ -3106,7 +2910,6 @@ scope = "source.dtd"
injection-regex = "dtd"
file-types = ["dtd", "ent"]
indent = {tab-width = 2, unit = " "}
-block-comment-tokens = { start = "<!--", end = "-->" }
[language.auto-pairs]
'(' = ')'
@@ -3150,12 +2953,14 @@ indent = { tab-width = 4, unit = "\t" }
grammar = "bash"
[[language]]
-name = "systemd"
+name = "ini"
scope = "source.ini"
file-types = [
+ "ini",
# Systemd unit files
"service",
"automount",
+ "desktop",
"device",
"mount",
"nspawn",
@@ -3167,19 +2972,6 @@ file-types = [
"target",
"timer",
{ glob = "systemd/**/*.conf" },
-]
-injection-regex = "systemd"
-comment-token = "#"
-grammar = "ini"
-language-servers = ["systemd-lsp"]
-
-[[language]]
-name = "ini"
-scope = "source.ini"
-file-types = [
- "ini",
- "desktop",
- { glob = "mimeapps.list" },
# Podman quadlets
"container",
"volume",
@@ -3190,11 +2982,9 @@ file-types = [
{ glob = "hgrc" },
{ glob = "npmrc" },
{ glob = "rclone.conf" },
- { glob = ".aws/config" },
"properties",
"cfg",
- "directory",
- { glob = ".wslconfig" },
+ "directory"
]
injection-regex = "ini"
comment-token = "#"
@@ -3217,7 +3007,7 @@ formatter = { command = "inko", args = ["fmt", "-"] }
[[grammar]]
name = "inko"
-source = { git = "https://github.com/inko-lang/tree-sitter-inko", rev = "f58a87ac4dc6a7955c64c9e4408fbd693e804686" }
+source = { git = "https://github.com/inko-lang/tree-sitter-inko", rev = "7860637ce1b43f5f79cfb7cc3311bf3234e9479f" }
[[language]]
name = "bicep"
@@ -3269,7 +3059,7 @@ indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "matlab"
-source = { git = "https://github.com/acristoffers/tree-sitter-matlab", rev = "585b52b9b16d8e626299a76360ef6ab4f9731aed" }
+source = { git = "https://github.com/acristoffers/tree-sitter-matlab", rev = "b0a0198b182574cd3ca0447264c83331901b9338" }
[[language]]
name = "ponylang"
@@ -3436,7 +3226,7 @@ file-types = ["rst"]
[[grammar]]
name = "rst"
-source = { git = "https://github.com/stsewd/tree-sitter-rst", rev = "ab09cab886a947c62a8c6fa94d3ad375f3f6a73d" }
+source = { git = "https://github.com/stsewd/tree-sitter-rst", rev = "25e6328872ac3a764ba8b926aea12719741103f1" }
[[language]]
name = "capnp"
@@ -3465,18 +3255,6 @@ name = "smithy"
source = { git = "https://github.com/indoorvivants/tree-sitter-smithy", rev = "8327eb84d55639ffbe08c9dc82da7fff72a1ad07" }
[[language]]
-name = "hdl"
-scope = "source.hdl"
-file-types = ["hdl"]
-indent = { tab-width = 4, unit = " " }
-injection-regex = "hdl"
-language-servers = [ "hdls" ]
-
-[[grammar]]
-name = "hdl"
-source = { git = "https://github.com/quantonganh/tree-sitter-hdl", rev="293902330423b2cd36ab1ec4b6b967163a4ed57b" }
-
-[[language]]
name = "vhdl"
scope = "source.vhdl"
file-types = ["vhd", "vhdl"]
@@ -3545,7 +3323,7 @@ indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "hurl"
-source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "1124058cd192e80d80914652a5850a5b1887cc10" }
+source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "cd1a0ada92cc73dd0f4d7eedc162be4ded758591" }
[[language]]
name = "markdoc"
@@ -3583,7 +3361,7 @@ language-servers = ["just-lsp"]
[[grammar]]
name = "just"
-source = { git = "https://github.com/poliorcetics/tree-sitter-just", rev = "b75dace757e5d122d25c1a1a7772cb87b560f829" }
+source = { git = "https://github.com/poliorcetics/tree-sitter-just", rev = "8d03cfdd7ab89ff76d935827de1b93450fa0ec0a" }
[[language]]
name = "gn"
@@ -3707,21 +3485,11 @@ name = "jinja2"
source = { git = "https://github.com/varpeti/tree-sitter-jinja2", rev = "a533cd3c33aea6acb0f9bf9a56f35dcfe6a8eb53" }
[[language]]
-name = "jjconfig"
-scope = "source.jjconfig"
-injection-regex = "jjconfig"
-grammar = "toml"
-file-types = [{ glob = "jj/config.toml" }, { glob = "jj/conf.d/*.toml" }, { glob = ".jj/repo/*.toml" }]
-comment-token = "#"
-language-servers = [ "taplo", "tombi" ]
-indent = { tab-width = 2, unit = " " }
-
-[[language]]
name = "jjdescription"
scope = "jj.description"
file-types = [{ glob = "*.jjdescription" }]
comment-token = "JJ:"
-indent = { tab-width = 4, unit = " " }
+indent = { tab-width = 2, unit = " " }
rulers = [51, 73]
text-width = 72
@@ -3730,43 +3498,6 @@ name = "jjdescription"
source = { git = "https://github.com/kareigu/tree-sitter-jjdescription", rev = "1613b8c85b6ead48464d73668f39910dcbb41911" }
[[language]]
-name = "jjrevset"
-scope = "jj.revset"
-file-types = ["jjrevset"]
-
-[[grammar]]
-name = "jjrevset"
-source = { git = "https://github.com/bryceberger/tree-sitter-jjrevset", rev = "d9af23944b884ec528b505f41d81923bb3136a51" }
-
-[[language]]
-name = "jjtemplate"
-scope = "jj.template"
-file-types = ["jjtemplate"]
-
-[[grammar]]
-name = "jjtemplate"
-source = { git = "https://github.com/bryceberger/tree-sitter-jjtemplate", rev = "4313eda8ac31c60e550e3ad5841b100a0a686715" }
-
-[[language]]
-name = "miseconfig"
-scope = "source.miseconfig"
-injection-regex = "miseconfig"
-grammar = "toml"
-file-types = [
- { glob = "mise.toml" },
- { glob = ".mise.toml" },
- { glob = "mise.*.toml" },
- { glob = ".mise.*.toml" },
- { glob = "mise/config.toml" },
- { glob = ".mise/config.toml" },
- { glob = ".config/mise.toml" },
- { glob = ".config/mise/conf.d/*.toml" },
-]
-comment-token = "#"
-language-servers = [ "taplo", "tombi" ]
-indent = { tab-width = 2, unit = " " }
-
-[[language]]
name = "jq"
scope = "source.jq"
injection-regex = "jq"
@@ -3878,7 +3609,7 @@ language-servers = [ "templ" ]
[[grammar]]
name = "templ"
-source = { git = "https://github.com/vrischmann/tree-sitter-templ", rev = "47594c5cbef941e6a3ccf4ddb934a68cf4c68075" }
+source = { git = "https://github.com/vrischmann/tree-sitter-templ", rev = "db662414ccd6f7c78b1e834e7abe11c224b04759" }
[[language]]
name = "dbml"
@@ -3951,7 +3682,7 @@ language-servers = ["koka"]
[[grammar]]
name = "koka"
-source = { git = "https://github.com/koka-community/tree-sitter-koka", rev = "fd3b482274d6988349ba810ea5740e29153b1baf" }
+source = { git = "https://github.com/mtoohey31/tree-sitter-koka", rev = "96d070c3700692858035f3524cc0ad944cef2594" }
[[language]]
name = "tact"
@@ -4232,7 +3963,7 @@ language-servers = ["pest-language-server"]
[[grammar]]
name = "pest"
-source = { git = "https://github.com/pest-parser/tree-sitter-pest", rev = "c19629a0c50e6ca2485c3b154b1dde841a08d169" }
+source = { git = "https://github.com/pest-parser/tree-sitter-pest", rev = "a8a98a824452b1ec4da7f508386a187a2f234b85" }
[[language]]
name = "elisp"
@@ -4263,7 +3994,7 @@ language-servers = [
"ember-language-server",
]
indent = { tab-width = 2, unit = " " }
-grammar = "glimmer-javascript"
+grammar = "javascript"
[language.auto-pairs]
'<' = '>'
@@ -4272,10 +4003,6 @@ grammar = "glimmer-javascript"
"(" = ")"
'"' = '"'
-[[grammar]]
-name = "glimmer-javascript"
-source = { git = "https://github.com/ember-tooling/tree-sitter-glimmer-javascript", rev = "5cc865a2a0a77cbfaf5062c8fcf2a9919bd54f87" }
-
[[language]]
name = "gts"
scope = "source.gts"
@@ -4291,7 +4018,7 @@ language-servers = [
"ember-language-server",
]
indent = { tab-width = 2, unit = " " }
-grammar = "glimmer-typescript"
+grammar = "typescript"
[language.auto-pairs]
'<' = '>'
@@ -4300,10 +4027,6 @@ grammar = "glimmer-typescript"
"(" = ")"
'"' = '"'
-[[grammar]]
-name = "glimmer-typescript"
-source = { git = "https://github.com/ember-tooling/tree-sitter-glimmer-typescript", rev = "12d98944c1d5077b957cbdb90d663a7c4d50118c" }
-
[[language]]
name = "gherkin"
scope = "source.feature"
@@ -4430,11 +4153,10 @@ comment-token = "#"
block-comment-tokens = ["#-", "-#"]
indent = { tab-width = 2, unit = " " }
language-servers = ["koto-ls"]
-formatter = {command = "koto", args = ["--format"]}
[[grammar]]
name = "koto"
-source = { git = "https://github.com/koto-lang/tree-sitter-koto", rev = "633744bca404ae4edb961a3c2d7bc947a987afa4" }
+source = { git = "https://github.com/koto-lang/tree-sitter-koto", rev = "b420f7922d0d74905fd0d771e5b83be9ee8a8a9a" }
[[language]]
name = "gpr"
@@ -4595,24 +4317,6 @@ language-servers = ["sourcepawn-studio"]
name = "sourcepawn"
source = { git = "https://github.com/nilshelmig/tree-sitter-sourcepawn", rev = "f2af8d0dc14c6790130cceb2a20027eb41a8297c" }
-
-[[grammar]]
-name = "vim"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-vim", rev = "f3cd62d8bd043ef20507e84bb6b4b53731ccf3a7" }
-
-[[language]]
-name = "vim"
-scope = "source.vim"
-injection-regex = "vim"
-comment-token = '"'
-indent = { tab-width = 4, unit = "\t" }
-file-types = [
- "vim",
- { glob = ".vimrc" },
- { glob = ".nvimrc" },
- { glob = ".exrc" }
-]
-
[[language]]
name = "tlaplus"
scope = "scope.tlaplus"
@@ -4685,12 +4389,6 @@ name = "rust-format-args"
source = { git = "https://github.com/nik-rev/tree-sitter-rust-format-args", rev = "84ffe550e261cf5ea40a0ec31849ba2443bae99f" }
[[language]]
-name = "rust-format-args-macro"
-scope = "source.rust-format-args-macro"
-file-types = []
-grammar = "rust"
-
-[[language]]
name = "clarity"
scope = "source.clar"
injection-regex = "clarity"
@@ -4735,220 +4433,3 @@ language-servers = [ "luau" ]
[[grammar]]
name = "luau"
source = { git = "https://github.com/polychromatist/tree-sitter-luau", rev = "ec187cafba510cddac265329ca7831ec6f3b9955" }
-
-[[language]]
-name = "caddyfile"
-scope = "source.caddyfile"
-injection-regex = "caddyfile"
-file-types = [{ glob = "Caddyfile" }]
-comment-tokens = ["#"]
-indent = { tab-width = 4, unit = " " }
-formatter = { command = "caddy", args = ["fmt", "-"] }
-auto-format = true
-
-[[grammar]]
-name = "caddyfile"
-source = { git = "https://github.com/caddyserver/tree-sitter-caddyfile", rev = "b04bdb4ec53e40c44afbf001e15540f60a296aef" }
-
-[[language]]
-name = "properties"
-scope = "source.properties"
-injection-regex = "properties"
-file-types = ["properties", "prefs"]
-comment-tokens = ["#"]
-
-[[grammar]]
-name = "properties"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-properties", rev = "579b62f5ad8d96c2bb331f07d1408c92767531d9" }
-
-[[language]]
-name = "robots.txt"
-scope = "source.robots.txt"
-file-types = [{ glob = "robots.txt" }]
-injection-regex = "robots[\\.-]txt"
-grammar = "robots"
-comment-token = "#"
-
-[[grammar]]
-name = "robots"
-source = { git = "https://github.com/opa-oz/tree-sitter-robots-txt", rev = "8e3a4205b76236bb6dbebdbee5afc262ce38bb62" }
-
-[[language]]
-name = "pip-requirements"
-scope = "source.pip-requirements"
-injection-regex = "(pip-)?requirements(\\.txt)?"
-grammar = "requirements"
-file-types = [{ glob = "requirements.txt" }, { glob = "constraints.txt" }]
-
-[[grammar]]
-name = "requirements"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-requirements", rev = "caeb2ba854dea55931f76034978de1fd79362939" }
-
-[[language]]
-name = "kconfig"
-file-types = ["kconfig", { glob = "kconfig.*" }]
-scope = "source.kconfig"
-
-[[grammar]]
-name = "kconfig"
-source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-kconfig" , rev = "9ac99fe4c0c27a35dc6f757cef534c646e944881" }
-
-[[language]]
-name = "doxyfile"
-scope = "source.doxyfile"
-injection-regex = "[Dd]oxyfile"
-file-types = [{ glob = "Doxyfile" }]
-comment-token = "#"
-indent = { tab-width = 4, unit = " " }
-
-[[grammar]]
-name = "doxyfile"
-source = { git = "https://github.com/tingerrr/tree-sitter-doxyfile/", rev = "18e44c6da639632a4e42264c7193df34be915f34" }
-
-[[language]]
-name = "cross-config"
-scope = "source.cross-config"
-injection-regex = "cross(-config)"
-grammar = "toml"
-comment-token = "#"
-file-types = [{glob = "Cross.toml"}]
-language-servers = [ "taplo", "tombi" ]
-indent = { tab-width = 2, unit = " " }
-
-[[language]]
-name = "git-cliff-config"
-scope = "source.git-cliff-config"
-injection-regex = "git-cliff(-config)"
-grammar = "toml"
-comment-token = "#"
-file-types = [{ glob = "cliff.toml" }]
-language-servers = ["taplo", "tombi"]
-indent = { tab-width = 2, unit = " " }
-
-[[language]]
-name = "cython"
-scope = "source.cython"
-file-types = ["pxd", "pxi", "pyx"]
-comment-token = "#"
-roots = ["pyproject.toml", "setup.py", "poetry.lock"]
-indent = { tab-width = 4, unit = " " }
-
-[[grammar]]
-name = "cython"
-source = { git = "https://github.com/b0o/tree-sitter-cython", rev = "62f44f5e7e41dde03c5f0a05f035e293bcf2bcf8" }
-
-[[language]]
-name = "shellcheckrc"
-scope = "source.shellcheckrc"
-injection-regex = "shellcheck(rc)?"
-file-types = [{glob = "shellcheckrc"}, {glob = ".shellcheckrc"}]
-comment-token = "#"
-
-[[grammar]]
-name = "shellcheckrc"
-source = {git = "https://codeberg.org/kpbaks/tree-sitter-shellcheckrc", rev = "ad3da4e8f7fd72dcc5e93a6b89822c59a7cd10ff"}
-
-[[grammar]]
-name = "strictdoc"
-source = { git = "https://github.com/manueldiagostino/tree-sitter-strictdoc", rev = "070edcf23f7c85af355437706048f73833e0ea10" }
-
-[[language]]
-name = "strictdoc"
-scope = "source.strictdoc"
-injection-regex = "strictdoc"
-file-types = ["sdoc", "sgra"]
-comment-token = ".."
-
-[[language]]
-name = "docker-bake"
-scope = "source.docker-bake"
-injection-regex = "docker-bake"
-grammar = "hcl"
-file-types = [
- { glob = "docker-bake.hcl" },
- { glob = "docker-bake.override.hcl" },
-]
-comment-token = "#"
-block-comment-tokens = { start = "/*", end = "*/" }
-indent = { tab-width = 2, unit = " " }
-language-servers = ["docker-language-server"]
-
-[[language]]
-name = "gitlab-ci"
-scope = "source.gitlab-ci"
-injection-regex = "^gitlab-ci$"
-file-types = [{ glob = ".gitlab-ci.yml" }]
-grammar = "yaml"
-indent = { tab-width = 2, unit = " " }
-language-servers = ["yaml-language-server", "gitlab-ci-ls"]
-comment-token = "#"
-
-[[grammar]]
-name = "wikitext"
-source = { git = "https://github.com/santhoshtr/tree-sitter-wikitext", rev = "444214b31695e9dd4d32fb06247397fb8778a9d2"}
-
-[[language]]
-name = "wikitext"
-scope = "source.wikitext"
-file-types = ["wikimedia", "mediawiki", "wikitext"]
-language-servers = ["wikitext-lsp"]
-indent = { tab-width = 2, unit = " " }
-block-comment-tokens = { start = "<!--", end = "-->" }
-word-completion.trigger-length = 4
-
-[[language]]
-name = "slisp"
-scope = "source.sl"
-injection-regex = "sl"
-file-types = ["sl"]
-comment-token = ";"
-indent = { tab-width = 2, unit = " " }
-
-[[grammar]]
-name = "slisp"
-source = { git = "https://github.com/xenogenics/tree-sitter-slisp", rev = "29f9c6707ce9dfc2fc915d175ec720b207f179f3" }
-
-[[language]]
-name = "nearley"
-scope = "source.nearley"
-file-types = ["ne"]
-comment-token = "#"
-indent = { tab-width = 2, unit = " " }
-
-[[grammar]]
-name = "nearley"
-source = { git = "https://github.com/mi2ebi/tree-sitter-nearley", rev = "12d01113e194c8e83f6341aab8c2a5f21db9cac9" }
-
-[[language]]
-name = "kcl"
-scope = "source.kcl"
-injection-regex = "kcl"
-file-types = ["kcl"]
-comment-tokens = "//"
-indent = { tab-width = 2, unit = " " }
-formatter = { command = "zoo" , args = ["kcl", "fmt", "-"] }
-language-servers = [ "kcl-lsp" ]
-block-comment-tokens = { start = "/*", end = "*/"}
-
-[[grammar]]
-name = "kcl"
-source = { git = "https://github.com/KittyCAD/tree-sitter-kcl", rev = "8905e0bdbf5870b50bc3f24345f1af27746f42e8"}
-
-[[language]]
-name = "bovex"
-scope = "source.bovex"
-file-types = ["bovex", "bibvex"]
-comment-tokens = []
-block-comment-tokens = [{start = "(*", end = "*)"}, {start = "[*", end = "*]"}]
-indent = {tab-width = 2, unit = " "}
-[language.auto-pairs]
-'(' = ')'
-'[' = ']'
-'{' = '}'
-'"' = '"'
-'“' = '”'
-'‘' = '’'
-
-[[grammar]]
-name = "bovex"
-source = { git = "https://github.com/mi2ebi/tree-sitter-bovex", rev = "de7657a9cc3525b9b77c6d268da09dad5b1346b0" }
diff --git a/runtime/queries/_javascript/tags.scm b/runtime/queries/_javascript/tags.scm
index 9c350cd2..a7bbd311 100644
--- a/runtime/queries/_javascript/tags.scm
+++ b/runtime/queries/_javascript/tags.scm
@@ -25,7 +25,7 @@
(comment)* @doc
.
[
- (function_expression
+ (function
name: (identifier) @name)
(function_declaration
name: (identifier) @name)
@@ -44,7 +44,7 @@
(lexical_declaration
(variable_declarator
name: (identifier) @name
- value: [(arrow_function) (function_expression)]) @definition.function)
+ value: [(arrow_function) (function)]) @definition.function)
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
(#select-adjacent! @doc @definition.function)
)
@@ -55,7 +55,7 @@
(variable_declaration
(variable_declarator
name: (identifier) @name
- value: [(arrow_function) (function_expression)]) @definition.function)
+ value: [(arrow_function) (function)]) @definition.function)
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
(#select-adjacent! @doc @definition.function)
)
@@ -66,12 +66,12 @@
(member_expression
property: (property_identifier) @name)
]
- right: [(arrow_function) (function_expression)]
+ right: [(arrow_function) (function)]
) @definition.function
(pair
key: (property_identifier) @name
- value: [(arrow_function) (function_expression)]) @definition.function
+ value: [(arrow_function) (function)]) @definition.function
(
(call_expression
diff --git a/runtime/queries/_jsx/textobjects.scm b/runtime/queries/_jsx/textobjects.scm
deleted file mode 100644
index c2b13f0a..00000000
--- a/runtime/queries/_jsx/textobjects.scm
+++ /dev/null
@@ -1,7 +0,0 @@
-; See runtime/queries/ecma/README.md for more info.
-
-(jsx_self_closing_element) @xml-element.around @xml-element.inside
-
-(jsx_element (jsx_opening_element) (_)* @xml-element.inside (jsx_closing_element))
-
-(jsx_element) @xml-element.around
diff --git a/runtime/queries/_typescript/highlights.scm b/runtime/queries/_typescript/highlights.scm
index 0ec1f9a6..8ce9cb65 100644
--- a/runtime/queries/_typescript/highlights.scm
+++ b/runtime/queries/_typescript/highlights.scm
@@ -79,7 +79,6 @@
(property_signature "?" @punctuation.special)
(conditional_type ["?" ":"] @operator)
-(ternary_expression ["?" ":"] @operator)
; Keywords
; --------
diff --git a/runtime/queries/bash/injections.scm b/runtime/queries/bash/injections.scm
index bf50c060..d6771e44 100644
--- a/runtime/queries/bash/injections.scm
+++ b/runtime/queries/bash/injections.scm
@@ -9,30 +9,3 @@
((regex) @injection.content
(#set! injection.language "regex"))
-
-(command
- name: (command_name (word) @_command (#any-of? @_command "jq" "jaq"))
- argument: [
- (raw_string) @injection.content
- (string (string_content) @injection.content)
- ]
- (#set! injection.language "jq"))
-
-(command
- name: (command_name (word) @_command (#eq? @_command "alias"))
- argument: (concatenation
- (word)
- [
- (raw_string) @injection.content
- (string (string_content) @injection.content)
- ])
- (#set! injection.language "bash"))
-
-(command
- name: (command_name (word) @_command (#any-of? @_command "eval" "trap"))
- .
- argument: [
- (raw_string) @injection.content
- (string (string_content) @injection.content)
- ]
- (#set! injection.language "bash"))
diff --git a/runtime/queries/bash/rainbows.scm b/runtime/queries/bash/rainbows.scm
deleted file mode 100644
index 422e2fbd..00000000
--- a/runtime/queries/bash/rainbows.scm
+++ /dev/null
@@ -1,20 +0,0 @@
-[
- (function_definition)
- (compound_statement)
- (subshell)
- (test_command)
- (subscript)
- (parenthesized_expression)
- (array)
- (expansion)
- (command_substitution)
-] @rainbow.scope
-
-[
- "(" ")"
- "((" "))"
- "${" "$("
- "{" "}"
- "[" "]"
- "[[" "]]"
-] @rainbow.bracket
diff --git a/runtime/queries/bash/tags.scm b/runtime/queries/bash/tags.scm
deleted file mode 100644
index f5d731e8..00000000
--- a/runtime/queries/bash/tags.scm
+++ /dev/null
@@ -1 +0,0 @@
-(function_definition name: (word) @definition.function)
diff --git a/runtime/queries/bibtex/tags.scm b/runtime/queries/bibtex/tags.scm
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/runtime/queries/bibtex/tags.scm
diff --git a/runtime/queries/blade/folds.scm b/runtime/queries/blade/folds.scm
index 3977a08b..c1711482 100644
--- a/runtime/queries/blade/folds.scm
+++ b/runtime/queries/blade/folds.scm
@@ -1,9 +1,8 @@
-; inherits: html
-
((directive_start) @start
(directive_end) @end.after
(#set! role block))
+
((bracket_start) @start
(bracket_end) @end
- (#set! role block))
+ (#set! role block)) \ No newline at end of file
diff --git a/runtime/queries/blade/highlights.scm b/runtime/queries/blade/highlights.scm
index e6d27fad..04a4b965 100644
--- a/runtime/queries/blade/highlights.scm
+++ b/runtime/queries/blade/highlights.scm
@@ -1,16 +1,8 @@
-; inherits: html
-
-(directive) @keyword.directive
-(directive_start) @keyword.directive
-(directive_end) @keyword.directive
+(directive) @tag
+(directive_start) @tag
+(directive_end) @tag
(comment) @comment
-
-; merged with blade punctuation
[
- "{{"
- "}}"
- "{!!"
- "!!}"
- "("
- ")"
+ (bracket_start)
+ (bracket_end)
] @punctuation.bracket
diff --git a/runtime/queries/blade/injections.scm b/runtime/queries/blade/injections.scm
index b37c18a7..77cf9eef 100644
--- a/runtime/queries/blade/injections.scm
+++ b/runtime/queries/blade/injections.scm
@@ -1,108 +1,14 @@
-; inherits: html
+((text) @injection.content
+ (#set! injection.combined)
+ (#set! injection.language "php"))
-; tree-sitter-comment injection
-; if available
((comment) @injection.content
(#set! injection.language "comment"))
((php_only) @injection.content
(#set! injection.language "php-only"))
-((parameter) @injection.content
- (#set! injection.include-children) ; You may need this, depending on your editor e.g Helix
- (#set! injection.language "php-only"))
-
-; ; Livewire attributes
-(attribute
- (attribute_name) @_attr
- (#any-of? @_attr
- "wire:click"
- "wire:submit"
- "wire:model"
- "wire:loading"
- "wire:navigate"
- "wire:current"
- "wire:cloak"
- "wire:dirty"
- "wire:confirm"
- "wire:transition"
- "wire:init"
- "wire:poll"
- "wire:offline"
- "wire:ignore"
- "wire:replace"
- "wire:show"
- "wire:stream"
- "wire:text"
- )
- (quoted_attribute_value
- (attribute_value) @injection.content)
- (#set! injection.language "javascript"))
-
-; ; See #33
-; ; AlpineJS attributes
-(attribute
- (attribute_name) @_attr
- (#match? @_attr "^x-[a-z]+")
- (quoted_attribute_value
- (attribute_value) @injection.content)
- (#set! injection.language "javascript"))
-
-; ; Apline Events
-(attribute
- (attribute_name) @_attr
- (#match? @_attr "^@[a-z]+")
- (quoted_attribute_value
- (attribute_value) @injection.content)
- (#set! injection.language "javascript"))
-
-; ; normal HTML element alpine attributes
-(element
- (_
- (tag_name) @_tag
- (#match? @_tag "[^x][^-]")
- (attribute
- (attribute_name) @_attr
- (#match? @_attr "^:[a-z]+")
- (quoted_attribute_value
- (attribute_value) @injection.content)
- (#set! injection.combined)
- (#set! injection.language "javascript"))))
-
-; ; ; Blade escaped JS attributes
-; ; <x-foo ::bar="baz" />
-(element
- (_
- (tag_name) @_tag
- (#match? @_tag "^x-[a-z]+")
- (attribute
- (attribute_name) @_attr
- (#match? @_attr "^::[a-z]+")
- (quoted_attribute_value
- (attribute_value) @injection.content)
- (#set! injection.language "javascript"))))
-
-
-; ; ; Blade escaped JS attributes
-; ; <htmlTag :class="baz" />
-(element
- (_
- (attribute_name) @_attr
- (#match? @_attr "^:[a-z]+")
- (quoted_attribute_value
- (attribute_value) @injection.content)
- (#set! injection.language "javascript")))
-
-
-; Blade PHP attributes
-(element
- (_
- (tag_name) @_tag
- (#match? @_tag "^x-[a-z]+")
- (attribute
- (attribute_name) @_attr
- (#match? @_attr "^:[a-z]+")
- (quoted_attribute_value
- (attribute_value) @injection.content)
- (#set! injection.language "php-only"))))
+((parameter) @injection.content
+ (#set! injection.include-children)
+ (#set! injection.language "php-only"))
diff --git a/runtime/queries/blade/rainbows.scm b/runtime/queries/blade/rainbows.scm
deleted file mode 100644
index 1f2129cf..00000000
--- a/runtime/queries/blade/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: html
diff --git a/runtime/queries/blade/textobjects.scm b/runtime/queries/blade/textobjects.scm
deleted file mode 100644
index 1f2129cf..00000000
--- a/runtime/queries/blade/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: html
diff --git a/runtime/queries/bovex/highlights.scm b/runtime/queries/bovex/highlights.scm
deleted file mode 100644
index cc4ffe0a..00000000
--- a/runtime/queries/bovex/highlights.scm
+++ /dev/null
@@ -1,88 +0,0 @@
-[(code_comment) (layout_comment)] @comment.block
-
-(do_decl "do" @keyword.control)
-(val_decl "val" @keyword.storage.type)
-(fun_decl ["fun" "and"] @keyword.storage.type)
-(datatype_decl ["datatype" "and"] @keyword.storage.type)
-(datatype_arm "of" @keyword.storage.type)
-(object_decl ["object" "of"] @keyword.storage.type)
-(type_decl "type" @keyword.storage.type)
-(local_decl ["local" "in" "end"] @keyword.storage.modifier)
-(open_decl "open" @keyword.control)
-(import_decl "import" @keyword.control.import)
-(with_expr ["with" "without"] @keyword.operator)
-(orelse_expr ["orelse" "otherwise"] @keyword.operator)
-(andalso_expr ["andalso" "andthen"] @keyword.operator)
-(fn_expr ["fn" "as"] @keyword.function)
-(if_expr ["if" "then" "else"] @keyword.control.conditional)
-(case_expr ["case" "of"] @keyword.control)
-(fail_expr "fail" @keyword.control)
-(let_expr ["let" "in" "end"] @keyword.storage.modifier)
-(pat "as" @keyword.operator)
-
-(boolean_lit) @constant.builtin.boolean
-(numeric_lit) @constant.numeric.integer
-(float_lit) @constant.numeric.float
-(string_lit) @string.quoted.double
-(backslash_escape) @constant.character.escape
-
-["=" ":" ","] @punctuation.delimiter
-["->" "=>"] @operator
-["(" ")" "[" "]" "{" "}"] @punctuation.bracket
-
-[(ident) (label)] @variable.other
-(type_ident) @type
-(atomic_pat (ident) @variable.other)
-(pat (app_pat (atomic_pat (ident) @variable.parameter)))
-
-(type_var) @type.parameter
-(atomic_type (type_ident) @type.builtin)
-[(record_type) (product_type) (app_type) (arrow_type)] @type
-
-(atomic_expr (ident) @variable.other)
-(project_expr) @variable.member
-(field_binding (label) @variable.member.private)
-(field_binding (expr) @variable.other)
-(record_pat (ident) @variable.member.private)
-
-(app_expr
- (app_expr (atomic_expr (ident) @function.call))
- (atomic_expr))
-(app_expr
- _
- [":=" "@" "::" "o" "==" "!=" "==." "!=."
- "<" "<=" ">" ">=" "<." "<=." ">." ">=."
- "+" "-" "+." "-." "*" "*." "/" "/." "div" "mod"
- "shl" "shr" "andb" "xorb" "orb"] @operator
- _)
-
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "b")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.bold))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "it")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.italic))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "rm")))
- (atomic_expr (layout_lit)))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#match? @function.builtin "^(tt|courier|fixedersys)$")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.raw.inline))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "title")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.1))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "section")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.2))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "subsection")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.3))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "subsubsection")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.4))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "paragraph")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.5))))
-(app_expr
- (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "blockquote")))
- (atomic_expr (layout_lit (layout_content (layout_text) @markup.quote))))
diff --git a/runtime/queries/bovex/rainbows.scm b/runtime/queries/bovex/rainbows.scm
deleted file mode 100644
index f00c454f..00000000
--- a/runtime/queries/bovex/rainbows.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-["(" ")" "[" "]" "{" "}"] @rainbow.bracket
-[
- (tuple_expr)
- (record_expr)
- (layout_lit)
- (layout_antiquote)
- (tuple_pat)
- (record_pat)
- (atomic_type)
- (record_type)
-] @rainbow.scope
diff --git a/runtime/queries/c-sharp/tags.scm b/runtime/queries/c-sharp/tags.scm
index 5a64c2d0..ffb2dd23 100644
--- a/runtime/queries/c-sharp/tags.scm
+++ b/runtime/queries/c-sharp/tags.scm
@@ -19,3 +19,5 @@
(invocation_expression function: (member_access_expression name: (identifier) @name)) @reference.send
(namespace_declaration name: (identifier) @name) @definition.module
+
+(namespace_declaration name: (identifier) @name) @module
diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm
index 8e499dd6..00d01e08 100644
--- a/runtime/queries/c/highlights.scm
+++ b/runtime/queries/c/highlights.scm
@@ -128,36 +128,11 @@
(call_expression (argument_list (identifier) @variable))
(function_declarator
declarator: [(identifier) (field_identifier)] @function)
-
-; Up to 6 layers of declarators
(parameter_declaration
declarator: (identifier) @variable.parameter)
(parameter_declaration
- (_
- (identifier) @variable.parameter))
-(parameter_declaration
- (_
- (_
- (identifier) @variable.parameter)))
-(parameter_declaration
- (_
- (_
- (_
- (identifier) @variable.parameter))))
-(parameter_declaration
- (_
- (_
- (_
- (_
- (identifier) @variable.parameter)))))
-(parameter_declaration
- (_
- (_
- (_
- (_
- (_
- (identifier) @variable.parameter))))))
-
+ (pointer_declarator
+ declarator: (identifier) @variable.parameter))
(preproc_function_def
name: (identifier) @function.special)
diff --git a/runtime/queries/c/locals.scm b/runtime/queries/c/locals.scm
deleted file mode 100644
index bc672c5e..00000000
--- a/runtime/queries/c/locals.scm
+++ /dev/null
@@ -1,38 +0,0 @@
-;; Scopes
-(function_definition) @local.scope
-
-;; Definitions
-
-; Parameters
-; Up to 6 layers of declarators
-(parameter_declaration
- (identifier) @local.definition.variable.parameter)
-(parameter_declaration
- (_
- (identifier) @local.definition.variable.parameter))
-(parameter_declaration
- (_
- (_
- (identifier) @local.definition.variable.parameter)))
-(parameter_declaration
- (_
- (_
- (_
- (identifier) @local.definition.variable.parameter))))
-(parameter_declaration
- (_
- (_
- (_
- (_
- (identifier) @local.definition.variable.parameter)))))
-(parameter_declaration
- (_
- (_
- (_
- (_
- (_
- (identifier) @local.definition.variable.parameter))))))
-
-;; References
-
-(identifier) @local.reference
diff --git a/runtime/queries/c/rainbows.scm b/runtime/queries/c/rainbows.scm
deleted file mode 100644
index 1f80868a..00000000
--- a/runtime/queries/c/rainbows.scm
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- (preproc_params)
- (preproc_defined)
- (argument_list)
- (attribute_specifier)
- (ms_declspec_modifier)
- (declaration_list)
- (parenthesized_declarator)
- (parenthesized_expression)
- (abstract_parenthesized_declarator)
- (array_declarator)
- (compound_statement)
- (initializer_list)
- (compound_literal_expression)
- (enumerator_list)
- (field_declaration_list)
- (parameter_list)
- (for_statement)
- (macro_type_specifier)
- (subscript_expression)
- (subscript_designator)
- (cast_expression)
-] @rainbow.scope
-
-[
- "(" ")"
- "{" "}"
- "[" "]"
-] @rainbow.bracket
diff --git a/runtime/queries/c/tags.scm b/runtime/queries/c/tags.scm
deleted file mode 100644
index f3921271..00000000
--- a/runtime/queries/c/tags.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-(function_declarator
- declarator: [(identifier) (field_identifier)] @definition.function)
-
-(preproc_function_def name: (identifier) @definition.function)
-
-(type_definition
- declarator: (type_identifier) @definition.type)
-
-(preproc_def name: (identifier) @definition.constant)
diff --git a/runtime/queries/caddyfile/highlights.scm b/runtime/queries/caddyfile/highlights.scm
deleted file mode 100644
index 492d2aec..00000000
--- a/runtime/queries/caddyfile/highlights.scm
+++ /dev/null
@@ -1,72 +0,0 @@
-(comment) @comment
-[
- (environment_variable)
- (placeholder)
-] @constant
-
-[
- (network_address)
- (ip_address_or_cidr)
-] @string.special.url
-
-(path) @string.special.path
-
-[
- (snippet_name)
- (named_route_identifier)
- (site_address)
-] @keyword
-
-(directive (directive_name) @variable.other.member)
-
-; declaration of a named matcher
-(named_matcher (matcher_identifier (matcher_name)) @function.macro)
-
-; reference to a named matcher
-(matcher (matcher_identifier (matcher_name)) @function.macro)
-
-; directive within a named matcher declaration
-(matcher_directive (matcher_directive_name) @function.method)
-
-; any other matcher (wildcard and path)
-(matcher) @function.macro
-
-[
- (interpreted_string_literal)
- (raw_string_literal)
- (heredoc)
- (cel_expression)
-] @string
-(escape_sequence) @constant.character.escape
-
-[
- (duration_literal)
- (int_literal)
-] @constant.numeric
-
-[
- "{"
- "}"
-] @punctuation.bracket
-
-(global_options
- (directive) @keyword.directive)
-
-(directive
- name: (directive_name)
- (argument) @type)
-
-; matches directive arguments that looks like an absolute path
-; e.g.
-; log {
-; output file /var/log/caddy.log
-; }
-(directive
- (argument) @string.special.path
- (#match? @string.special.path "^/"))
-
-((argument) @constant.builtin.boolean
- (#any-of? @constant.builtin.boolean "on" "off"))
-
-((argument) @type.enum.variant
- (#any-of? @type.enum.variant "tcp" "udp" "ipv4" "ipv6"))
diff --git a/runtime/queries/caddyfile/indents.scm b/runtime/queries/caddyfile/indents.scm
deleted file mode 100644
index 46b17f3a..00000000
--- a/runtime/queries/caddyfile/indents.scm
+++ /dev/null
@@ -1,8 +0,0 @@
-[
- (block)
- (matcher_block)
-] @indent
-
-((global_options) @indent)
-
-"}" @outdent
diff --git a/runtime/queries/caddyfile/injections.scm b/runtime/queries/caddyfile/injections.scm
deleted file mode 100644
index 321c90ad..00000000
--- a/runtime/queries/caddyfile/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/caddyfile/locals.scm b/runtime/queries/caddyfile/locals.scm
deleted file mode 100644
index 1a27ccea..00000000
--- a/runtime/queries/caddyfile/locals.scm
+++ /dev/null
@@ -1,5 +0,0 @@
-(block) @local.scope
-
-(named_matcher (matcher_identifier (matcher_name)) @local.definition.function.macro)
-
-(matcher) @local.reference
diff --git a/runtime/queries/caddyfile/textobjects.scm b/runtime/queries/caddyfile/textobjects.scm
deleted file mode 100644
index 8a9fd7e9..00000000
--- a/runtime/queries/caddyfile/textobjects.scm
+++ /dev/null
@@ -1,16 +0,0 @@
-(comment) @comment.inside
-(comment)+ @comment.around
-
-(directive
- name: (directive_name) @parameter.inside) @parameter.around
-
-(global_options
- "{" (_)* @class.inside "}") @class.around
-
-(snippet_definition
- (block) @class.inside) @class.around
-
-(named_route
- (block) @class.inside) @class.around
-
-(site_definition (block) @class.inside) @class.around
diff --git a/runtime/queries/clojure/rainbows.scm b/runtime/queries/clojure/rainbows.scm
deleted file mode 100644
index 99dc8bc3..00000000
--- a/runtime/queries/clojure/rainbows.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- (list_lit)
- (map_lit)
- (vec_lit)
- (anon_fn_lit)
-] @rainbow.scope
-
-[
- "(" ")"
- "#"
- "{" "}"
- "[" "]"
-] @rainbow.bracket
diff --git a/runtime/queries/common-lisp/rainbows.scm b/runtime/queries/common-lisp/rainbows.scm
deleted file mode 100644
index e11eb788..00000000
--- a/runtime/queries/common-lisp/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: scheme
diff --git a/runtime/queries/cpp/rainbows.scm b/runtime/queries/cpp/rainbows.scm
deleted file mode 100644
index ff4882c2..00000000
--- a/runtime/queries/cpp/rainbows.scm
+++ /dev/null
@@ -1,49 +0,0 @@
-[
- ; c
- (preproc_params)
- (preproc_defined)
- (argument_list)
- (attribute_specifier)
- (ms_declspec_modifier)
- (declaration_list)
- (parenthesized_declarator)
- (parenthesized_expression)
- (abstract_parenthesized_declarator)
- (array_declarator)
- (compound_statement)
- (initializer_list)
- (compound_literal_expression)
- (enumerator_list)
- (field_declaration_list)
- (parameter_list)
- (for_statement)
- ; (macro_type_specifier) - not part of cpp
- (subscript_expression)
- (subscript_designator)
- (cast_expression)
-
- ; cpp
- (decltype)
- (explicit_function_specifier)
- (template_parameter_list)
- (template_argument_list)
- (parameter_list)
- (argument_list)
- (structured_binding_declarator)
- (noexcept)
- (throw_specifier)
- (static_assert_declaration)
- (condition_clause)
- (for_range_loop)
- (new_declarator)
- (delete_expression "[" "]")
- (lambda_capture_specifier)
- (sizeof_expression)
-] @rainbow.scope
-
-[
- "(" ")"
- "{" "}"
- "[" "]"
- "<" ">"
-] @rainbow.bracket
diff --git a/runtime/queries/cpp/tags.scm b/runtime/queries/cpp/tags.scm
deleted file mode 100644
index 3e01de33..00000000
--- a/runtime/queries/cpp/tags.scm
+++ /dev/null
@@ -1,12 +0,0 @@
-; inherits: c
-
-(function_declarator
- declarator: (qualified_identifier name: (identifier) @definition.function))
-
-(struct_specifier
- name: (type_identifier) @definition.struct
- body: (field_declaration_list))
-
-(class_specifier
- name: (type_identifier) @definition.class
- body: (field_declaration_list))
diff --git a/runtime/queries/cross-config/highlights.scm b/runtime/queries/cross-config/highlights.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/cross-config/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/cross-config/injections.scm b/runtime/queries/cross-config/injections.scm
deleted file mode 100644
index 1262b7e8..00000000
--- a/runtime/queries/cross-config/injections.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
-
-; https://github.com/cross-rs/cross/blob/main/docs/config_file.md
-(pair
- (bare_key) @_key (#eq? @_key "pre-build")
- (array
- (string) @injection.content)
- (#set! injection.language "bash"))
diff --git a/runtime/queries/cross-config/rainbows.scm b/runtime/queries/cross-config/rainbows.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/cross-config/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/cross-config/textobjects.scm b/runtime/queries/cross-config/textobjects.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/cross-config/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/css/highlights.scm b/runtime/queries/css/highlights.scm
index 6cf5e0e7..e7f73219 100644
--- a/runtime/queries/css/highlights.scm
+++ b/runtime/queries/css/highlights.scm
@@ -1,78 +1,67 @@
(comment) @comment
[
- (tag_name)
- (nesting_selector)
- (universal_selector)
+ (tag_name)
+ (nesting_selector)
+ (universal_selector)
] @tag
[
- "~"
- ">"
- "+"
- "-"
- "*"
- "/"
- "="
- "^="
- "|="
- "~="
- "$="
- "*="
+ "~"
+ ">"
+ "+"
+ "-"
+ "*"
+ "/"
+ "="
+ "^="
+ "|="
+ "~="
+ "$="
+ "*="
] @operator
[
- "and"
- "not"
- "only"
- "or"
+ "and"
+ "not"
+ "only"
+ "or"
] @keyword.operator
-(attribute_selector (plain_value) @string)
-
(property_name) @variable.other.member
(plain_value) @constant
((property_name) @variable
- (#match? @variable "^--"))
+ (#match? @variable "^--"))
((plain_value) @variable
- (#match? @variable "^--"))
+ (#match? @variable "^--"))
+(attribute_name) @attribute
(class_name) @label
(feature_name) @variable.other.member
(function_name) @function
(id_name) @label
(namespace_name) @namespace
-(attribute_name) @attribute
-(pseudo_element_selector (tag_name) @attribute)
-(pseudo_class_selector (class_name) @attribute)
-
[
- "@charset"
- "@import"
- "@keyframes"
- "@media"
- "@namespace"
- "@supports"
- (at_keyword)
- (from)
- (important)
- (to)
- (keyword_query)
- (keyframes_name)
- (unit)
+ "@charset"
+ "@import"
+ "@keyframes"
+ "@media"
+ "@namespace"
+ "@supports"
+ (at_keyword)
+ (from)
+ (important)
+ (to)
+ (keyword_query)
+ (keyframes_name)
+ (unit)
] @keyword
-; @apply something;
-(at_rule
- . (at_keyword) @keyword
- . (keyword_query) @constant
- (#eq? @keyword "@apply"))
-
[
- "#"
- "."
+ "#"
+ "."
] @punctuation
(string_value) @string
@@ -83,17 +72,17 @@
(float_value) @constant.numeric.float
[
- ")"
- "("
- "["
- "]"
- "{"
- "}"
+ ")"
+ "("
+ "["
+ "]"
+ "{"
+ "}"
] @punctuation.bracket
[
- ","
- ";"
- ":"
- "::"
+ ","
+ ";"
+ ":"
+ "::"
] @punctuation.delimiter
diff --git a/runtime/queries/css/rainbows.scm b/runtime/queries/css/rainbows.scm
deleted file mode 100644
index 66b60d51..00000000
--- a/runtime/queries/css/rainbows.scm
+++ /dev/null
@@ -1,15 +0,0 @@
-[
- (keyframe_block_list)
- (block)
- (attribute_selector)
- (feature_query)
- (parenthesized_query)
- (selector_query)
- (parenthesized_value)
- (arguments)
-] @rainbow.scope
-
-[
- "{" "}"
- "(" ")"
-] @rainbow.bracket
diff --git a/runtime/queries/cython/folds.scm b/runtime/queries/cython/folds.scm
deleted file mode 100644
index ecb9352d..00000000
--- a/runtime/queries/cython/folds.scm
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- (function_definition)
- (class_definition)
- (while_statement)
- (for_statement)
- (if_statement)
- (with_statement)
- (try_statement)
- (match_statement)
- (import_from_statement)
- (parameters)
- (argument_list)
- (parenthesized_expression)
- (generator_expression)
- (list_comprehension)
- (set_comprehension)
- (dictionary_comprehension)
- (tuple)
- (list)
- (set)
- (dictionary)
- (string)
-] @fold
-
-[
- (import_statement)
- (import_from_statement)
-]+ @fold
diff --git a/runtime/queries/cython/highlights.scm b/runtime/queries/cython/highlights.scm
deleted file mode 100644
index 3fdd7f1c..00000000
--- a/runtime/queries/cython/highlights.scm
+++ /dev/null
@@ -1,199 +0,0 @@
-; Punctuation
-
-["," "." ":" ";" (ellipsis)] @punctuation.delimiter
-["(" ")" "[" "]" "{" "}"] @punctuation.bracket
-(interpolation
- "{" @punctuation.special
- "}" @punctuation.special)
-
-; Identifier naming conventions
-
-(identifier) @variable
-
-((identifier) @constructor
- (#match? @constructor "^[A-Z]"))
-
-((identifier) @constant
- (#match? @constant "^[A-Z][A-Z_]*$"))
-
-; Function calls
-
-(decorator) @function
-
-(call
- function: (attribute attribute: (identifier) @function.method))
-(call
- function: (identifier) @function)
-
-; Builtin functions
-
-((call
- function: (identifier) @function.builtin)
- (#any-of?
- @function.builtin
- "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" "classmethod" "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" "filter" "float" "format" "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" "input" "int" "isinstance" "issubclass" "iter" "len" "list" "locals" "map" "max" "memoryview" "min" "next" "object" "oct" "open" "ord" "pow" "print" "property" "range" "repr" "reversed" "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" "sum" "super" "tuple" "type" "vars" "zip" "__import__"))
-
-; Types
-
-(maybe_typed_name
- type: ((_) @type))
-
-(type
- (identifier) @type)
-
-(c_type
- type: ((_) @type))
-(c_type
- ((identifier) @type))
-(c_type
- ((int_type) @type))
-
-(maybe_typed_name
- name: ((identifier) @variable))
-
-; Function definitions
-
-(function_definition
- name: (identifier) @function)
-
-(cdef_statement
- (cvar_def
- (maybe_typed_name
- name: ((identifier) @function))
- (c_function_definition)))
-
-(cvar_decl
- (c_type
- ([(identifier) (int_type)]))
- (c_name
- ((identifier) @function))
- (c_function_definition))
-
-(attribute attribute: (identifier) @variable.other.member)
-
-; Literals
-
-[
- (none)
-] @constant.builtin
-
-[
- (true)
- (false)
-] @constant.builtin.boolean
-
-(integer) @constant.numeric.integer
-(float) @constant.numeric.float
-
-(comment) @comment
-(string) @string
-(escape_sequence) @constant.character.escape
-
-(interpolation
- "{" @punctuation.special
- "}" @punctuation.special) @embedded
-
-[
- "-"
- "-="
- "!="
- "*"
- "**"
- "**="
- "*="
- "/"
- "//"
- "//="
- "/="
- "&"
- "&="
- "%"
- "%="
- "^"
- "^="
- "+"
- "->"
- "+="
- "<"
- "<<"
- "<<="
- "<="
- "<>"
- "="
- ":="
- "=="
- ">"
- ">="
- ">>"
- ">>="
- "|"
- "|="
- "~"
- "@="
- "and"
- "in"
- "is"
- "not"
- "or"
- "@"
-] @operator
-
-[
- "as"
- "assert"
- "async"
- "await"
- "break"
- "class"
- "continue"
- "def"
- "del"
- "elif"
- "else"
- "except"
- "exec"
- "finally"
- "for"
- "from"
- "global"
- "if"
- "import"
- "lambda"
- "nonlocal"
- "pass"
- "print"
- "raise"
- "return"
- "try"
- "while"
- "with"
- "yield"
- "match"
- "case"
-
- ; cython-specific
- "cdef"
- "cpdef"
- "ctypedef"
- "cimport"
- "nogil"
- "gil"
- "extern"
- "inline"
- "public"
- "readonly"
- "struct"
- "union"
- "enum"
- "fused"
- "property"
- "namespace"
- "cppclass"
- "const"
-] @keyword.control
-
-(dotted_name
- (identifier)* @namespace)
-
-(aliased_import
- alias: (identifier) @namespace)
diff --git a/runtime/queries/cython/indents.scm b/runtime/queries/cython/indents.scm
deleted file mode 100644
index 8f3a569a..00000000
--- a/runtime/queries/cython/indents.scm
+++ /dev/null
@@ -1,96 +0,0 @@
-[
- (list)
- (tuple)
- (dictionary)
- (set)
- (if_statement)
- (for_statement)
- (while_statement)
- (with_statement)
- (try_statement)
- (match_statement)
- (case_clause)
- (import_from_statement)
-
- (parenthesized_expression)
- (generator_expression)
- (list_comprehension)
- (set_comprehension)
- (dictionary_comprehension)
-
- (tuple_pattern)
- (list_pattern)
- (argument_list)
- (parameters)
- (binary_operator)
-
- (function_definition)
- (cdef_statement)
- (class_definition)
-] @indent
-
-; Workaround for the tree-sitter grammar creating large errors when a
-; try_statement is missing the except/finally clause
-
-(ERROR
- "try"
- .
- ":" @indent @extend)
-(ERROR
- .
- "def") @indent @extend
-(ERROR
- (block) @indent @extend
- (#set! "scope" "all"))
-
-(ERROR
- "try"
- .
- ":"
- (ERROR
- (block
- (expression_statement
- (identifier) @_except) @indent.branch))
- (#eq? @_except "except"))
-
-[
- (if_statement)
- (for_statement)
- (while_statement)
- (with_statement)
- (try_statement)
- (match_statement)
- (case_clause)
-
- (cdef_statement)
- (function_definition)
- (class_definition)
-] @extend
-
-[
- (return_statement)
- (break_statement)
- (continue_statement)
- (raise_statement)
- (pass_statement)
-] @extend.prevent-once
-
-[
- ")"
- "]"
- "}"
-] @outdent
-(elif_clause
- "elif" @outdent)
-(else_clause
- "else" @outdent)
-
-(parameters
- .
- (identifier) @anchor
- (#set! "scope" "tail")) @align
-
-(argument_list
- .
- (_) @anchor
- (#set! "scope" "tail")) @align
diff --git a/runtime/queries/cython/injections.scm b/runtime/queries/cython/injections.scm
deleted file mode 100644
index bbc924be..00000000
--- a/runtime/queries/cython/injections.scm
+++ /dev/null
@@ -1,18 +0,0 @@
-(call
- function: (attribute
- object: (identifier) @_re)
- arguments: (argument_list
- .
- (string
- (string_content) @injection.content))
- (#eq? @_re "re")
- (#set! injection.language "regex"))
-
-((binary_operator
- left: (string
- (string_content) @injection.content)
- operator: "%")
- (#set! injection.language "printf"))
-
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/cython/locals.scm b/runtime/queries/cython/locals.scm
deleted file mode 100644
index 9abed8f7..00000000
--- a/runtime/queries/cython/locals.scm
+++ /dev/null
@@ -1,115 +0,0 @@
-; Program structure
-(module) @local.scope
-
-(class_definition
- body: (block
- (expression_statement
- (assignment
- left: (identifier) @local.definition)))) @local.scope
-
-(class_definition
- body: (block
- (expression_statement
- (assignment
- left: (_
- (identifier) @local.definition))))) @local.scope
-
-; Imports
-(aliased_import
- alias: (identifier) @local.definition.namespace)
-
-(import_statement
- name: (dotted_name
- (identifier) @local.definition.namespace))
-
-(import_from_statement
- name: (dotted_name
- (identifier) @local.definition.namespace))
-
-; Function with parameters, defines parameters
-(parameters
- (identifier) @local.definition.variable.parameter)
-
-(default_parameter
- (identifier) @local.definition.variable.parameter)
-
-(typed_parameter
- (identifier) @local.definition.variable.parameter)
-
-(typed_default_parameter
- (identifier) @local.definition.variable.parameter)
-
-; *args parameter
-(parameters
- (list_splat_pattern
- (identifier) @local.definition))
-
-; **kwargs parameter
-(parameters
- (dictionary_splat_pattern
- (identifier) @local.definition.variable.parameter))
-
-(class_definition
- body: (block
- (function_definition
- name: (identifier) @local.definition.function)))
-
-; Loops
-; not a scope!
-(for_in_loop
- left: (pattern_list
- (identifier) @local.definition.variable))
-
-(for_in_loop
- left: (tuple_pattern
- (identifier) @local.definition.variable))
-
-(for_in_loop
- left: (identifier) @local.definition.variable)
-
-; not a scope!
-;(while_statement) @local.scope
-; for in list comprehension
-(for_in_clause
- left: (identifier) @local.definition.variable)
-
-(for_in_clause
- left: (tuple_pattern
- (identifier) @local.definition.variable))
-
-(for_in_clause
- left: (pattern_list
- (identifier) @local.definition.variable))
-
-(dictionary_comprehension) @local.scope
-
-(list_comprehension) @local.scope
-
-(set_comprehension) @local.scope
-
-; Assignments
-(assignment
- left: (identifier) @local.definition.variable)
-
-(assignment
- left: (pattern_list
- (identifier) @local.definition.variable))
-
-(assignment
- left: (tuple_pattern
- (identifier) @local.definition.variable))
-
-(assignment
- left: (attribute
- (identifier)
- (identifier) @local.definition.variable))
-
-; Walrus operator x := 1
-(named_expression
- (identifier) @local.definition.variable)
-
-(as_pattern
- alias: (as_pattern_target) @local.definition.variable)
-
-; REFERENCES
-(identifier) @local.reference
diff --git a/runtime/queries/cython/tags.scm b/runtime/queries/cython/tags.scm
deleted file mode 100644
index 4fe36552..00000000
--- a/runtime/queries/cython/tags.scm
+++ /dev/null
@@ -1,14 +0,0 @@
-(module (expression_statement (assignment left: (identifier) @name) @definition.constant))
-
-(class_definition
- name: (identifier) @name) @definition.class
-
-(function_definition
- name: (identifier) @name) @definition.function
-
-(call
- function: [
- (identifier) @name
- (attribute
- attribute: (identifier) @name)
- ]) @reference.call
diff --git a/runtime/queries/docker-bake/folds.scm b/runtime/queries/docker-bake/folds.scm
deleted file mode 100644
index 0e5ffc2d..00000000
--- a/runtime/queries/docker-bake/folds.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: hcl
diff --git a/runtime/queries/docker-bake/highlights.scm b/runtime/queries/docker-bake/highlights.scm
deleted file mode 100644
index 0e5ffc2d..00000000
--- a/runtime/queries/docker-bake/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: hcl
diff --git a/runtime/queries/docker-bake/indents.scm b/runtime/queries/docker-bake/indents.scm
deleted file mode 100644
index 0e5ffc2d..00000000
--- a/runtime/queries/docker-bake/indents.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: hcl
diff --git a/runtime/queries/docker-bake/injections.scm b/runtime/queries/docker-bake/injections.scm
deleted file mode 100644
index 6028785d..00000000
--- a/runtime/queries/docker-bake/injections.scm
+++ /dev/null
@@ -1,23 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
-
-; https://docs.docker.com/build/bake/reference/#targetdockerfile-inline
-(block
- (identifier) @_target (#eq? @_target "target")
- (body
- (attribute
- (identifier) @_attr (#eq? @_attr "dockerfile-inline")
- (expression
- (template_expr
- (heredoc_template
- (template_literal) @injection.content)))))
- (#set! injection.language "dockerfile"))
-
-(function_call
- (identifier) @_name (#eq? @_name "regex")
- (function_arguments
- (expression
- (literal_value
- (string_lit
- (template_literal) @injection.content))))
- (#set! injection.language "regex"))
diff --git a/runtime/queries/docker-bake/rainbows.scm b/runtime/queries/docker-bake/rainbows.scm
deleted file mode 100644
index 0e5ffc2d..00000000
--- a/runtime/queries/docker-bake/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: hcl
diff --git a/runtime/queries/docker-bake/tags.scm b/runtime/queries/docker-bake/tags.scm
deleted file mode 100644
index e005272a..00000000
--- a/runtime/queries/docker-bake/tags.scm
+++ /dev/null
@@ -1,33 +0,0 @@
-; group
-; target
-; function
-; variable
-
-
-(block
- (identifier) @_block (#eq? @_block "group")
- (string_lit
- (template_literal) @name)) @definition.module
-
-(block
- (identifier) @_block (#eq? @_block "target")
- (string_lit
- (template_literal) @name)) @definition.struct
-
-(block
- (identifier) @_block (#eq? @_block "function")
- (string_lit
- (template_literal) @name)) @definition.function
-
-(block
- (identifier) @_block (#eq? @_block "variable")
- (string_lit
- (template_literal) @name)) @definition.constant
-
-
-; (config_file
-; (body
-; (block
-; (identifier) @_block (#eq? @_block "function")
-; (string_lit
-; (template_literal) @name)) @definition.function))
diff --git a/runtime/queries/docker-bake/textobjects.scm b/runtime/queries/docker-bake/textobjects.scm
deleted file mode 100644
index 0e5ffc2d..00000000
--- a/runtime/queries/docker-bake/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: hcl
diff --git a/runtime/queries/dockerfile/injections.scm b/runtime/queries/dockerfile/injections.scm
index fae7e337..20396f1a 100644
--- a/runtime/queries/dockerfile/injections.scm
+++ b/runtime/queries/dockerfile/injections.scm
@@ -1,16 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
-((shell_command (shell_fragment) @injection.content)
- (#set! injection.language "bash")
- (#set! injection.combined))
+([(shell_command) (shell_fragment)] @injection.content
+ (#set! injection.language "bash"))
-((run_instruction
- (heredoc_block (heredoc_line) @injection.content . "\n" @injection.content))
- (#set! injection.language "bash")
- (#set! injection.combined))
-
-((copy_instruction
- (path (heredoc_marker)) . (path) @injection.filename
- (heredoc_block (heredoc_line) @injection.content . "\n" @injection.content))
- (#set! injection.combined))
diff --git a/runtime/queries/doxyfile/highlights.scm b/runtime/queries/doxyfile/highlights.scm
deleted file mode 100644
index f9eaaf33..00000000
--- a/runtime/queries/doxyfile/highlights.scm
+++ /dev/null
@@ -1,19 +0,0 @@
-(comment) @comment.line
-
-(identifier) @variable
-
-(boolean) @constant.builtin.boolean
-(number) @constant.numeric.integer
-[
- (unquoted_string)
- (quoted_string)
-] @string
-
-[
- "\\"
-] @punctuation.delimiter
-
-[
- "="
- "+="
-] @operator
diff --git a/runtime/queries/doxyfile/indents.scm b/runtime/queries/doxyfile/indents.scm
deleted file mode 100644
index 5768fc6c..00000000
--- a/runtime/queries/doxyfile/indents.scm
+++ /dev/null
@@ -1,3 +0,0 @@
-(option
- value: (_) @anchor
- (#set! "scope" "tail")) @align
diff --git a/runtime/queries/doxyfile/injections.scm b/runtime/queries/doxyfile/injections.scm
deleted file mode 100644
index 3be7fa7a..00000000
--- a/runtime/queries/doxyfile/injections.scm
+++ /dev/null
@@ -1,3 +0,0 @@
-((comment
- body: (_) @injection.content)
- (#set! injection.language "comment"))
diff --git a/runtime/queries/doxyfile/tags.scm b/runtime/queries/doxyfile/tags.scm
deleted file mode 100644
index eb0fb8d0..00000000
--- a/runtime/queries/doxyfile/tags.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-(option
- key: (_) @definition.constant)
diff --git a/runtime/queries/doxyfile/textobjects.scm b/runtime/queries/doxyfile/textobjects.scm
deleted file mode 100644
index c4623f71..00000000
--- a/runtime/queries/doxyfile/textobjects.scm
+++ /dev/null
@@ -1,5 +0,0 @@
-(option
- value: (_) @entry.inside) @entry.around
-
-(comment) @comment.inside
-(comment)+ @comment.around
diff --git a/runtime/queries/ecma/highlights.scm b/runtime/queries/ecma/highlights.scm
index 4ba74a4b..4b23d66a 100644
--- a/runtime/queries/ecma/highlights.scm
+++ b/runtime/queries/ecma/highlights.scm
@@ -161,7 +161,7 @@
; Function and method definitions
;--------------------------------
-(function_expression
+(function
name: (identifier) @function)
(function_declaration
name: (identifier) @function)
@@ -172,27 +172,27 @@
(pair
key: (property_identifier) @function.method
- value: [(function_expression) (arrow_function)])
+ value: [(function) (arrow_function)])
(pair
key: (private_property_identifier) @function.method.private
- value: [(function_expression) (arrow_function)])
+ value: [(function) (arrow_function)])
(assignment_expression
left: (member_expression
property: (property_identifier) @function.method)
- right: [(function_expression) (arrow_function)])
+ right: [(function) (arrow_function)])
(assignment_expression
left: (member_expression
property: (private_property_identifier) @function.method.private)
- right: [(function_expression) (arrow_function)])
+ right: [(function) (arrow_function)])
(variable_declarator
name: (identifier) @function
- value: [(function_expression) (arrow_function)])
+ value: [(function) (arrow_function)])
(assignment_expression
left: (identifier) @function
- right: [(function_expression) (arrow_function)])
+ right: [(function) (arrow_function)])
; Function and method parameters
;-------------------------------
@@ -222,15 +222,12 @@
(super) @variable.builtin
[
+ (true)
+ (false)
(null)
(undefined)
] @constant.builtin
-[
- (true)
- (false)
-] @constant.builtin.boolean
-
(comment) @comment
[
diff --git a/runtime/queries/ecma/injections.scm b/runtime/queries/ecma/injections.scm
index 71163c5c..72ad31da 100644
--- a/runtime/queries/ecma/injections.scm
+++ b/runtime/queries/ecma/injections.scm
@@ -26,7 +26,7 @@
((call_expression
function: (identifier) @_template_function_name
- arguments: (template_string (string_fragment) @injection.content))
+ arguments: (template_string) @injection.content)
(#eq? @_template_function_name "gql")
(#set! injection.language "graphql"))
@@ -47,18 +47,3 @@
(#set! injection.language "comment")
(#match? @injection.content "^//"))
-; Match string literals passed to standard browser API methods that expects a
-; css selector as argument.
-; - https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
-; - https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll
-; - https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
-; - https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
-; e.g.
-; `const el = document.querySelector("div.user-panel.main input[name='login']");`
-(call_expression
- function: (member_expression
- object: (identifier) @_object
- property: (property_identifier) @_property (#any-of? @_property "querySelector" "querySelectorAll" "closest" "matches"))
- arguments: (arguments
- (string (string_fragment) @injection.content))
- (#set! injection.language "css"))
diff --git a/runtime/queries/ecma/locals.scm b/runtime/queries/ecma/locals.scm
index 594a5f50..345cf177 100644
--- a/runtime/queries/ecma/locals.scm
+++ b/runtime/queries/ecma/locals.scm
@@ -3,14 +3,10 @@
[
(statement_block)
+ (function)
(arrow_function)
- (function_expression)
(function_declaration)
(method_definition)
- (for_statement)
- (for_in_statement)
- (catch_clause)
- (finally_clause)
] @local.scope
; Definitions
diff --git a/runtime/queries/ecma/rainbows.scm b/runtime/queries/ecma/rainbows.scm
deleted file mode 100644
index 50f9f813..00000000
--- a/runtime/queries/ecma/rainbows.scm
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- (export_clause)
- (named_imports)
- (statement_block)
- (for_statement)
- (for_in_statement)
- (switch_body)
- (catch_clause "(" ")")
- (parenthesized_expression)
- (object)
- (object_pattern)
- (array)
- (array_pattern)
- (subscript_expression)
- (template_substitution)
- (arguments)
- (class_body)
- (formal_parameters)
- (computed_property_name)
-] @rainbow.scope
-
-[
- "(" ")"
- "${" "{" "}"
- "[" "]"
-] @rainbow.bracket
-
-(regex "/" @rainbow.bracket) @rainbow.scope
diff --git a/runtime/queries/ecma/textobjects.scm b/runtime/queries/ecma/textobjects.scm
index 08c0307b..a19eb25b 100644
--- a/runtime/queries/ecma/textobjects.scm
+++ b/runtime/queries/ecma/textobjects.scm
@@ -1,7 +1,7 @@
(function_declaration
body: (_) @function.inside) @function.around
-(function_expression
+(function
body: (_) @function.inside) @function.around
(arrow_function
diff --git a/runtime/queries/eiffel/highlights.scm b/runtime/queries/eiffel/highlights.scm
deleted file mode 100644
index 90b0cfdb..00000000
--- a/runtime/queries/eiffel/highlights.scm
+++ /dev/null
@@ -1,108 +0,0 @@
-[
- "alias"
- "convert"
- "inherit"
- "redefine"
- "undefine"
- "rename"
- "select"
- "note"
- "create"
-] @keyword.control.import
-
-["export"] @keyword.control.export
-
-[
- "do"
- "end"
- "once"
- "attribute"
-] @keyword.control
-
-[
- "class"
- "local"
-] @keyword.storage.type
-
-[
- "feature"
- "agent"
-] @keyword.function
-
-[
- "frozen"
- "deferred"
- "detachable"
- "expanded"
- "attached"
- "old"
- "like"
-] @keyword.storage.modifier
-
-(conditional ["if" "elseif" "end"] @keyword.control.conditional)
-(else_part ["else"] @keyword.control.conditional)
-(then_part ["then"] @keyword.control.conditional)
-
-(conditional_expression ["if" "else" "elseif" "end"] @keyword.control.conditional)
-(else_part_expression ["else"] @keyword.control.conditional)
-(then_part_expression ["then"] @keyword.control.conditional)
-
-(multi_branch "inspect" @keyword.control.conditional)
-(when_part ["when" "then"] @keyword.control.conditional)
-
-(multi_branch_expression "inspect" @keyword.control.conditional)
-(when_part_expression ["when" "then"] @keyword.control.conditional)
-
-(quantifier_loop ["∀" "∃" ":" "¦"] @keyword.control.repeat)
-(quantifier_loop_body ["all" "some"] @keyword.control.repeat)
-(iteration ["across" "as"] @keyword.control.repeat)
-(initialization "from" @keyword.control.repeat)
-(exit_condition "until" @keyword.control.repeat)
-(loop_body "loop" @keyword.control.repeat)
-(variant "variant" @keyword.control.repeat)
-(loop (invariant "invariant" @keyword.control.repeat))
-(loop ["⟳" ":" "¦" "⟲"]@keyword.control.repeat)
-(loop "end" @keyword.control.repeat)
-
-[
- "require"
- "ensure"
- "invariant"
- "check"
-] @keyword.control.exception
-
-["(" ")" "[" "]" "<<" ">>"] @punctuation.bracket
-["," ":" ";"] @punctuation.delimiter
-
-[
- (unary)
- ":="
- (binary_caret)
- (binary_mul_div)
- (binary_plus_minus)
- (binary_comparison)
- (binary_and)
- (binary_or)
- (binary_implies)
- (comparison)
- (unary_not)
-] @operator
-
-(result) @variable.builtin
-(anchored (call (_) @variable))
-[(verbatim_string) (basic_manifest_string)] @string
-[(integer_constant) (real_constant)] @constant.numeric
-(boolean_constant) @constant.builtin.boolean
-(void) @constant.builtin
-(current) @variable.builtin
-(extended_feature_name (identifier) @function.method)
-
-(iteration (identifier) @variable)
-(quantifier_loop (identifier) @variable)
-(entity_declaration_group (identifier) @variable)
-
-(class_name) @type
-(formal_generic) @type.parameter
-
-(comment) @comment.line
-(header_comment) @comment.line.documentation
diff --git a/runtime/queries/eiffel/indents.scm b/runtime/queries/eiffel/indents.scm
deleted file mode 100644
index 5be4cb42..00000000
--- a/runtime/queries/eiffel/indents.scm
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- (notes)
- (class_declaration)
- (inheritance)
- (feature_adaptation)
- (creation_clause)
- (converters)
-
- (feature_declaration)
-
- (attribute_or_routine)
-
- (precondition)
- (local_declarations)
- (feature_body)
-
- (check)
- (multi_branch)
- (multi_branch_expression)
- (conditional)
- (conditional_expression)
- (loop)
- (quantifier_loop)
- (iteration)
-
- (postcondition)
- (rescue)
-
- (invariant)
-] @indent
diff --git a/runtime/queries/eiffel/textobjects.scm b/runtime/queries/eiffel/textobjects.scm
deleted file mode 100644
index 34693a02..00000000
--- a/runtime/queries/eiffel/textobjects.scm
+++ /dev/null
@@ -1,15 +0,0 @@
-[
- (comment)+
- (header_comment)+
-] @comment.around
-[
- (comment)
- (header_comment)
-] @comment.inside
-(formal_arguments) @parameter.around
-(entity_declaration_group) @parameter.inside
-(attribute_or_routine) @function.around
-(feature_body) @function.inside
-(class_declaration) @class.around
-(feature_clause) @class.inside
-
diff --git a/runtime/queries/elixir/rainbows.scm b/runtime/queries/elixir/rainbows.scm
deleted file mode 100644
index 01d3da7a..00000000
--- a/runtime/queries/elixir/rainbows.scm
+++ /dev/null
@@ -1,24 +0,0 @@
-[
- (block)
- (interpolation)
- (list)
- (tuple)
- (bitstring)
- (map)
- ; short-hand function captures like &(&1 + &2)
- (unary_operator
- operator: "&")
- (arguments "(" ")")
- (access_call)
- (sigil)
-] @rainbow.scope
-
-[
- "(" ")"
- "%"
- "{" "}"
- "[" "]"
- "<<" ">>"
- "#{"
- "|"
-] @rainbow.bracket
diff --git a/runtime/queries/elixir/tags.scm b/runtime/queries/elixir/tags.scm
deleted file mode 100644
index 582f1160..00000000
--- a/runtime/queries/elixir/tags.scm
+++ /dev/null
@@ -1,54 +0,0 @@
-; Definitions
-
-; * modules and protocols
-(call
- target: (identifier) @ignore
- (arguments (alias) @name)
- (#any-of? @ignore "defmodule" "defprotocol")) @definition.module
-
-; * functions/macros
-(call
- target: (identifier) @ignore
- (arguments
- [
- ; zero-arity functions with no parentheses
- (identifier) @name
- ; regular function clause
- (call target: (identifier) @name)
- ; function clause with a guard clause
- (binary_operator
- left: (call target: (identifier) @name)
- operator: "when")
- ])
- (#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp")) @definition.function
-
-; References
-
-; ignore calls to kernel/special-forms keywords
-(call
- target: (identifier) @ignore
- (#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp" "defmodule" "defprotocol" "defimpl" "defstruct" "defexception" "defoverridable" "alias" "case" "cond" "else" "for" "if" "import" "quote" "raise" "receive" "require" "reraise" "super" "throw" "try" "unless" "unquote" "unquote_splicing" "use" "with"))
-
-; ignore module attributes
-(unary_operator
- operator: "@"
- operand: (call
- target: (identifier) @ignore))
-
-; * function call
-(call
- target: [
- ; local
- (identifier) @name
- ; remote
- (dot
- right: (identifier) @name)
- ]) @reference.call
-
-; * pipe into function call
-(binary_operator
- operator: "|>"
- right: (identifier) @name) @reference.call
-
-; * modules
-(alias) @name @reference.module
diff --git a/runtime/queries/erlang/rainbows.scm b/runtime/queries/erlang/rainbows.scm
deleted file mode 100644
index 5092c998..00000000
--- a/runtime/queries/erlang/rainbows.scm
+++ /dev/null
@@ -1,24 +0,0 @@
-[
- ; ()
- (arguments "(" ")")
- (parenthesized_expression)
- (function_type)
- ; #{}
- (record)
- (map)
- ; {}
- (map_update)
- (tuple)
- ; <<>>
- (bitstring)
- ; []
- (list)
-] @rainbow.scope
-
-[
- "#"
- "{" "}"
- "(" ")"
- "[" "]"
- "<<" ">>"
-] @rainbow.bracket
diff --git a/runtime/queries/erlang/tags.scm b/runtime/queries/erlang/tags.scm
deleted file mode 100644
index 0aa0e33c..00000000
--- a/runtime/queries/erlang/tags.scm
+++ /dev/null
@@ -1,45 +0,0 @@
-; Modules
-(attribute
- name: (atom) @_attr
- (arguments (atom) @definition.module)
- (#eq? @_attr "module"))
-
-; Constants
-((attribute
- name: (atom) @_attr
- (arguments
- .
- [
- (atom) @definition.constant
- (call function: [(variable) (atom)] @definition.macro)
- ]))
- (#eq? @_attr "define"))
-
-; Record definitions
-((attribute
- name: (atom) @_attr
- (arguments
- .
- (atom) @definition.struct))
- (#eq? @_attr "record"))
-
-; Function specs
-((attribute
- name: (atom) @_attr
- (stab_clause name: (atom) @definition.interface))
- (#eq? @_attr "spec"))
-
-; Types
-((attribute
- name: (atom) @_attr
- (arguments
- (binary_operator
- left: [
- (atom) @definition.type
- (call function: (atom) @definition.type)
- ]
- operator: "::")))
- (#any-of? @_attr "type" "opaque"))
-
-; Functions
-(function_clause name: (atom) @definition.function)
diff --git a/runtime/queries/fennel/highlights.scm b/runtime/queries/fennel/highlights.scm
index 384e0349..fe90279a 100644
--- a/runtime/queries/fennel/highlights.scm
+++ b/runtime/queries/fennel/highlights.scm
@@ -1,11 +1,6 @@
; Most primitive nodes
(shebang) @keyword.directive
-[
- (symbol)
- (symbol_binding)
-] @variable
-
(comment) @comment
(fn_form
@@ -191,3 +186,8 @@
(string)
(string_binding)
] @string
+
+[
+ (symbol)
+ (symbol_binding)
+] @variable
diff --git a/runtime/queries/fish/injections.scm b/runtime/queries/fish/injections.scm
index 81a067e2..321c90ad 100644
--- a/runtime/queries/fish/injections.scm
+++ b/runtime/queries/fish/injections.scm
@@ -1,14 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))
-
-(command
- name: (word) @_command (#any-of? @_command "jq" "jaq")
- argument: [(double_quote_string) (single_quote_string)] @injection.content
- (#set! injection.language "jq"))
-
-(command
- name: (word) @_command (#eq? @_command "nu")
- argument: (word) @_flag (#match? @_flag "^-.*c$")
- argument: [(single_quote_string) (double_quote_string)] @injection.content
- (#set! injection.language "nu")
-)
diff --git a/runtime/queries/flatbuffers/highlights.scm b/runtime/queries/flatbuffers/highlights.scm
deleted file mode 100644
index 213bb850..00000000
--- a/runtime/queries/flatbuffers/highlights.scm
+++ /dev/null
@@ -1,89 +0,0 @@
-[
- "namespace"
- "attribute"
- "table"
- "struct"
- "union"
- "enum"
- "root_type"
- "rpc_service"
- "file_extension"
- "file_identifier"
-] @keyword
-
-"include" @keyword.control.import
-
-[
- ";"
- "."
- ","
-] @punctuation.delimiter
-
-(type) @type.builtin
-(string_constant) @string
-
-[
- (true)
- (false)
-] @constant.builtin.boolean
-
-[
- (inf_token)
- (nan_token)
-] @constant.builtin
-
-[
- (int_lit)
- (int_constant)
-] @constant.numeric.integer
-
-[
- (float_lit)
- (float_constant)
-] @constant.numeric.float
-
-
-(comment) @comment
-(documentation) @comment.line.documentation
-
-[
- "("
- ")"
- "["
- "]"
- "{"
- "}"
-] @punctuation.bracket
-
-[
- (metadata)
-] @attribute
-
-(attribute_decl
- attribute_name: (identifier) @string)
-
-(namespace_decl
- namespace_ident: (full_ident) @namespace)
-
-(type_decl
- table_or_struct_name: (identifier) @type)
-
-(enum_decl
- enum_name: (identifier) @type)
-
-(enum_val_decl
- enum_key: (identifier) @type)
-
-(union_decl
- union_name: (identifier) @type)
-
-(root_decl
- root_type_ident: (identifier) @type)
-
-(rpc_decl
- rpc_name: (identifier) @type)
-
-(rpc_method
- rpc_method_name: (identifier) @function
- rpc_parameter: (identifier) @variable.parameter
- rpc_return_type: (identifier) @type)
diff --git a/runtime/queries/fortran/folds.scm b/runtime/queries/fortran/folds.scm
index 01e24dd6..f62d9dd7 100644
--- a/runtime/queries/fortran/folds.scm
+++ b/runtime/queries/fortran/folds.scm
@@ -7,6 +7,5 @@
(derived_type_definition)
(function)
(subroutine)
- (module_procedure)
(interface)
-] @fold
+] @fold \ No newline at end of file
diff --git a/runtime/queries/fortran/highlights.scm b/runtime/queries/fortran/highlights.scm
index 4b3c9b96..0901a4aa 100644
--- a/runtime/queries/fortran/highlights.scm
+++ b/runtime/queries/fortran/highlights.scm
@@ -1,167 +1,134 @@
-(identifier) @variable
-(string_literal) @string
-(number_literal) @constant.numeric
-(boolean_literal) @constant.builtin.boolean
-(comment) @comment
-
[
- (intrinsic_type)
- "allocatable"
- "attributes"
- "device"
- "dimension"
- "endtype"
- "global"
- "grid_global"
- "host"
- "import"
- "in"
- "inout"
- "intent"
- "optional"
- "out"
- "pointer"
- "type"
- "value"
- ] @keyword.storage.modifier
+ (intrinsic_type)
+ "dimension"
+ "intent"
+ "in"
+ "out"
+ "inout"
+ "type"
+ "endtype"
+ "attributes"
+ "global"
+ "device"
+ "host"
+ "grid_global"
+ "pointer"
+] @keyword.storage.modifier
[
- "contains"
- "private"
- "public"
- ] @keyword.directive
+ "contains"
+ "public"
+ "private"
+] @keyword.directive
[
- (none)
- "implicit"
- ] @attribute
+"implicit"
+(none)
+] @attribute
[
- "endfunction"
- "endprogram"
- "endsubroutine"
- "function"
- "procedure"
- "subroutine"
- ] @keyword.function
+ "function"
+ "endfunction"
+ "endprogram"
+ "subroutine"
+ "endsubroutine"
+] @keyword.storage
[
- (default)
- (procedure_qualifier)
- "abstract"
- "bind"
- "call"
- "class"
- "continue"
- "cycle"
- "end"
- "endenum"
- "endinterface"
- "endmodule"
- "endprocedure"
- "endprogram"
- "endsubmodule"
- "enum"
- "enumerator"
- "equivalence"
- "exit"
- "extends"
- "format"
- "goto"
- "include"
- "interface"
- "intrinsic"
- "non_intrinsic"
- "module"
- "namelist"
- "only"
- "parameter"
- "print"
- "procedure"
- "program"
- "read"
- "stop"
- "submodule"
- "use"
- "write"
- ] @keyword
-
-"return" @keyword.control.return
+ "module"
+ "endmodule"
+ "bind"
+ "call"
+ "class"
+ "continue"
+ "cycle"
+ "enumerator"
+ "equivalence"
+ "exit"
+ "format"
+ "goto"
+ "include"
+ "interface"
+ "endinterface"
+ "only"
+ "parameter"
+ "procedure"
+ "print"
+ "program"
+ "endprogram"
+ "read"
+ "return"
+ "result"
+ "stop"
+ "use"
+ "write"
+ "enum"
+ "endenum"
+ (default)
+ (procedure_qualifier)
+] @keyword
[
- "else"
- "elseif"
- "elsewhere"
- "endif"
- "endwhere"
- "if"
- "then"
- "where"
- ] @keyword.control.conditional
+ "if"
+ "then"
+ "else"
+ "elseif"
+ "endif"
+ "where"
+ "endwhere"
+] @keyword.control.conditional
[
- "do"
- "enddo"
- "forall"
- "while"
- ] @keyword.control.repeat
+ "do"
+ "enddo"
+ "while"
+ "forall"
+] @keyword.control.repeat
[
- "*"
- "+"
- "-"
- "/"
- "="
- "<"
- ">"
- "<="
- ">="
- "=="
- "/="
- ] @operator
+ "*"
+ "**"
+ "+"
+ "-"
+ "/"
+ "="
+ "<"
+ ">"
+ "<="
+ ">="
+ "=="
+ "/="
+] @operator
[
- "\\.and\\."
- "\\.or\\."
- "\\.lt\\."
- "\\.gt\\."
- "\\.ge\\."
- "\\.le\\."
- "\\.eq\\."
- "\\.eqv\\."
- "\\.neqv\\."
- ] @keyword.operator
-
-;; Brackets
-[
- "("
- ")"
- "["
- "]"
- "<<<"
- ">>>"
+ "\\.and\\."
+ "\\.or\\."
+ "\\.lt\\."
+ "\\.gt\\."
+ "\\.ge\\."
+ "\\.le\\."
+ "\\.eq\\."
+ "\\.eqv\\."
+ "\\.neqv\\."
+] @keyword.operator
+
+(identifier) @variable
+
+ ;; Brackets
+ [
+ "("
+ ")"
+ "["
+ "]"
] @punctuation.bracket
-;; Delimiter
-[
- "::"
- ","
- "%"
+ ;; Delimiter
+ [
+ "::"
+ ","
+ "%"
] @punctuation.delimiter
-[
- "defined"
- "#define"
- "#elif"
- "#else"
- "#endif"
- "#if"
- "#ifdef"
- "#ifndef"
- "#include"
- (preproc_directive)
-] @keyword.directive
-
(parameters
(identifier) @variable.parameter)
@@ -171,38 +138,26 @@
(module_statement
(name) @namespace)
-(submodule_statement
- (module_name) (name) @namespace)
-
(function_statement
(name) @function)
(subroutine_statement
(name) @function)
-(module_procedure_statement
- (name) @function)
-
(end_program_statement
(name) @namespace)
(end_module_statement
(name) @namespace)
-(end_submodule_statement
- (name) @namespace)
-
(end_function_statement
(name) @function)
(end_subroutine_statement
(name) @function)
-(end_module_procedure_statement
- (name) @function)
-
(subroutine_call
- (identifier) @function)
+ (name) @function)
(keyword_argument
name: (identifier) @keyword)
@@ -210,5 +165,8 @@
(derived_type_member_expression
(type_member) @variable.other.member)
-(call_expression
- (identifier) @function)
+(string_literal) @string
+(number_literal) @constant.numeric
+(boolean_literal) @constant.builtin.boolean
+(comment) @comment
+
diff --git a/runtime/queries/fortran/indents.scm b/runtime/queries/fortran/indents.scm
index 2248b383..daa8bac1 100644
--- a/runtime/queries/fortran/indents.scm
+++ b/runtime/queries/fortran/indents.scm
@@ -1,9 +1,7 @@
[
(module)
- (submodule)
(program)
(subroutine)
- (module_procedure)
(function)
; (interface)
(if_statement)
@@ -15,10 +13,8 @@
[
(end_module_statement)
- (end_submodule_statement)
(end_program_statement)
(end_subroutine_statement)
- (end_module_procedure_statement)
(end_function_statement)
; (end_interface_statement)
(end_if_statement)
@@ -28,4 +24,4 @@
(end_type_statement)
(end_enum_statement)
(end_where_statement)
-] @outdent
+] @outdent \ No newline at end of file
diff --git a/runtime/queries/gdscript/tags.scm b/runtime/queries/gdscript/tags.scm
index d2f4ffd9..05796fdf 100644
--- a/runtime/queries/gdscript/tags.scm
+++ b/runtime/queries/gdscript/tags.scm
@@ -2,4 +2,4 @@
(function_definition (name) @name) @definition.function
-(call (identifier) @name) @reference.call
+(call (name) @name) @reference.call \ No newline at end of file
diff --git a/runtime/queries/git-cliff-config/highlights.scm b/runtime/queries/git-cliff-config/highlights.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/git-cliff-config/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/git-cliff-config/injections.scm b/runtime/queries/git-cliff-config/injections.scm
deleted file mode 100644
index c0c38c4b..00000000
--- a/runtime/queries/git-cliff-config/injections.scm
+++ /dev/null
@@ -1,53 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
-
-; https://git-cliff.org/docs/configuration/changelog
-(table
- (bare_key) @_table (#eq? @_table "changelog")
- (pair
- (bare_key) @_key (#any-of? @_key "header" "body" "footer")
- (string) @injection.content
- (#set! injection.language "tera")))
-
-; https://git-cliff.org/docs/configuration/git#commit_preprocessors
-; https://git-cliff.org/docs/configuration/git/#link_parsers
-; https://git-cliff.org/docs/configuration/changelog#postprocessors
-; https://git-cliff.org/docs/configuration/git/#tag_pattern
-; https://git-cliff.org/docs/configuration/git/#skip_tags
-; https://git-cliff.org/docs/configuration/git/#ignore_tags
-; https://git-cliff.org/docs/configuration/git/#count_tags
-; https://git-cliff.org/docs/configuration/bump/#custom_major_increment_regex--custom_minor_increment_regex
-(pair
- (bare_key) @_key (#any-of? @_key
- "pattern"
- "tag_pattern"
- "skip_tags"
- "ignore_tags"
- "count_tags"
- "custom_major_increment_regex"
- "custom_minor_increment_regex"
- )
- (string) @injection.content
- (#set! injection.language "regex"))
-
-; https://git-cliff.org/docs/configuration/git/#commit_preprocessors
-; [[git.commit_preprocessors]]
-; replace_command = ""
-(pair
- (bare_key) @_key (#eq? @_key "replace_command")
- (string) @injection.content
- (#set! injection.language "bash"))
-
-; https://git-cliff.org/docs/configuration/git/#commit_parsers
-; [[git.commit_parsers]]
-; message = "..."
-(table
- (bare_key) @_table (#eq? @_table "git")
- (pair
- (bare_key) @_key (#eq? @_key "commit_parsers")
- (array
- (inline_table
- (pair
- (bare_key) @_message (#any-of? @_message "message" "body")
- (string) @injection.content))))
- (#set! injection.language "regex"))
diff --git a/runtime/queries/git-cliff-config/rainbows.scm b/runtime/queries/git-cliff-config/rainbows.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/git-cliff-config/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/git-cliff-config/textobjects.scm b/runtime/queries/git-cliff-config/textobjects.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/git-cliff-config/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/git-commit/highlights.scm b/runtime/queries/git-commit/highlights.scm
index bc84d037..319d7656 100644
--- a/runtime/queries/git-commit/highlights.scm
+++ b/runtime/queries/git-commit/highlights.scm
@@ -1,18 +1,18 @@
-[(comment) (generated_comment) (scissor)] @comment
(subject) @markup.heading
+(path) @string.special.path
(branch) @string.special.symbol
-(filepath) @string.special.path
-(arrow) @punctuation.delimiter
-(subject (subject_prefix) @function)
-(prefix (type) @keyword)
-(prefix (scope) @variable.parameter)
-(prefix [ "(" ")" ":" ] @punctuation.delimiter)
-(prefix "!" @punctuation.special)
-(trailer (token) @variable.other.member)
-(trailer (value) @string)
-(breaking_change (token) @special)
+(commit) @constant
+(item) @markup.link.url
+(header) @tag
-(change kind: (new)) @diff.plus
-(change kind: (deleted)) @diff.minus
-(change kind: (modified)) @diff.delta
-(change kind: [(renamed) (typechange)]) @diff.delta.moved
+(change kind: "new file" @diff.plus)
+(change kind: "deleted" @diff.minus)
+(change kind: "modified" @diff.delta)
+(change kind: "renamed" @diff.delta.moved)
+
+(trailer
+ key: (trailer_key) @variable.other.member
+ value: (trailer_value) @string)
+
+[":" "=" "->" (scissors)] @punctuation.delimiter
+(comment) @comment
diff --git a/runtime/queries/git-commit/injections.scm b/runtime/queries/git-commit/injections.scm
index 823188e0..79f7691a 100644
--- a/runtime/queries/git-commit/injections.scm
+++ b/runtime/queries/git-commit/injections.scm
@@ -1,4 +1,6 @@
-((diff) @injection.content
+(((scissors)
+ (message) @injection.content)
+ (#set! injection.include-children)
(#set! injection.language "diff"))
((rebase_command) @injection.content
diff --git a/runtime/queries/git-notes/highlights.scm b/runtime/queries/git-notes/highlights.scm
deleted file mode 100644
index 4bb7d675..00000000
--- a/runtime/queries/git-notes/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-(comment) @comment
diff --git a/runtime/queries/gitlab-ci/highlights.scm b/runtime/queries/gitlab-ci/highlights.scm
deleted file mode 100644
index 1891c000..00000000
--- a/runtime/queries/gitlab-ci/highlights.scm
+++ /dev/null
@@ -1,89 +0,0 @@
-(boolean_scalar) @constant.builtin.boolean
-(null_scalar) @constant.builtin
-(double_quote_scalar) @string
-(single_quote_scalar) @string
-(block_scalar) @string
-(string_scalar) @string
-(escape_sequence) @constant.character.escape
-(integer_scalar) @constant.numeric.integer
-(float_scalar) @constant.numeric.float
-(comment) @comment
-(anchor_name) @type
-(alias_name) @type
-(tag) @type
-(yaml_directive) @keyword
-
-(block_mapping_pair
- key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member))
-(block_mapping_pair
- key: (flow_node (plain_scalar (string_scalar) @variable.other.member)))
-
-(flow_mapping
- (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member)))
-(flow_mapping
- (_ key: (flow_node (plain_scalar (string_scalar) @variable.other.member))))
-
-[
-","
-"-"
-":"
-">"
-"?"
-"|"
-] @punctuation.delimiter
-
-[
-"["
-"]"
-"{"
-"}"
-] @punctuation.bracket
-
-["*" "&" "---" "..."] @punctuation.special
-
-
-; Highlight the toplevel keys differently as keywords
-(block_mapping_pair
- key: (flow_node (plain_scalar (string_scalar) @keyword (#any-of? @keyword "variables" "stages" "default" "include" "workflow"))) )
-
-; Highlight the builtin stages differently
-; <https://docs.gitlab.com/ci/yaml/#stages>
-(block_mapping_pair
- key: (flow_node
- (plain_scalar
- (string_scalar) @variable.other.member (#eq? @variable.other.member "stage")))
- value: (flow_node
- (plain_scalar
- (string_scalar) @constant.builtin (#any-of? @constant.builtin ".pre" "build" "test" "deploy" ".post"))))
-; e.g.
-; ```
-; stages:
-; - build
-; - test
-; ```
-(block_mapping_pair
- key: (flow_node
- (plain_scalar
- (string_scalar) @keyword (#eq? @keyword "stages")))
- value: (block_node
- (block_sequence
- (block_sequence_item
- (flow_node
- (plain_scalar
- (string_scalar) @constant.builtin (#any-of? @constant.builtin ".pre" "build" "test" "deploy" ".post")))))))
-
-
-; Highlight defined variable names as @variable
-; Matches on:
-; ```
-; variables:
-; <variable>: ...
-; ```
-(block_mapping_pair
- key: (flow_node
- (plain_scalar
- (string_scalar) @keyword (#eq? @keyword "variables")))
- value: (block_node
- (block_mapping
- (block_mapping_pair
- key: (flow_node) @variable)+)))
diff --git a/runtime/queries/gitlab-ci/indents.scm b/runtime/queries/gitlab-ci/indents.scm
deleted file mode 100644
index 4ba254e8..00000000
--- a/runtime/queries/gitlab-ci/indents.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: yaml
diff --git a/runtime/queries/gitlab-ci/injections.scm b/runtime/queries/gitlab-ci/injections.scm
deleted file mode 100644
index bb62c18d..00000000
--- a/runtime/queries/gitlab-ci/injections.scm
+++ /dev/null
@@ -1,51 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
-
-(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "script" "before_script" "after_script" "pre_get_sources_script" "command" "entrypoint")
- value: (flow_node
- (plain_scalar
- (string_scalar) @injection.content)
- (#set! injection.language "bash")))
-
-(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "script" "before_script" "after_script" "pre_get_sources_script" "command" "entrypoint")
- value: (block_node
- (block_scalar) @injection.content
- (#set! injection.language "bash")))
-
-(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "script" "before_script" "after_script" "pre_get_sources_script" "command" "entrypoint")
- value: (block_node
- (block_sequence
- (block_sequence_item
- (flow_node
- (plain_scalar
- (string_scalar) @injection.content))
- (#set! injection.language "bash")))))
-
-(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "script" "before_script" "after_script" "pre_get_sources_script" "command" "entrypoint")
- value: (block_node
- (block_sequence
- (block_sequence_item
- (block_node
- (block_scalar) @injection.content
- (#set! injection.language "bash"))))))
-
-; e.g.
-; ```
-; job1:
-; services:
-; entrypoint: ["/usr/local/bin/docker-entrypoint.sh", "-c", 'max_connections=100']
-; ```
-(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "command" "entrypoint")
- value: (flow_node
- (flow_sequence
- (flow_node
- [
- (double_quote_scalar)
- (single_quote_scalar)
- ] @injection.content)))
- (#set! injection.language "bash"))
diff --git a/runtime/queries/gitlab-ci/rainbows.scm b/runtime/queries/gitlab-ci/rainbows.scm
deleted file mode 100644
index 4ba254e8..00000000
--- a/runtime/queries/gitlab-ci/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: yaml
diff --git a/runtime/queries/gitlab-ci/tags.scm b/runtime/queries/gitlab-ci/tags.scm
deleted file mode 100644
index 6313a075..00000000
--- a/runtime/queries/gitlab-ci/tags.scm
+++ /dev/null
@@ -1,17 +0,0 @@
-; select jobs
-(block_mapping
- (block_mapping_pair
- value: (block_node
- (block_mapping
- (block_mapping_pair
- key: (flow_node) @_key (#eq? @_key "stage"))))) @definition.struct)
-
-; select defined variables under `variables:`
-(block_mapping
- (block_mapping_pair
- key: (flow_node) @_key (#eq? @_key "variables")
- value: (block_node
- (block_mapping
- (block_mapping_pair
- key: (flow_node) @name
- value: (_) @definition.constant)))))
diff --git a/runtime/queries/gitlab-ci/textobjects.scm b/runtime/queries/gitlab-ci/textobjects.scm
deleted file mode 100644
index 4ba254e8..00000000
--- a/runtime/queries/gitlab-ci/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: yaml
diff --git a/runtime/queries/gleam/rainbows.scm b/runtime/queries/gleam/rainbows.scm
deleted file mode 100644
index a28312c1..00000000
--- a/runtime/queries/gleam/rainbows.scm
+++ /dev/null
@@ -1,32 +0,0 @@
-[
- (target_group)
- (unqualified_imports)
- (tuple)
- (list)
- (function)
- (function_parameters)
- (todo)
- (tuple)
- (list)
- (anonymous_function)
- (block)
- (case)
- (record_update)
- (arguments)
- (record_pattern_arguments)
- (tuple_pattern)
- (list_pattern)
- (type_definition)
- (data_constructor_arguments)
- (tuple_type)
- (function_parameter_types)
- (type_arguments)
- (type_parameters)
-] @rainbow.scope
-
-[
- "(" ")"
- "[" "]"
- "{" "}"
- "#"
-] @rainbow.bracket
diff --git a/runtime/queries/go-format-string/highlights.scm b/runtime/queries/go-format-string/highlights.scm
deleted file mode 100644
index 68d64ebd..00000000
--- a/runtime/queries/go-format-string/highlights.scm
+++ /dev/null
@@ -1,21 +0,0 @@
-(escaped_percent_sign) @constant.character.escape
-
-"." @punctuation.delimiter
-"%" @punctuation.special
-
-[
- "["
- "]"
-] @punctuation.bracket
-
-(explicit_argument_index) @constant.numeric
-
-(flag) @constant.builtin
-
-(width) @constant.numeric.integer
-(precision) @constant.numeric.float
-(asterisk) @string.special.symbol
-
-(verb) @type
-
-(text) @string
diff --git a/runtime/queries/go-format-string/rainbows.scm b/runtime/queries/go-format-string/rainbows.scm
deleted file mode 100644
index f4c22325..00000000
--- a/runtime/queries/go-format-string/rainbows.scm
+++ /dev/null
@@ -1,5 +0,0 @@
-(explicit_argument_index_expr) @rainbow.scope
-
-[
- "[" "]"
-] @rainbow.bracket
diff --git a/runtime/queries/go/highlights.scm b/runtime/queries/go/highlights.scm
index be9efeac..485b5cb8 100644
--- a/runtime/queries/go/highlights.scm
+++ b/runtime/queries/go/highlights.scm
@@ -10,7 +10,7 @@
(const_spec
name: (identifier) @constant)
-(type_spec
+(type_spec
name: (type_identifier) @constructor)
(keyed_element . (literal_element (identifier) @variable.other.member))
@@ -36,14 +36,14 @@
(call_expression
function: (identifier) @function.builtin
- (#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover|min|max|clear)$"))
+ (#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$"))
; Types
(type_identifier) @type
(type_parameter_list
- (type_parameter_declaration
+ (parameter_declaration
name: (identifier) @type.parameter))
((type_identifier) @type.builtin
@@ -57,8 +57,9 @@
(method_declaration
name: (field_identifier) @function.method)
-(method_elem
- name: (field_identifier) @function.method)
+(method_spec
+ name: (field_identifier) @function.method)
+
; Operators
@@ -99,8 +100,6 @@
"|"
"|="
"||"
- "&^"
- "&^="
"~"
] @operator
@@ -118,7 +117,7 @@
] @keyword.control
[
- "if"
+ "if"
"else"
"switch"
"select"
@@ -181,10 +180,9 @@
[
(interpreted_string_literal)
(raw_string_literal)
+ (rune_literal)
] @string
-(rune_literal) @constant.character
-
(escape_sequence) @constant.character.escape
[
diff --git a/runtime/queries/go/injections.scm b/runtime/queries/go/injections.scm
index b8a4d63e..d7b03da3 100644
--- a/runtime/queries/go/injections.scm
+++ b/runtime/queries/go/injections.scm
@@ -1,34 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
-; Inject markdown into documentation comments
-;
-; Go's comments are documentation comments when they are directly followed
-; by one of Go's statements (e.g. `type`, `func`, `const`)
-;
-; This is only a partial implementation, which covers only
-; block comments. For line comments (which are more common),
-; upstream changes to the grammar are required.
-(
- (comment) @injection.content . (comment)* . [
- (package_clause) ; `package`
- (type_declaration) ; `type`
- (function_declaration) ; `func`
- (method_declaration) ; `func`
- (var_declaration) ; `var`
- (const_declaration) ; `const`
- ; var (
- ; A = 1
- ; B = 2
- ; )
- (const_spec)
- ; const (
- ; A = 1
- ; B = 2
- ; )
- (var_spec)
- ]
- (#set! injection.language "markdown"))
(call_expression
(selector_expression) @_function
@@ -40,49 +12,3 @@
(interpreted_string_literal)
] @injection.content
(#set! injection.language "regex")))
-
-; https://pkg.go.dev/fmt#Printf
-; https://pkg.go.dev/fmt#Sprintf
-; https://pkg.go.dev/fmt#Scanf
-; https://pkg.go.dev/fmt#Errorf
-((call_expression
- function: (selector_expression
- operand: (identifier) @_module
- field: (field_identifier) @_func)
- arguments: (argument_list
- . (interpreted_string_literal) @injection.content))
- (#eq? @_module "fmt")
- (#any-of? @_func "Printf" "Sprintf" "Scanf" "Errorf")
- (#set! injection.language "go-format-string"))
-
-; https://pkg.go.dev/fmt#Fprintf
-; https://pkg.go.dev/fmt#Fscanf
-; https://pkg.go.dev/fmt#Sscanf
-((call_expression
- function: (selector_expression
- operand: (identifier) @_module
- field: (field_identifier) @_func)
- arguments: (argument_list
- ; [(identifier) (interpreted_string_literal)]
- (_)
- ; (identifier)
- .
- (interpreted_string_literal) @injection.content))
- (#eq? @_module "fmt")
- (#any-of? @_func "Fprintf" "Fscanf" "Sscanf")
- (#set! injection.language "go-format-string"))
-
-; https://pkg.go.dev/log#Printf
-; https://pkg.go.dev/log#Fatalf
-; https://pkg.go.dev/log#Panicf
-; https://pkg.go.dev/log#Logger.Printf
-; https://pkg.go.dev/log#Logger.Fatalf
-; https://pkg.go.dev/log#Logger.Panicf
-((call_expression
- function: (selector_expression
- operand: (identifier)
- field: (field_identifier) @_func)
- arguments: (argument_list
- . (interpreted_string_literal) @injection.content))
- (#any-of? @_func "Printf" "Fatalf" "Panicf")
- (#set! injection.language "go-format-string"))
diff --git a/runtime/queries/go/rainbows.scm b/runtime/queries/go/rainbows.scm
deleted file mode 100644
index 81004bf8..00000000
--- a/runtime/queries/go/rainbows.scm
+++ /dev/null
@@ -1,33 +0,0 @@
-[
- (import_spec_list)
- (const_declaration)
- (var_declaration)
- (type_parameter_list)
- (parameter_list)
- (type_declaration)
- (parenthesized_type)
- (type_arguments)
- (array_type)
- (implicit_length_array_type)
- (slice_type)
- (field_declaration_list)
- (interface_type)
- (map_type)
- (block)
- (expression_switch_statement)
- (type_switch_statement)
- (select_statement)
- (parenthesized_expression)
- (argument_list)
- (index_expression)
- (slice_expression)
- (type_assertion_expression)
- (type_conversion_expression)
- (literal_value)
-] @rainbow.scope
-
-[
- "(" ")"
- "[" "]"
- "{" "}"
-] @rainbow.bracket
diff --git a/runtime/queries/go/tags.scm b/runtime/queries/go/tags.scm
index b7049c7c..d87008ab 100644
--- a/runtime/queries/go/tags.scm
+++ b/runtime/queries/go/tags.scm
@@ -4,7 +4,7 @@
(function_declaration
name: (identifier) @name) @definition.function
(#strip! @doc "^//\\s*")
- (#select-adjacent! @doc @definition.function)
+ (#set-adjacent! @doc @definition.function)
)
(
@@ -13,7 +13,7 @@
(method_declaration
name: (field_identifier) @name) @definition.method
(#strip! @doc "^//\\s*")
- (#select-adjacent! @doc @definition.method)
+ (#set-adjacent! @doc @definition.method)
)
(call_expression
diff --git a/runtime/queries/go/textobjects.scm b/runtime/queries/go/textobjects.scm
index 06c412ee..df1b0866 100644
--- a/runtime/queries/go/textobjects.scm
+++ b/runtime/queries/go/textobjects.scm
@@ -12,7 +12,7 @@
(type_spec (type_identifier) (struct_type (field_declaration_list (_)?) @class.inside))) @class.around
(type_declaration
- (type_spec (type_identifier) (interface_type (method_elem)+ @class.inside))) @class.around
+ (type_spec (type_identifier) (interface_type (method_spec)+ @class.inside))) @class.around
(type_parameter_list
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
diff --git a/runtime/queries/gomod/highlights.scm b/runtime/queries/gomod/highlights.scm
index bfcb6fca..63e1f012 100644
--- a/runtime/queries/gomod/highlights.scm
+++ b/runtime/queries/gomod/highlights.scm
@@ -2,8 +2,6 @@
"require"
"replace"
"go"
- "toolchain"
- "tool"
"exclude"
"retract"
"module"
diff --git a/runtime/queries/hdl/highlights.scm b/runtime/queries/hdl/highlights.scm
deleted file mode 100644
index 053c99a6..00000000
--- a/runtime/queries/hdl/highlights.scm
+++ /dev/null
@@ -1,44 +0,0 @@
-;; Keywords
-[
- "CHIP"
- "IN"
- "OUT"
- "PARTS"
- "BUILTIN"
- "CLOCKED"
-] @keyword
-
-(identifier) @variable
-
-(chip_definition
- name: (identifier) @function)
-
-(in_section
- input_pin_name: (identifier) @variable.parameter)
-
-(out_section
- output_pin_name: (identifier) @variable.parameter)
-
-(builtin_body
- chip_name: (identifier) @function)
-
-(clocked_body
- (identifier) @variable.parameter)
-
-(part
- chip_name: (identifier) @function)
-
-(connection
- part_pin: (identifier) @variable.other.member
- chip_pin: [
- (identifier) @variable.parameter
- (bus_identifier
- (identifier) @variable.parameter
- (number) @constant.numeric)
- ])
-
-(bus_identifier
- (number) @constant.numeric)
-
-;; Comments
-(comment) @comment
diff --git a/runtime/queries/html/rainbows.scm b/runtime/queries/html/rainbows.scm
deleted file mode 100644
index 66e62e95..00000000
--- a/runtime/queries/html/rainbows.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- (doctype)
- (erroneous_end_tag)
-] @rainbow.scope
-
-([
- (element)
- (script_element)
- (style_element)
- ] @rainbow.scope
- (#set! rainbow.include-children))
-
-["<" ">" "<!" "</" "/>"] @rainbow.bracket
diff --git a/runtime/queries/html/textobjects.scm b/runtime/queries/html/textobjects.scm
deleted file mode 100644
index 8dd8f2fe..00000000
--- a/runtime/queries/html/textobjects.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-(script_element (start_tag) (_) @xml-element.inside (end_tag)) @xml-element.around
-
-(style_element (start_tag) (_) @xml-element.inside (end_tag)) @xml-element.around
-
-(element (start_tag) (_)* @xml-element.inside (end_tag))
-
-(element) @xml-element.around
-
-(comment) @comment.around
diff --git a/runtime/queries/htmldjango/highlights.scm b/runtime/queries/htmldjango/highlights.scm
deleted file mode 100644
index c8077f94..00000000
--- a/runtime/queries/htmldjango/highlights.scm
+++ /dev/null
@@ -1,26 +0,0 @@
-[
- (unpaired_comment)
- (paired_comment)
-] @comment
-
-[
- "{{"
- "}}"
- "{%"
- "%}"
- (end_paired_statement)
-] @punctuation.bracket
-
-[
- (tag_name)
-] @function
-
-(variable_name) @variable
-(filter_name) @function
-(filter_argument) @variable.parameter
-(keyword) @keyword
-(operator) @operator
-(keyword_operator) @keyword.operator
-(number) @constant.numeric
-(boolean) @constant.builtin.boolean
-(string) @string
diff --git a/runtime/queries/htmldjango/injections.scm b/runtime/queries/htmldjango/injections.scm
deleted file mode 100644
index f0822734..00000000
--- a/runtime/queries/htmldjango/injections.scm
+++ /dev/null
@@ -1,3 +0,0 @@
-((content) @injection.content
- (#set! injection.language "html")
- (#set! injection.combined))
diff --git a/runtime/queries/hurl/highlights.scm b/runtime/queries/hurl/highlights.scm
index e591add2..a2037637 100644
--- a/runtime/queries/hurl/highlights.scm
+++ b/runtime/queries/hurl/highlights.scm
@@ -1,10 +1,7 @@
[
"[QueryStringParams]"
- "[Query]"
"[FormParams]"
- "[Form]"
"[MultipartFormData]"
- "[Multipart]"
"[Cookies]"
"[Captures]"
"[Asserts]"
@@ -119,9 +116,6 @@
"isBoolean"
"isString"
"isCollection"
- "isNumber"
- "isIsoDate"
- "isEmpty"
] @keyword.operator
(integer) @constant.numeric.integer
diff --git a/runtime/queries/ini/highlights.scm b/runtime/queries/ini/highlights.scm
index 95b5e651..70e649a1 100644
--- a/runtime/queries/ini/highlights.scm
+++ b/runtime/queries/ini/highlights.scm
@@ -12,4 +12,4 @@
(setting
(setting_name) @variable.other.member
- ((setting_value) @string)?)
+ (setting_value) @string)
diff --git a/runtime/queries/inko/highlights.scm b/runtime/queries/inko/highlights.scm
index 44138ef4..d5730dce 100644
--- a/runtime/queries/inko/highlights.scm
+++ b/runtime/queries/inko/highlights.scm
@@ -78,7 +78,7 @@
] @keyword.operator
[
- "type"
+ "class"
"trait"
] @keyword.storage.type
diff --git a/runtime/queries/inko/tags.scm b/runtime/queries/inko/tags.scm
deleted file mode 100644
index 42dbcfc9..00000000
--- a/runtime/queries/inko/tags.scm
+++ /dev/null
@@ -1,14 +0,0 @@
-(class
- name: _ @definition.struct)
-
-(trait
- name: _ @definition.interface)
-
-(external_function
- name: _ @definition.function)
-
-(method
- name: _ @definition.function)
-
-(define_constant
- name: _ @definition.constant)
diff --git a/runtime/queries/janet/highlights.scm b/runtime/queries/janet/highlights.scm
index 0314b196..94e4cdce 100644
--- a/runtime/queries/janet/highlights.scm
+++ b/runtime/queries/janet/highlights.scm
@@ -24,11 +24,6 @@
.
(sym_lit) @function)
-;; other calls
-(par_tup_lit
- .
- (sym_lit) @function)
-
;; special forms
(par_tup_lit
.
@@ -60,6 +55,10 @@
(#match? @function.builtin
"^(%|\\*|\\+|\\-|/|<|<=|=|>|>=|\\.break|\\.breakall|\\.bytecode|\\.clear|\\.clearall|\\.disasm|\\.fiber|\\.fn|\\.frame|\\.locals|\\.next|\\.nextc|\\.ppasm|\\.signal|\\.slot|\\.slots|\\.source|\\.stack|\\.step|abstract\\?|accumulate|accumulate2|all|all\\-bindings|all\\-dynamics|any\\?|apply|array|array/clear|array/concat|array/ensure|array/fill|array/insert|array/new|array/new\\-filled|array/peek|array/pop|array/push|array/remove|array/slice|array/trim|array/weak|array\\?|asm|bad\\-compile|bad\\-parse|band|blshift|bnot|boolean\\?|bor|brshift|brushift|buffer|buffer/bit|buffer/bit\\-clear|buffer/bit\\-set|buffer/bit\\-toggle|buffer/blit|buffer/clear|buffer/fill|buffer/format|buffer/from\\-bytes|buffer/new|buffer/new\\-filled|buffer/popn|buffer/push|buffer/push\\-at|buffer/push\\-byte|buffer/push\\-string|buffer/push\\-word|buffer/slice|buffer/trim|buffer\\?|bxor|bytes\\?|cancel|cfunction\\?|cli\\-main|cmp|comp|compare|compare<|compare<=|compare=|compare>|compare>=|compile|complement|count|curenv|debug|debug/arg\\-stack|debug/break|debug/fbreak|debug/lineage|debug/stack|debug/stacktrace|debug/step|debug/unbreak|debug/unfbreak|debugger|debugger\\-on\\-status|dec|deep\\-not=|deep=|defglobal|describe|dictionary\\?|disasm|distinct|div|doc\\*|doc\\-format|doc\\-of|dofile|drop|drop\\-until|drop\\-while|dyn|eflush|empty\\?|env\\-lookup|eprin|eprinf|eprint|eprintf|error|errorf|ev/acquire\\-lock|ev/acquire\\-rlock|ev/acquire\\-wlock|ev/all\\-tasks|ev/call|ev/cancel|ev/capacity|ev/chan|ev/chan\\-close|ev/chunk|ev/close|ev/count|ev/deadline|ev/full|ev/give|ev/give\\-supervisor|ev/go|ev/lock|ev/read|ev/release\\-lock|ev/release\\-rlock|ev/release\\-wlock|ev/rselect|ev/rwlock|ev/select|ev/sleep|ev/take|ev/thread|ev/thread\\-chan|ev/write|eval|eval\\-string|even\\?|every\\?|extreme|false\\?|ffi/align|ffi/call|ffi/calling\\-conventions|ffi/close|ffi/context|ffi/free|ffi/jitfn|ffi/lookup|ffi/malloc|ffi/native|ffi/pointer\\-buffer|ffi/pointer\\-cfunction|ffi/read|ffi/signature|ffi/size|ffi/struct|ffi/trampoline|ffi/write|fiber/can\\-resume\\?|fiber/current|fiber/getenv|fiber/last\\-value|fiber/maxstack|fiber/new|fiber/root|fiber/setenv|fiber/setmaxstack|fiber/status|fiber\\?|file/close|file/flush|file/lines|file/open|file/read|file/seek|file/tell|file/temp|file/write|filter|find|find\\-index|first|flatten|flatten\\-into|flush|flycheck|freeze|frequencies|from\\-pairs|function\\?|gccollect|gcinterval|gcsetinterval|gensym|get|get\\-in|getline|getproto|group\\-by|has\\-key\\?|has\\-value\\?|hash|idempotent\\?|identity|import\\*|in|inc|index\\-of|indexed\\?|int/s64|int/to\\-bytes|int/to\\-number|int/u64|int\\?|interleave|interpose|invert|juxt\\*|keep|keep\\-syntax|keep\\-syntax!|keys|keyword|keyword/slice|keyword\\?|kvs|last|length|lengthable\\?|load\\-image|macex|macex1|maclintf|make\\-env|make\\-image|map|mapcat|marshal|math/abs|math/acos|math/acosh|math/asin|math/asinh|math/atan|math/atan2|math/atanh|math/cbrt|math/ceil|math/cos|math/cosh|math/erf|math/erfc|math/exp|math/exp2|math/expm1|math/floor|math/gamma|math/gcd|math/hypot|math/lcm|math/log|math/log\\-gamma|math/log10|math/log1p|math/log2|math/next|math/pow|math/random|math/rng|math/rng\\-buffer|math/rng\\-int|math/rng\\-uniform|math/round|math/seedrandom|math/sin|math/sinh|math/sqrt|math/tan|math/tanh|math/trunc|max|max\\-of|mean|memcmp|merge|merge\\-into|merge\\-module|min|min\\-of|mod|module/add\\-paths|module/expand\\-path|module/find|module/value|nan\\?|nat\\?|native|neg\\?|net/accept|net/accept\\-loop|net/address|net/address\\-unpack|net/chunk|net/close|net/connect|net/flush|net/listen|net/localname|net/peername|net/read|net/recv\\-from|net/send\\-to|net/server|net/setsockopt|net/shutdown|net/write|next|nil\\?|not|not=|number\\?|odd\\?|one\\?|os/arch|os/cd|os/chmod|os/clock|os/compiler|os/cpu\\-count|os/cryptorand|os/cwd|os/date|os/dir|os/environ|os/execute|os/exit|os/getenv|os/isatty|os/link|os/lstat|os/mkdir|os/mktime|os/open|os/perm\\-int|os/perm\\-string|os/pipe|os/posix\\-exec|os/posix\\-fork|os/proc\\-close|os/proc\\-kill|os/proc\\-wait|os/readlink|os/realpath|os/rename|os/rm|os/rmdir|os/setenv|os/shell|os/sigaction|os/sleep|os/spawn|os/stat|os/strftime|os/symlink|os/time|os/touch|os/umask|os/which|pairs|parse|parse\\-all|parser/byte|parser/clone|parser/consume|parser/eof|parser/error|parser/flush|parser/has\\-more|parser/insert|parser/new|parser/produce|parser/state|parser/status|parser/where|partial|partition|partition\\-by|peg/compile|peg/find|peg/find\\-all|peg/match|peg/replace|peg/replace\\-all|pos\\?|postwalk|pp|prewalk|prin|prinf|print|printf|product|propagate|put|put\\-in|quit|range|reduce|reduce2|repl|require|resume|return|reverse|reverse!|run\\-context|sandbox|scan\\-number|setdyn|signal|slice|slurp|some|sort|sort\\-by|sorted|sorted\\-by|spit|string|string/ascii\\-lower|string/ascii\\-upper|string/bytes|string/check\\-set|string/find|string/find\\-all|string/format|string/from\\-bytes|string/has\\-prefix\\?|string/has\\-suffix\\?|string/join|string/repeat|string/replace|string/replace\\-all|string/reverse|string/slice|string/split|string/trim|string/triml|string/trimr|string\\?|struct|struct/getproto|struct/proto\\-flatten|struct/to\\-table|struct/with\\-proto|struct\\?|sum|symbol|symbol/slice|symbol\\?|table|table/clear|table/clone|table/getproto|table/new|table/proto\\-flatten|table/rawget|table/setproto|table/to\\-struct|table/weak|table/weak\\-keys|table/weak\\-values|table\\?|take|take\\-until|take\\-while|tarray/buffer|tarray/copy\\-bytes|tarray/length|tarray/new|tarray/properties|tarray/slice|tarray/swap\\-bytes|thread/close|thread/current|thread/exit|thread/new|thread/receive|thread/send|thaw|trace|true\\?|truthy\\?|tuple|tuple/brackets|tuple/setmap|tuple/slice|tuple/sourcemap|tuple/type|tuple\\?|type|unmarshal|untrace|update|update\\-in|values|varglobal|walk|warn\\-compile|xprin|xprinf|xprint|xprintf|yield|zero\\?|zipcoll)$"))
+;; other calls
+(par_tup_lit
+ .
+ (sym_lit) @function)
["{" "@{" "}"
"[" "@[" "]"
diff --git a/runtime/queries/janet/indents.scm b/runtime/queries/janet/indents.scm
deleted file mode 100644
index b37c9bb7..00000000
--- a/runtime/queries/janet/indents.scm
+++ /dev/null
@@ -1,28 +0,0 @@
-; aligns forms to the second position if there's two in a line:
-; (-> 10
-; (* 2)
-; (print))
-(par_tup_lit . (sym_lit) @first . (_) @anchor
- (#set! "scope" "tail")
- (#same-line? @first @anchor)
- ; anything that doesn't match should be indented normally
- ; from https://github.com/janet-lang/spork/blob/5601dc883535473bca28351cc6df04ed6c656c65/spork/fmt.janet#L87C12-L93C38
- (#not-match? @first "^(fn|match|with|with-dyns|def|def-|var|var-|defn|defn-|varfn|defmacro|defmacro-|defer|edefer|loop|seq|tabseq|catseq|generate|coro|for|each|eachp|eachk|case|cond|do|defglobal|varglobal|if|when|when-let|when-with|while|with-syms|with-vars|if-let|if-not|if-with|let|short-fn|try|unless|default|forever|upscope|repeat|forv|compwhen|compif|ev/spawn|ev/do-thread|ev/spawn-thread|ev/with-deadline|label|prompt|forever)$")) @align
-
-; everything else should be indented normally:
-;
-; (let [foo 10]
-; (print foo))
-;
-; (foo
-; bar)
-(par_tup_lit . (sym_lit)) @indent
-
-; for `{}` and `[]`:
-; {:foo 10
-; :bar 20}
-(struct_lit . (_) @anchor) @align
-
-; [foo
-; bar]
-(sqr_tup_lit . (_) @anchor) @align
diff --git a/runtime/queries/janet/injections.scm b/runtime/queries/janet/injections.scm
deleted file mode 100644
index 321c90ad..00000000
--- a/runtime/queries/janet/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/janet/rainbows.scm b/runtime/queries/janet/rainbows.scm
deleted file mode 100644
index 07602c94..00000000
--- a/runtime/queries/janet/rainbows.scm
+++ /dev/null
@@ -1,16 +0,0 @@
-[
- (par_arr_lit)
- (par_tup_lit)
- (sqr_arr_lit)
- (sqr_tup_lit)
- (tbl_lit)
- (struct_lit)
- (short_fn_lit)
-] @rainbow.scope
-
-[
- "(" "@(" ")"
- "[" "@[" "]"
- "{" "@{" "}"
- "|"
-] @rainbow.bracket
diff --git a/runtime/queries/java/rainbows.scm b/runtime/queries/java/rainbows.scm
deleted file mode 100644
index 699b899c..00000000
--- a/runtime/queries/java/rainbows.scm
+++ /dev/null
@@ -1,35 +0,0 @@
-[
- (cast_expression)
- (inferred_parameters)
- (dimensions_expr)
- (parenthesized_expression)
- (array_access)
- (argument_list)
- (type_arguments)
- (dimensions)
- (block)
- (switch_block)
- (catch_clause)
- (resource_specification)
- (for_statement)
- (enhanced_for_statement)
- (annotation_argument_list)
- (element_value_array_initializer)
- (module_body)
- (enum_body)
- (type_parameters)
- (class_body)
- (constructor_body)
- (annotation_type_body)
- (annotation_type_element_declaration)
- (interface_body)
- (array_initializer)
- (formal_parameters)
-] @rainbow.scope
-
-[
- "(" ")"
- "{" "}"
- "[" "]"
- "<" ">"
-] @rainbow.bracket
diff --git a/runtime/queries/java/tags.scm b/runtime/queries/java/tags.scm
deleted file mode 100644
index a8465022..00000000
--- a/runtime/queries/java/tags.scm
+++ /dev/null
@@ -1,27 +0,0 @@
-(class_declaration
- name: (identifier) @definition.class)
-
-(interface_declaration
- name: (identifier) @definition.interface)
-
-(record_declaration
- name: (identifier) @definition.class)
-
-(enum_declaration
- name: (identifier) @defintion.class)
-
-(method_declaration
- name: (identifier) @definition.function)
-
-(constructor_declaration
- name: (identifier) @definition.function)
-
-(compact_constructor_declaration
- name: (identifier) @definition.function)
-
-(field_declaration
- declarator: (variable_declarator
- name: (identifier) @definition.constant))
-
-(enum_constant
- name: (identifier) @definition.constant)
diff --git a/runtime/queries/javascript/rainbows.scm b/runtime/queries/javascript/rainbows.scm
deleted file mode 100644
index 04328f09..00000000
--- a/runtime/queries/javascript/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: ecma
diff --git a/runtime/queries/jjconfig/highlights.scm b/runtime/queries/jjconfig/highlights.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/jjconfig/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/jjconfig/indents.scm b/runtime/queries/jjconfig/indents.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/jjconfig/indents.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/jjconfig/injections.scm b/runtime/queries/jjconfig/injections.scm
deleted file mode 100644
index 4cc78fde..00000000
--- a/runtime/queries/jjconfig/injections.scm
+++ /dev/null
@@ -1,25 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
-
-(table
- (bare_key) @table-name (#any-of? @table-name "templates" "template-aliases")
- [(pair (_) ((string) @injection.content (#set! injection.language "jjtemplate"))) (comment)])
-
-(table
- (bare_key) @table-name (#any-of? @table-name "revsets" "revset-aliases")
- [(pair (_) ((string) @injection.content (#set! injection.language "jjrevset"))) (comment)])
-
-; Injections for aliases that contain inline scripts. (see `jj util exec --help`)
-; This pattern currently relies on the language having the same name as its
-; interpreter, which is often the case (sh, bash, python, fish, nu...)
-; It also assumes the interpreter accepts the inline script with the "-c" flag.
-(table
- (bare_key) @table-name (#eq? @table-name "aliases")
- (pair (_) (array .
- (string) @util (#eq? @util "\"util\"") . (string) @exec (#eq? @exec "\"exec\"") . (string) @dd (#eq? @dd "\"--\"") .
- (string) @injection.language .
- ; There are many possibilities to combine "-c" with other short flags, but by
- ; far the most common one should be the "-e" flag, which makes the script
- ; return early when an error occurs.
- (string) @dc (#any-of? @dc "\"-c\"" "\"-ce\"" "\"-ec\"") .
- (string) @injection.content)))
diff --git a/runtime/queries/jjconfig/textobjects.scm b/runtime/queries/jjconfig/textobjects.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/jjconfig/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/jjrevset/highlights.scm b/runtime/queries/jjrevset/highlights.scm
deleted file mode 100644
index 4bd07f5d..00000000
--- a/runtime/queries/jjrevset/highlights.scm
+++ /dev/null
@@ -1,18 +0,0 @@
-(at_op) @variable.builtin
-
-[
- "::" ".."
- (negate_op)
- (union_op) (intersection_op) (difference_op)
-] @operator
-
-["(" ")"] @punctuation.bracket
-"," @punctuation.delimiter
-[(raw_string_literal) (string_literal)] @string
-
-(function ((strict_identifier) @function))
-(function (function_arguments (keyword_argument (strict_identifier) @variable.parameter)))
-
-(primary ((identifier) @variable))
-
-(string_pattern (strict_identifier) @keyword)
diff --git a/runtime/queries/jjtemplate/highlights.scm b/runtime/queries/jjtemplate/highlights.scm
deleted file mode 100644
index 29ed75e6..00000000
--- a/runtime/queries/jjtemplate/highlights.scm
+++ /dev/null
@@ -1,16 +0,0 @@
-(function ((identifier) @function))
-; method calls
-(term (_) ("." @punctuation) ((function ((identifier) @function.method))))
-
-["(" ")"] @punctuation.bracket
-"," @punctuation.delimiter
-
-((identifier) @keyword.control.conditional (#eq? @keyword.control.conditional "if"))
-((identifier) @keyword.control.repeat (#eq? @keyword.control.repeat "for"))
-
-(term ((identifier) @variable))
-
-[(infix_ops) "++"] @operator
-[(string_literal) (raw_string_literal)] @string
-
-(integer_literal) @constant.numeric.integer
diff --git a/runtime/queries/json-ld/highlights.scm b/runtime/queries/json-ld/highlights.scm
deleted file mode 100644
index 8fccb10a..00000000
--- a/runtime/queries/json-ld/highlights.scm
+++ /dev/null
@@ -1,43 +0,0 @@
-; inherits: json
-
-; https://www.w3.org/TR/json-ld/#syntax-tokens-and-keywords
-((string (string_content) @keyword)
- (#any-of? @keyword
- "@base"
- "@container"
- "@context"
- "@direction"
- "@graph"
- "@id"
- "@import"
- "@included"
- "@index"
- "@json"
- "@language"
- "@list"
- "@nest"
- "@none"
- "@prefix"
- "@propagate"
- "@protected"
- "@reverse"
- "@set"
- "@type"
- "@value"
- "@version"
- "@vocab"))
-
-((pair
- value: (string (string_content) @string.special.url))
- (#match? @string.special.url "^https?://"))
-
-((array
- (string (string_content) @string.special.url))
- (#match? @string.special.url "^https?://"))
-
-; https://www.w3.org/TR/json-ld/#dfn-base-direction
-((pair
- key: (string (string_content) @keyword)
- value: (string (string_content) @type.enum.variant))
- (#eq? @keyword "@direction")
- (#any-of? @type.enum.variant "ltr" "rtl"))
diff --git a/runtime/queries/json-ld/indents.scm b/runtime/queries/json-ld/indents.scm
deleted file mode 100644
index 41269219..00000000
--- a/runtime/queries/json-ld/indents.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: json
diff --git a/runtime/queries/json-ld/textobjects.scm b/runtime/queries/json-ld/textobjects.scm
deleted file mode 100644
index 41269219..00000000
--- a/runtime/queries/json-ld/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: json
diff --git a/runtime/queries/json/rainbows.scm b/runtime/queries/json/rainbows.scm
deleted file mode 100644
index 5c21bdcc..00000000
--- a/runtime/queries/json/rainbows.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- (object)
- (array)
-] @rainbow.scope
-
-[
- "[" "]"
- "{" "}"
-] @rainbow.bracket
diff --git a/runtime/queries/jsonc/rainbows.scm b/runtime/queries/jsonc/rainbows.scm
deleted file mode 100644
index 41269219..00000000
--- a/runtime/queries/jsonc/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: json
diff --git a/runtime/queries/jsonnet/injections.scm b/runtime/queries/jsonnet/injections.scm
deleted file mode 100644
index 321c90ad..00000000
--- a/runtime/queries/jsonnet/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/jsx/rainbows.scm b/runtime/queries/jsx/rainbows.scm
deleted file mode 100644
index 38d8f242..00000000
--- a/runtime/queries/jsx/rainbows.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-; inherits: ecma
-
-[
- (jsx_expression)
-] @rainbow.scope
-
-(jsx_opening_element ["<" ">"] @rainbow.bracket) @rainbow.scope
-(jsx_closing_element ["</" ">"] @rainbow.bracket) @rainbow.scope
-(jsx_self_closing_element ["<" "/>"] @rainbow.bracket) @rainbow.scope
diff --git a/runtime/queries/just/highlights.scm b/runtime/queries/just/highlights.scm
index 77ab454a..17fcef43 100644
--- a/runtime/queries/just/highlights.scm
+++ b/runtime/queries/just/highlights.scm
@@ -30,7 +30,7 @@
(identifier) @variable)
(alias
- alias_name: (identifier) @variable)
+ name: (identifier) @variable)
(assignment
name: (identifier) @variable)
@@ -61,9 +61,6 @@
(mod
name: (identifier) @namespace)
-(module_path
- name: (identifier) @namespace)
-
; Paths
(mod
diff --git a/runtime/queries/just/locals.scm b/runtime/queries/just/locals.scm
index b0b40667..f7498b74 100644
--- a/runtime/queries/just/locals.scm
+++ b/runtime/queries/just/locals.scm
@@ -8,7 +8,7 @@
; Definitions
(alias
- alias_name: (identifier) @local.definition.variable)
+ name: (identifier) @local.definition.variable)
(assignment
name: (identifier) @local.definition.variable)
@@ -30,9 +30,6 @@
(function_call
name: (identifier) @local.reference)
-(module_path
- name: (identifier) @local.reference)
-
(recipe_dependency
name: (identifier) @local.reference)
diff --git a/runtime/queries/just/tags.scm b/runtime/queries/just/tags.scm
deleted file mode 100644
index 53e33a65..00000000
--- a/runtime/queries/just/tags.scm
+++ /dev/null
@@ -1,19 +0,0 @@
-; Symbols that can be considered definitions in a Just file.
-
-(alias
- alias_name: (identifier) @definition.function)
-
-(assignment
- name: (identifier) @definition.constant)
-
-(import
- (path) @definition.module)
-
-(mod
- name: (identifier) @definition.module)
-
-(recipe
- name: (identifier) @definition.function)
-
-(unexport
- name: (identifier) @definition.constant)
diff --git a/runtime/queries/kcl/highlights.scm b/runtime/queries/kcl/highlights.scm
deleted file mode 100644
index 61c24ade..00000000
--- a/runtime/queries/kcl/highlights.scm
+++ /dev/null
@@ -1,57 +0,0 @@
-;; Maps AST nodes (left) to highlighting classes (right)
-;; See https://docs.helix-editor.com/themes.html#scopes
-;; for the supported scopes.
-;; Don't forget to run the command `hx --grammar fetch` to fetch the grammars,
-;; and `hx --grammar build` to build any out-of-date grammars.
-
-"fn" @keyword.function
-"return" @keyword.control.return
-"import" @keyword.control.import
-"export" @keyword.control.import
-[
- "if"
- "else"
- ] @keyword.control.conditional
-(identifier) @variable
-
-;; highlight type names
-(type_name
- (identifier) @type
-) @type
-
-(fn_call
- callee: (identifier) @function
- (labeledArg
- label: (identifier) @variable.parameter
- )
-)
-
-
-;; operators
-(binary_operator) @operator
-(prefix_operator) @operator
-
-;; punctuation
-
-; ".." @punctuation.special
-
-"(" @punctuation.bracket
-")" @punctuation.bracket
-"[" @punctuation.bracket
-"]" @punctuation.bracket
-"{" @punctuation.bracket
-"}" @punctuation.bracket
-
-; "." @punctuation.delimiter
-"," @punctuation.delimiter
-; ":" @punctuation.delimiter
-; ";" @punctuation.delimiter
-
-;; literals
-(boolean) @constant.builtin.boolean
-(string) @string
-(number) @constant.numeric
-
-;; comments
-(shebang) @keyword.directive
-(comment) @comment
diff --git a/runtime/queries/kconfig/folds.scm b/runtime/queries/kconfig/folds.scm
deleted file mode 100644
index 980667df..00000000
--- a/runtime/queries/kconfig/folds.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- (config)
- (menuconfig)
- (choice)
- (comment_entry)
- (menu)
- (if)
- (help_text)
-] @fold
diff --git a/runtime/queries/kconfig/highlights.scm b/runtime/queries/kconfig/highlights.scm
deleted file mode 100644
index 8baf3988..00000000
--- a/runtime/queries/kconfig/highlights.scm
+++ /dev/null
@@ -1,86 +0,0 @@
-[
- "source"
- "osource"
- "rsource"
- "orsource"
-] @keyword.control.import
-
-[
- "mainmenu"
- "config"
- "configdefault"
- "menuconfig"
- "choice"
- "endchoice"
- "comment"
- "menu"
- "endmenu"
- "prompt"
- "default"
- "range"
- "help"
- (optional)
- (modules)
-] @keyword
-
-[
- "if"
- "endif"
- "depends on"
- "select"
- "imply"
- "visible if"
-] @keyword.control.conditional
-
-[
- "def_bool"
- "def_tristate"
-] @keyword.function
-
-[
- "||"
- "&&"
- "="
- "!="
- "<"
- ">"
- "<="
- ">="
- "!"
-] @operator
-
-[
- "bool"
- "tristate"
- "int"
- "hex"
- "string"
-] @type.builtin
-
-[ "(" ")" ] @punctuation.bracket
-
-(macro_variable ["$(" ")"] @punctuation.special)
-
-(symbol) @variable
-
-[
- (string)
- (macro_content)
- (text)
-] @string
-
-(config name: (name (symbol) @constant))
-(configdefault name: (name (symbol) @constant))
-(menuconfig name: (name (symbol) @constant))
-(choice name: (name (symbol) @constant))
-
-((symbol) @constant
- (#match? @constant "[A-Z0-9]+"))
-
-(mainmenu name: (string) @markup.heading)
-(comment_entry name: (string) @markup.heading)
-(menu name: (string) @markup.heading)
-
-(source (string) @string.special.url @string.special)
-
-(comment) @comment
diff --git a/runtime/queries/kconfig/indents.scm b/runtime/queries/kconfig/indents.scm
deleted file mode 100644
index c9f411be..00000000
--- a/runtime/queries/kconfig/indents.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-(help_text (text) @align)
-
-[
- (config)
- (menuconfig)
- (choice)
- (comment_entry)
- (menu)
- (if)
- (help_text)
-] @indent
diff --git a/runtime/queries/kconfig/injections.scm b/runtime/queries/kconfig/injections.scm
deleted file mode 100644
index 2f0e58eb..00000000
--- a/runtime/queries/kconfig/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/kconfig/locals.scm b/runtime/queries/kconfig/locals.scm
deleted file mode 100644
index 0bb5b089..00000000
--- a/runtime/queries/kconfig/locals.scm
+++ /dev/null
@@ -1,17 +0,0 @@
-[
- (symbol)
- (string)
-] @local.reference
-
-[
- (config)
- (menuconfig)
- (choice)
- (comment_entry)
- (menu)
- (if)
-] @local.scope
-
-(type_definition (string) @local.definition.type)
-(type_definition (input_prompt (string) @local.definition.type))
-(type_definition_default (expression (string) @local.definition.type))
diff --git a/runtime/queries/kdl/highlights.scm b/runtime/queries/kdl/highlights.scm
index 9ba420a9..78e5acf4 100644
--- a/runtime/queries/kdl/highlights.scm
+++ b/runtime/queries/kdl/highlights.scm
@@ -1,15 +1,5 @@
-[
- (single_line_comment)
- (multi_line_comment)
-
- (node_comment)
- (node_field_comment)
-
- ; these do not show up as comments in Helix as they are also highlighted as
- ; normal nodes
- (node . (node_comment))
- (node_field . (node_field_comment))
-] @comment
+(single_line_comment) @comment
+(multi_line_comment) @comment
(node
(identifier) @variable)
diff --git a/runtime/queries/kdl/injections.scm b/runtime/queries/kdl/injections.scm
deleted file mode 100644
index eaa168e2..00000000
--- a/runtime/queries/kdl/injections.scm
+++ /dev/null
@@ -1,63 +0,0 @@
-; match/exclude regex with regular string
-(node
- (identifier) @_section_name
- (#any-of? @_section_name "window-rule" "layer-rule")
- children: (node_children
- (node
- (identifier) @_node_name
- (#any-of? @_node_name "match" "exclude")
- (node_field
- (prop
- (identifier) @_prop_name
- (#any-of? @_prop_name "app-id" "title" "namespace")
- (value
- (string
- (string_fragment) @injection.content
- (#set! injection.language "regex")
- )
- )
- )
- )
- )
- )
-)
-
-(node
- (identifier) @_section
- (#eq? @_section "binds")
- children: (node_children
- (node
- (identifier)
- children: (node_children
- (node
- (identifier) @_action_name
- (#eq? @_action_name "spawn")
- (node_field
- (value
- (string
- (string_fragment) @_executable
- (#eq? @_executable "fish")
- )
- )
- )
- (node_field
- (value
- (string
- (string_fragment) @_flag
- (#eq? @_flag "-c")
- )
- )
- )
- (node_field
- (value
- (string
- (string_fragment) @injection.content
- (#set! injection.language "fish")
- )
- )
- )
- )
- )
- )
- )
-)
diff --git a/runtime/queries/kdl/tags.scm b/runtime/queries/kdl/tags.scm
deleted file mode 100644
index ec073a3d..00000000
--- a/runtime/queries/kdl/tags.scm
+++ /dev/null
@@ -1,3 +0,0 @@
-(node (identifier) @definition.struct
- children: _
-)
diff --git a/runtime/queries/koka/highlights.scm b/runtime/queries/koka/highlights.scm
index 65eb441d..cec2881f 100644
--- a/runtime/queries/koka/highlights.scm
+++ b/runtime/queries/koka/highlights.scm
@@ -1,51 +1,122 @@
-; Comment
+; Identifiers
-[
- (linecomment)
- (blockcomment)
-] @comment
+(qconid) @namespace
-; Literals
+(qidop) @namespace
-(string) @string
-(char) @constant.character
+(varid) @variable
-(escape) @constant.character.escape
+(conid) @constructor
-(float) @constant.numeric.float
-(int) @constant.numeric.integer
+(puredecl
+ (binder
+ (identifier
+ [(varid) (idop)] @constant)))
-; Delimiters
+; TODO: Highlight vars differently once helix has an appropriate highlight query
+; for that purpose.
-(matchrule "|" @punctuation.delimiter)
+(pparameter
+ (pattern
+ (identifier
+ (varid) @variable.parameter)))
+
+(paramid
+ (identifier
+ (varid) @variable.parameter))
-(tatomic "|" @punctuation.delimiter)
+(typedecl
+ "effect"
+ (varid) @type)
+
+(typeid
+ (varid) @type)
+
+(tbinder
+ (varid) @type)
+
+(typecon
+ (varid) @type)
+
+(qvarid
+ (qid) @namespace)
+
+(modulepath (varid) @namespace)
+
+; Function calls
+
+(appexpr
+ function: (appexpr
+ (atom
+ (qidentifier
+ [
+ (qvarid) @function
+ (qidop) @function
+ (identifier
+ [(varid) (idop)] @function)
+ ])))
+ ["(" (block) (fnexpr)])
+
+(appexpr
+ field: (atom
+ (qidentifier
+ [
+ (qvarid) @function
+ (qidop) @function
+ (identifier
+ [(varid) (idop)] @function)
+ ])))
+
+(appexpr
+ (appexpr
+ field: (atom
+ (qidentifier
+ [
+ (qvarid) @variable
+ (qidop) @variable
+ (identifier
+ [(varid) (idop)] @variable)
+ ])))
+ "[")
[
- ","
- "->"
- "."
- ":"
- "::"
- "<-"
- ";"
-] @punctuation.delimiter
+ "initially"
+ "finally"
+] @function.special
+
+; Function definitions
+
+(puredecl
+ (funid
+ (identifier
+ [(varid) (idop)] @function)))
+
+(fundecl
+ (funid
+ (identifier
+ [(varid) (idop)] @function)))
+
+(operation
+ (identifier
+ [(varid) (idop)] @function))
+
+; Operators
[
- "<"
- ">"
- "("
- ")"
- "["
- "]"
- "{"
- "}"
-] @punctuation.bracket
+ "!"
+ "~"
+ "="
+ ":="
+ (idop)
+ (op)
+ (qidop)
+] @operator
; Keywords
[
"as"
+ "behind"
(externtarget)
"forall"
"handle"
@@ -54,25 +125,22 @@
"infix"
"infixl"
"infixr"
+ "inject"
"mask"
- (behindmod)
- (pub)
+ "other"
+ "pub"
+ "public"
"some"
] @keyword
-; Lazy constructor
-(constructor
- "lazy" @keyword)
-
-; Lazy match
-(matchexpr
- "lazy" @keyword)
-
[
- (con)
+ "con"
+ "control"
"ctl"
"fn"
"fun"
+ "rawctl"
+ "rcontrol"
] @keyword.function
"with" @keyword.control
@@ -87,7 +155,7 @@
[
"import"
- ;"include"
+ "include"
"module"
] @keyword.control.import
@@ -102,130 +170,69 @@
[
"abstract"
+ "co"
+ "extend"
"extern"
+ "fbip"
"final"
- (inlinemod)
- (externinline)
- (typemod)
- (structmod)
- (effectmod)
+ "fip"
+ "inline"
+ "linear"
"named"
- (override)
- (controlmod)
- ;"scoped" ; scoped is actually an effect modifier, but it is not in the current parser.
- (tailmod)
+ "noinline"
+ "open"
+ "override"
+ "raw"
+ "rec"
+ "ref"
+ "reference"
+ "scoped"
+ "tail"
+ "value"
] @keyword.storage.modifier
-(fipmod
- ["fip" "fbip"] @keyword.storage.modifier)
-
"return" @keyword.control.return
-; Operators
-
-[
- "!"
- "~"
- "="
- ":="
- (idop)
- (op)
- (qidop)
-] @operator
-
-(modulepath) @namespace
-
-; Variables
-
-(pattern
- (identifier
- (varid) @variable))
-
-(paramid
- (identifier
- (varid) @variable.parameter))
-
-(pparameter
- (pattern
- (identifier
- (varid) @variable.parameter)))
-
-(pparameter
- (qimplicit) @variable.parameter)
-
-(puredecl
- (binder
- (qidentifier) @constant))
-
-; Named arguments
-(argument
- [(identifier) (qimplicit)] @variable.parameter
- "="
- (expr))
-
-; Types
-
-(typecon
- [(varid) (qvarid)] @type)
-
-(tbinder
- (varid) @type)
-
-(typeid
- (varid) @type)
-
-(typedecl
- "effect"
- (varid) @type)
-
-; Function definitions
-
-(fundecl
- (identifier) @function)
-
-(puredecl
- (qidentifier) @function)
-
-(externdecl
- (qidentifier) @function)
-
-; Effect definitions/usages
+; Delimiters
-(opclause
- (qidentifier) @function)
+(matchrule "|" @punctuation.delimiter)
-(operation
- (identifier) @function)
-
+[
+ ","
+ "->"
+ "."
+ ":"
+ "::"
+ "<-"
+ ";"
+] @punctuation.delimiter
-; Function calls
+[
+ "<"
+ ">"
+ "("
+ ")"
+ "["
+ "]"
+ "{"
+ "}"
+] @punctuation.bracket
-(opexpr
- (atom
- (name) @function)
- .
- [
- call: "(" (arguments)? ")"
- trailing_lambda: [(block) (fnexpr)]
- ])
+; Literals
-(opexpr
- (atom)
- (name) @function)
+[
+ (string)
+ (char)
+] @string
-(ntlexpr
- (atom
- (name) @function)
- .
- ("(" (arguments)? ")"))
+(escape) @constant.character.escape
-(ntlexpr
- (atom)
- (name) @function)
+(float) @constant.numeric.float
+(int) @constant.numeric.integer
-[(conid) (qconid)] @constructor
+; Comment
[
- "initially"
- "finally"
-] @function.builtin
+ (linecomment)
+ (blockcomment)
+] @comment
diff --git a/runtime/queries/koka/indents.scm b/runtime/queries/koka/indents.scm
index e496f30b..6045373d 100644
--- a/runtime/queries/koka/indents.scm
+++ b/runtime/queries/koka/indents.scm
@@ -1,9 +1,9 @@
[
- (opexpr [index: (arguments) call: (arguments)]) ; Applications.
+ (appexpr ["[" "("]) ; Applications.
(atom ["[" "("]) ; Lists and tuples.
+ (program (moduledecl "{")) ; Braced module declarations.
(funbody)
(block)
- (constructor)
(handlerexpr)
(opclausex)
] @indent
diff --git a/runtime/queries/koka/locals.scm b/runtime/queries/koka/locals.scm
new file mode 100644
index 00000000..e654f70c
--- /dev/null
+++ b/runtime/queries/koka/locals.scm
@@ -0,0 +1,25 @@
+(modulebody) @local.scope
+
+(block) @local.scope
+
+(pparameter
+ (pattern
+ (identifier
+ (varid) @local.definition.variable.parameter)))
+
+(puredecl
+ (funid
+ (identifier
+ (varid) @local.definition.function)))
+
+(puredecl
+ (binder
+ (identifier
+ (varid) @local.definition.function)))
+
+(decl
+ (binder
+ (identifier
+ (varid) @local.definition.function)))
+
+(identifier (varid) @local.reference)
diff --git a/runtime/queries/kotlin/tags.scm b/runtime/queries/kotlin/tags.scm
deleted file mode 100644
index b6bb3039..00000000
--- a/runtime/queries/kotlin/tags.scm
+++ /dev/null
@@ -1,12 +0,0 @@
-(class_declaration
- (type_identifier) @definition.class)
-
-(object_declaration
- "object" (type_identifier) @definition.class)
-
-(function_declaration
- (simple_identifier) @definition.function)
-
-(property_declaration
- (variable_declaration
- (simple_identifier) @definition.constant))
diff --git a/runtime/queries/koto/highlights.scm b/runtime/queries/koto/highlights.scm
index bdc01440..de0971b1 100644
--- a/runtime/queries/koto/highlights.scm
+++ b/runtime/queries/koto/highlights.scm
@@ -5,13 +5,11 @@
"*"
"/"
"%"
- "^"
"+="
"-="
"*="
"/="
"%="
- "^="
"=="
"!="
"<"
@@ -101,17 +99,11 @@
(export
(identifier) @namespace)
-(chain
- start: (identifier) @function)
-
-(chain
- (lookup (identifier)) @variable.other.member)
-
(call
- function: (identifier)) @function
+ function: (identifier) @function.method)
-(call_arg
- (identifier) @variable.other.member)
+(chain
+ lookup: (identifier) @variable.other.member)
[
(true)
@@ -147,10 +139,13 @@
(self) @variable.builtin
-(type
- _ @type)
+(variable
+ type: (identifier) @type)
(arg
(_ (identifier) @variable.parameter))
(ellipsis) @variable.parameter
+
+(function
+ output_type: (identifier) @type)
diff --git a/runtime/queries/koto/rainbows.scm b/runtime/queries/koto/rainbows.scm
deleted file mode 100644
index 2e2dab5e..00000000
--- a/runtime/queries/koto/rainbows.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-[
- (args)
- (call_args)
- (index)
- (list)
- (map)
- (parenthesized)
- (tuple)
-] @rainbow.scope
-
-["(" ")" "[" "]" "{" "}"] @rainbow.bracket
diff --git a/runtime/queries/koto/textobjects.scm b/runtime/queries/koto/textobjects.scm
index c997b5cf..15455689 100644
--- a/runtime/queries/koto/textobjects.scm
+++ b/runtime/queries/koto/textobjects.scm
@@ -11,6 +11,10 @@
(call_args
((call_arg) @parameter.inside . ","? @parameter.around) @parameter.around)
+(chain
+ call: (tuple
+ ((element) @parameter.inside . ","? @parameter.around) @parameter.around))
+
(map
((entry_inline) @entry.inside . ","? @entry.around) @entry.around)
diff --git a/runtime/queries/lua/injections.scm b/runtime/queries/lua/injections.scm
index 8f8c174a..fca94d58 100644
--- a/runtime/queries/lua/injections.scm
+++ b/runtime/queries/lua/injections.scm
@@ -1,29 +1,3 @@
((comment) @injection.content
(#set! injection.language "comment")
(#set! injection.include-children))
-
-; string.match("123", "%d+")
-(function_call
- (dot_index_expression
- field: (identifier) @_method
- (#any-of? @_method "find" "match" "gmatch" "gsub"))
- arguments: (arguments
- .
- (_)
- .
- (string
- content: (string_content) @injection.content
- (#set! injection.language "luap")
- (#set! injection.include-children))))
-
-; ("123"):match("%d+")
-(function_call
- (method_index_expression
- method: (identifier) @_method
- (#any-of? @_method "find" "match" "gmatch" "gsub"))
- arguments: (arguments
- .
- (string
- content: (string_content) @injection.content
- (#set! injection.language "luap")
- (#set! injection.include-children))))
diff --git a/runtime/queries/lua/rainbows.scm b/runtime/queries/lua/rainbows.scm
deleted file mode 100644
index 3c97fc72..00000000
--- a/runtime/queries/lua/rainbows.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- (table_constructor)
- (bracket_index_expression)
- (parameters)
- (arguments)
- (field)
-] @rainbow.scope
-
-["(" ")" "[" "]" "{" "}"] @rainbow.bracket
diff --git a/runtime/queries/luap/highlights.scm b/runtime/queries/luap/highlights.scm
deleted file mode 100644
index e01cd226..00000000
--- a/runtime/queries/luap/highlights.scm
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- (anchor_begin)
- (anchor_end)
-] @punctuation.delimiter
-
-(pattern
- (character
- "." @variable.builtin))
-
-[
- "["
- "]"
- "("
- ")"
-] @punctuation.bracket
-
-[
- (zero_or_more)
- (shortest_zero_or_more)
- (one_or_more)
- (zero_or_one)
-] @operator
-
-(range
- from: (character) @constant
- "-" @operator
- to: (character) @constant)
-
-(set
- (character) @constant)
-
-(negated_set
- (character) @constant)
-
-(class) @constant.character.escape
-
-(class
- "%" @string.regexp
- (escape_char) @string.regexp)
-
-(negated_set
- "^" @operator)
-
-(balanced_match
- (character) @variable.parameter)
diff --git a/runtime/queries/luau/injections.scm b/runtime/queries/luau/injections.scm
index 86d4196e..321c90ad 100644
--- a/runtime/queries/luau/injections.scm
+++ b/runtime/queries/luau/injections.scm
@@ -1,26 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))
-
-; string.match("123", "%d+")
-(call_stmt
- invoked: (var
- table_name: (name)
- (key
- field_name: (name) @_method))
- (arglist
- .
- (_)
- .
- (string) @injection.content)
- (#any-of? @_method "find" "format" "match" "gmatch" "gsub")
- (#set! injection.language "luap"))
-
-; ("123"):match("%d+")
-(call_stmt
- method_table: (_)
- method_name: (name) @_method
- (arglist
- .
- (string) @injection.content)
- (#any-of? @_method "find" "format" "match" "gmatch" "gsub")
- (#set! injection.language "luap"))
diff --git a/runtime/queries/markdown/tags.scm b/runtime/queries/markdown/tags.scm
deleted file mode 100644
index 38a69718..00000000
--- a/runtime/queries/markdown/tags.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-; TODO: have symbol types for markup?
-(atx_heading) @definition.class
diff --git a/runtime/queries/miseconfig/highlights.scm b/runtime/queries/miseconfig/highlights.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/miseconfig/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/miseconfig/indents.scm b/runtime/queries/miseconfig/indents.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/miseconfig/indents.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/miseconfig/injections.scm b/runtime/queries/miseconfig/injections.scm
deleted file mode 100644
index 01da52cb..00000000
--- a/runtime/queries/miseconfig/injections.scm
+++ /dev/null
@@ -1,34 +0,0 @@
-; inherits: toml
-
-; This part covers simple tasks where only the command(s) to run
-; are specified as a string or array of strings, e.g.
-;
-; [tasks]
-; simple = "simple-command arg1 arg2"
-; many-simple = [
-; "simple-command-1",
-; "simple-command-2",
-; ]
-;
-(table
- (bare_key) @table-name (#eq? @table-name "tasks")
- (pair (_) [
- ((string) @injection.shebang @injection.content (#set! injection.language "bash"))
- ((array (string) @injection.shebang @injection.content (#set! injection.language "bash")))
- ])
-)
-
-; This part covers advanced tasks which are specified as a table.
-; Only the "run" key is subject to injections.
-;
-; [tasks.foo]
-; description = "This is regular text."
-; run = "this is bash"
-;
-(table
- (dotted_key (bare_key) @table-name (#eq? @table-name "tasks"))
- (pair (bare_key) @key-name (#eq? @key-name "run") [
- ((string) @injection.shebang @injection.content (#set! injection.language "bash"))
- ((array (string) @injection.shebang @injection.content (#set! injection.language "bash")))
- ])
-)
diff --git a/runtime/queries/miseconfig/textobjects.scm b/runtime/queries/miseconfig/textobjects.scm
deleted file mode 100644
index b55e36da..00000000
--- a/runtime/queries/miseconfig/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: toml
diff --git a/runtime/queries/nearley/highlights.scm b/runtime/queries/nearley/highlights.scm
deleted file mode 100644
index 7cc0b6e4..00000000
--- a/runtime/queries/nearley/highlights.scm
+++ /dev/null
@@ -1,43 +0,0 @@
-
-(comment) @comment.line
-
-(string) @string
-(string "i" @keyword.modifier)
-
-(identifier) @variable.other
-(rule_name (identifier) @function)
-(rule (generic (identifier) @function))
-
-(directive_name) @keyword.directive
-(directive_value (identifier) @constant)
-(directive_value (string) @string)
-
-(token) @constant
-
-(generic
- "<" @punctuation.bracket
- (identifier) @type.parameter
- ">" @punctuation.bracket
-)
-
-(group "(" @punctuation.bracket ")" @punctuation.bracket)
-
-(charset) @string.regexp
-(wildcard) @keyword
-
-(quantifier) @function.builtin
-
-(macro_name
- "[" @punctuation.bracket
- (identifier) @variable.parameter
- "]" @punctuation.bracket
-)
-(macro_arg) @variable.parameter
-
-(rule "->" @operator)
-(rule_body "|" @operator)
-
-(cont_block "@{%" @keyword.directive "%}" @keyword.directive)
-(cont_inline "{%" @keyword.directive "%}" @keyword.directive)
-
-(ifdef) @keyword.directive
diff --git a/runtime/queries/nearley/injections.scm b/runtime/queries/nearley/injections.scm
deleted file mode 100644
index d8168304..00000000
--- a/runtime/queries/nearley/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((cont) @injection.content
- (#set! injection.language "javascript"))
diff --git a/runtime/queries/nearley/rainbows.scm b/runtime/queries/nearley/rainbows.scm
deleted file mode 100644
index 5de4f8e1..00000000
--- a/runtime/queries/nearley/rainbows.scm
+++ /dev/null
@@ -1,3 +0,0 @@
-((group) @rainbow.scope)
-
-["(" ")"] @rainbow.bracket
diff --git a/runtime/queries/nix/injections.scm b/runtime/queries/nix/injections.scm
index f9e0267b..ce53d39e 100644
--- a/runtime/queries/nix/injections.scm
+++ b/runtime/queries/nix/injections.scm
@@ -255,18 +255,4 @@
(#set! injection.combined))
((indented_string_expression (string_fragment) @injection.shebang @injection.content)
- (#set! injection.combined))
-
-; string contents of lib.literalExpression is nix code
-((apply_expression
- function: [
- (select_expression) ; `lib.literalExpression`
- (variable_expression) ; `literalExpression` this is the case when the symbol is brougth into scope e.g. `let inherit (lib) literalExpression; in`
- ] @_func
- argument: [
- (indented_string_expression (string_fragment) @injection.content) ; lib.literalExpression ''...''
- (string_expression (string_fragment) @injection.content) ; lib.literalExpression "..."
- ])
- (#any-of? @_func "lib.literalExpression" "literalExpression")
- (#set! injection.language "nix")
- (#set! injection.combined))
+ (#set! injection.combined)) \ No newline at end of file
diff --git a/runtime/queries/nix/rainbows.scm b/runtime/queries/nix/rainbows.scm
deleted file mode 100644
index 2df51393..00000000
--- a/runtime/queries/nix/rainbows.scm
+++ /dev/null
@@ -1,17 +0,0 @@
-[
- (formals)
- (parenthesized_expression)
- (attrset_expression)
- (let_attrset_expression)
- (rec_attrset_expression)
- (inherit_from)
- (interpolation)
- (list_expression)
-] @rainbow.scope
-
-[
- "${"
- "{" "}"
- "(" ")"
- "[" "]"
-] @rainbow.bracket
diff --git a/runtime/queries/nu/folds.scm b/runtime/queries/nu/folds.scm
deleted file mode 100644
index 53607745..00000000
--- a/runtime/queries/nu/folds.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-[
- (attribute_list)
- (block)
- (command_list)
- (parameter_bracks)
- (record_body)
- (val_list)
- (val_table)
- (val_closure)
-] @fold
diff --git a/runtime/queries/nu/highlights.scm b/runtime/queries/nu/highlights.scm
index 27583f2f..66a30584 100644
--- a/runtime/queries/nu/highlights.scm
+++ b/runtime/queries/nu/highlights.scm
@@ -1,410 +1,284 @@
-; ---
-; keywords
+;;; ---
+;;; keywords
[
- "let"
- "mut"
- "const"
-] @keyword
+ "def"
+ "alias"
+ "export-env"
+ "export"
+ "extern"
+ "module"
-[
- "if"
- "else"
- "match"
-] @keyword.control.conditional
+ "let"
+ "let-env"
+ "mut"
+ "const"
-[
- "loop"
- "while"
-] @keyword.control.repeat
+ "hide-env"
-"def" @keyword.function
+ "source"
+ "source-env"
-[
- "try"
- "catch"
- "error"
-] @keyword.control.exception
+ "overlay"
+ "register"
-[
- "module"
- "use"
-] @keyword.control.import
+ "loop"
+ "while"
+ "error"
-[
- "alias"
- "export-env"
- "export"
- "extern"
-] @keyword.storage.modifier
+ "do"
+ "if"
+ "else"
+ "try"
+ "catch"
+ "match"
-(decl_use
- "use" @keyword.control.import)
+ "break"
+ "continue"
+ "return"
+
+] @keyword
+
+(hide_mod "hide" @keyword)
+(decl_use "use" @keyword)
(ctrl_for
- "for" @keyword.control.repeat
- "in" @keyword.control.repeat)
+ "for" @keyword
+ "in" @keyword
+)
+(overlay_list "list" @keyword.storage.modifier)
+(overlay_hide "hide" @keyword.storage.modifier)
+(overlay_new "new" @keyword.storage.modifier)
+(overlay_use
+ "use" @keyword.storage.modifier
+ "as" @keyword
+)
+(ctrl_error "make" @keyword.storage.modifier)
-; ---
-; literals
+;;; ---
+;;; literals
(val_number) @constant.numeric
-
(val_duration
- unit: _ @variable.parameter)
-
+ unit: [
+ "ns" "µs" "us" "ms" "sec" "min" "hr" "day" "wk"
+ ] @variable.parameter
+)
(val_filesize
- unit: _ @variable.parameter)
-
+ unit: [
+ "b" "B"
+
+ "kb" "kB" "Kb" "KB"
+ "mb" "mB" "Mb" "MB"
+ "gb" "gB" "Gb" "GB"
+ "tb" "tB" "Tb" "TB"
+ "pb" "pB" "Pb" "PB"
+ "eb" "eB" "Eb" "EB"
+
+ "kib" "kiB" "kIB" "kIb" "Kib" "KIb" "KIB"
+ "mib" "miB" "mIB" "mIb" "Mib" "MIb" "MIB"
+ "gib" "giB" "gIB" "gIb" "Gib" "GIb" "GIB"
+ "tib" "tiB" "tIB" "tIb" "Tib" "TIb" "TIB"
+ "pib" "piB" "pIB" "pIb" "Pib" "PIb" "PIB"
+ "eib" "eiB" "eIB" "eIb" "Eib" "EIb" "EIB"
+ ] @variable.parameter
+)
(val_binary
- [
- "0b"
- "0o"
- "0x"
- ] @constant.numeric
- "[" @punctuation.bracket
- digit: [
- "," @punctuation.delimiter
- (hex_digit) @constant.numeric
- ]
- "]" @punctuation.bracket) @constant.numeric
-
-(val_bool) @constant.builtin.boolean
-
+ [
+ "0b"
+ "0o"
+ "0x"
+ ] @constant.numeric
+ "[" @punctuation.bracket
+ digit: [
+ "," @punctuation.delimiter
+ (hex_digit) @constant.number
+ ]
+ "]" @punctuation.bracket
+) @constant.numeric
+(val_bool) @constant.builtin
(val_nothing) @constant.builtin
-
(val_string) @string
-
-arg_str: (val_string) @variable.parameter
-
-file_path: (val_string) @variable.parameter
-
-(val_date) @constant.numeric
-
+(val_date) @constant.number
(inter_escape_sequence) @constant.character.escape
-
(escape_sequence) @constant.character.escape
-
-(val_interpolated
- [
+(val_interpolated [
"$\""
"$\'"
"\""
"\'"
- ] @string)
-
+] @string)
(unescaped_interpolated_content) @string
-
(escaped_interpolated_content) @string
+(expr_interpolated ["(" ")"] @variable.parameter)
-(expr_interpolated
- [
- "("
- ")"
- ] @variable.parameter)
-
-(raw_string_begin) @punctuation.special
-
-(raw_string_end) @punctuation.special
-
-; ---
-; operators
-(expr_binary
- opr: _ @operator)
-
-(where_predicate
- opr: _ @operator)
-
-(assignment
- [
+;;; ---
+;;; operators
+(expr_binary [
+ "+"
+ "-"
+ "*"
+ "/"
+ "mod"
+ "//"
+ "++"
+ "**"
+ "=="
+ "!="
+ "<"
+ "<="
+ ">"
+ ">="
+ "=~"
+ "!~"
+ "and"
+ "or"
+ "xor"
+ "bit-or"
+ "bit-xor"
+ "bit-and"
+ "bit-shl"
+ "bit-shr"
+ "in"
+ "not-in"
+ "starts-with"
+ "ends-with"
+] @operator )
+
+(where_command [
+ "+"
+ "-"
+ "*"
+ "/"
+ "mod"
+ "//"
+ "++"
+ "**"
+ "=="
+ "!="
+ "<"
+ "<="
+ ">"
+ ">="
+ "=~"
+ "!~"
+ "and"
+ "or"
+ "xor"
+ "bit-or"
+ "bit-xor"
+ "bit-and"
+ "bit-shl"
+ "bit-shr"
+ "in"
+ "not-in"
+ "starts-with"
+ "ends-with"
+] @operator)
+
+(assignment [
"="
"+="
"-="
"*="
"/="
"++="
- ] @operator)
+] @operator)
-(expr_unary
- [
- "not"
- "-"
- ] @operator)
+(expr_unary ["not" "-"] @operator)
-(val_range
- [
+(val_range [
".."
"..="
"..<"
- ] @operator)
+] @operator)
-[
- "=>"
- "="
- "|"
-] @operator
+["=>" "=" "|"] @operator
[
- "o>"
- "out>"
- "e>"
- "err>"
- "e+o>"
- "err+out>"
- "o+e>"
- "out+err>"
- "o>>"
- "out>>"
- "e>>"
- "err>>"
- "e+o>>"
- "err+out>>"
- "o+e>>"
- "out+err>>"
- "e>|"
- "err>|"
- "e+o>|"
- "err+out>|"
- "o+e>|"
- "out+err>|"
-] @operator
-
-; ---
-; punctuation
+ "o>" "out>"
+ "e>" "err>"
+ "e+o>" "err+out>"
+ "o+e>" "out+err>"
+] @special
+
+;;; ---
+;;; punctuation
[
- ","
- ";"
-] @punctuation.special
-
-(param_long_flag
- "--" @punctuation.delimiter)
-
-(long_flag
- "--" @punctuation.delimiter)
-
-(short_flag
- "-" @punctuation.delimiter)
-
-(long_flag
- "=" @punctuation.special)
-
-(short_flag
- "=" @punctuation.special)
-
-(param_short_flag
- "-" @punctuation.delimiter)
-
-(param_rest
- "..." @punctuation.delimiter)
-
-(param_type
- ":" @punctuation.special)
-
-(param_value
- "=" @punctuation.special)
-
-(param_cmd
- "@" @punctuation.special)
-
-(attribute
- "@" @punctuation.special)
-
-(param_opt
- "?" @punctuation.special)
-
-(returns
- "->" @punctuation.special)
+ ","
+ ";"
+] @punctuation.delimiter
+
+(param_short_flag "-" @punctuation.delimiter)
+(param_long_flag ["--"] @punctuation.delimiter)
+(long_flag ["--"] @punctuation.delimiter)
+(param_rest "..." @punctuation.delimiter)
+(param_type [":"] @punctuation.special)
+(param_value ["="] @punctuation.special)
+(param_cmd ["@"] @punctuation.special)
+(param_opt ["?"] @punctuation.special)
[
- "("
- ")"
- "{"
- "}"
- "["
- "]"
- "...["
- "...("
- "...{"
+ "(" ")"
+ "{" "}"
+ "[" "]"
] @punctuation.bracket
(val_record
- (record_entry
- ":" @punctuation.delimiter))
-
-key: (identifier) @property
-
-; ---
-; identifiers
+ (record_entry ":" @punctuation.delimiter))
+;;; ---
+;;; identifiers
(param_rest
- name: (_) @variable.parameter)
-
+ name: (_) @variable.parameter)
(param_opt
- name: (_) @variable.parameter)
-
+ name: (_) @variable.parameter)
(parameter
- param_name: (_) @variable.parameter)
-
+ param_name: (_) @variable.parameter)
(param_cmd
- (cmd_identifier) @string)
-
-(param_long_flag
- (long_flag_identifier) @attribute)
-
-(param_short_flag
- (param_short_flag_identifier) @attribute)
-
-(attribute
- (attribute_identifier) @attribute)
-
-(short_flag
- (short_flag_identifier) @attribute)
+ (cmd_identifier) @string)
+(param_long_flag) @variable.parameter
+(param_short_flag) @variable.parameter
-(long_flag_identifier) @attribute
+(short_flag) @variable.parameter
+(long_flag) @variable.parameter
-(scope_pattern
- (wild_card) @function)
+(scope_pattern [(wild_card) @function])
(cmd_identifier) @function
-(decl_def . "def"
- (val_string
- (string_content) @function
- )
-)
-
-; generated with Nu 0.107.0
-; help commands
-; | where $it.command_type == built-in and $it.category != core
-; | each {$'"($in.name | split row " " | $in.0)"'}
-; | uniq
-; | str join ' '
-(command
- head: (cmd_identifier) @function.builtin
- (#any-of? @function.builtin
- "all" "ansi" "any" "append" "ast" "bits" "bytes" "cal" "cd" "char" "chunk-by" "chunks" "clear" "collect" "columns" "compact" "complete" "config" "cp" "date" "debug" "decode" "default" "detect" "drop" "du" "each" "encode" "enumerate" "every" "exec" "exit" "explain" "explore" "fill" "filter" "find" "first" "flatten" "format" "from" "generate" "get" "glob" "grid" "group-by" "hash" "headers" "histogram" "history" "http" "input" "insert" "inspect" "interleave" "into" "is-empty" "is-not-empty" "is-terminal" "items" "job" "join" "keybindings" "kill" "last" "length" "let-env" "lines" "load-env" "ls" "math" "merge" "metadata" "mkdir" "mktemp" "move" "mv" "nu-check" "nu-highlight" "open" "panic" "par-each" "parse" "path" "plugin" "port" "prepend" "print" "ps" "query" "random" "reduce" "reject" "rename" "reverse" "rm" "roll" "rotate" "run-external" "save" "schema" "select" "seq" "shuffle" "skip" "sleep" "slice" "sort" "sort-by" "split" "start" "stor" "str" "sys" "table" "take" "tee" "term" "timeit" "to" "touch" "transpose" "tutor" "ulimit" "uname" "uniq" "uniq-by" "update" "upsert" "url" "values" "version" "view" "watch" "which" "whoami" "window" "with-env" "wrap" "zip"))
-
-(command
- head: (cmd_identifier) @keyword.control.repeat
- (#any-of? @keyword.control.repeat "break" "continue" "return"))
-
-(command
- head: (cmd_identifier) @keyword
- (#any-of? @keyword "do" "source" "source-env" "hide" "hide-env"))
-
(command
- head: (cmd_identifier) @keyword
- .
- arg_str: (val_string) @keyword.control.import
- (#any-of? @keyword "overlay" "error"))
-
-(command
- head: (cmd_identifier) @cmd
- arg_str: (val_string) @keyword
- (#eq? @cmd "overlay")
- (#eq? @keyword "as"))
-
-(command
- "^" @punctuation.delimiter
- head: (_) @function)
-
-"where" @function.builtin
+ "^" @punctuation.delimiter
+ head: (_) @function
+)
-(where_predicate
- [
- "?"
- "!"
- ] @punctuation.delimiter)
+"where" @function
(path
- [
- "."
- "?"
- "!"
- ]? @punctuation.delimiter) @variable.parameter
-
-(stmt_let
- (identifier) @variable)
+ ["." "?"] @punctuation.delimiter
+) @variable.parameter
-(val_variable
- "$"? @punctuation.special
- "...$"? @punctuation.special
+(val_variable
+ "$" @variable.parameter
[
- (identifier) @variable
- "in" @special
- "nu" @namespace
- "env" @constant
- ]) @none
-
-(val_cellpath
- "$" @punctuation.special)
-
-(record_entry
- ":" @punctuation.special)
-
-; ---
-; types
-(flat_type) @type
-
+ (identifier) @namespace
+ "in"
+ "nu"
+ "env"
+ "nothing"
+ ] @special
+)
+;;; ---
+;;; types
+(flat_type) @type.builtin
(list_type
- "list" @type.enum
- [
- "<"
- ">"
- ] @punctuation.bracket)
-
+ "list" @type.enum
+ ["<" ">"] @punctuation.bracket
+)
(collection_type
- [
- "record"
- "table"
- ] @type.enum
- "<" @punctuation.bracket
- key: (_) @variable.parameter
- [
- ","
- ":"
- ] @punctuation.special
- ">" @punctuation.bracket)
-
-(composite_type
- "oneof" @type.enum
- [
- "<"
- ">"
- ] @punctuation.bracket)
-
-[(comment) (shebang)] @comment
-
-((comment)+ @comment.documentation
- .
- (decl_def))
-
-(parameter
- (comment) @comment.documentation)
-
-(command
- head: ((cmd_identifier) @function.builtin
- (#match? @function.builtin "^\\s*(find|parse|split|str)$"))
- flag: (_
- name: (_) @attribute
- (#any-of? @attribute "r" "regex"))
- .
- arg: (_
- (string_content) @string.regexp))
-
-(_
- opr: [
- "=~"
- "!~"
- "like"
- "not-like"
- ]
- rhs: (_
- (string_content) @string.regexp))
+ ["record" "table"] @type.enum
+ "<" @punctuation.bracket
+ key: (_) @variable.parameter
+ ["," ":"] @punctuation.delimiter
+ ">" @punctuation.bracket
+)
-(command
- head: ((_) @function
- (#any-of? @function "nu" "$nu.current-exe"))
- flag: (_
- name: (_) @attribute
- (#any-of? @attribute "c" "e" "commands" "execute"))
- .
- arg: (_
- (string_content) @string.code))
+(shebang) @comment
+(comment) @comment
diff --git a/runtime/queries/nu/indents.scm b/runtime/queries/nu/indents.scm
deleted file mode 100644
index 5a1f109b..00000000
--- a/runtime/queries/nu/indents.scm
+++ /dev/null
@@ -1,18 +0,0 @@
-[
- (expr_parenthesized)
- (parameter_bracks)
- (ctrl_match)
-
- (val_record)
- (val_list)
- (val_closure)
- (val_table)
-
- (block)
-] @indent
-
-[
- "}"
- "]"
- ")"
-] @outdent
diff --git a/runtime/queries/nu/injections.scm b/runtime/queries/nu/injections.scm
index 8005ffdc..30804d65 100644
--- a/runtime/queries/nu/injections.scm
+++ b/runtime/queries/nu/injections.scm
@@ -1,50 +1,2 @@
((comment) @injection.content
- (#set! injection.language "comment"))
-
-(command
- head: ((cmd_identifier) @_cmd
- (#match? @_cmd "^\\s*(find|parse|split|str)$"))
- flag: (_
- name: (_) @_flag
- (#any-of? @_flag "r" "regex"))
- .
- arg: (_
- (string_content) @injection.content
- (#set! injection.language "regex")))
-
-(_
- opr: [
- "=~"
- "!~"
- "like"
- "not-like"
- ]
- rhs: (_
- (string_content) @injection.content
- (#set! injection.language "regex")))
-
-(command
- head: (_) @_cmd
- (#any-of? @_cmd "nu" "$nu.current-exe")
- flag: (_
- name: (_) @_flag
- (#any-of? @_flag "c" "e" "commands" "execute"))
- .
- arg: (_
- (string_content) @injection.content
- (#set! injection.language "nu")))
-
-(command
- head: (cmd_identifier) @_command (#any-of? @_command "jq" "jaq")
- .
- arg: (_ (string_content) @injection.content)
- (#set! injection.language "jq")
-)
-
-(command
- head: (cmd_identifier) @_command (#eq? @_command "fish")
- flag: (short_flag "-") @_flag (#match? @_flag "^-.*c$")
- .
- arg: (_ (string_content) @injection.content)
- (#set! injection.language "fish")
-)
+ (#set! injection.language "comment")) \ No newline at end of file
diff --git a/runtime/queries/nu/textobjects.scm b/runtime/queries/nu/textobjects.scm
deleted file mode 100644
index ddf92ee2..00000000
--- a/runtime/queries/nu/textobjects.scm
+++ /dev/null
@@ -1,78 +0,0 @@
-; (stmt_let) @assignment.outer
-
-; (stmt_mut) @assignment.outer
-
-; (stmt_const) @assignment.outer
-
-; (stmt_let
-; value: (_) @assignment.inner)
-
-; (stmt_mut
-; value: (_) @assignment.inner)
-
-; (stmt_const
-; value: (_) @assignment.inner)
-
-; (block) @block.outer
-
-(comment) @comment.around
-
-; (pipeline) @pipeline.outer
-
-; (pipe_element) @pipeline.inner
-
-(decl_def) @function.around
-
-(decl_def
- body: (_) @function.inside)
-
-; (ctrl_for) @loop.outer
-
-; (ctrl_loop) @loop.outer
-
-; (ctrl_while) @loop.outer
-
-; (ctrl_for
-; body: (_) @loop.inner)
-
-; (ctrl_loop
-; body: (_) @loop.inner)
-
-; (ctrl_while
-; body: (_) @loop.inner)
-
-; Conditional inner counts the last one, rather than the current one.
-; (ctrl_if
-; then_branch: (_) @conditional.inner
-; else_block: (_)? @conditional.inner) @conditional.outer
-
-(parameter) @parameter.around
-
-; (command
-; head: (_) @call.inner) @call.outer
-
-; (where_command
-; predicate: (_) @call.inner) @call.outer
-
-; define pipeline first, because it should only match as a fallback
-; e.g., `let a = date now` should match the whole assignment.
-; But a standalone `date now` should also match a statement
-; (pipeline) @statement.outer
-
-; (stmt_let) @statement.outer
-
-; (stmt_mut) @statement.outer
-
-; (stmt_const) @statement.outer
-
-; (ctrl_if) @statement.outer
-
-; (ctrl_try) @statement.outer
-
-; (ctrl_match) @statement.outer
-
-; (ctrl_while) @statement.outer
-
-; (ctrl_loop) @statement.outer
-
-; (val_number) @number.inner
diff --git a/runtime/queries/odin/highlights.scm b/runtime/queries/odin/highlights.scm
index 03d8b83c..ed8f03ab 100644
--- a/runtime/queries/odin/highlights.scm
+++ b/runtime/queries/odin/highlights.scm
@@ -9,31 +9,28 @@
] @keyword.directive
[
+ "package"
+] @namespace
+
+[
"import"
] @keyword.control.import
[
- "package"
"foreign"
"using"
- "cast"
- "transmute"
- "auto_cast"
-] @keyword
-
-[
- "defer"
-] @keyword.control
-
-[
"struct"
"enum"
"union"
+ "defer"
+ "cast"
+ "transmute"
+ "auto_cast"
"map"
"bit_set"
"matrix"
"bit_field"
-] @keyword.storage.type
+] @keyword
[
"proc"
@@ -57,7 +54,6 @@
"case"
"where"
"break"
- "or_break"
(fallthrough_statement)
] @keyword.control.conditional
@@ -74,7 +70,6 @@
"for"
"do"
"continue"
- "or_continue"
] @keyword.control.repeat
[
@@ -156,7 +151,7 @@
(character) @string
-(escape_sequence) @constant.character.escape
+(escape_sequence) @string.special
(boolean) @constant.builtin.boolean
@@ -199,39 +194,6 @@
(call_expression function: (identifier) @function)
-(call_expression
- function: (identifier) @function.builtin
- (#any-of? @function.builtin
- "abs" "align_of" "append" "append_elem" "append_elem_string"
- "append_elems" "append_nothing" "append_soa" "append_soa_elem"
- "append_soa_elems" "append_string" "assert" "assert_contextless"
- "assign_at" "assign_at_elem" "assign_at_elem_string" "assign_at_elems"
- "cap" "card" "clamp" "clear" "clear_dynamic_array" "clear_map" "clear_soa"
- "complex" "conj" "container_of" "copy" "copy_from_string" "copy_slice"
- "delete" "delete_cstring" "delete_dynamic_array" "delete_key"
- "delete_map" "delete_slice" "delete_soa" "delete_string"
- "expand_values" "free" "free_all" "imag" "init_global_temporary_allocator"
- "inject_at" "inject_at_elem" "inject_at_elem_string" "inject_at_elems"
- "jmag" "kmag" "len" "make" "make_dynamic_array" "make_dynamic_array_len"
- "make_dynamic_array_len_cap" "make_map" "make_multi_pointer" "make_slice"
- "make_soa" "make_soa_aligned" "make_soa_dynamic_array"
- "make_soa_dynamic_array_len" "make_soa_dynamic_array_len_cap"
- "make_soa_slice" "map_insert" "map_upsert" "max" "min"
- "new_clone" "non_zero_append" "non_zero_append_elem"
- "non_zero_append_elem_string" "non_zero_append_elems"
- "non_zero_append_soa_elem" "non_zero_append_soa_elems"
- "non_zero_resize" "non_zero_resize_dynamic_array" "non_zero_resize_soa"
- "non_zero_reserve" "non_zero_reserve_dynamic_array" "non_zero_reserve_soa"
- "offset_of" "offset_of_by_string" "offset_of_member" "offset_of_selector"
- "ordered_remove" "panic" "panic_contextless" "pop" "pop_front"
- "pop_front_safe" "pop_safe" "raw_data" "raw_soa_footer_dynamic_array"
- "raw_soa_footer_slice" "real" "remove_range" "reserve"
- "reserve_dynamic_array" "reserve_map" "reserve_soa" "resize"
- "resize_dynamic_array" "resize_soa" "shrink" "shrink_map"
- "size_of" "soa_unzip" "soa_zip" "swizzle" "type_info_of" "type_of"
- "typeid_of" "unordered_remove" "unordered_remove_soa"
- "unimplemented" "unimplemented_contextless"))
-
; Types
(struct_declaration (identifier) @type "::")
@@ -277,10 +239,6 @@
; Fields
(member_expression "." (identifier) @variable.other.member)
-(member_expression
- (identifier) "."
- (call_expression
- function: (identifier) @function.method))
(struct_type "{" (identifier) @variable.other.member)
@@ -298,7 +256,7 @@
(using_statement (identifier) @namespace)
-(import_declaration (identifier) @namespace)
+(import_declaration (identifier) @keyword.storage.type)
; Parameters
diff --git a/runtime/queries/odin/indents.scm b/runtime/queries/odin/indents.scm
index 223bab13..f456c1fe 100644
--- a/runtime/queries/odin/indents.scm
+++ b/runtime/queries/odin/indents.scm
@@ -6,7 +6,6 @@
(struct)
(parameters)
(tuple_type)
- (struct_type)
(call_expression)
(switch_case)
] @indent
@@ -22,4 +21,3 @@
(union_declaration "}" @outdent)
(struct_declaration "}" @outdent)
(struct "}" @outdent)
-(struct_type "}" @outdent)
diff --git a/runtime/queries/pest/highlights.scm b/runtime/queries/pest/highlights.scm
index 430382c9..9d6f13c2 100644
--- a/runtime/queries/pest/highlights.scm
+++ b/runtime/queries/pest/highlights.scm
@@ -39,14 +39,11 @@
] @operator
[
- "ANY"
- "DROP"
- "EOI"
- "NEWLINE"
+ "PUSH"
"PEEK"
- "PEEK_ALL"
"POP"
- "POP_ALL"
- "PUSH"
"SOI"
+ "EOI"
+ "ANY"
] @keyword
+
diff --git a/runtime/queries/php/rainbows.scm b/runtime/queries/php/rainbows.scm
deleted file mode 100644
index 49e3e883..00000000
--- a/runtime/queries/php/rainbows.scm
+++ /dev/null
@@ -1,15 +0,0 @@
-[
- (declaration_list)
- (compound_statement)
- (array_creation_expression)
- (subscript_expression)
- (parenthesized_expression)
- (formal_parameters)
- (arguments)
- (catch_clause)
- (foreach_statement)
- (switch_block)
- (anonymous_function_use_clause)
-] @rainbow.scope
-
-["(" ")" "[" "]" "{" "}"] @rainbow.bracket
diff --git a/runtime/queries/pip-requirements/highlights.scm b/runtime/queries/pip-requirements/highlights.scm
deleted file mode 100644
index 6036e301..00000000
--- a/runtime/queries/pip-requirements/highlights.scm
+++ /dev/null
@@ -1,41 +0,0 @@
-(comment) @comment
-
-(requirement (package) @variable)
-(extras (package) @variable.parameter)
-
-; "==" | ">" | "<" | ">=" | "<="
-(version_cmp) @operator
-
-(version) @constant.numeric
-
-(marker_var) @attribute
-
-(marker_op) @keyword.operator
-
-[
- "[" "]"
- "(" ")"
-] @punctuation.bracket
-
-[
- ","
- ";"
- "@"
-] @punctuation.delimiter
-
-[
- "${" "}"
-] @punctuation.special
-
-"=" @operator
-
-(path) @string.special.path
-(url) @string.special.url
-
-(option) @function
-
-(env_var) @constant
-
-(quoted_string) @string
-
-(linebreak) @constant.character.escape
diff --git a/runtime/queries/pip-requirements/injections.scm b/runtime/queries/pip-requirements/injections.scm
deleted file mode 100644
index 2f0e58eb..00000000
--- a/runtime/queries/pip-requirements/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/properties/highlights.scm b/runtime/queries/properties/highlights.scm
deleted file mode 100644
index d3c6ed79..00000000
--- a/runtime/queries/properties/highlights.scm
+++ /dev/null
@@ -1,40 +0,0 @@
-(comment) @comment
-
-(key) @attribute
-
-(value) @string
-
-(value (escape) @constant.character.escape)
-
-((index) @constant.numeric.integer
- (#match? @constant.numeric.integer "^[0-9]+$"))
-
-((substitution (key) @constant)
- (#match? @constant "^[A-Z0-9_]+"))
-
-((value) @constant.builtin.boolean
- (#any-of? @constant.builtin.boolean "true" "false" "enabled" "disabled"))
-
-((value) @constant.numeric.integer
- (#match? @constant.numeric.integer "^-?[0-9]+$"))
-
-((value) @constant.numeric.float
- (#match? @constant.numeric.float "^-?[0-9]+\.[0-9]$"))
-
-((value) @string.special.path
- (#match? @string.special.path "^(\.{1,2})?/"))
-
-(substitution
- (key) @function
- "::" @punctuation.special
- (secret) @string.special.symbol)
-
-(property [ "=" ":" ] @keyword.operator)
-
-[ "${" "}" ] @punctuation.special
-
-(substitution ":" @punctuation.special)
-
-[ "[" "]" ] @punctuation.bracket
-
-[ "." "\\" ] @punctuation.delimiter
diff --git a/runtime/queries/properties/injections.scm b/runtime/queries/properties/injections.scm
deleted file mode 100644
index 321c90ad..00000000
--- a/runtime/queries/properties/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/properties/locals.scm b/runtime/queries/properties/locals.scm
deleted file mode 100644
index 7a07220d..00000000
--- a/runtime/queries/properties/locals.scm
+++ /dev/null
@@ -1,5 +0,0 @@
-(property
- (key) @local.definition.attribute)
-
-(substitution
- (key) @local.reference)
diff --git a/runtime/queries/properties/textobjects.scm b/runtime/queries/properties/textobjects.scm
deleted file mode 100644
index 9be538ac..00000000
--- a/runtime/queries/properties/textobjects.scm
+++ /dev/null
@@ -1,4 +0,0 @@
-(comment) @comment.inside
-(comment)+ @comment.around
-
-(property (key) @parameter.inside) @parameter.around
diff --git a/runtime/queries/protobuf/tags.scm b/runtime/queries/protobuf/tags.scm
deleted file mode 100644
index 9f4d698e..00000000
--- a/runtime/queries/protobuf/tags.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-(message_name (identifier) @definition.class)
-
-(enum_name (identifier) @definition.class)
-
-(service_name (identifier) @definition.class)
-
-(rpc_name (identifier) @definition.function)
-
-(enum_variant_name (identifier) @definition.constant)
-
-(field_name (identifier) @definition.constant)
diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm
index ad45d495..a8ec18c8 100644
--- a/runtime/queries/python/highlights.scm
+++ b/runtime/queries/python/highlights.scm
@@ -75,9 +75,6 @@
(lambda_parameters
(identifier) @variable.parameter)
-(keyword_argument
- name: (identifier) @variable.parameter)
-
; - Builtin
((identifier) @variable.builtin
(#any-of? @variable.builtin "self" "cls"))
diff --git a/runtime/queries/python/injections.scm b/runtime/queries/python/injections.scm
index 19a22c39..321c90ad 100644
--- a/runtime/queries/python/injections.scm
+++ b/runtime/queries/python/injections.scm
@@ -1,14 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))
-
-; Match all 9 functions in the `re` module from the standard library that
-; that takes a regex pattern as first argument.
-; https://docs.python.org/3/library/re.html#functions
-(call
- function: (attribute
- object: (identifier) @_module (#eq? @_module "re")
- attribute: (identifier) @_function (#any-of? @_function "compile" "search" "match" "fullmatch" "sub" "subn" "findall" "finditer" "split"))
- arguments: (argument_list
- . (string
- (string_content) @injection.content))
- (#set! injection.language "regex"))
diff --git a/runtime/queries/python/locals.scm b/runtime/queries/python/locals.scm
index 955ebc52..24800870 100644
--- a/runtime/queries/python/locals.scm
+++ b/runtime/queries/python/locals.scm
@@ -45,6 +45,3 @@
(identifier) @local.reference
-; don't make the name of kwargs locals
-(keyword_argument
- name: (identifier) @variable.parameter)
diff --git a/runtime/queries/python/rainbows.scm b/runtime/queries/python/rainbows.scm
deleted file mode 100644
index 34d773c1..00000000
--- a/runtime/queries/python/rainbows.scm
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- (future_import_statement)
- (import_from_statement)
- (with_clause)
- (parameters)
- (parenthesized_list_splat)
- (argument_list)
- (tuple_pattern)
- (list_pattern)
- (subscript)
- (list)
- (set)
- (tuple)
- (dictionary)
- (dictionary_comprehension)
- (set_comprehension)
- (list_comprehension)
- (generator_expression)
- (parenthesized_expression)
- (interpolation)
- (format_expression)
-] @rainbow.scope
-
-[
- "(" ")"
- "{" "}"
- "[" "]"
-] @rainbow.bracket
-
-; (string ["{{" "}}"] @rainbow.bracket) @rainbow.scope
diff --git a/runtime/queries/qml/textobjects.scm b/runtime/queries/qml/textobjects.scm
deleted file mode 100644
index 13662742..00000000
--- a/runtime/queries/qml/textobjects.scm
+++ /dev/null
@@ -1,49 +0,0 @@
-; (comment) is used for both // and /* ... */ comment syntax
-(comment) @comment.inside
-(comment)+ @comment.around
-
-(ui_object_definition
- initializer: (_) @class.inside) @class.around
-
-(ui_binding
- name: (identifier) @parameter.inside) @parameter.around
-
-(ui_property
- (_)+ @parameter.inside ":") @parameter.around
-
-(function_declaration
- body: (_) @function.inside) @function.around
-
-(arrow_function
- body: (_) @function.inside) @function.around
-
-; e.g. `onClicked: console.log("Button clicked!")`
-((ui_binding
- name: (identifier) @_name
- value: (_) @function.around @function.inside)
- (#match? @_name "^on[A-Z].*"))
-
-; e.g.
-; Component.onCompleted: {
-; console.log("completed")
-; }
-(statement_block (expression_statement)* @function.inside) @function.around
-
-; e.g.
-; states: [
-; State { name: "activated" },
-; State { name: "deactivated" }
-; ]
-(ui_object_array
- ((_) @entry.inside . ","? @entry.around) @entry.around)
-
-; e.g. [1, 2, 3, 4]
-(array
- ((_) @entry.inside . ","? @entry.around) @entry.around)
-
-; Tests in QML are written using "Qt Quick Test" and it's `TestCase` type
-; ref: https://doc.qt.io/qt-6/qtquicktest-index.html
-((ui_object_definition
- type_name: (identifier) @_name
- initializer: (_) @test.inside) @test.around
- (#eq? @_name "TestCase"))
diff --git a/runtime/queries/racket/rainbows.scm b/runtime/queries/racket/rainbows.scm
deleted file mode 100644
index e11eb788..00000000
--- a/runtime/queries/racket/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: scheme
diff --git a/runtime/queries/regex/rainbows.scm b/runtime/queries/regex/rainbows.scm
deleted file mode 100644
index a9eb1cff..00000000
--- a/runtime/queries/regex/rainbows.scm
+++ /dev/null
@@ -1,17 +0,0 @@
-[
- (lookahead_assertion)
- (character_class)
- (anonymous_capturing_group)
- (named_capturing_group)
- (non_capturing_group)
- (count_quantifier)
- (character_class_escape)
-] @rainbow.scope
-
-[
- "(?" "(?:"
- "(?<" ">"
- "(" ")"
- "[" "]"
- "{" "}"
-] @rainbow.bracket
diff --git a/runtime/queries/robots.txt/highlights.scm b/runtime/queries/robots.txt/highlights.scm
deleted file mode 100644
index b6eec1b6..00000000
--- a/runtime/queries/robots.txt/highlights.scm
+++ /dev/null
@@ -1,28 +0,0 @@
-(comment) @comment
-
-(directive) @attribute
-
-(rule (unknownDirective) @attribute) @diagnostic.error
-
-(userAgent) @namespace
-
-(value) @string
-
-((value) @string.special.path
- (#match? @string.special.path "^/"))
-
-((value) @ui.text.directory
- (#match? @ui.text.directory "^/.+/$"))
-
-((value) @operator
- (#match? @operator "\\*"))
-
-(rule
- (directive (sitemap))
- (value) @string.special.url)
-
-(rule
- (directive (crawlDelay))
- (value) @constant.numeric.integer)
-
-":" @punctuation.delimiter
diff --git a/runtime/queries/robots.txt/injections.scm b/runtime/queries/robots.txt/injections.scm
deleted file mode 100644
index 2f0e58eb..00000000
--- a/runtime/queries/robots.txt/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/robots.txt/tags.scm b/runtime/queries/robots.txt/tags.scm
deleted file mode 100644
index 04a61c9c..00000000
--- a/runtime/queries/robots.txt/tags.scm
+++ /dev/null
@@ -1,4 +0,0 @@
-(rule
- (directive
- (userAgent))
- (value) @definition.module)
diff --git a/runtime/queries/robots.txt/textobjects.scm b/runtime/queries/robots.txt/textobjects.scm
deleted file mode 100644
index 8374dda9..00000000
--- a/runtime/queries/robots.txt/textobjects.scm
+++ /dev/null
@@ -1,4 +0,0 @@
-(comment) @comment.inside
-(comment)+ @comment.around
-
-(rule (_) @entry.inside) @entry.around
diff --git a/runtime/queries/ron/rainbows.scm b/runtime/queries/ron/rainbows.scm
deleted file mode 100644
index 0641564d..00000000
--- a/runtime/queries/ron/rainbows.scm
+++ /dev/null
@@ -1,8 +0,0 @@
-[
- (struct)
- (map)
- (tuple)
- (array)
-] @rainbow.scope
-
-["(" ")" "[" "]" "{" "}"] @rainbow.bracket
diff --git a/runtime/queries/ron/tags.scm b/runtime/queries/ron/tags.scm
deleted file mode 100644
index 71df971e..00000000
--- a/runtime/queries/ron/tags.scm
+++ /dev/null
@@ -1,4 +0,0 @@
-(struct_entry
- (identifier) @definition.struct)
-
-(map_entry (string) @definition.struct)
diff --git a/runtime/queries/ruby/injections.scm b/runtime/queries/ruby/injections.scm
index b87ea8cb..3e0d8bb8 100644
--- a/runtime/queries/ruby/injections.scm
+++ b/runtime/queries/ruby/injections.scm
@@ -21,15 +21,3 @@
(#set! injection.language "erb"))
(#eq? @name "ERB"))
-; `<command>`
-; %x{<command>}
-(subshell
- (string_content) @injection.content
- (#set! injection.language "bash"))
-
-(call
- method: (identifier) @_method (#any-of? @_method "system" "spawn" "exec")
- arguments: (argument_list
- (string
- (string_content) @injection.content))
- (#set! injection.language "bash"))
diff --git a/runtime/queries/ruby/rainbows.scm b/runtime/queries/ruby/rainbows.scm
deleted file mode 100644
index e67edfb8..00000000
--- a/runtime/queries/ruby/rainbows.scm
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- (begin_block)
- (end_block)
- (singleton_method)
- (block_parameters)
- (parenthesized_statements)
- (element_reference)
- (argument_list "(" ")")
- (block)
- (destructured_left_assignment)
- (interpolation)
- (string_array)
- (symbol_array)
- (regex)
- (array)
- (hash)
- (method_parameters)
-] @rainbow.scope
-
-[
- "#{"
- "{" "}"
- "(" ")"
- "%w(" "%i("
- "[" "]"
- "|"
- "/"
-] @rainbow.bracket
diff --git a/runtime/queries/rust-format-args-macro/highlights.scm b/runtime/queries/rust-format-args-macro/highlights.scm
deleted file mode 100644
index ae55c7fa..00000000
--- a/runtime/queries/rust-format-args-macro/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: rust
diff --git a/runtime/queries/rust-format-args-macro/indents.scm b/runtime/queries/rust-format-args-macro/indents.scm
deleted file mode 100644
index ae55c7fa..00000000
--- a/runtime/queries/rust-format-args-macro/indents.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: rust
diff --git a/runtime/queries/rust-format-args-macro/injections.scm b/runtime/queries/rust-format-args-macro/injections.scm
deleted file mode 100644
index 47db1345..00000000
--- a/runtime/queries/rust-format-args-macro/injections.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-; inherits: rust
-
-; HACK: This language is the same as Rust but all strings are injected
-; with rust-format-args. Rust injects this into known macros which use
-; the format args syntax. This can cause false-positive highlights but
-; those are expected to be rare.
-
-([
- (string_literal (string_content) @injection.content)
- (raw_string_literal (string_content) @injection.content)
- ]
- (#set! injection.language "rust-format-args")
- (#set! injection.include-children))
diff --git a/runtime/queries/rust-format-args-macro/locals.scm b/runtime/queries/rust-format-args-macro/locals.scm
deleted file mode 100644
index ae55c7fa..00000000
--- a/runtime/queries/rust-format-args-macro/locals.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: rust
diff --git a/runtime/queries/rust-format-args-macro/rainbows.scm b/runtime/queries/rust-format-args-macro/rainbows.scm
deleted file mode 100644
index ae55c7fa..00000000
--- a/runtime/queries/rust-format-args-macro/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: rust
diff --git a/runtime/queries/rust-format-args-macro/textobjects.scm b/runtime/queries/rust-format-args-macro/textobjects.scm
deleted file mode 100644
index ae55c7fa..00000000
--- a/runtime/queries/rust-format-args-macro/textobjects.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: rust
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm
index cc8380cb..981896f9 100644
--- a/runtime/queries/rust/highlights.scm
+++ b/runtime/queries/rust/highlights.scm
@@ -79,19 +79,18 @@
; Types
; -------
-(type_parameter
+(type_parameters
+ (type_identifier) @type.parameter)
+(constrained_type_parameter
+ left: (type_identifier) @type.parameter)
+(optional_type_parameter
name: (type_identifier) @type.parameter)
((type_arguments (type_identifier) @constant)
(#match? @constant "^[A-Z_]+$"))
(type_arguments (type_identifier) @type)
-; `_` in `(_, _)`
(tuple_struct_pattern "_" @comment.unused)
-; `_` in `Vec<_>`
((type_arguments (type_identifier) @comment.unused)
(#eq? @comment.unused "_"))
-; `_` in `Rc<[_]>`
-((array_type (type_identifier) @comment.unused)
- (#eq? @comment.unused "_"))
; ---
; Primitives
@@ -112,7 +111,6 @@
; Comments
; -------
-(shebang) @comment
(line_comment) @comment.line
(block_comment) @comment.block
@@ -212,6 +210,10 @@
; Keywords
; -------
+(for_expression
+ "for" @keyword.control.repeat)
+(gen_block "gen" @keyword.control)
+
"in" @keyword.control
[
@@ -240,6 +242,10 @@
(type_cast_expression "as" @keyword.operator)
+((generic_type
+ type: (type_identifier) @keyword)
+ (#eq? @keyword "use"))
+
[
(crate)
(super)
@@ -257,10 +263,6 @@
"async"
] @keyword
-(for_expression
- "for" @keyword.control.repeat)
-(gen_block "gen" @keyword.control)
-
[
"struct"
"enum"
@@ -303,23 +305,6 @@
; Functions
; -------
-; highlight `baz` in `any_function(foo::bar::baz)` as function
-; This generically works for an unlimited number of path segments:
-;
-; - `f(foo::bar)`
-; - `f(foo::bar::baz)`
-; - `f(foo::bar::baz::quux)`
-;
-; We know that in the above examples, the last component of each path is a function
-; as the only other valid thing (following Rust naming conventions) would be a module at
-; that position, however you cannot pass modules as arguments
-(call_expression
- function: _
- arguments: (arguments
- (scoped_identifier
- path: _
- name: (identifier) @function)))
-
(call_expression
function: [
((identifier) @function)
diff --git a/runtime/queries/rust/injections.scm b/runtime/queries/rust/injections.scm
index 0c7cc350..ba58bf36 100644
--- a/runtime/queries/rust/injections.scm
+++ b/runtime/queries/rust/injections.scm
@@ -55,24 +55,14 @@
function: (scoped_identifier
path: (identifier) @_regex (#any-of? @_regex "Regex" "RegexBuilder")
name: (identifier) @_new (#eq? @_new "new"))
- arguments:
- (arguments
- [
- (string_literal (string_content) @injection.content)
- (raw_string_literal (string_content) @injection.content)
- ])
+ arguments: (arguments (raw_string_literal (string_content) @injection.content))
(#set! injection.language "regex"))
(call_expression
function: (scoped_identifier
path: (scoped_identifier (identifier) @_regex (#any-of? @_regex "Regex" "RegexBuilder") .)
name: (identifier) @_new (#eq? @_new "new"))
- arguments:
- (arguments
- [
- (string_literal (string_content) @injection.content)
- (raw_string_literal (string_content) @injection.content)
- ])
+ arguments: (arguments (raw_string_literal (string_content) @injection.content))
(#set! injection.language "regex"))
; Highlight SQL in `sqlx::query!()`, `sqlx::query_scalar!()`, and `sqlx::query_scalar_unchecked!()`
@@ -113,6 +103,8 @@
; the `format_args!` syntax.
;
; This language is injected into a hard-coded set of macros.
+
+; 1st argument is `format_args!`
(
(macro_invocation
macro:
@@ -121,11 +113,13 @@
name: (_) @_macro_name)
(identifier) @_macro_name
]
- (token_tree) @injection.content
+ (token_tree . [
+ (string_literal (string_content) @injection.content)
+ (raw_string_literal (string_content) @injection.content)
+ ]
+ )
)
(#any-of? @_macro_name
- ; 1st argument is `format_args!`
-
; std
"print" "println" "eprint" "eprintln"
"format" "format_args" "todo" "panic"
@@ -146,25 +140,86 @@
"eyre"
; miette
"miette"
+ )
+ (#set! injection.language "rust-format-args")
+ (#set! injection.include-children)
+)
- ; 2nd argument is `format_args!`
-
+; 2nd argument is `format_args!`
+(
+ (macro_invocation
+ macro:
+ [
+ (scoped_identifier
+ name: (_) @_macro_name)
+ (identifier) @_macro_name
+ ]
+ (token_tree
+ . (_)
+ . [
+ (string_literal (string_content) @injection.content)
+ (raw_string_literal (string_content) @injection.content)
+ ]
+ )
+ )
+ (#any-of? @_macro_name
; std
"write" "writeln" "assert" "debug_assert"
; defmt
"expect" "unwrap"
; ratatui
"span"
+ )
+ (#set! injection.language "rust-format-args")
+ (#set! injection.include-children)
+)
- ; 3rd argument is `format_args!`
-
+; 3rd argument is `format_args!`
+(
+ (macro_invocation
+ macro:
+ [
+ (scoped_identifier
+ name: (_) @_macro_name)
+ (identifier) @_macro_name
+ ]
+ (token_tree
+ . (_)
+ . (_)
+ . [
+ (string_literal (string_content) @injection.content)
+ (raw_string_literal (string_content) @injection.content)
+ ]
+ )
+ )
+ (#any-of? @_macro_name
; std
"assert_eq" "debug_assert_eq" "assert_ne" "debug_assert_ne"
+ )
+ (#set! injection.language "rust-format-args")
+ (#set! injection.include-children)
+)
- ; Dioxus's rsx! macro accepts string interpolation in all
- ; strings, across the entire token tree
- "rsx"
+; Dioxus' "rsx!" macro relies heavily on string interpolation as well. The strings can be nested very deeply
+(
+ (macro_invocation
+ macro: [
+ (scoped_identifier
+ name: (_) @_macro_name)
+ (identifier) @_macro_name
+ ]
+ ; TODO: This only captures 1 level of string literals. But in dioxus you can have
+ ; nested string literals. For instance:
+ ;
+ ; rsx! { "{hello} world" }:
+ ; -> (token_tree (string_literal))
+ ; rsx! { div { "{hello} world" } }
+ ; -> (token_tree (token_tree (string_literal)))
+ ; rsx! { div { div { "{hello} world" } } }
+ ; -> (token_tree (token_tree (token_tree (string_literal))))
+ (token_tree (string_literal) @injection.content)
)
- (#set! injection.language "rust-format-args-macro")
+ (#eq? @_macro_name "rsx")
+ (#set! injection.language "rust-format-args")
(#set! injection.include-children)
)
diff --git a/runtime/queries/rust/rainbows.scm b/runtime/queries/rust/rainbows.scm
deleted file mode 100644
index 0656047b..00000000
--- a/runtime/queries/rust/rainbows.scm
+++ /dev/null
@@ -1,60 +0,0 @@
-[
- ; {/}
- (declaration_list)
- (field_declaration_list)
- (field_initializer_list)
- (enum_variant_list)
- (block)
- (match_block)
- (use_list)
- (struct_pattern)
-
- ; (/)
- (ordered_field_declaration_list)
- (arguments)
- (parameters)
- (tuple_type)
- (tuple_expression)
- (tuple_pattern)
- (tuple_struct_pattern)
- (unit_type)
- (unit_expression)
- (visibility_modifier)
- (parenthesized_expression)
- (token_repetition_pattern)
-
- ; </>
- (type_parameters)
- (type_arguments)
- (bracketed_type)
- (for_lifetimes)
-
- ; [/]
- (array_type)
- (array_expression)
- (index_expression)
- (slice_pattern)
-
- ; attributes #[]
- (attribute_item)
- (inner_attribute_item)
-
- ; macros
- (token_tree_pattern)
- (macro_definition)
-
- ; closures
- (closure_parameters)
-] @rainbow.scope
-
-; attributes like `#[serde(rename_all = "kebab-case")]`
-(attribute arguments: (token_tree) @rainbow.scope)
-
-[
- "#"
- "[" "]"
- "(" ")"
- "{" "}"
- "<" ">"
- "|"
-] @rainbow.bracket
diff --git a/runtime/queries/rust/tags.scm b/runtime/queries/rust/tags.scm
deleted file mode 100644
index c5700ea6..00000000
--- a/runtime/queries/rust/tags.scm
+++ /dev/null
@@ -1,26 +0,0 @@
-(struct_item
- name: (type_identifier) @definition.struct)
-
-(const_item
- name: (identifier) @definition.constant)
-
-(trait_item
- name: (type_identifier) @definition.interface)
-
-(function_item
- name: (identifier) @definition.function)
-
-(function_signature_item
- name: (identifier) @definition.function)
-
-(enum_item
- name: (type_identifier) @definition.type)
-
-(enum_variant
- name: (identifier) @definition.struct)
-
-(mod_item
- name: (identifier) @definition.module)
-
-(macro_definition
- name: (identifier) @definition.macro)
diff --git a/runtime/queries/scheme/highlights.scm b/runtime/queries/scheme/highlights.scm
index 288fcfe9..71bad076 100644
--- a/runtime/queries/scheme/highlights.scm
+++ b/runtime/queries/scheme/highlights.scm
@@ -13,10 +13,10 @@
; variables
((symbol) @variable.builtin
- (#eq? @variable.builtin "..."))
+ (#eq? @variable.builtin "..."))
((symbol) @variable.builtin
- (#eq? @variable.builtin "."))
+ (#eq? @variable.builtin "."))
(symbol) @variable
@@ -33,106 +33,71 @@
.
(symbol) @function)
-(list
- .
- (symbol) @function.builtin
- (#any-of? @function.builtin
- "caar" "cadr" "call-with-input-file" "call-with-output-file" "cdar" "cddr" "list"
- "open-input-file" "open-output-file" "with-input-from-file" "with-output-to-file" "*" "+" "-"
- "/" "<" "<=" "=" ">" ">=" "abs" "acos" "angle" "append" "apply" "asin" "assoc" "assq" "assv"
- "atan" "boolean?" "caaaar" "caaadr" "caaar" "caadar" "caaddr" "caadr" "cadaar" "cadadr" "cadar"
- "caddar" "cadddr" "caddr" "call-with-current-continuation" "call-with-values" "car" "cdaaar"
- "cdaadr" "cdaar" "cdadar" "cdaddr" "cdadr" "cddaar" "cddadr" "cddar" "cdddar" "cddddr" "cdddr"
- "cdr" "ceiling" "char->integer" "char-alphabetic?" "char-ci<=?" "char-ci<?" "char-ci=?"
- "char-ci>=?" "char-ci>?" "char-downcase" "char-lower-case?" "char-numeric?" "char-ready?"
- "char-upcase" "char-upper-case?" "char-whitespace?" "char<=?" "char<?" "char=?" "char>=?"
- "char>?" "char?" "close-input-port" "close-output-port" "complex?" "cons" "cos"
- "current-error-port" "current-input-port" "current-output-port" "denominator" "display"
- "dynamic-wind" "eof-object?" "eq?" "equal?" "eqv?" "eval" "even?" "exact->inexact" "exact?" "exp"
- "expt" "floor" "flush-output" "for-each" "force" "gcd" "imag-part" "inexact->exact" "inexact?"
- "input-port?" "integer->char" "integer?" "interaction-environment" "lcm" "length" "list->string"
- "list->vector" "list-ref" "list-tail" "list?" "load" "log" "magnitude" "make-polar"
- "make-rectangular" "make-string" "make-vector" "map" "max" "member" "memq" "memv" "min" "modulo"
- "negative?" "newline" "not" "null-environment" "null?" "number->string" "number?" "numerator"
- "odd?" "output-port?" "pair?" "peek-char" "positive?" "procedure?" "quotient" "rational?"
- "rationalize" "read" "read-char" "real-part" "real?" "remainder" "reverse" "round"
- "scheme-report-environment" "set-car!" "set-cdr!" "sin" "sqrt" "string" "string->list"
- "string->number" "string->symbol" "string-append" "string-ci<=?" "string-ci<?" "string-ci=?"
- "string-ci>=?" "string-ci>?" "string-copy" "string-fill!" "string-length" "string-ref"
- "string-set!" "string<=?" "string<?" "string=?" "string>=?" "string>?" "string?" "substring"
- "symbol->string" "symbol?" "tan" "transcript-off" "transcript-on" "truncate" "values" "vector"
- "vector->list" "vector-fill!" "vector-length" "vector-ref" "vector-set!" "vector?" "write"
- "write-char" "zero?"))
-
; special forms
(list
- "["
- (symbol)+ @variable
- "]")
+ "["
+ (symbol)+ @variable
+ "]")
(list
- .
- (symbol) @_f
- .
- (list
- (symbol) @variable)
- (#any-of? @_f "lambda" "λ" "define-values"))
+ .
+ (symbol) @_f
+ .
+ (list
+ (symbol) @variable)
+ (#any-of? @_f "lambda" "λ"))
(list
- .
- (symbol) @_f
- (list
- .
- (list
- (symbol) @variable))
- (#eq? @_f "case-lambda"))
-
-(list
- .
- (symbol) @_f
- .
- (list
- (list
- (symbol) @variable.parameter))
- (#any-of? @_f
- "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax" "do"))
+ .
+ (symbol) @_f
+ .
+ (list
+ (list
+ (symbol) @variable.parameter))
+ (#match? @_f
+ "^(let|let\\*|let-syntax|let-values|let\\*-values|letrec|letrec\\*|letrec-syntax)$"))
; operators
((symbol) @operator
- (#any-of? @operator "+" "-" "*" "/" "=" ">" "<" ">=" "<="))
+ (#match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$"))
; library
(list
- .
- (symbol) @_lib
- .
- (symbol) @namespace
+ .
+ (symbol) @_lib
+ .
+ (symbol) @namespace
- (#eq? @_lib "library"))
+ (#eq? @_lib "library"))
; quote
(list
- .
- (symbol) @_f
- (#eq? @_f "quote")) @string.symbol
+ .
+ (symbol) @_f
+ (#eq? @_f "quote")) @string.symbol
; keywords
(list
.
((symbol) @keyword.conditional
- (#any-of? @keyword.conditional "if" "cond" "case" "when" "unless")))
-
+ (#match? @keyword.conditional "^(if|cond|case|when|unless)$"
+ )))
+
(list
.
(symbol) @keyword
- (#any-of? @keyword
- "define-syntax" "let*" "lambda" "λ" "case-lambda" "case" "=>" "quote-splicing" "unquote-splicing"
- "set!" "let" "letrec" "letrec-syntax" "let-values" "let*-values" "do" "else" "define" "cond"
- "syntax-rules" "unquote" "begin" "quote" "let-syntax" "and" "if" "quasiquote" "letrec" "delay"
- "or" "when" "unless" "identifier-syntax" "assert" "library" "export" "import" "rename" "only"
- "except" "prefix" "define-values"))
+ (#match? @keyword
+ "^(define-syntax|let\\*|lambda|λ|case|=>|quote-splicing|unquote-splicing|set!|let|letrec|letrec-syntax|let-values|let\\*-values|do|else|define|cond|syntax-rules|unquote|begin|quote|let-syntax|and|if|quasiquote|letrec|delay|or|when|unless|identifier-syntax|assert|library|export|import|rename|only|except|prefix)$"
+ ))
+
+(list
+ .
+ (symbol) @function.builtin
+ (#match? @function.builtin
+ "^(caar|cadr|call-with-input-file|call-with-output-file|cdar|cddr|list|open-input-file|open-output-file|with-input-from-file|with-output-to-file|\\*|\\+|-|/|<|<=|=|>|>=|abs|acos|angle|append|apply|asin|assoc|assq|assv|atan|boolean\\?|caaaar|caaadr|caaar|caadar|caaddr|caadr|cadaar|cadadr|cadar|caddar|cadddr|caddr|call-with-current-continuation|call-with-values|car|cdaaar|cdaadr|cdaar|cdadar|cdaddr|cdadr|cddaar|cddadr|cddar|cdddar|cddddr|cdddr|cdr|ceiling|char->integer|char-alphabetic\\?|char-ci<=\\?|char-ci<\\?|char-ci=\\?|char-ci>=\\?|char-ci>\\?|char-downcase|char-lower-case\\?|char-numeric\\?|char-ready\\?|char-upcase|char-upper-case\\?|char-whitespace\\?|char<=\\?|char<\\?|char=\\?|char>=\\?|char>\\?|char\\?|close-input-port|close-output-port|complex\\?|cons|cos|current-error-port|current-input-port|current-output-port|denominator|display|dynamic-wind|eof-object\\?|eq\\?|equal\\?|eqv\\?|eval|even\\?|exact->inexact|exact\\?|exp|expt|floor|flush-output|for-each|force|gcd|imag-part|inexact->exact|inexact\\?|input-port\\?|integer->char|integer\\?|interaction-environment|lcm|length|list->string|list->vector|list-ref|list-tail|list\\?|load|log|magnitude|make-polar|make-rectangular|make-string|make-vector|map|max|member|memq|memv|min|modulo|negative\\?|newline|not|null-environment|null\\?|number->string|number\\?|numerator|odd\\?|output-port\\?|pair\\?|peek-char|positive\\?|procedure\\?|quotient|rational\\?|rationalize|read|read-char|real-part|real\\?|remainder|reverse|round|scheme-report-environment|set-car!|set-cdr!|sin|sqrt|string|string->list|string->number|string->symbol|string-append|string-ci<=\\?|string-ci<\\?|string-ci=\\?|string-ci>=\\?|string-ci>\\?|string-copy|string-fill!|string-length|string-ref|string-set!|string<=\\?|string<\\?|string=\\?|string>=\\?|string>\\?|string\\?|substring|symbol->string|symbol\\?|tan|transcript-off|transcript-on|truncate|values|vector|vector->list|vector-fill!|vector-length|vector-ref|vector-set!|vector\\?|write|write-char|zero\\?)$"
+ ))
diff --git a/runtime/queries/scheme/rainbows.scm b/runtime/queries/scheme/rainbows.scm
deleted file mode 100644
index f948772c..00000000
--- a/runtime/queries/scheme/rainbows.scm
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- (list)
- (vector)
- (byte_vector)
-] @rainbow.scope
-
-[
- "#(" "#vu8("
- "(" ")"
- "[" "]"
- "{" "}"
-] @rainbow.bracket
diff --git a/runtime/queries/scheme/textobjects.scm b/runtime/queries/scheme/textobjects.scm
deleted file mode 100644
index 5cd88321..00000000
--- a/runtime/queries/scheme/textobjects.scm
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- (comment)
- (block_comment)
-] @comment.inside
-
-(comment)+ @comment.around
-(block_comment) @comment.around
diff --git a/runtime/queries/scss/rainbows.scm b/runtime/queries/scss/rainbows.scm
deleted file mode 100644
index f0c648f3..00000000
--- a/runtime/queries/scss/rainbows.scm
+++ /dev/null
@@ -1,3 +0,0 @@
-; inherits: css
-
-(parameters) @rainbow.scope
diff --git a/runtime/queries/shellcheckrc/highlights.scm b/runtime/queries/shellcheckrc/highlights.scm
deleted file mode 100644
index b7b0a748..00000000
--- a/runtime/queries/shellcheckrc/highlights.scm
+++ /dev/null
@@ -1,55 +0,0 @@
-(comment) @comment
-(string) @string
-(boolean) @constant.builtin.boolean
-(integer) @constant.numeric.integer
-
-[
- "disable"
- "enable"
- "extended-analysis"
- "external-sources"
- "source"
- "source-path"
- "shell"
-] @keyword
-
-"=" @operator
-
-[
- ","
- "-"
-] @punctuation.delimiter
-
-"SC" @special
-
-(shell) @type.enum.variant
-
-(all) @variable.builtin
-
-(identifier) @label
-
-(source_directive
- (identifier) @string.special.path)
-
-(source_path_directive
- (identifier) @string.special.path)
-
-(source_directive
- (identifier) @variable.builtin (#eq? @variable.builtin "SCRIPTDIR"))
-
-(source_path_directive
- (identifier) @variable.builtin (#eq? @variable.builtin "SCRIPTDIR"))
-
-(enable_directive
- (identifier) @diagnostic.error
- (#not-any-of? @diagnostic.error
- "add-default-case"
- "avoid-nullary-conditions"
- "check-extra-masked-returns"
- "check-set-e-suppressed"
- "check-unassigned-uppercase"
- "deprecate-which"
- "quote-safe-variables"
- "require-double-brackets"
- "require-variable-braces"
- ))
diff --git a/runtime/queries/shellcheckrc/injections.scm b/runtime/queries/shellcheckrc/injections.scm
deleted file mode 100644
index 2f0e58eb..00000000
--- a/runtime/queries/shellcheckrc/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/shellcheckrc/textobjects.scm b/runtime/queries/shellcheckrc/textobjects.scm
deleted file mode 100644
index 8e61bc85..00000000
--- a/runtime/queries/shellcheckrc/textobjects.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-(comment) @comment.inside
-(comment)+ @comment.around
-
-
-[
- (disable_directive)
- (enable_directive)
- (extended_analysis_directive)
- (external_sources_directive)
- (source_directive)
- (source_path_directive)
- (shell_directive)
-] @entry.around
diff --git a/runtime/queries/slisp/highlights.scm b/runtime/queries/slisp/highlights.scm
deleted file mode 100644
index a7bf91d8..00000000
--- a/runtime/queries/slisp/highlights.scm
+++ /dev/null
@@ -1,74 +0,0 @@
-;; Keywords
-[ "if" "prog" ] @keyword
-
-;; Let binding
-[ "let" ] @keyword
-
-(let_bindings name: (symbol) @variable)
-
-;; Apply
-(apply_stmt . (symbol) @function)
-
-;; Use module
-[ "use" ] @keyword
-
-(use_module_global (quote) . (symbol) @namespace)
-(use_module_select (quote) . (symbol) @namespace)
-
-;; Val definition
-[ "val" ] @keyword
-
-(val_definition name: (symbol) @constant)
-
-;; External definitions
-[ "ext" ] @keyword
-
-(external_definition name: (symbol) @function)
-(external_definition signature: (signature (symbol) @variable.parameter (dot) (external_type) @type.builtin))
-(external_definition docstring: (string) @comment)
-(external_definition return_type: (external_type) @type.builtin)
-
-;; Function definitions
-[ "def" ] @keyword
-
-(function_definition name: (symbol) @function)
-(function_definition parameters: (parameters (symbol) @variable.parameter))
-(function_definition docstring: (string) @comment)
-
-;; Macro definitions
-[ "mac" ] @keyword
-
-(macro_definition name: (symbol) @function)
-(macro_definition parameters: (parameters (symbol) @variable.parameter))
-(macro_definition docstring: (string) @comment)
-
-;; Lambda
-[ "\\" ] @keyword
-
-(lambda_stmt parameters: (parameters (symbol) @variable.parameter))
-
-;; Atoms
-(char) @constant.character
-(comment) @comment
-(number) @constant.numeric
-(string) @string
-
-;; Punctuation
-[ "(" ")" ] @punctuation.bracket
-
-;; Operators
-(dot) @operator
-(tilde) @operator
-(backquote) @operator
-(quote) @operator
-(unquote) @operator
-(unquote_splice) @operator
-
-;; Highlight nil t as constant
-[ "nil" ] @constant.builtin
-
-;; Highlight as t as boolean constant
-[ "T" ] @constant.builtin.boolean
-
-;; Highlight variable names used in anamorphic macros.
-[ "it" ] @variable.builtin
diff --git a/runtime/queries/slisp/tags.scm b/runtime/queries/slisp/tags.scm
deleted file mode 100644
index df62606b..00000000
--- a/runtime/queries/slisp/tags.scm
+++ /dev/null
@@ -1,8 +0,0 @@
-;; def
-(function_definition name: (symbol) @name) @definition.function
-
-;; ext
-(external_definition name: (symbol) @name) @definition.function
-
-;; mac
-(macro_definition name: (symbol) @name) @definition.function
diff --git a/runtime/queries/snakemake/LICENSE b/runtime/queries/snakemake/LICENSE
index 3dea1627..3dea1627 100644..100755
--- a/runtime/queries/snakemake/LICENSE
+++ b/runtime/queries/snakemake/LICENSE
diff --git a/runtime/queries/snakemake/folds.scm b/runtime/queries/snakemake/folds.scm
index d154f3cd..d154f3cd 100644..100755
--- a/runtime/queries/snakemake/folds.scm
+++ b/runtime/queries/snakemake/folds.scm
diff --git a/runtime/queries/snakemake/highlights.scm b/runtime/queries/snakemake/highlights.scm
index 18d81811..18d81811 100644..100755
--- a/runtime/queries/snakemake/highlights.scm
+++ b/runtime/queries/snakemake/highlights.scm
diff --git a/runtime/queries/snakemake/indents.scm b/runtime/queries/snakemake/indents.scm
index 6685fccb..6685fccb 100644..100755
--- a/runtime/queries/snakemake/indents.scm
+++ b/runtime/queries/snakemake/indents.scm
diff --git a/runtime/queries/snakemake/injections.scm b/runtime/queries/snakemake/injections.scm
index fa56daab..fa56daab 100644..100755
--- a/runtime/queries/snakemake/injections.scm
+++ b/runtime/queries/snakemake/injections.scm
diff --git a/runtime/queries/snakemake/locals.scm b/runtime/queries/snakemake/locals.scm
index 0b920cbf..0b920cbf 100644..100755
--- a/runtime/queries/snakemake/locals.scm
+++ b/runtime/queries/snakemake/locals.scm
diff --git a/runtime/queries/starlark/rainbows.scm b/runtime/queries/starlark/rainbows.scm
deleted file mode 100644
index 0b920cbf..00000000
--- a/runtime/queries/starlark/rainbows.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: python
diff --git a/runtime/queries/strictdoc/highlights.scm b/runtime/queries/strictdoc/highlights.scm
deleted file mode 100644
index 3630f971..00000000
--- a/runtime/queries/strictdoc/highlights.scm
+++ /dev/null
@@ -1,113 +0,0 @@
-;; Tree-sitter highlight queries for strictdoc
-
-;; —————————————————————————————————————————
-;; Keywords “blok” del documento
-;; —————————————————————————————————————————
-[
- "[DOCUMENT]"
- "[DOCUMENT_FROM_FILE]"
- "[GRAMMAR]"
- "[/SECTION]"
- "[SECTION]"
- (sdoc_node_opening)
- (sdoc_composite_node_opening)
- (sdoc_composite_node_closing)
- (sdoc_composite_node_type_name)
-] @keyword
-
-[
- "AUTO_LEVELS"
- "CLASSIFICATION"
- "DATE"
- "DEFAULT_VIEW"
- "ELEMENTS"
- "ENABLE_MID"
- "FIELDS"
- "FILE"
- "FORMAT"
- "IMPORT_FROM_FILE"
- "IS_COMPOSITE"
- "LAYOUT"
- "LEVEL"
- "MARKUP"
- "METADATA"
- "MID"
- "NAME"
- "NODE_IN_TOC"
- "OBJECT_TYPE"
- "OPTIONS"
- "PLACEMENT"
- "PREFIX"
- "PROPERTIES"
- "REQ_PREFIX"
- "REQUIRED"
- "REQUIREMENT_IN_TOC"
- "REQUIREMENT_STYLE"
- "ROLE"
- "ROOT"
- "TAG"
- "TITLE"
- "TYPE"
- "UID"
- "VALUE"
- "VERSION"
- "VIEW_STYLE"
- "VISIBLE_FIELDS"
-] @type.builtin
-
-;; Operators
-[
- (multiline_opening_token)
- (multiline_closing_token)
-] @operator
-
-;; Punctuation
-[
- ":" @punctuation.delimiter
- "," @punctuation.delimiter
- "-" @punctuation.delimiter
-]
-
-;; Boolean literals
-(boolean_choice) @constant.builtin.boolean
-
-;; Requirement types and file formats
-
-;; Config option values
-[
- "Child"
- "Default"
- "File"
- "HTML"
- "Inline"
- "Narrative"
- "Off"
- "On"
- "Parent"
- "Plain"
- "RST"
- "Simple"
- "Table"
- "Text"
- "Website"
- "Zebra"
-] @constant.builtin
-
-
-;; Strings
-(single_line_string) @string
-[ (uid_string) (req_reference_value_id) ] @string.special.symbol
-(date) @string.special
-
-;; Fields
-(document_custom_metadata_key) @type.parameter
-[ "RELATIONS" (field_name) ] @variable.other.member
-(choice_option) @variable.parameter
-
-;; Anchors and links
-(anchor) @label
-(inline_link) @string.special.url
-
-[
- (role_id)
-] @variable
diff --git a/runtime/queries/strictdoc/injections.scm b/runtime/queries/strictdoc/injections.scm
deleted file mode 100644
index c303dc33..00000000
--- a/runtime/queries/strictdoc/injections.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-
-((text_part) @injection.content
- (#set! injection.language "rst")
- (#set! injection.include-children))
-
-((single_line_text_part) @injection.content
- (#set! injection.language "rst")
- (#set! injection.include-children))
-
diff --git a/runtime/queries/strictdoc/tags.scm b/runtime/queries/strictdoc/tags.scm
deleted file mode 100644
index bf658a43..00000000
--- a/runtime/queries/strictdoc/tags.scm
+++ /dev/null
@@ -1,258 +0,0 @@
-; == StrictDoc Code Navigation Queries ==
-
-; -- Document Configuration Definitions --
-(
-(document_config
-uid: (uid_string) @name) @definition.document.uid
-)
-(
-(document_version
-version: (single_line_string) @name) @definition.document.version
-)
-(
-(document_date
-date: (date) @name) @definition.document.date
-)
-(
-(document_classification
-classification: (single_line_string) @name) @definition.document.classification
-)
-(
-(document_requirement
-requirement_prefix: (single_line_string) @name) @definition.document.requirement_prefix
-)
-(
-(document_config
-root: (boolean_choice) @name) @definition.document.root
-)
-(
-(document_config
-options: (document_config_options) @name) @definition.document.options
-)
-(
-(enable_mid
-(boolean_choice) @name) @definition.document.options.enable_mid
-)
-(
-(markup
-(markup_choice) @name) @definition.document.options.markup
-)
-(
-(auto_levels
-(auto_levels_choice) @name) @definition.document.options.auto_levels
-)
-(
-(layout
-(layout_choice) @name) @definition.document.options.layout
-)
-(
-(view_style
-(style_choice) @name) @definition.document.options.view_style
-)
-(
-(in_toc_tag
-(boolean_choice) @name) @definition.document.options.in_toc_tag
-)
-(
-(default_view
-(single_line_string) @name) @definition.document.options.default_view
-)
-(
-(document_config
-metadata: (document_custom_metadata) @name) @definition.document.metadata
-)
-
-; -- Grammar Definition -- ( (document_grammar) @definition.grammar.document_grammar )
-
-; -- Import From File Reference --
-(
-(import_from_file
-import_path: (file_path) @name) @reference.grammar.file_path
-)
-
-; -- Grammar Elements Definitions --
-(
-(grammar_elements) @definition.grammar.elements
-)
-(
-(grammar_element) @definition.grammar.element
-)
-
-; -- Grammar Properties Definitions --
-(
-(grammar_properties) @definition.grammar.properties
-)
-(
-(grammar_property_is_composite
-(boolean_choice) @name) @definition.grammar.property.is_composite
-)
-(
-(grammar_property_prefix
-(single_line_string) @name) @definition.grammar.property.prefix
-)
-(
-(grammar_property_view_style
-(style_choice) @name) @definition.grammar.property.view_style
-)
-
-; -- Grammar Fields Definitions --
-(
-(grammar_fields) @definition.grammar.fields
-)
-(
-(grammar_field_title
-title: (field_name) @name) @definition.grammar.field.title
-)
-(
-(grammar_field_required
-value: (boolean_choice) @name) @definition.grammar.field.required
-)
-(
-(grammar_field_string) @definition.grammar.field.string
-)
-(
-(grammar_field_single_choice) @definition.grammar.field.single_choice
-)
-(
-(grammar_field_multiple_choice) @definition.grammar.field.multiple_choice
-)
-(
-(grammar_field_tag) @definition.grammar.field.tag
-)
-
-; -- Grammar Relations Definitions --
-(
-(grammar_relations) @definition.grammar.relations
-)
-(
-(grammar_relation_parent
-(single_line_string) @name) @definition.grammar.relation.parent
-)
-(
-(grammar_relation_child
-(single_line_string) @name) @definition.grammar.relation.child
-)
-(
-(grammar_relation_file
-(single_line_string) @name) @definition.grammar.relation.file
-)
-
-; -- Document Custom Metadata --
-(
- (document_custom_metadata) @definition.document.metadata
-)
-(
- (document_custom_metadata_key_value_pair
- key: (document_custom_metadata_key) @name
- value: (single_line_string) @doc) @definition.document.metadata.entry
-)
-
-; -- Document View Definitions --
-(
-(document_view) @definition.document.view
-)
-(
-(view_element
-id: (uid_string) @name) @definition.view.element.id
-)
-(
-(view_element
-name: (single_line_string) @name) @definition.view.element.name
-)
-(
-(view_element_tag
-object_type: (single_line_string) @name) @definition.view.element.tag.object_type
-)
-(
-(view_element_field
-name: (single_line_string) @name) @definition.view.element.field.name
-)
-(
-(view_element_field
-placement: (single_line_string) @name) @definition.view.element.field.placement
-)
-(
-(view_element_hidden_tag
-hidden_tag: (single_line_string) @name) @definition.view.element.hidden_tag
-)
-
-; -- Section & Requirement Definitions --
-
-(
-(section_or_requirement_list) @definition.section.list
-)
-(
- (sdoc_section) @definition.section
-)
-
-(
- (section_body
- mid: (single_line_string) @name) @definition.section.mid
-)
-
-(
-(section_body
- uid: (uid_string) @name) @definition.section.uid
-)
-
-(
- (section_body
- custom_level: (single_line_string) @name) @definition.section.level
-)
-
-(
- (section_body
- title: (single_line_string) @name) @definition.section.title
-)
-
-(
- (section_body
- requirement_prefix: (single_line_string) @name) @definition.section.requirement_prefix
-)
-; -- Document From File Reference --
-(
-(document_from_file
-path: (file_path) @name) @definition.document.from_file
-)
-
-; -- SDoc Node Definitions --
-(
-(sdoc_node) @definition.node
-)
-(
-(sdoc_composite_node) @definition.composite_node
-)
-(
-(sdoc_composite_node_opening
-node_type_opening: (sdoc_composite_node_type_name) @name) @definition.composite_node.opening
-)
-(
-(sdoc_composite_node_type_name) @definition.composite_node.type
-)
-
-; -- SDoc Node Field Definitions --
-(
- (sdoc_node_field_mid
- mid: (single_line_string) @name) @definition.node.mid
-)
-
-(
- (sdoc_node_field_uid
- uid: (uid_string) @name) @definition.node.uid
-)
-
-(
- (sdoc_node_field_generic
- field_name: (field_name) @name
- ) @definition.node.field
-)
-
-(
- (parent_req_reference
- ref_uid: (req_reference_value_id) @name) @reference.node.uid
-)
-
-(
- (child_req_reference
- ref_uid: (req_reference_value_id) @name) @reference.node.uid
-)
diff --git a/runtime/queries/svelte/folds.scm b/runtime/queries/svelte/folds.scm
deleted file mode 100644
index 6440301a..00000000
--- a/runtime/queries/svelte/folds.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-; inherits: html
-
-[
- (if_statement)
- (else_if_block)
- (else_block)
- (each_statement)
- (await_statement)
- (then_block)
- (catch_block)
- (key_statement)
- (snippet_statement)
-] @fold
diff --git a/runtime/queries/svelte/highlights.scm b/runtime/queries/svelte/highlights.scm
index efd41406..7ab72903 100644
--- a/runtime/queries/svelte/highlights.scm
+++ b/runtime/queries/svelte/highlights.scm
@@ -1,38 +1,68 @@
-; inherits: html
+; Special identifiers
+;--------------------
-(raw_text) @none
+(tag_name) @tag
+(attribute_name) @variable.other.member
+(erroneous_end_tag_name) @error
+(comment) @comment
-[
- "as"
- "key"
- "html"
- "debug"
- "snippet"
- "render"
-] @keyword
+; TODO:
+((element (start_tag (tag_name) @_tag) (text) @markup.heading)
+ (#match? @_tag "^(h[0-9]|title)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @markup.bold)
+ (#match? @_tag "^(strong|b)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @markup.italic)
+ (#match? @_tag "^(em|i)$"))
+
+; ((element (start_tag (tag_name) @_tag) (text) @markup.strike)
+; (#match? @_tag "^(s|del)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @markup.underline)
+ (#eq? @_tag "u"))
-"const" @keyword.storage.modifier
+((element (start_tag (tag_name) @_tag) (text) @markup.inline)
+ (#match? @_tag "^(code|kbd)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @markup.link.url)
+ (#eq? @_tag "a"))
+
+((attribute
+ (attribute_name) @_attr
+ (quoted_attribute_value (attribute_value) @markup.link.url))
+ (#match? @_attr "^(href|src)$"))
[
- "if"
- "else if"
- "else"
- "then"
- "await"
-] @keyword.control.conditional
+ (attribute_value)
+ (quoted_attribute_value)
+] @string
-"each" @keyword.control.repeat
+[
+ (text)
+ (raw_text_expr)
+] @none
-"catch" @keyword.control.exception
+[
+ (special_block_keyword)
+ (then)
+ (as)
+] @keyword
[
"{"
"}"
-] @punctuation.bracket
+] @punctuation.brackets
+
+"=" @operator
[
+ "<"
+ ">"
+ "</"
+ "/>"
"#"
":"
"/"
"@"
-] @punctuation.delimiter
+] @punctuation.definition.tag
diff --git a/runtime/queries/svelte/indents.scm b/runtime/queries/svelte/indents.scm
index 4bb103d7..d0408d61 100644
--- a/runtime/queries/svelte/indents.scm
+++ b/runtime/queries/svelte/indents.scm
@@ -1,24 +1,18 @@
[
(element)
- (start_tag)
(if_statement)
- (else_if_block)
- (else_block)
- (then_block)
(each_statement)
- (key_statement)
- (snippet_statement)
(await_statement)
- (style_element)
(script_element)
- (expression)
+ (style_element)
] @indent
[
(end_tag)
- (if_end)
- (each_end)
- (await_end)
- (key_end)
- (snippet_end)
-] @outdent
+ (else_statement)
+ (if_end_expr)
+ (each_end_expr)
+ (await_end_expr)
+ ">"
+ "/>"
+] @outdent \ No newline at end of file
diff --git a/runtime/queries/svelte/injections.scm b/runtime/queries/svelte/injections.scm
index c94373c1..52d430c3 100644
--- a/runtime/queries/svelte/injections.scm
+++ b/runtime/queries/svelte/injections.scm
@@ -1,46 +1,40 @@
-; inherits html
+; injections.scm
+; --------------
((style_element
- (start_tag
- (attribute
- (attribute_name) @_attr
- (quoted_attribute_value
- (attribute_value) @_lang)))
(raw_text) @injection.content)
+ (#set! injection.language "css"))
+
+((style_element
+ (start_tag
+ (attribute
+ (attribute_name) @_attr
+ (quoted_attribute_value (attribute_value) @_lang)))
+ (raw_text) @injection.content)
(#eq? @_attr "lang")
- (#any-of? @_lang "scss" "postcss" "less")
+ (#match? @_lang "scss")
(#set! injection.language "scss"))
-((svelte_raw_text) @injection.content
- (#set! injection.language "typescript"))
+((attribute
+ (attribute_name) @_attr
+ (quoted_attribute_value (attribute_value) @css))
+ (#eq? @_attr "style"))
-((script_element
- (start_tag
- (attribute
- (attribute_name) @_attr
- (quoted_attribute_value
- (attribute_value) @_lang)))
- (raw_text) @injection.content)
- (#eq? @_attr "lang")
- (#any-of? @_lang "ts" "typescript")
- (#set! injection.language "typescript"))
+(
+ (script_element
+ (start_tag
+ (attribute
+ (quoted_attribute_value (attribute_value) @_lang)))
+ (raw_text) @injection.content)
+ (#match? @_lang "(ts|typescript)")
+ (#set! injection.language "typescript")
+)
((script_element
- (start_tag
- (attribute
- (attribute_name) @_attr
- (quoted_attribute_value
- (attribute_value) @_lang)))
(raw_text) @injection.content)
- (#eq? @_attr "lang")
- (#any-of? @_lang "js" "javascript")
(#set! injection.language "javascript"))
-((element
- (start_tag
- (attribute
- (attribute_name) @_attr
- (quoted_attribute_value
- (attribute_value) @injection.language)))
- (text) @injection.content)
- (#eq? @_attr "lang")
- (#eq? @injection.language "pug"))
+((raw_text_expr) @injection.content
+ (#set! injection.language "javascript"))
+
+((comment) @injection.content
+ (#set! injection.language "comment"))
diff --git a/runtime/queries/svelte/locals.scm b/runtime/queries/svelte/locals.scm
deleted file mode 100644
index 1f2129cf..00000000
--- a/runtime/queries/svelte/locals.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: html
diff --git a/runtime/queries/swift/rainbows.scm b/runtime/queries/swift/rainbows.scm
deleted file mode 100644
index 49ede9fc..00000000
--- a/runtime/queries/swift/rainbows.scm
+++ /dev/null
@@ -1,60 +0,0 @@
-[
- (array_literal)
- (array_type)
- (attribute)
- (availability_condition)
- (call_expression)
- (call_suffix)
- (catch_block)
- (class_body)
- (class_declaration)
- (computed_getter)
- (computed_property)
- (computed_setter)
- (dictionary_literal)
- (dictionary_type)
- (didset_clause)
- (do_statement)
- (enum_class_body)
- (enum_entry)
- (enum_type_parameters)
- (for_statement)
- (function_body)
- (function_declaration)
- (guard_statement)
- (if_statement)
- (init_declaration)
- (lambda_literal)
- (line_string_literal)
- (modifiers)
- (navigation_expression)
- (optional_type)
- (pattern)
- (protocol_body)
- (protocol_declaration)
- (protocol_function_declaration)
- (protocol_property_requirements)
- (property_declaration)
- (source_file)
- (statements)
- (subscript_declaration)
- (switch_entry)
- (switch_pattern)
- (switch_statement)
- (tuple_expression)
- (tuple_type)
- (tuple_type_item)
- (type_annotation)
- (value_arguments)
- (visibility_modifier)
- (while_statement)
- (willset_didset_block)
-] @rainbow.scope
-
-[
- "(" ")"
- "[" "]"
- "{" "}"
- "<" ">"
- "\\("
-] @rainbow.bracket
diff --git a/runtime/queries/systemd/highlights.scm b/runtime/queries/systemd/highlights.scm
deleted file mode 100644
index 5fa4bb82..00000000
--- a/runtime/queries/systemd/highlights.scm
+++ /dev/null
@@ -1 +0,0 @@
-; inherits: ini
diff --git a/runtime/queries/systemverilog/highlights.scm b/runtime/queries/systemverilog/highlights.scm
deleted file mode 100644
index 74653229..00000000
--- a/runtime/queries/systemverilog/highlights.scm
+++ /dev/null
@@ -1,321 +0,0 @@
-;; Comments
-(one_line_comment) @comment
-(block_comment) @comment
-
-
-;; Strings
-(string_literal) @string
-(quoted_string) @string ; `include strings
-(system_lib_string) @string
-
-
-;; Keywords
-(["begin" "end" "this"]) @keyword
-(["input" "output" "inout" "ref"]) @keyword
-(["alias" "and" "assert" "assign" "assume" "before" "bind" "binsof" "break"
- "case" "checker" "class" "class" "clocking" "config" "const" "constraint"
- "cover" "covergroup" "coverpoint" "cross" "default" "defparam" "disable"
- "do" "else" "endcase" "endchecker" "endclass" "endclocking" "endconfig"
- "endfunction" "endgenerate" "endgroup" "endinterface" "endmodule"
- "endpackage" "endprogram" "endproperty" "endsequence" "endtask" "enum"
- "extends" "extern" "final" "first_match" "for" "force" "foreach" "forever"
- "fork" "forkjoin" "function" "generate" "genvar" "if" "iff" "illegal_bins"
- "implements" "import" "initial" "inside" "interconnect" "interface"
- "intersect" "join" "join_any" "join_none" "local" "localparam" "matches"
- "modport" "new" "null" "option" "or" "package" "packed" "parameter"
- "program" "property" "pure" "randcase" "randomize" "release" "repeat"
- "return" "sequence" "showcancelled" "soft" "solve" "struct" "super" "tagged"
- "task" "timeprecision" "timeunit" "type" "typedef" "union" "unique"
- "virtual" "wait" "while" "with"
- (always_keyword) ; always, always_comb, always_latch, always_ff
- (bins_keyword) ; bins, illegal_bins, ignore_bins
- (case_keyword) ; case, casez, casex
- (class_item_qualifier) ; static, protected, local
- (edge_identifier) ; posedge, negedge, edge
- (lifetime) ; static, automatic
- (module_keyword) ; module, macromodule
- (random_qualifier) ; rand, randc
- (unique_priority)]) @keyword ; unique, unique0, priority
-
-
-;; Preprocessor directives and macro usage
-(["`include" "`define" "`ifdef" "`ifndef" "`timescale" "`default_nettype"
- "`elsif" "`undef" (resetall_compiler_directive) (undefineall_compiler_directive)
- "`endif" "`else" "`unconnected_drive" (celldefine_compiler_directive)
- (endcelldefine_compiler_directive) (endkeywords_directive) "`line"
- "`begin_keywords" "`pragma" "`__FILE__" "`__LINE__"]) @string.special
-(text_macro_usage
- (simple_identifier) @string.special)
-
-
-;; Delimiters, operators
-([";" ":" "," "::"
- "=" "?" "|=" "&=" "^="
- "|->" "|=>" "->"
- ":=" ":/" "-:" "+:"]) @punctuation.delimiter
-(["(" ")"]) @punctuation.bracket
-(["[" "]"]) @punctuation.bracket
-(["{" "}" "'{"]) @punctuation.bracket
-
-(["."] @operator)
-(["+" "-" "*" "/" "%" "**"]) @operator
-(["<" "<=" ">" ">="]) @operator
-(["===" "!==" "==" "!="]) @operator
-(["&&" "||" "!"]) @operator
-(["~" "&" "~&" "|" "~|" "^" "~^"]) @operator
-(["<<" ">>" "<<<" ">>>"]) @operator
-
-(["@" "#" "##"]) @operator
-(assignment_operator) @operator
-(unary_operator) @operator
-(inc_or_dec_operator) @operator
-(stream_operator) @operator
-(event_trigger) @operator
-(["->" "->>"]) @operator
-
-
-;; Declarations
-;; Module/interface/program/package/class/checker
-(module_nonansi_header
- name: (simple_identifier) @function)
-(module_ansi_header
- name: (simple_identifier) @function)
-(interface_nonansi_header
- name: (simple_identifier) @function)
-(interface_ansi_header
- name: (simple_identifier) @function)
-(program_nonansi_header
- name: (simple_identifier) @function)
-(program_ansi_header
- name: (simple_identifier) @function)
-(package_declaration
- name: (simple_identifier) @function)
-(class_declaration
- name: (simple_identifier) @function)
-(interface_class_declaration
- name: (simple_identifier) @function)
-(checker_declaration
- name: (simple_identifier) @function)
-(class_declaration
- (class_type
- (simple_identifier) @type)) ; Parent class
-;; Function/task/methods
-(function_body_declaration
- name: (simple_identifier) @function)
-(task_body_declaration
- name: (simple_identifier) @function)
-(function_prototype
- (data_type_or_void)
- name: (simple_identifier) @function)
-(task_prototype
- name: (simple_identifier) @function)
-(class_scope ; Definition of extern defined methods
- (class_type
- (simple_identifier)) @function)
-
-
-;; Types
-[(integer_vector_type) ; bit, logic, reg
- (integer_atom_type) ; byte, shortint, int, longint, integer, time
- (non_integer_type) ; shortreal, real, realtime
- (net_type) ; supply0, supply1, tri, triand, trior, trireg, tri0, tri1, uwire, wire, wand, wor
- ["string" "event" "signed" "unsigned" "chandle"]] @type
-(data_type_or_implicit
- (data_type
- (simple_identifier)) @type)
-(data_type
- (class_type
- (simple_identifier) @type
- (parameter_value_assignment)))
-(data_type
- (class_type
- (simple_identifier) @operator
- (simple_identifier) @type))
-(net_port_header
- (net_port_type
- (simple_identifier) @type))
-(variable_port_header
- (variable_port_type
- (data_type
- (simple_identifier) @type)))
-(["void'" (data_type_or_void)]) @type ; void cast of task called as a function
-(interface_port_header ; Interfaces with modports
- interface_name: (simple_identifier) @type
- modport_name: (simple_identifier) @type)
-(type_assignment
- name: (simple_identifier) @type)
-(net_declaration ; User type variable declaration
- (simple_identifier) @type)
-(enum_base_type ; Enum base type with user type
- (simple_identifier) @type)
-
-
-;; Instances
-;; Module names
-(module_instantiation
- instance_type: (simple_identifier) @namespace)
-(interface_instantiation
- instance_type: (simple_identifier) @namespace)
-(program_instantiation
- instance_type: (simple_identifier) @namespace)
-(checker_instantiation
- instance_type: (simple_identifier) @namespace)
-(udp_instantiation
- instance_type: (simple_identifier) @namespace)
-(gate_instantiation
- [(cmos_switchtype)
- (mos_switchtype)
- (enable_gatetype)
- (n_input_gatetype)
- (n_output_gatetype)
- (pass_en_switchtype)
- (pass_switchtype)
- "pulldown" "pullup"]
- @namespace)
-;; Instance names
-(name_of_instance
- instance_name: (simple_identifier) @constant)
-;; Instance parameters
-(module_instantiation
- (parameter_value_assignment
- (list_of_parameter_value_assignments
- (named_parameter_assignment
- (simple_identifier) @constant))))
-(module_instantiation
- (parameter_value_assignment
- (list_of_parameter_value_assignments
- (ordered_parameter_assignment
- (param_expression
- (data_type
- (simple_identifier) @constant))))))
-;; Port names
-(named_port_connection
- port_name: (simple_identifier) @constant)
-(named_parameter_assignment
- (simple_identifier) @constant)
-(named_checker_port_connection
- port_name: (simple_identifier) @constant)
-;; Bind statements
-(bind_directive
- (bind_target_scope
- (simple_identifier) @constant))
-
-
-;; Numbers
-(hex_number
- size: (unsigned_number) @constant.numeric
- base: (hex_base) @punctuation.delimiter)
-(decimal_number
- size: (unsigned_number) @constant.numeric
- base: (decimal_base) @punctuation.delimiter)
-(octal_number
- size: (unsigned_number) @constant.numeric
- base: (octal_base) @punctuation.delimiter)
-(binary_number
- size: (unsigned_number) @constant.numeric
- base: (binary_base) @punctuation.delimiter)
-;; Same as before but without the width (width extension)
-(hex_number
- base: (hex_base) @punctuation.delimiter)
-(decimal_number
- base: (decimal_base) @punctuation.delimiter)
-(octal_number
- base: (octal_base) @punctuation.delimiter)
-(binary_number
- base: (binary_base) @punctuation.delimiter)
-
-
-;; Arrays
-(unpacked_dimension
- [(constant_expression) (constant_range)] @constant.numeric)
-(packed_dimension
- (constant_range) @constant.numeric)
-(select
- (constant_range) @constant.numeric)
-(constant_select
- (constant_range
- (constant_expression) @constant.numeric))
-(constant_bit_select
- (constant_expression) @constant.numeric)
-(bit_select
- (expression) @constant.numeric)
-(indexed_range
- (expression) @constant.numeric
- (constant_expression) @constant.numeric)
-(constant_indexed_range
- (constant_expression) @constant.numeric)
-(value_range ; inside {[min_range:max_range]}, place here to apply override
- (expression) @constant)
-(dynamic_array_new
- (expression) @constant)
-
-
-;; Misc
-;; Timeunit
-((time_unit) @constant.builtin)
-;; Enum labels
-(enum_name_declaration
- (simple_identifier) @constant.builtin)
-;; Case item label (not radix)
-(case_item_expression
- (expression
- (primary
- (hierarchical_identifier
- (simple_identifier) @constant.builtin))))
-;; Hierarchical references, interface signals, class members, package scope
-(hierarchical_identifier
- (simple_identifier) @punctuation.delimiter
- "."
- (simple_identifier))
-(method_call
- (primary) @punctuation.delimiter
- (["." "::"])
- (method_call_body))
-(package_scope
- (simple_identifier) @punctuation.delimiter)
-(method_call
- (primary
- (select
- (simple_identifier) @punctuation.delimiter))
- (method_call_body))
-;; Attributes
-(["(*" "*)"] @constant)
-(attribute_instance
- (attr_spec (simple_identifier) @attribute))
-;; Typedefs
-(type_declaration
- (class_type (simple_identifier) @type)
- type_name: (simple_identifier) @constant)
-(type_declaration
- type_name: (simple_identifier) @constant)
-("typedef" "class" (simple_identifier) @constant)
-;; Coverpoint & cross labels
-(cover_point
- name: (simple_identifier) @constant)
-(cover_cross
- name: (simple_identifier) @constant)
-;; Loop variables (foreach[i])
-(loop_variables
- (simple_identifier) @constant)
-;; Bins values
-(bins_or_options
- (expression
- (primary
- (concatenation
- (expression) @constant))))
-;; Bins ranges
-(covergroup_value_range
- (expression) @constant)
-;; Queue dimension
-(("$") @punctuation.special)
-;; Parameterized classes (e.g: uvm_config_db #(axi_stream_agent_config))
-(class_type
- (parameter_value_assignment
- (list_of_parameter_value_assignments) @punctuation.delimiter))
-
-
-;; System-tf
-([(system_tf_identifier) ; System task/function
- "$fatal" "$error" "$warning" "$info" ; (severity_system_task)
- "$stop" "$finish" "$exit"]) ; (simulation_control_task)
diff --git a/runtime/queries/toml/rainbows.scm b/runtime/queries/toml/rainbows.scm
deleted file mode 100644
index 1f61c8ac..00000000
--- a/runtime/queries/toml/rainbows.scm
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- (table_array_element)
- (table)
- (array)
- (inline_table)
-] @rainbow.scope
-
-[
- "[[" "]]"
- "[" "]"
- "{" "}"
-] @rainbow.bracket
diff --git a/runtime/queries/tsq/rainbows.scm b/runtime/queries/tsq/rainbows.scm
deleted file mode 100644
index 9001f07f..00000000
--- a/runtime/queries/tsq/rainbows.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-[
- (list)
- (predicate)
- (grouping)
- (named_node)
-] @rainbow.scope
-
-[
- "(" ")"
- "[" "]"
-] @rainbow.bracket
diff --git a/runtime/queries/tsx/rainbows.scm b/runtime/queries/tsx/rainbows.scm
deleted file mode 100644
index 64c2fe36..00000000
--- a/runtime/queries/tsx/rainbows.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-; inherits: typescript
-; inherits: jsx
diff --git a/runtime/queries/typescript/rainbows.scm b/runtime/queries/typescript/rainbows.scm
deleted file mode 100644
index 919061aa..00000000
--- a/runtime/queries/typescript/rainbows.scm
+++ /dev/null
@@ -1,19 +0,0 @@
-; inherits: ecma
-
-[
- (import_require_clause)
- (enum_body)
- (lookup_type)
- (parenthesized_type)
- (object_type)
- (type_parameters)
- (index_signature)
- (array_type)
- (tuple_type)
-] @rainbow.scope
-
-(type_arguments ["<" ">"] @rainbow.bracket) @rainbow.scope
-
-[
- "{|" "|}"
-] @rainbow.bracket
diff --git a/runtime/queries/typst/highlights.scm b/runtime/queries/typst/highlights.scm
index 7b1b7c72..4e012a2f 100644
--- a/runtime/queries/typst/highlights.scm
+++ b/runtime/queries/typst/highlights.scm
@@ -1,3 +1,11 @@
+(call
+ item: (ident) @function)
+(call
+ item: (field field: (ident) @function.method))
+(tagged field: (ident) @tag)
+(field field: (ident) @tag)
+(comment) @comment
+
; CONTROL
(let "let" @keyword.storage.type)
(branch ["if" "else"] @keyword.control.conditional)
@@ -42,15 +50,6 @@
(auto) @constant.builtin
(ident) @variable
-; FUNCTIONS
-(call
- item: (ident) @function)
-(call
- item: (field field: (ident) @function.method))
-(tagged field: (ident) @tag)
-(field field: (ident) @tag)
-(comment) @comment
-
; MARKUP
(item "-" @markup.list)
(term ["/" ":"] @markup.list)
diff --git a/runtime/queries/typst/tags.scm b/runtime/queries/typst/tags.scm
deleted file mode 100644
index e6f22998..00000000
--- a/runtime/queries/typst/tags.scm
+++ /dev/null
@@ -1,6 +0,0 @@
-; should be a heading
-(heading (text) @definition.class)
-
-; should be a label/reference/tag
-(heading (label) @definition.function)
-(content (label) @definition.function)
diff --git a/runtime/queries/unison/rainbows.scm b/runtime/queries/unison/rainbows.scm
deleted file mode 100644
index 1721dc55..00000000
--- a/runtime/queries/unison/rainbows.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-[
- (literal_list)
- (parenthesized_or_tuple_pattern)
-] @rainbow.scope
-
-[
- "(" ")"
- "{" "}"
- "[" "]"
-] @rainbow.bracket
diff --git a/runtime/queries/unison/tags.scm b/runtime/queries/unison/tags.scm
deleted file mode 100644
index 2834748a..00000000
--- a/runtime/queries/unison/tags.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-(term_definition
- name: (regular_identifier) @name) @definition.function
-
-(type_declaration
- (type_kw)
- (type_constructor
- ((type_name (regular_identifier) @name)) @definition.type))
-
-(ability_declaration
- (ability_name) @type _) @definition.type
diff --git a/runtime/queries/vim/folds.scm b/runtime/queries/vim/folds.scm
deleted file mode 100644
index 0a1fb695..00000000
--- a/runtime/queries/vim/folds.scm
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- (if_statement)
- (function_definition)
-] @fold
diff --git a/runtime/queries/vim/highlights.scm b/runtime/queries/vim/highlights.scm
deleted file mode 100644
index d2686241..00000000
--- a/runtime/queries/vim/highlights.scm
+++ /dev/null
@@ -1,350 +0,0 @@
-(identifier) @variable
-
-((identifier) @constant
- (#match? @constant "^[A-Z][A-Z_0-9]*$"))
-
-; Keywords
-[
- "if"
- "else"
- "elseif"
- "endif"
-] @keyword.control.conditional
-
-[
- "try"
- "catch"
- "finally"
- "endtry"
- "throw"
-] @keyword.control.except
-
-[
- "for"
- "endfor"
- "in"
- "while"
- "endwhile"
- "break"
- "continue"
-] @keyword.control.repeat
-
-[
- "function"
- "endfunction"
-] @keyword.function
-
-; Function related
-(function_declaration
- name: (_) @function)
-
-(call_expression
- function: (identifier) @function)
-
-(call_expression
- function:
- (scoped_identifier
- (identifier) @function))
-
-(parameters
- (identifier) @variable.parameter)
-
-(default_parameter
- (identifier) @variable.parameter)
-
-[
- (bang)
- (spread)
-] @punctuation.special
-
-[
- (no_option)
- (inv_option)
- (default_option)
- (option_name)
-] @variable.builtin
-
-[
- (scope)
- "a:"
- "$"
-] @namespace
-
-; Commands and user defined commands
-[
- "let"
- "unlet"
- "const"
- "call"
- "execute"
- "normal"
- "set"
- "setfiletype"
- "setlocal"
- "silent"
- "echo"
- "echon"
- "echohl"
- "echomsg"
- "echoerr"
- "autocmd"
- "augroup"
- "return"
- "syntax"
- "filetype"
- "source"
- "lua"
- "ruby"
- "perl"
- "python"
- "highlight"
- "command"
- "delcommand"
- "comclear"
- "colorscheme"
- "scriptencoding"
- "startinsert"
- "stopinsert"
- "global"
- "runtime"
- "wincmd"
- "cnext"
- "cprevious"
- "cNext"
- "vertical"
- "leftabove"
- "aboveleft"
- "rightbelow"
- "belowright"
- "topleft"
- "botright"
- (unknown_command_name)
- "edit"
- "enew"
- "find"
- "ex"
- "visual"
- "view"
- "eval"
- "sign"
-] @keyword
-
-(map_statement
- cmd: _ @keyword)
-
-(keycode) @constant.character.escape
-
-(command_name) @function.macro
-
-; Filetype command
-(filetype_statement
- [
- "detect"
- "plugin"
- "indent"
- "on"
- "off"
- ] @keyword)
-
-; Syntax command
-(syntax_statement
- (keyword) @string)
-
-(syntax_statement
- [
- "enable"
- "on"
- "off"
- "reset"
- "case"
- "spell"
- "foldlevel"
- "iskeyword"
- "keyword"
- "match"
- "cluster"
- "region"
- "clear"
- "include"
- ] @keyword)
-
-(syntax_argument
- name: _ @keyword)
-
-[
- "<buffer>"
- "<nowait>"
- "<silent>"
- "<script>"
- "<expr>"
- "<unique>"
-] @constant.builtin
-
-(augroup_name) @namespace
-
-(au_event) @constant
-
-(normal_statement
- (commands) @constant)
-
-; Highlight command
-(hl_attribute
- key: _ @variable.parameter
- val: _ @constant)
-
-(hl_group) @type
-
-(highlight_statement
- [
- "default"
- "link"
- "clear"
- ] @keyword)
-
-; Command command
-(command) @string
-
-(command_attribute
- name: _ @variable.parameter)
-
-(command_attribute
- val: (behavior
- _ @constant))
-
-; Edit command
-(plus_plus_opt
- val: _? @constant) @variable.parameter
-
-(plus_cmd
- "+" @variable.parameter) @variable.parameter
-
-; Runtime command
-(runtime_statement
- (where) @keyword.operator)
-
-; Colorscheme command
-(colorscheme_statement
- (name) @string)
-
-; Scriptencoding command
-(scriptencoding_statement
- (encoding) @string.special)
-
-; Literals
-(string_literal) @string
-
-(integer_literal) @constant.numeric.integer
-
-(float_literal) @constant.numeric.float
-
-(comment) @comment
-
-(line_continuation_comment) @comment
-
-(pattern) @string.special
-
-(pattern_multi) @string.regexp
-
-(filename) @string.special.path
-
-(heredoc
- (body) @string)
-
-(heredoc
- (parameter) @keyword)
-
-[
- (marker_definition)
- (endmarker)
-] @label
-
-(literal_dictionary
- (literal_key) @variable.parameter)
-
-((scoped_identifier
- (scope) @_scope
- .
- (identifier) @constant.builtin.boolean)
- (#eq? @_scope "v:")
- (#any-of? @constant.builtin.boolean "true" "false"))
-
-; Operators
-[
- "||"
- "&&"
- "&"
- "+"
- "-"
- "*"
- "/"
- "%"
- ".."
- "is"
- "isnot"
- "=="
- "!="
- ">"
- ">="
- "<"
- "<="
- "=~"
- "!~"
- "="
- "+="
- "-="
- "*="
- "/="
- "%="
- ".="
- "..="
- "<<"
- "=<<"
- (match_case)
-] @operator
-
-; Some characters have different meanings based on the context
-(unary_operation
- "!" @operator)
-
-(binary_operation
- "." @operator)
-
-; Punctuation
-[
- "("
- ")"
- "{"
- "}"
- "["
- "]"
- "#{"
-] @punctuation.bracket
-
-(field_expression
- "." @punctuation.delimiter)
-
-[
- ","
- ":"
-] @punctuation.delimiter
-
-(ternary_expression
- [
- "?"
- ":"
- ] @keyword.operator)
-
-; Options
-((set_value) @constant.numeric
- (#match? @constant.numeric "^[0-9]+([.][0-9]+)?$"))
-
-(inv_option
- "!" @operator)
-
-(set_item
- "?" @operator)
-
-((set_item
- option: (option_name) @_option
- value: (set_value) @function)
- (#any-of? @_option "tagfunc" "tfu" "completefunc" "cfu" "omnifunc" "ofu" "operatorfunc" "opfunc"))
diff --git a/runtime/queries/vim/injections.scm b/runtime/queries/vim/injections.scm
deleted file mode 100644
index 30d11cbb..00000000
--- a/runtime/queries/vim/injections.scm
+++ /dev/null
@@ -1,44 +0,0 @@
-(lua_statement
- (script
- (body) @injection.content
- (#set! injection.language "lua")))
-
-(lua_statement
- (chunk) @injection.content
- (#set! injection.language "lua"))
-
-(ruby_statement
- (script
- (body) @injection.content
- (#set! injection.language "ruby")))
-
-(ruby_statement
- (chunk) @injection.content
- (#set! injection.language "ruby"))
-
-(python_statement
- (script
- (body) @injection.content
- (#set! injection.language "python")))
-
-(python_statement
- (chunk) @injection.content
- (#set! injection.language "python"))
-
-; If we support perl at some point...
-; (perl_statement (script (body) @perl))
-; (perl_statement (chunk) @perl)
-(autocmd_statement
- (pattern) @injection.content
- (#set! injection.language "regex"))
-
-((set_item
- option: (option_name) @_option
- value: (set_value) @injection.content)
- (#any-of? @_option
- "includeexpr" "inex" "printexpr" "pexpr" "formatexpr" "fex" "indentexpr" "inde" "foldtext" "fdt"
- "foldexpr" "fde" "diffexpr" "dex" "patchexpr" "pex" "charconvert" "ccv")
- (#set! injection.language "vim"))
-
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/wgsl/indents.scm b/runtime/queries/wgsl/indents.scm
deleted file mode 100644
index ef65973a..00000000
--- a/runtime/queries/wgsl/indents.scm
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- (struct_declaration)
- (compound_statement)
-] @indent
-
-"}" @outdent
diff --git a/runtime/queries/wgsl/rainbows.scm b/runtime/queries/wgsl/rainbows.scm
deleted file mode 100644
index 6e644e36..00000000
--- a/runtime/queries/wgsl/rainbows.scm
+++ /dev/null
@@ -1,14 +0,0 @@
-[
- (struct_declaration)
- (function_declaration)
- (attribute)
- (type_declaration)
- (compound_statement)
- (argument_list_expression)
- (postfix_expression)
- (variable_qualifier)
- (subscript_expression)
- (parenthesized_expression)
-] @rainbow.scope
-
-["(" ")" "[" "]" "{" "}" "<" ">"] @rainbow.bracket
diff --git a/runtime/queries/wgsl/tags.scm b/runtime/queries/wgsl/tags.scm
deleted file mode 100644
index ae640b4b..00000000
--- a/runtime/queries/wgsl/tags.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-(struct_declaration
- name: (identifier) @definition.struct)
-
-(function_declaration
- name: (identifier) @definition.function)
-
-(global_variable_declaration
- (variable_declaration
- (variable_identifier_declaration
- name: (identifier) @definition.constant)))
diff --git a/runtime/queries/wgsl/textobjects.scm b/runtime/queries/wgsl/textobjects.scm
deleted file mode 100644
index 4dade474..00000000
--- a/runtime/queries/wgsl/textobjects.scm
+++ /dev/null
@@ -1,14 +0,0 @@
-(function_declaration
- body: (_) @function.inside) @function.around
-
-(struct_declaration) @class.around
-
-[
- (struct_member)
- (parameter)
- (variable_declaration)
-] @parameter.around
-
-(comment) @comment.inside
-
-(comment)+ @comment.around
diff --git a/runtime/queries/wikitext/folds.scm b/runtime/queries/wikitext/folds.scm
deleted file mode 100644
index baefe749..00000000
--- a/runtime/queries/wikitext/folds.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-(section) @fold
-
diff --git a/runtime/queries/wikitext/highlights.scm b/runtime/queries/wikitext/highlights.scm
deleted file mode 100644
index a3545ca8..00000000
--- a/runtime/queries/wikitext/highlights.scm
+++ /dev/null
@@ -1,92 +0,0 @@
-(heading1
- (heading_marker) @markup.heading.marker
- (text) @markup.heading.1
- (heading_marker) @markup.heading.marker
-)
-(heading2
- (heading_marker) @markup.heading.marker
- (text) @markup.heading.2
- (heading_marker) @markup.heading.marker
-)
-(heading3
- (heading_marker) @markup.heading.marker
- (text) @markup.heading.3
- (heading_marker) @markup.heading.marker
-)
-(heading4
- (heading_marker) @markup.heading.marker
- (text) @markup.heading.4
- (heading_marker) @markup.heading.marker
-)
-(heading5
- (heading_marker) @markup.heading.marker
- (text) @markup.heading.5
- (heading_marker) @markup.heading.marker
-)
-(heading6
- (heading_marker) @markup.heading.marker
- (text) @markup.heading.6
- (heading_marker) @markup.heading.marker
-)
-
-(wikilink
- (wikilink_page) @markup.link.url
- (page_name_segment)? @markup.link.label
-)
-(external_link
- (url) @markup.link.url
- (page_name_segment)? @markup.link.label
-)
-
-(template
- (template_name) @function
- (template_argument
- (template_param_name)? @attribute
- (template_param_value)? @string
- )
-)
-
-(comment) @comment
-
-[
- "[["
- "]]"
- "{{"
- "}}"
- "{|"
- "|}"
- "["
- "]"
- "<"
- ">"
- "</"
-] @punctuation.bracket
-
-[
- "|"
- "|-"
- "|+"
- "!"
- "!!"
- "||"
-] @punctuation.delimiter
-
-(table_header_block
- (content) @markup.bold
-)
-(table_header_inline
- (content) @markup.bold
-)
-
-(html_tag_name) @tag
-(html_attribute
- (html_attribute_name) @attribute
-)
-(html_attribute
- (html_attribute_name) @attribute
- (html_attribute_value) @string
-)
-
-(italic) @markup.italic
-(bold) @markup.bold
-
diff --git a/runtime/queries/xml/rainbows.scm b/runtime/queries/xml/rainbows.scm
deleted file mode 100644
index 0ff9c7fa..00000000
--- a/runtime/queries/xml/rainbows.scm
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- (processing_instructions)
- (cdata_sect)
- (xml_decl)
- (doctype_decl)
- (element_decl)
- (element_choice)
- (element_seq)
- (mixed)
- (attlist_decl)
- (notation_type)
- (enumeration)
- (ge_decl)
- (pe_decl)
- (notation_decl)
-] @rainbow.scope
-
-((element) @rainbow.scope
- (#set! rainbow.include-children))
-
-[
- "<?" "?>"
- "<" ">"
- "</" "/>"
- "<!"
- "(" ")"
- ")*"
- "[" "]"
-] @rainbow.bracket
diff --git a/runtime/queries/xml/textobjects.scm b/runtime/queries/xml/textobjects.scm
deleted file mode 100644
index e23873e4..00000000
--- a/runtime/queries/xml/textobjects.scm
+++ /dev/null
@@ -1,5 +0,0 @@
-(element (start_tag) (_)* @xml-element.inside (end_tag))
-
-(element) @xml-element.around
-
-(comment) @comment.around
diff --git a/runtime/queries/yaml/injections.scm b/runtime/queries/yaml/injections.scm
index e0e1094b..a16a945a 100644
--- a/runtime/queries/yaml/injections.scm
+++ b/runtime/queries/yaml/injections.scm
@@ -21,22 +21,23 @@
; Modified for Helix from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/yaml/injections.scm
;; GitHub actions: run
+;; Gitlab CI: scripts, before_script, after_script
;; Buildkite: command, commands
(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "run" "command" "commands")
+ key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (flow_node
(plain_scalar
(string_scalar) @injection.content)
(#set! injection.language "bash")))
(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "run" "command" "commands")
+ key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (block_node
(block_scalar) @injection.content
(#set! injection.language "bash")))
(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "run" "command" "commands")
+ key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (block_node
(block_sequence
(block_sequence_item
@@ -46,7 +47,7 @@
(#set! injection.language "bash")))))
(block_mapping_pair
- key: (flow_node) @_run (#any-of? @_run "run" "command" "commands")
+ key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (block_node
(block_sequence
(block_sequence_item
diff --git a/runtime/queries/yaml/rainbows.scm b/runtime/queries/yaml/rainbows.scm
deleted file mode 100644
index d810accc..00000000
--- a/runtime/queries/yaml/rainbows.scm
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- (flow_sequence)
- (flow_mapping)
-] @rainbow.scope
-
-[
- "[" "]"
- "{" "}"
-] @rainbow.bracket
diff --git a/runtime/queries/zig/textobjects.scm b/runtime/queries/zig/textobjects.scm
index 3d8d5e02..243d1294 100644
--- a/runtime/queries/zig/textobjects.scm
+++ b/runtime/queries/zig/textobjects.scm
@@ -18,8 +18,5 @@
(parameters
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
-(arguments
- ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
-
(comment) @comment.inside
(comment)+ @comment.around
diff --git a/runtime/themes/adwaita-light.toml b/runtime/themes/adwaita-light.toml
index f7801b83..8f9d7a8d 100644
--- a/runtime/themes/adwaita-light.toml
+++ b/runtime/themes/adwaita-light.toml
@@ -81,7 +81,7 @@ inherits="adwaita-dark"
"ui.window" = "split_and_borders"
"ui.help" = { bg = "light_3" }
"ui.text" = "dark_4"
-"ui.virtual" = "light_5"
+"ui.virtual" = "light_1"
"ui.virtual.ruler" = { bg = "light_5"}
"ui.virtual.jump-label" = { modifiers = ["reversed"] }
"ui.menu" = { fg = "dark_4", bg = "light_3" }
diff --git a/runtime/themes/andromeda.toml b/runtime/themes/andromeda.toml
deleted file mode 100644
index c9364e13..00000000
--- a/runtime/themes/andromeda.toml
+++ /dev/null
@@ -1,186 +0,0 @@
-
-# Interface colors
-"ui.background" = { bg = "background" }
-"ui.background.separator" = { fg = "muted" }
-"ui.cursor" = { fg = "background", bg = "cursor" }
-"ui.cursor.normal" = { fg = "background", bg = "cursor" }
-"ui.cursor.insert" = { fg = "background", bg = "accent" }
-"ui.cursor.select" = { fg = "background", bg = "purple" }
-"ui.cursor.match" = { fg = "background", bg = "yellow" }
-"ui.cursor.primary" = { fg = "background", bg = "cursor" }
-"ui.cursor.primary.normal" = { fg = "background", bg = "cursor" }
-"ui.cursor.primary.insert" = { fg = "background", bg = "accent" }
-"ui.cursor.primary.select" = { fg = "background", bg = "purple" }
-
-"ui.gutter" = { bg = "background" }
-"ui.gutter.selected" = { bg = "line_highlight" }
-"ui.linenr" = { fg = "line_numbers" }
-"ui.linenr.selected" = { fg = "accent", modifiers = ["bold"] }
-
-"ui.statusline" = { fg = "foreground", bg = "background" }
-"ui.statusline.inactive" = { fg = "muted", bg = "background" }
-"ui.statusline.normal" = { fg = "background", bg = "accent" }
-"ui.statusline.insert" = { fg = "background", bg = "green" }
-"ui.statusline.select" = { fg = "background", bg = "purple" }
-
-"ui.popup" = { fg = "foreground", bg = "popup_bg" }
-"ui.popup.info" = { fg = "foreground", bg = "popup_bg" }
-"ui.window" = { fg = "muted" }
-"ui.help" = { fg = "foreground", bg = "popup_bg" }
-
-"ui.text" = { fg = "foreground" }
-"ui.text.focus" = { fg = "accent", modifiers = ["bold"] }
-"ui.text.inactive" = { fg = "muted" }
-"ui.text.info" = { fg = "foreground" }
-
-"ui.virtual.ruler" = { bg = "line_highlight" }
-"ui.virtual.whitespace" = { fg = "muted" }
-"ui.virtual.indent-guide" = { fg = "muted" }
-"ui.virtual.inlay-hint" = { fg = "hint" }
-"ui.virtual.jump-label" = { fg = "white", bg = "background" }
-
-"ui.menu" = { fg = "foreground", bg = "popup_bg" }
-"ui.menu.selected" = { fg = "background", bg = "accent" }
-"ui.menu.scroll" = { fg = "muted", bg = "background" }
-
-"ui.selection" = { bg = "selection_background" }
-"ui.selection.primary" = { bg = "selection_background" }
-"ui.highlight" = { bg = "line_highlight" }
-"ui.cursorline.primary" = { bg = "line_highlight" }
-"ui.cursorline.secondary" = { bg = "line_highlight" }
-
-# Diagnostics
-"warning" = { fg = "warning" }
-"error" = { fg = "error" }
-"info" = { fg = "info" }
-"hint" = { fg = "hint" }
-"diagnostic" = { modifiers = ["underlined"] }
-"diagnostic.hint" = { fg = "hint", modifiers = ["underlined"] }
-"diagnostic.info" = { fg = "info", modifiers = ["underlined"] }
-"diagnostic.warning" = { fg = "warning", modifiers = ["underlined"] }
-"diagnostic.error" = { fg = "error", modifiers = ["underlined"] }
-"diagnostic.unnecessary" = { fg = "muted", modifiers = ["dim"] }
-
-# Syntax highlighting
-"comment" = { fg = "comment", modifiers = ["italic"] }
-"constant" = { fg = "red" }
-"constant.character" = { fg = "green" }
-"constant.character.escape" = { fg = "yellow" }
-"constant.numeric" = { fg = "orange" }
-"constant.builtin" = { fg = "red" }
-
-"string" = { fg = "green" }
-"string.regexp" = { fg = "blue" }
-"string.special" = { fg = "yellow" }
-
-"type" = { fg = "yellow" }
-"type.builtin" = { fg = "yellow" }
-"type.enum" = { fg = "yellow" }
-"type.parameter" = { fg = "orange" }
-
-"constructor" = { fg = "red" }
-"function" = { fg = "yellow" }
-"function.builtin" = { fg = "yellow" }
-"function.method" = { fg = "yellow" }
-"function.macro" = { fg = "purple" }
-
-"variable" = { fg = "cyan" }
-"variable.builtin" = { fg = "red" }
-"variable.parameter" = { fg = "orange" }
-"variable.other.member" = { fg = "cyan" }
-
-"keyword" = { fg = "purple" }
-"keyword.control" = { fg = "purple" }
-"keyword.control.conditional" = { fg = "purple" }
-"keyword.control.repeat" = { fg = "purple" }
-"keyword.control.import" = { fg = "purple" }
-"keyword.control.return" = { fg = "purple" }
-"keyword.control.exception" = { fg = "purple" }
-"keyword.operator" = { fg = "red" }
-"keyword.directive" = { fg = "purple" }
-"keyword.function" = { fg = "purple" }
-"keyword.storage" = { fg = "purple" }
-"keyword.storage.type" = { fg = "purple" }
-"keyword.storage.modifier" = { fg = "purple" }
-
-"operator" = { fg = "red" }
-"punctuation" = { fg = "foreground" }
-"punctuation.delimiter" = { fg = "foreground" }
-"punctuation.bracket" = { fg = "foreground" }
-"punctuation.special" = { fg = "hot_pink" }
-
-"tag" = { fg = "hot_pink" }
-"attribute" = { fg = "orange" }
-"namespace" = { fg = "yellow" }
-"module" = { fg = "yellow" }
-"special" = { fg = "hot_pink" }
-
-# Markup
-"markup.heading" = { fg = "hot_pink", modifiers = ["bold"] }
-"markup.heading.marker" = { fg = "hot_pink" }
-"markup.list" = { fg = "yellow" }
-"markup.list.marker" = { fg = "hot_pink" }
-"markup.bold" = { fg = "orange", modifiers = ["bold"] }
-"markup.italic" = { fg = "purple", modifiers = ["italic"] }
-"markup.strikethrough" = { modifiers = ["crossed_out"] }
-"markup.link.url" = { fg = "blue", modifiers = ["underlined"] }
-"markup.link.text" = { fg = "cyan" }
-"markup.quote" = { fg = "comment", modifiers = ["italic"] }
-"markup.raw" = { fg = "green" }
-"markup.raw.block" = { fg = "green" }
-
-# Diff
-"diff.plus" = { fg = "diff_add" }
-"diff.minus" = { fg = "diff_delete" }
-"diff.delta" = { fg = "diff_change" }
-
-# Color palette
-[palette]
-# Main colors
-white = "#FFFFFF"
-background = "#23262E"
-foreground = "#D5CED9"
-cursor = "#FFFFFF"
-
-# UI colors
-line_highlight = "#2e323d"
-selection_background = "#3D4352"
-line_numbers = "#746f77"
-muted = "#746f77"
-popup_bg = "#20232A"
-
-# Accent colors
-accent = "#00e8c6" # Cyan
-cyan = "#00e8c6" # Cyan
-orange = "#f39c12" # Orange
-yellow = "#FFE66D" # Yellow
-purple = "#c74ded" # Purple
-hot_pink = "#f92672" # Hot Pink
-blue = "#7cb7ff" # Blue
-red = "#ee5d43" # Red
-green = "#96E072" # Green
-
-# Syntax colors
-comment = "#A0A1A7"
-string = "#96E072"
-number = "#f39c12"
-keyword = "#c74ded"
-function = "#FFE66D"
-variable = "#00e8c6"
-type = "#FFE66D"
-constant = "#ee5d43"
-operator = "#ee5d43"
-tag = "#f92672"
-attribute = "#f39c12"
-punctuation = "#D5CED9"
-
-# Diagnostic colors
-error = "#FC644D"
-warning = "#FF9F2E"
-info = "#00b0ff"
-hint = "#746f77"
-
-# Diff colors
-diff_add = "#96E072"
-diff_delete = "#FC644D"
-diff_change = "#FFE66D"
diff --git a/runtime/themes/ashokai.toml b/runtime/themes/ashokai.toml
deleted file mode 100644
index c6d55b1b..00000000
--- a/runtime/themes/ashokai.toml
+++ /dev/null
@@ -1,134 +0,0 @@
-# name = "Ashokai"
-# author = "TeriyakiBomb"
-# version = "1.0.0"
-
-# Syntax highlighting
-"type" = "purple"
-"constant" = "magenta"
-"constant.numeric" = "purple"
-"constant.character.escape" = "orange"
-"string" = "orange"
-"string.regexp" = "blue"
-"comment" = "comment"
-"variable" = "fg0"
-"class" = {fg ="purple", modifiers = ["bold"]}
-"variable.builtin" = "blue"
-"variable.parameter" = "yellow"
-"variable.other.member" = "fg0"
-"label" = "purple"
-"punctuation" = "grey1"
-"punctuation.delimiter" = "lightblue"
-"punctuation.bracket" = "blue2"
-"keyword" = "blue"
-"keyword.directive" = "aqua"
-"operator" = "lightblue"
-"function" = "green"
-"function.builtin" = "blue"
-"function.macro" = "aqua"
-"function.method" = "magenta"
-"tag" = "magenta"
-"namespace" = "aqua"
-"attribute" = "green"
-"constructor" = "purple"
-"module" = "blue"
-"special" = "orange"
-"identifier" = "blue"
-
-# Markup
-"markup.heading.marker" = "grey1"
-"markup.heading.1" = { fg = "purple", modifiers = ["bold"] }
-"markup.heading.2" = { fg = "magenta", modifiers = ["bold"] }
-"markup.heading.3" = { fg = "yellow", modifiers = ["bold"] }
-"markup.heading.4" = { fg = "green", modifiers = ["bold"] }
-"markup.heading.5" = { fg = "blue", modifiers = ["bold"] }
-"markup.heading.6" = { fg = "fg0", modifiers = ["bold"] }
-"markup.list" = "red"
-"markup.bold" = { modifiers = ["bold"] }
-"markup.italic" = { modifiers = ["italic"] }
-"markup.link.url" = { fg = "blue", modifiers = ["underlined"] }
-"markup.link.text" = "magenta"
-"markup.quote" = "grey1"
-"markup.raw" = "green"
-
-# Diff
-"diff.plus" = "diffgreen"
-"diff.delta" = "orange"
-"diff.minus" = "red"
-
-# UI elements
-"ui.background" = { bg = "bg0" }
-"ui.background.separator" = "grey"
-
-"ui.cursor" = { fg = "bg0", bg = "cursor" }
-"ui.cursor.match" = { fg = "orange", bg = "selection" }
-"ui.cursor.insert" = { fg = "bg0", bg = "grey1" }
-"ui.cursor.select" = { fg = "bg0", bg = "blue" }
-"ui.cursor.primary" = {fg = "bg0", bg ="fg0"}
-"ui.cursor.primary.normal" = {fg = "bg0", bg ="fg0"}
-"ui.cursorline.primary" = { bg = "cursorline" }
-"ui.cursorline.secondary" = { bg = "cursorline" }
-
-"ui.selection" = { bg = "selection" }
-"ui.selection.primary" = { bg = "selection" }
-
-"ui.linenr" = "line_number"
-"ui.linenr.selected" = "line_number_selected"
-"ui.statusline" = { fg = "fg0", bg = "bg3" }
-"ui.statusline.inactive" = { fg = "grey", bg = "bg0" }
-"ui.statusline.normal" = { fg = "bg0", bg = "fg0", modifiers = ["bold"] }
-"ui.statusline.insert" = { fg = "bg0", bg = "green", modifiers = ["bold"] }
-"ui.statusline.select" = { fg = "bg0", bg = "pink", modifiers = ["bold"] }
-"ui.bufferline" = { fg = "grey", bg = "bg1" }
-"ui.bufferline.active" = { fg = "fg0", bg = "bg3", modifiers = ["bold"] }
-"ui.popup" = { fg = "helptext", bg = "bg3" }
-"ui.window" = { fg = "grey", bg = "bg0" }
-"ui.help" = { fg = "helptext", bg = "helpbg" }
-"ui.text" = "fg0"
-"ui.text.focus" = "fg0"
-"ui.menu" = { fg = "fg0", bg = "bg3" }
-"ui.menu.selected" = { fg = "bg0", bg = "blue", modifiers = ["bold"] }
-"ui.virtual.whitespace" = { fg = "bg3" }
-"ui.virtual.indent-guide" = { fg = "bg3" }
-"ui.virtual.ruler" = { bg = "bg3" }
-
-# Diagnostics
-"hint" = "blue"
-"info" = "aqua"
-"warning" = "yellow"
-"error" = "red"
-"diagnostic" = { underline = { style = "curl" } }
-"diagnostic.hint" = { underline = { color = "blue", style = "dotted" } }
-"diagnostic.info" = { underline = { color = "aqua", style = "dotted" } }
-"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } }
-"diagnostic.error" = { underline = { color = "red", style = "curl" } }
-[palette]
-bg0 = "#191D24"
-bg1 = "#0F141C"
-bg2 = "#2C4A7A"
-bg3 = "#2A3A54"
-fg0 = "#FEFEFF"
-helptext = "#8599B9"
-helpbg = "#2A3A54"
-grey = "#70697D"
-grey1 = "#667E99"
-red = "#FF5D5D"
-yellow = "#FDC153"
-green = "#64FF85"
-blue = "#7AC3FF"
-blue2 = "#6C849D"
-lightblue = "#B0DDD2"
-aqua = "#5DB1B1"
-orange = "#FF9647"
-purple = "#9983D7"
-magenta = "#FF1E6D"
-pink = "#E06798"
-
-diffgreen = "#5B7753"
-
-line_number = "#374B6B"
-line_number_selected = "#8397B8"
-comment = "#4E6A97"
-
-cursor = "#6F757F"
-cursorline = "#1B232E"
-selection = "#1B232E"
diff --git a/runtime/themes/ashokai_brahn.toml b/runtime/themes/ashokai_brahn.toml
deleted file mode 100644
index 30fa9e43..00000000
--- a/runtime/themes/ashokai_brahn.toml
+++ /dev/null
@@ -1,37 +0,0 @@
-# name = "Ashokai Brahn"
-# author = "TeriyakiBomb"
-# version = "1.0.0"
-
-inherits = "ashokai"
-
-[palette]
-bg0 = "#2A211D"
-bg1 = "#3A2C27"
-bg2 = "#49385D"
-bg3 = "#4F3D35"
-fg0 = "#EEE3DC"
-helptext = "#976E5E"
-helpbg = "#24150F"
-grey = "#70697D"
-grey1 = "#667E99"
-red = "#FF5D5D"
-yellow = "#FBC664"
-green = "#43BB71"
-blue = "#7AC3FF"
-blue2 = "#9D7D6C"
-lightblue = "#EEE3DC"
-aqua = "#5DB1B1"
-orange = "#FF9647"
-purple = "#B57CED"
-magenta = "#F94786"
-pink = "#EA7AD5"
-
-diffgreen = "#5B7753"
-
-line_number = "#574941"
-line_number_selected = "#7B665B"
-comment = "#6F5D53"
-
-cursor = "#5E8F81"
-cursorline = "#30241C"
-selection = "#442E21"
diff --git a/runtime/themes/ashokai_evermoor.toml b/runtime/themes/ashokai_evermoor.toml
deleted file mode 100644
index 5362e663..00000000
--- a/runtime/themes/ashokai_evermoor.toml
+++ /dev/null
@@ -1,37 +0,0 @@
-# name = "Ashokai Evermoor"
-# author = "TeriyakiBomb"
-# version = "1.0.0"
-
-inherits = "ashokai"
-
-[palette]
-bg0 = "#1D2A26"
-bg1 = "#14332A"
-bg2 = "#49385D"
-bg3 = "#3F6457"
-fg0 = "#F8FFF8"
-helptext = "#5E9785"
-helpbg = "#0F241E"
-grey = "#70697D"
-grey1 = "#667E99"
-red = "#FF5D5D"
-yellow = "#FBC664"
-green = "#7AEA92"
-blue = "#7AC3FF"
-blue2 = "#4E6A97"
-lightblue = "#B0DDD2"
-aqua = "#5DB1B1"
-orange = "#FF9647"
-purple = "#9983D7"
-magenta = "#F94786"
-pink = "#F9518C"
-
-diffgreen = "#5B7753"
-
-line_number = "#32403B"
-line_number_selected = "#5E8F81"
-comment = "#6C9286"
-
-cursor = "#5E8F81"
-cursorline = "#1E302A"
-selection = "#214037"
diff --git a/runtime/themes/ashokai_urple.toml b/runtime/themes/ashokai_urple.toml
deleted file mode 100644
index 4e2cf63f..00000000
--- a/runtime/themes/ashokai_urple.toml
+++ /dev/null
@@ -1,37 +0,0 @@
-# name = "Ashokai Urple"
-# author = "TeriyakiBomb"
-# version = "1.0.0"
-
-inherits = "ashokai"
-
-[palette]
-bg0 = "#211D2A"
-bg1 = "#322750"
-bg2 = "#49385D"
-bg3 = "#4B3E64"
-fg0 = "#EFEAFF"
-helptext="#9485b9"
-helpbg="#130F1C"
-grey = "#70697D"
-grey1 = "#667E99"
-red = "#FF5D5D"
-yellow = "#FBC664"
-green = "#7AEA92"
-blue = "#7AC3FF"
-blue2 = "#4E6A97"
-lightblue = "#B0DDD2"
-aqua = "#5DB1B1"
-orange = "#FF9647"
-purple = "#9983D7"
-magenta = "#F94786"
-pink = "#E06798"
-
-diffgreen = "#5B7753"
-
-line_number = "#5D5E72"
-line_number_selected = "#7262A6E"
-comment = "#565775"
-
-cursor = "#746F7F"
-cursorline = "#2B2437"
-selection = "#493A77"
diff --git a/runtime/themes/aura-dark-soft.toml b/runtime/themes/aura-dark-soft.toml
deleted file mode 100644
index 417093c2..00000000
--- a/runtime/themes/aura-dark-soft.toml
+++ /dev/null
@@ -1,145 +0,0 @@
-# aura ported by:
-# Author: elainabialkowski
-
-# aura originally by:
-# Author: Dalton Menezes
-# License: MIT
-
-"ui.background" = { fg = "white", bg = "black"}
-
-"ui.linenr" = { fg = "accent17"}
-"ui.linenr.selected" = { bg = "accent33", modifiers = ["bold"]}
-
-"ui.statusline" = { fg = "accent10", bg = "accent24"}
-
-"ui.selection" = { bg = "purple_selection"}
-"ui.selection.background" = { fg = "purple_selection"}
-
-"ui.cursor" = { fg = "black", bg = "pink" }
-"ui.cursor.match" = { fg = "purple", modifiers = ["bold"] }
-
-"ui.text" = { fg = "white"}
-"ui.text.focus" = { fg = "white", bg = "purple_selection_solid" }
-"ui.text.inactive" = { fg = "gray" }
-
-"ui.virtual.indent-guide" = "accent13"
-"ui.virtual.ruler" = { bg = "accent13" }
-"ui.virtual.whitespace" = { fg = "accent13" }
-"ui.virtual.inlay-hint" = { fg = "accent9", bg = "accent33" }
-"ui.virtual.jump-label" = { fg = "pink" , modifiers = ["bold"] }
-
-"ui.highlight" = { bg = "accent33", modifiers = ["bold"] }
-
-"ui.menu" = { fg = "accent9", bg = "accent24"}
-"ui.menu.selected" = { fg = "purple", bg = "accent33"}
-
-"ui.popup" = { fg = "accent9", bg = "accent24"}
-
-"ui.window" = { fg = "green" }
-
-"diagnostic.error" = { underline = { color = "red", style = "curl" } }
-"diagnostic.warning" = { underline = { color = "orange" , style = "curl" } }
-"diagnostic.info" = { underline = { color = "blue" , style = "curl" } }
-"diagnostic.hint" = { underline = { color = "blue" , style = "curl" } }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
-
-error = "red"
-warning = "orange"
-info = "blue"
-hint = "blue"
-
-attributes = "purple"
-type = "blue"
-
-constructor = "blue"
-
-constant = "green"
-string = "green"
-
-comment = {fg = "gray" }
-
-variable = "white" # should be dimmed
-"variable.builtin" = "purple"
-"variable.other" = "pink"
-
-"punctuation.delimeter" = "pink"
-"punctuation.special" = "white"
-
-keyword = "purple"
-operator = "purple"
-
-function = "orange"
-tag = "purple"
-
-markup = "purple"
-"markup.heading" = "orange"
-"markup.quote" = "gray"
-"markup.list" = "purple"
-"markup.link.url" = { fg = "green" , modifiers = ["underlined"]}
-
-"diff.plus" = "green"
-"diff.delta" = "orange"
-"diff.minus" = "red"
-
-[palette]
-# dark soft/dim
-purple = "#8464c6" # 132,100,198 accent1 primary color
-purple_selection = "#3d375e7f" # 61,55,94 accent20 selections
-purple_selection_solid = "#29263c" # 41,38,60 accent38 selections (without alpha)
-green = "#54c59f" # 84,197,159 accent2 secondary color
-orange = "#c7a06f" # 199,160,111 accent3 tertiary color
-pink = "#c17ac8" # 193,122,200 accent6 quaternary color
-blue = "#6cb2c7" # 108,178,199 accent32 quinary color
-red = "#c55858" # 197,88,88 accent5 senary color
-white = "#bdbdbd" # 189,189,189 accent7 foregrounds
-gray = "#6d6d6d" # 109,109,109 accent8 comments
-black = "#15141b" # 21,20,27 accent12 backgrounds
-
-
-# https://github.com/daltonmenezes/aura-theme/blob/main/src/core/colors/schemes/common.ts
-# commonColors = {
-# accent0 = "#0f0f0f" # black
-# ...
-# accent4 = "#9dff65" # bright green
-# ...
-# accent31 = "#ffca85" # bright orange
-# accent32 = "#82e2ff" # light blue!!
-# accent33 = "#24222c" # black
-# accent34 = "#00000000" # fully transparent,
-# accent35 = "#525156" # activity bar inactive foreground,
-# # }
-
-# export const commonUI = {
-accent9 = "#cdccce" # black
-accent10 = "#adacae" # light grey
-accent13 = "#2d2d2d" # black
-# accent14 = "#af8aff7f" # light purple
-# accent15 = "#4d4d4d"
-# accent16 = "#ffffff00"
-accent17 = "#a394f033" # secondary-selection
-# accent18 = "#a394f000" # light purple
-# accent19 = "#3ea7847f"
-# accent20 = "#3d375e7f" # primary-selection
-# accent22 = "#4d466e"
-# accent23 = "#3b334b"
-# accent25 = "#49c29a"
-# accent26 = "#00d89023"
-# accent27 = "#ff474720"
-# accent28 = "#121016"
-# accent29 = "#000000"
-# accent30 = "#2d2b38"
-accent33 = "#2e2b38"
-# accent36 = "#a19c77" # debugging background
-# accent37 = "#353424" # breakpoint frame highlight
-# accent38 = "#29263c" # primary-selection without alpha
-# accent39 = "#211D26"
-# }c',
-# accent34 = "#00000000" # fully transparent,
-# accent35 = "#525156" # activity bar inactive foreground,
-# }
-
-# https://github.com/daltonmenezes/aura-theme/tree/c607be79c8eeaa5a5d7ac66421f8b5c51d936fe8/src/core/colors/schemes
-accent24 = "#1f1a27" # soft dark
-
-
diff --git a/runtime/themes/aura-dark.toml b/runtime/themes/aura-dark.toml
deleted file mode 100644
index 28d28e9b..00000000
--- a/runtime/themes/aura-dark.toml
+++ /dev/null
@@ -1,143 +0,0 @@
-# aura ported by:
-# Author: elainabialkowski
-
-# aura originally by:
-# Author: Dalton Menezes
-# License: MIT
-
-"ui.background" = { fg = "white", bg = "black"}
-
-"ui.linenr" = { fg = "accent17"}
-"ui.linenr.selected" = { bg = "accent33", modifiers = ["bold"]}
-
-"ui.statusline" = { fg = "accent10", bg = "accent24"}
-
-"ui.selection" = { bg = "purple_selection"}
-"ui.selection.background" = { fg = "purple_selection"}
-
-"ui.cursor" = { fg = "black", bg = "pink" }
-"ui.cursor.match" = { fg = "purple", modifiers = ["bold"] }
-
-"ui.text" = { fg = "white"}
-"ui.text.focus" = { fg = "white", bg = "purple_selection_solid" }
-"ui.text.inactive" = { fg = "gray" }
-
-"ui.virtual.indent-guide" = "accent13"
-"ui.virtual.ruler" = { bg = "accent13" }
-"ui.virtual.whitespace" = { fg = "accent13" }
-"ui.virtual.inlay-hint" = { fg = "accent9", bg = "accent33" }
-"ui.virtual.jump-label" = { fg = "pink" , modifiers = ["bold"] }
-
-"ui.highlight" = { bg = "accent33", modifiers = ["bold"] }
-
-"ui.menu" = { fg = "accent9", bg = "accent24"}
-"ui.menu.selected" = { fg = "purple", bg = "accent33"}
-
-"ui.popup" = { fg = "accent9", bg = "accent24"}
-
-"ui.window" = { fg = "green" }
-
-"diagnostic.error" = { underline = { color = "red", style = "curl" } }
-"diagnostic.warning" = { underline = { color = "orange" , style = "curl" } }
-"diagnostic.info" = { underline = { color = "blue" , style = "curl" } }
-"diagnostic.hint" = { underline = { color = "blue" , style = "curl" } }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
-
-error = "red"
-warning = "orange"
-info = "blue"
-hint = "blue"
-
-attributes = "purple"
-type = "blue"
-
-constructor = "blue"
-
-constant = "green"
-string = "green"
-
-comment = {fg = "gray" }
-
-variable = "white" # should be dimmed
-"variable.builtin" = "purple"
-"variable.other" = "pink"
-
-"punctuation.delimeter" = "pink"
-"punctuation.special" = "white"
-
-keyword = "purple"
-operator = "purple"
-
-function = "orange"
-tag = "purple"
-
-markup = "purple"
-"markup.heading" = "orange"
-"markup.quote" = "gray"
-"markup.list" = "purple"
-"markup.link.url" = { fg = "green" , modifiers = ["underlined"]}
-
-"diff.plus" = "green"
-"diff.delta" = "orange"
-"diff.minus" = "red"
-
-[palette]
-# dark
-purple = "#a277ff" # 162,119,255 accent1 Primary color
-purple_selection = "#3d375e7f" # 61,55,94 accent20 Selections
-purple_selection_solid = "#29263c" # 41,38,60 accent38 Selections (without alpha)
-green = "#61ffca" # 97,255,202 accent2 Secondary color
-orange = "#ffca85" # 255,202,133 accent3 Tertiary color
-pink = "#f694ff" # 246,148,255 accent6 Quaternary color
-blue = "#82e2ff" # 130,226,255 accent32 Quinary color
-red = "#ff6767" # 255,103,103 accent5 Senary color
-white = "#edecee" # 237,236,238 accent7 Foregrounds
-gray = "#6d6d6d" # 109,109,109 accent8 Comments
-black = "#15141b" # 21,20,27 accent12 Backgrounds
-
-
-# https://github.com/daltonmenezes/aura-theme/blob/main/src/core/colors/schemes/common.ts
-# commonColors = {
-# accent0 = "#0f0f0f" # black
-# ...
-# accent4 = "#9dff65" # bright green
-# ...
-# accent32 = "#82e2ff" # light blue!!
-# accent33 = "#24222c" # black
-# accent34 = "#00000000" # fully transparent,
-# accent35 = "#525156" # activity bar inactive foreground,
-# # }
-
-# export const commonUI = {
-accent9 = "#cdccce" # black
-accent10 = "#adacae" # light grey
-accent13 = "#2d2d2d" # black
-# accent14 = "#af8aff7f" # light purple
-# accent15 = "#4d4d4d"
-# accent16 = "#ffffff00"
-accent17 = "#a394f033" # secondary-selection
-# accent18 = "#a394f000" # light purple
-# accent19 = "#3ea7847f"
-# accent20 = "#3d375e7f" # primary-selection
-# accent22 = "#4d466e"
-# accent23 = "#3b334b"
-# accent25 = "#49c29a"
-# accent26 = "#00d89023"
-# accent27 = "#ff474720"
-# accent28 = "#121016"
-# accent29 = "#000000"
-# accent30 = "#2d2b38"
-accent33 = "#2e2b38"
-# accent36 = "#a19c77" # debugging background
-# accent37 = "#353424" # breakpoint frame highlight
-# accent38 = "#29263c" # primary-selection without alpha
-# accent39 = "#211D26"
-# }c',
-# accent34 = "#00000000" # fully transparent,
-# accent35 = "#525156" # activity bar inactive foreground,
-# }
-
-# https://github.com/daltonmenezes/aura-theme/tree/c607be79c8eeaa5a5d7ac66421f8b5c51d936fe8/src/core/colors/schemes
-accent24 = "#1f1a27" # soft dark
-
diff --git a/runtime/themes/aurara.toml b/runtime/themes/aurara.toml
deleted file mode 100644
index d8a5a229..00000000
--- a/runtime/themes/aurara.toml
+++ /dev/null
@@ -1,485 +0,0 @@
-# aurara
-# a messy mix of aura (dark, soft), noctis, and liberal use of helix's text styling
-# Author : rahil/rathewolf <[email protected]>
-
-# aura ported by:
-# Author: elainabialkowski
-
-# aura originally by:
-# Author: Dalton Menezes
-# License: MIT
-
-# noctis ported by:
-# Author: 0rphee
-# who used this template: https://github.com/n0s4/helix-theme-template
-
-# noctis originally by:
-# Author: Liviu Schera and contributors
-# License: MIT
-
-
-# design
-# mostly from natural convergences
-# "soft"/"dim"/low-brightness colors
- # this should've been done on the app/terminal level.. however, since i've already used mostly low-brightness colors, perhaps there can be special cases to use brighter colors, to make certain things stand out... anyway, now can make use of both palettes: dim and bright
-# simple color scheme: purple as main text color (plain text, ui, possibly strings and/or comments), a secondary color (popups, punctuation or operators, variable.other?), tertiary color (functions)
-
-# the mains things you read should stick out, while the rest shouldn't
-# a common line:
-# modifier type-declaration variable operator type.function("string")
-# most visible: variable operator function type
-# clearly visible: operator, punctuation
-# less visible: type-declaration
-# least visible: modifiers
-
-# TODO:
-# should just inherit the original aura theme
-# try purple for comments and something else for strings?
-# maybe add a fallback for every table..?
-# not happy with aura's orange, it's just too dim.. boring! is noctis's orange really that bright..?
-# still not happy about aura's blue-green used for namespace, especially for rust.. desaturating didn't quite do it..
-# can try another color/shade for atoms..? although, it's not too bad..
-# could try other colors for either operators or punctuation..
-# currently trying a dimmer shade of pink for variable.other.member, but there's too many keywords categorized in there..
- # create a white-stone with a tinge of color for variable.other..?
-# never found out why the derive macro is a bolded bright orange color..
-# find out where the color for file picker is set, and try to dim it
- # i tried searching the other configs in the repo to no avail, just found ui.picker.header
-# oranger-brighter used for functions is slightly too bright, get a darker shade (using orange for now..)
-# find a different color for built-in types, currently using aura's default green-sea
-
-# NOTE:
-# blinking doesn't work with italics, another reason to not italicize comments
-# see keys here:
- # https://github.com/helix-editor/helix/blob/master/book/src/themes.md#scopes
-# can fetch syntax highlighting tests from here:
- # https://github.com/sharkdp/bat
-
-
-## GENERAL ==============================
-
-# the diagnostic info in the gutter area
-'warning' = { fg ="orange-bright", modifiers = ["bold"] } # Editor warnings. TEMP/TEST/WARN
-'error' = { fg = "red-error", modifiers = ["bold", "slow_blink"] } # Editor errors, like mis-typing a command. BUG ISSUE
- # but not ERROR..?
-'info' = { fg = "blue-aqua" } # Code diagnostic info in gutter (LSP). TODO/INFO
- # def prefer noctis's blue-aqua over aura's here
-'hint' = { fg = "green-aqua", modifiers = ["bold"] } # Code diagnostics hint in gutter (LSP).
- # ? Difference between info and hint ?
-
-# diagnostic info in the main text-editing area
-'diagnostic' = { underline = { style = "line" } } # Code diagnostics in editing area (LSP).
-'diagnostic.error' = { underline = { style = "curl", color = "red-error" }, modifiers = ["bold", "dim", "slow_blink"] }
-"diagnostic.warning" = { underline = { style = "curl", color = "orange" }, modifiers = ["bold", "dim" ] }
-'diagnostic.info' = { underline = { style = "dashed", color = "blue-aqua" }, modifiers = ["bold", "dim" ] }
-'diagnostic.hint' = { underline = { style = "dashed", color = "green-aqua" }, modifiers = ["bold", "dim" ] }
- # TODO: TEST: diagnostics, might need a new set of colors..! can use all neon colors here!! definitely need to test all this blinking.. LOL
- # underline styles: line, curl, dashed, dotted, double_line
-'diagnostic.unnecessary' = { modifiers = ["dim"] } # took this from default theme
-'diagnostic.deprecated' = { modifiers = ["crossed_out"] } # took this from default theme
-
-# UI ==============================
-# For styling helix itself.
-
-# 'ui' = { bg = 'bg-ui' }
- # doesn't work.. :/
-'ui.background' = { fg = "purple-pleasant-dimmer", bg = "bg"} # Default background color., the fg seems to be used for borders..
- # NOTE:this effects the main background of the text-editing area; it's values don't cascade down to popup/auto-complete/etc; you must override them in each key
-'ui.background.separator' = { fg = "gray-stone" } # below the input line in picker
-'ui.window' = { fg = "gray-stone" } # Window border between splits.
- # pruple also works really well here.. maybe more needed when there are no line numbers..
-
-'ui.gutter' = { fg = "gold" } # Left gutter for diagnostics and breakpoints.
- # background affects the entire background of the gutter!
- # breakpoints are kinda hard to see, only the outline..?
-# 'ui.gutter.selected' = { bg = "selection-ui" }
-# 'ui.debug.breakpoint' = "●" # character for breakpoint? nope, that's not it..
-'ui.debug.active' = { fg = "pink-dimmer" } # debug execution paused, gutter?
-'ui.highlight.frameline' = { bg = "selection-ui" } # debug execution paused, line
- # TODO: could use a tinted color here.. a little confusing as it uses the same background as selected text
-
-'ui.text' = { fg = "purple-pleasant-dimmer" } # Default text color. used in text files, pickers, ui, and more!
-'ui.text.focus' = { fg = "pink", bg = "selection-ui", modifiers = ["bold"] } # Selection highlight in buffer-picker or file-picker.
-'ui.text.info' = { fg = "pink-dimmer", bg = "bg-ui" } # Info popup contents (space mode menu).
- # see ui.menu for auto-complete
- # NOTE: pink pops out more, making it better than the comfy purple-pleasant-dimmer here
-'ui.text.inactive' = { fg = "gray-stone-lighter", modifiers = ["dim"] } # i think used in autocomplete suggestion..
- # i might like this better than gray-purple
-
-'ui.cursor' = { fg = "light-green-complement", bg = "light-green", modifiers = ["reversed", "bold" ] } # Fallback cursor colour, non-primary cursors when there are multiple (shift-c).
- # should be slightly darker than primary cursor..
-'ui.cursor.primary' = { fg = "pink", bg = "light-green", modifiers = ["reversed", "bold"] } # The primary cursor when there are multiple (shift-c).
- # TODO: NOTE: this blinking at a different timing then the selection's blink is too much!! lol, but i do prefer it to blink..
-# 'ui.cursor.insert' = { fg = "pink", bg = "light-green", modifiers = ["reversed", "bold"] } # The cursor in insert mode (i).
-# 'ui.cursor.select' = { fg = "pink", bg = "light-green", modifiers = ["reversed", "bold"] } # The cursor in select mode (v).
-'ui.cursor.match' = { fg = "cyan", bg = "pink", modifiers = ["bold", "reversed", "slow_blink"] } # The matching parentheses of that under the cursor.
- # NOTE: changed from purple, which was a bit tough to see..; rapid_blink was just too annoying..; light-green was too much, trying cyan..
-
-'ui.selection' = { bg = "selection-ui", modifiers = [ "bold", "slow_blink" ] } # All currently selected text.
- # TODO: decide purple-selection vs the neutral selection-ui: purple is easier to see immediately, but the neutral selection shows text more clearly / less muddy, and with the aid of blinking, it's pretty easy to see too
- # TODO: ...wish there were a "brighten" modifier..
-# 'ui.selection.primary' = { bg = "purple-selection" } # The primary selection when there are multiple.
-# 'ui.cursorline.primary' = { bg = 'purple-selection' } #
- # TODO: would need a very dim color, between selection-ui and background.. it could work of primary selection has a tinge of color to it (purple-selection), but without that, it would make it even harder to see the selection
-
-
-'ui.linenr' = { fg = "purple-pleasant", modifiers = ["dim"]} # Line numbers.
-'ui.linenr.selected' = { modifiers = [ "bold" ] } # Current line number.
-
-'ui.virtual' = { fg = "gray-stone" } # Namespace for additions to the editing area.
-'ui.virtual.ruler' = { bg = "selection-ui"} # Vertical rulers (colored columns in editing area).
- # TODO: TEST: haven't seen these two yet..error
-# 'ui.virtual.whitespace' = { fg = "gray-stone"} # Whitespace markers in editing area: newline..
-# 'ui.virtual.wrap'
-# 'ui.virtual.jump-label'
-'ui.virtual.indent-guide' = { fg = "marker13" } # Indentation guides.
-
-'ui.virtual.inlay-hint' = { fg = "purple-pleasant-dimmer" } # TODO: TEST:
-# ui.virtual.inlay-hint.parameter
-# ui.virtual.inlay-hint.type
-
-# 'ui.bufferline' = { fg = "purple-pleasant", bg = "bg-ui", modifiers = ["dim"] }
-# 'ui.bufferline.active' = { underline = { style = "line" } }
- # not so pretty.., and it extends past the text
-# 'ui.bufferline.inactive' = { fg = "gray-purple" } # BUG: doesn't work..
- # or berry-desturated
- # using ui.statusline as fallback instead:
-
-'ui.statusline' = { fg = "purple-pleasant", bg = "bg-ui", modifiers = ["dim"] } # Status line. and tab bar
- # NOTE: matches line numbers
-# 'ui.statusline.separator' = '|' # not working..? don't think i'd need anyway, seems cleaner without it..
-
-'ui.statusline.inactive' = { fg = "gray-stone", bg = "bg-ui", modifiers = [] } # Status line in unfocused windows.
- # seems very dim.., likely inherited, but i don't know how to uninherit it.., i do prefer it to be different from the text used for comments though.. so it's not bad..
-
-"ui.statusline.normal" = { fg = "purple-pleasant" }
-"ui.statusline.insert" = { fg = "pink-salmon", modifiers = [] }
- # matches return keyword
-"ui.statusline.select" = { fg = "blue-aqua", modifiers = [] }
- # seems dark, even without dim.. not sure how inheritance works here..
- # slow_blink on insert/select was too annoying..
- # using a colored background was also too annoying
-
-'ui.help' = { fg = "pink-dimmer", bg = "bg-ui" } # `:command` descriptions above the command line.
-
-'ui.highlight' = { bg = "selection-ui", modifiers = ["slow_blink"] } # selected contents of symbol pickers (spc-s, spc-S) and current line in buffer picker (spc-b).
- # bold doesn't seem to work here..
-
-'ui.menu' = { fg = "purple-pleasant", bg = "bg-ui", modifiers = ["dim"] } # Autocomplete menu.
- # a dim color that doesn't pop up makes sense here
- # BUG: the dim modifier conflicts with the matching gold for the first line only, maybe the parent key's dim affects the child key..?
-'ui.menu.selected' = { fg = "gold", bg = "selection-ui", modifiers = ["bold"] } # Selected autocomplete item.
- # not a fan of slow_blink here..
- # gold is fantastic for selected text and fuzzy matching
-# 'ui.menu.scroll'
-
-# 'ui.picker' = { fg = "purple" } # ope.. good guess..
-"ui.picker.header" = { modifiers = ["bold"] } # TODO: TEST: i found this in another config, no clue yet..
-
-'ui.popup' = { fg = "purple-pleasant-dimmer", bg = "bg-ui" } # Documentation popups (space-k).
-'ui.popup.info' = { fg = "purple", bg = "bg-ui" } # Info popups box (space mode menu). just the borders.
- # gold is very pretty here.., but distracting.. purple creates a solid frame and feels out of the way..
- # modifiers don't work here.. no shiny blinky stuff..; also dim doesn't work, so can't use purple-pleasant dimmed..
-# "ui.menu.scroll" = { }
-
-# SYNTAX HIGHLIGHTING ==============================
-# All the keys here are Treesitter scopes.
-
-'property' = { fg = "green-aqua" } # Regex group names.
- # TODO: no clue.. never seen this.. just matching regex strings for now..
-'special' = { fg = "orange-bright", modifiers = ["bold"] } # Special symbols e.g `?` in Rust, `...` in Hare, also derive macro..??
- # rust's ? is usually squashed between punctuation ()?;
- # pink-hotter works well for punctuation. gold also works well for the derive macro. it's also nice for it to just stick out, so as to indicate a syntax highlighting problem
-'attribute' = { fg = "purple", modifiers = ["italic"] } # Class attributes, html tag attributes.
- # italics makes sense for html tag attributes.. matching tag
-
-'type' = { fg = "blue-aqua" } # Variable type, like integer or string, including program defined classes, structs etc..
- # NOTE: sometimes there's class / end, which looks odd not bolded like other control/end statements
- # doesn't seperate declaration, parameters, instantiation (though there is constructor), so it's difficult to italicize
-'type.builtin' = { fg = "green-sea", modifiers = ["italic"] } # Primitive types of the language (string, int, float).
-'type.enum.variant' = { fg = "green-sea" } # A variant of an enum.
- # vs match constant color
- # NOTE: i think was pink in aura theme.. but i def didn't like that for the enum values TODO: maybe white is fine
-
-'constructor' = { fg = "blue-aqua" } # Constructor method for a class or struct. And in some cases applies to module names, as in ruby
- # was blue-aqua in noctis, it's pink in vs-code's aura, along with static... TODO: maybe could try a new color here..
- # ruby's class seems to use this.. maybe best to stick to using the same color as type.., but then __init__ uses this too..; also used upon constructor call! Ok(), Some() in rust
-
-'constant' = { fg = "green-aqua" } # Constant value
- # originally green in aura... and it seems a pretty good use of this green, as i don't use it for strings anymore..
- # NOTE: if this is too dark, can use cyan or light-green, as there aren't too many of these..
-# 'constant.builtin' = { fg = "blue-aqua" } # Special constants like `true`, `false`, `none`, etc.
-# 'constant.builtin.boolean' = { } # True or False.
-# 'constant.character' = { fg = "blue-aqua"} # Constant of character type.
-# 'constant.character.escape' = { fg = "mid-green", modifiers = ["bold"] } # escape codes like \n.
- # NOTE: matches regexp
-# 'constant.numeric' = { fg = "blue-green", modifiers = ["bold"] } # constant integer or float value.
-# 'constant.numeric.integer' = { } # constant integer value.
-# 'constant.numeric.float' = { fg = "green-aqua" } # constant float value.
-
-'string' = { fg = "purple-pleasant-dimmer" } # String literal.
- # changed to use main text color (purple!) TODO: can decrease alpha more if needed
-'string.regexp' = { fg = "green-aqua" } # Regular expression literal.
- # NOTE: matches character escape
-'string.special' = { fg = "purple-pleasant-dimmer", modifiers = ["italic"] } # Strings containing a path, URL, etc.
- # could use something funky 'n dark here..
- # i hate long underlined text!, so def don't want that..
- # TODO: TEST: italics
-# 'string.special.path' = { } # String containing a file path.
-# 'string.special.url' = { } # String containing a web URL.
-'string.special.symbol' = { fg = "berry-desaturated" } # Erlang/Elixir atoms, Ruby symbols, Clojure keywords.
- # secondary text (pink) collides with punctuation :/, so now pink is used for variable.other
- # perhaps it could be similar to the color used for constant/literals.. a kind of green..?
-
-'comment' = { fg = "gray-stone-lighter", modifiers = ["dim"] } # This is a comment.
- # TODO: dim and italics should be optional
- # TODO: this is beautiful when it's dim, but with a transparent background, it can be tough to see..
- # even purple-pleasant dimmed doesn't look bad..
-# 'comment.line' = { } # Line comments, like this.
-# 'comment.block' = { } # Block comments, like /* this */ in some languages.
-'comment.block.documentation' = { fg = "gray-stone-lighter", modifiers = ["dim", "italic"] } # Doc comments, e.g '///' in rust.
- # TODO: TEST: maybe okay to use italics here..
-
-'variable' = { fg = "white-stone" } # Variable names.
- # likely the most important word in the line, and therefore must be the most easily visible, yet comfortable
-'variable.builtin' = { fg = "blue-aqua" } # Language reserved variables: `this`, `self`, `super`, etc.
- # NOTE: matches class color
-'variable.parameter' = { fg = "white-stone" } # Function parameters.
- # TODO: this would be really useful to differentiate.. white-sea-tinged isn't too bad.. italic is too anooying
-'variable.function' = { fg = "orange" } # ? ruby-like everything is an object..?
-'variable.other' = { fg = "white-stone" } # from aura..
- # fallback
-'variable.other.member' = { fg = "pink-dimmer" } # Fields of composite data types (e.g. structs, unions)., @callback in elixir, serialized data fields (like this config file..)
-# 'variable.other.member.private' # only for ECMAScript-based languages
- # TODO: decide white-stone vs pink vs another color, and remember to turn down punctuation down a notch in hotness; would be nice to create a slightly tinged color, like noctis's white-sea-tinge
-
-'label' = { fg = "purple" } # Loop labels in rust.
-
-'punctuation' = { fg = "pink-dimmer", modifiers = ["bold"] } # (){}[]:;,.
- # NOTE: the bolded gold from noctic is really, really nice, but it collides with the orange-brighter color; also, bolded white is too much white, should save white just for variables only
-'punctuation.delimiter' = { fg = "pink-hot", modifiers = ["bold"] } # Commas and colons.
- # pink-hotter is slightly too annoying..
-'punctuation.bracket' = { fg = "pink-dimmer", modifiers = ["bold"] } # Parentheses, angle brackets, etc.
-'punctuation.special' = { fg = "pink-dimmer", modifiers = ["bold"] } # string interpolation
-
-'keyword' = { fg = "purple" } # Language reserved keywords. var, void, let
-'keyword.control' = { fg = "purple", modifiers = ["bold"] } # Control keywords.
- # NOTE: bold makes it slightly brighter too
-'keyword.control.conditional' = { fg = "purple", modifiers = ["bold"] } # 'if', 'else', 'elif'.
- # TODO: could use a cascading shades of purple here, between purple and purple-darker of operator, darkest on the outside, yet it's also nice to have it consistent..
-'keyword.control.repeat' = { fg = "purple", modifiers = ["bold"] } # 'for', 'while', 'loop'.
-'keyword.control.import' = { fg = "purple", modifiers = ["italic"] } # 'import', 'export', 'use', 'mod'
- # use crate::blah blah conflicts, crate is the same color..
-'keyword.control.return' = { fg = "pink-salmon", modifiers = ["italic"] } # 'return' in most languages.
- # NOTE: tried red-error, but it's so ugly!!.. :/ but could use it's own color.. stole noctis's pink-salmon here.. bold is really nice too, more pink-salmony, but it eventually bugged me..; italics makes it feel like it's *pressed* in
-'keyword.control.exception' = { fg = "pink-salmon", modifiers = ["italic"] } # 'raise' in python.
-'keyword.operator' = { fg = "purple", modifiers = ["bold"] } # 'or', 'and', 'in'.
- # TODO: doesn't look like it's working..??
-'keyword.directive' = { fg = "purple", modifiers = ["italic"] } # Preprocessor directives (#if, #include in C).
-'keyword.function' = { fg = "purple", modifiers = ["bold"] } # The keyword to define a funtion: 'def', 'fun', 'fn'.
-'keyword.storage' = { fg = "purple" } # let and var in rust.. these should be more visible..
-'keyword.storage.modifier' = { fg = "purple-dimmer", modifiers = ["italic"] } # function and type modifiers/accessors: public/private, mut, dyn, ref, &, internal, readonly, const, etc.
- # these should be less visible
- # bold makes sense here for C#, as it's usually the start of a function, but not so much for rust..
- # currently using the same purple as operators.. which isn't too bad though, as it keeps a consistent scheme.. and it doesn't conflict with anything either. it's also good as a fallback for 'end', as that sometimes doesn't highlight properly..
-'keyword.storage.type' = { fg = "green-sea", modifiers = ["italic"] } # class, struct, enum, namespace, sometimes var? (for javascript but not rust)
- # matches type.builtin
-
-
-'operator' = { fg = "purple", modifiers = ["bold"] } # Logical (&&, ||) and - I assume - Mathematical (+, %) operators
-
-# top three are ordered from brightest to darkest
- # also used in markup headings
-'function' = { fg = "orange"}
- # TODO: orange-brighter is too bright.. :/ but much of the beauty of the theme comes from this color... just need to get a notch lower..
-'function.method' = { fg = "orange" } # Class / Struct methods.
-# 'function.method.private' # just ECMAScript-based languages..
-'function.builtin' = { fg = "orange-desaturated" }
-'function.macro' = { fg = "orange", modifiers = ["italic"] } # Like macros in rust.
- # italics works well here.. as does the magical gold of macros, as does orange-pumpkin
-'function.special' = { fg = "orange", modifiers = ["italic"] } # Preprocessor in C.
-
-'tag' = { fg = "purple-darker", modifiers = ["italic"] } # As in <body> for html. also @tags in comments?
- # must be darker then the default text, and attribute
-#'tag.builtin' # ?
-
-'namespace' = { fg = "blue-green" } # * Namespace keyword in java, C#, etc.
- # namespace::function, namespace::class, package main, *types.Tuple
- # requires a seperate color
- # TODO: this nasty blue-green accurately matches how i feel about namespace syntax..: *barf*.. pink-hotter is interesting... really changes things up!.. but i still prefer something similar to blue for logical reasoning
- # for a long time i was using italics here, but then discovered it was part of its ugliness! now it's actually tolerable
-
-# Colors for markup languages, like Markdown or XML.
- # a little different from code since it's so simple, using a simple two color scheme: purple 'n gold
-
-# NOTE: it inherits the main text color from ui.text, and punctuation too
-
-markup = "purple-pleasant-dimmer" # fallback
-
-'markup.bold' = { fg = "orange-bright" } # Bold text.
- # bold text isn't so easy to read.. but purple bold works pretty well alongside purple-pleasant
- # this orange is surprisingly dim! not bad at all, and keeps a consistent two-color theme. though, orange-brighter is far more beautiful, but perhaps too bright..
-'markup.italic' = { modifiers = ["italic"] } # Italicised text.
-"markup.strikethrough" = { modifiers = ["crossed_out"] }
-
-'markup.heading' = { fg = "orange-bright", modifiers = ["bold"] } # Markdown headings
-# NOTE: underline didn't bold, and looked wayyy too thin compared to the bold font..
- # underline = { style = "curl", modifiers = ["bold"] }
-'markup.heading.1' = { fg = "orange-bright", modifiers = ["bold"] }
-'markup.heading.2' = { fg = "orange", modifiers = ["bold"] }
-'markup.heading.3' = { fg = "orange-desaturated", modifiers = ["bold"] }
-'markup.heading.4' = { fg = "orange-bright" }
-'markup.heading.5' = { fg = "orange" }
-'markup.heading.6' = { fg = "orange-desaturated" }
-'markup.heading.marker' = { fg = "orange-brighter" } # Hashtag color on Markdown headings.
-
-'markup.list' = { fg = "orange-bright", modifiers = ["bold"] }
- # the bullet symbols are like shiny jewelry in the sea :)
-'markup.list.numbered' = { fg = "orange-bright" } # Numbered list.
-# 'markup.list.unnumbered' = { } # Bullet point list.
-
-'markup.link' = { fg = "gray-stone" }
- # different color is annoying in comments
- # seems to underline only when highlighted, which is great!!
-'markup.link.url' = { fg = "gray-stone"} # Urls pointed to by links.
-'markup.link.label' = { fg = "gray-stone" } # Non-URL link references.
-'markup.link.text' = { fg = "purple-pleasant-dimmer"} # URL and image descriptions in links.
-
-'markup.quote' = { fg = "pink-dimmer", modifiers = ["italic"] } # `> Quotes` in Markdown.
-
-# Markup - Interface ==============================
-# "These scopes are used for theming the editor interface."
-
-# TODO: ??
-'markup.normal' = { }
-'markup.normal.completion' = { } # For completion doc popup ui.
-'markup.normal.raw' = { } # For hover popup ui.
-
-'markup.heading.completion' = { } # Headings for completion doc popup ui.
-'markup.heading.raw' = { } # Headings for hover popup ui.
-
-'markup.raw' = { } # Code block in Markdown.
-'markup.raw.block' = { } # Multiline (```) codeblock in Markdown.
-'markup.raw.inline' = { } # `Inline code block` in Markdown.
-'markup.raw.inline.completion' = { } # ?
-'markup.raw.inline.hover' = { } # ?
-
-# Diff ==============================
-# Version control changes.
-
-'diff.plus' = { fg = "green-aqua" } # Additions.
-'diff.minus' = { fg = "pink-salmon", modifiers = ["slow_blink"] } # Deletions.
- # shows up as a little red dash, so blinking actually works well here!
-'diff.delta' = { fg = "orange" } # Modifications.
-'diff.delta.moved' = {fg = "blue-aqua" } # Renamed or moved files / changes.
-'diff.delta.conflict' = { fg = "orange" }
- # could dim.. but i also quite like how clear it is.. especially without the line numbers. BUG: dim doesn't seem to work..
- # slow_blink is fun, but epilepsy-inducing, lol.. at least they blink at the same time!
- # TODO: TEST: blinking on deletions, is it too distracting..?
- # not sure where you'd see diff.delta.moved..
-
-
-[palette] # Define your custom colors here.
-# NOTE: there are 16 colors in the palette by default, these will override any that have the same name. TODO: in order to make it most compatible and future-proof, should really use thsoe color names, even if it's not actually that color
-
-# noctis
-# dark-green = "#00262a" # backgrounds
-# mid-green = "#073a40" # highlights
-# autocomp-green = "#0d6772" # lighter than mid-green
- # these three were used for backgrounds
-light-green = "#48e9a7" # a nice sea green, bright neon when bolded, like the displays of deep sea instruments, was "green", re-used for text under the cursor
-
-pink-salmon = "#df769b" # re-used for return, was "pink", it's perfect! :D use sparingly as i really don't like themes with lots of red in it, only returns and maybe exceptions
-gold = "#ffd800" # a nice, shiny bolded gold used for punctuation, was "yellow", ..maybe was also used for it's variable text..? unfortunately, it's very bright. used for matching fuzzy search, and other things that should really stick out, or otherwise highlighting selected text
-purple-darker = "#6f60ea" # this purple is slightly darker than aura's, used for cascading keywords, but seems to match vs-code's aura better??
-white-sea-tinged = "#b1cace" # has a tinge of green in it.., pleasant tho
-orange-bright = "#e4b782" # looks fantastic in noctis, fit for the sea theme, like a clown-fish, but too bright :(
-green-sea-darker = "#5b858b" # was mainly used for comments/background text in noctis, was "gray", it's very readable but rather less saturated compared to the other colors.. TODO: a very good, unused reading color, not bad for atoms..
-# red = "#e34e1b" # an ugly red.. only good for errors.. using aura's instead, though they seem the same..
-
-blue-green = "#19a2b7" # TODO: quite hideous toxic aqua green... currently using for namespaces, as i don't have anymore colors.. just feels too saturated. it's closest to tokyonight's aqua, but dimmer
-# blue-green-desaturated = "#3B94A3" # hmmm, maybe desaturate isn't the answer.. just dims it.., but it's not a bad idea either..
-# blue-green-blue = "#0098C2" # slightly bluer in hue, possible replacement for type.builtin, then can use green-sea with namespace
-# blue-green-green = "#2C98BF" blue-green, with slightly lower hue, more greener
-# cyan-bright = "#87efff" # a tad too bright..
-
-
-# aura dark soft/dim
-purple = "#8464c6"
-purple-dimmer = "#7B57C2" # increased saturation??
-purple-selection = "#3d375e7f"
-purple-selection-solid = "#29263c"
-blue-aqua = "#47ace8" # currently used for types, a pretty standard blue for classes..
-green-aqua = "#54c59f" # used for constants/literals, not the prettiest, but it fits the aqua sea feelin' of the overall theme.. maybe can try bogster's green
-orange = "#c7a06f" # used for functions, but feels too boring.. :(
-orange-desaturated = "#C7B693"
-pink = "#c17ac8" # great, comfy pink for pop-up-menu ui text, TODO: shuold be second main text color, but using it for punctuation t the moment..
-# pink-lighter = "#cb90d1" # 1/7th shade lighter (whiter)
-# white-stone-pink = "#BEA7C1" # somewhere between white-stone and pink; meh... pink is just more clearly visible than the colors between..
-# pink-brighter = "#DE95E5"
-pink-dimmer = "#B56EBC" # slightly desaturated, used for fields/methods and elixir's @thing
-# fuschia = "#A955B2" # TODO: an interesting one to use..
-# pink-even-dimmer = "#8C5C90" # used for pop-up menus, similar to pink with dim modifier.. too dim, not even pink anymore! more like magenta.. but very comfy to read!
-pink-hot = "#cc6cd6" # +25% saturation, nice 'n slight! for delimiters via coolers.co gradient
-pink-hotter = "#d85ee3" # +50% saturation, for "special" symbols
-green-sea = "#6cb2c7" # builtin type, a bit funky but very much readable
-red-error = "#c55858" # error, looks great when blinking, like red flashing like underwater!
-white-stone = "#bdbdbd" # variable, has a dim tinge of dirty stone to it
-# white-stone-yellow-tinge = "#BAB195" # just added a little saturation, but it feels less readable :/
-gray-stone = "#6d6d6d" # comment, similar to white, but desaturated/grayed out, now a sort of dirty blonde; i didn't like it at first, but then became amazing once dimmed!!
- # gray-stone-dimmed = "#6d6d6d80" # 80 = 50%, 40 = 25%
-gray-stone-lighter = "#7d7d7d" # used for comments with the dim modifier; 9d9d9d dimmed seems slightly brighter than gray-stone undimmed.. 7d7d7d is out of the way, 858585 forces eyes to read it, vs 8d8d8d?
- # TODO: alpha doesn't seem to affect these, only dim works..
-# bg = "#121016" # black, was accent28, slightly darker
-bg = "#15141b" # was "black", quite dark.. high-contrast
- # TODO: have to figure out how backgrounds work: shouldn't the gui app (terminal or not) handle it?
-# bg = "#211D26" # a darker raisin black, was accent39, seems like a nice alternative
-# bg = "#2d2b38" # raisin black, was accent30. much much lighter, tougher to see on transparent backgrounds
-
-purple-pleasant = "#a394f033" # great comfy purp for ui, should be main color, used for text (in .txt files) and strings and ui, was accent17 (with 33 alpha) as TODO: secondary selection and accent18 (with 00 alpha)
- # NOTE: still use this with dim modifer to make a color even dimmer than purple-pleasant-dimmer
-purple-pleasant-dimmer = "#9889E4" # switch to using this as main text.. along with pink-dimmer
-
-# aura colors shared between variations
-# text10 = "#adacae" # TODO: try it
-bg-ui = "#1f1a27" # soft dark, used in ui background, status line, tab bar, seems similar to purple-selection, was accent24
-
-# somewhere hidden in aura
-selection-ui = "#2e2b38" # no purple tinge, more closer to gray-stone, was accent33
-marker13 = "#2d2d2d" # a barely visible gray
-
-# others scraped from aura
-cyan = "#82e2ff" # seems like noctis's cyan.. also sticks out too much.., just used for cursor match..
-# purple14 = "#af8aff7f" # light purple TODO: try it
-# purple-pleasant-opaque = "#a394f000" # purple-pleasant with 00 alpha (opaque?), was accent18
- # NOTE: doesn't seem to make a difference..
-# accent4 = "#9dff65" # bright green
-orange-brighter = "#ffca85" # brighter than noctis's orange, beautiful, was accent31
-# green-aqua-darker = "#3ea7847f" # was accent19
-# gray-purple = "#4d466e" # was accent22, english violet, too dark to read, almost charcoal.. perhaps used for grayed out text like for auto-suggestions? too dark for even inactive tabs..
-# accent25 = "#49c29a" # mint green, seems very close to green-aqua
-# accent26 = "#00d89023" # emerald green, slightly brighter than the above, when without alpha
-# TODO: untested colors below..
-# accent36 = "#a19c77" # debugging background
-# accent37 = "#353424" # breakpoint frame highlight
-# accent35 = "#525156" # activity bar inactive foreground,
-
-# new colors
-light-green-complement = "#e9488a" # initially used to create a high-contrast color for match surrounding pairs but it was too fugly to use as a cursor.. pink is better. currently using for secondary cursors as it's darker than the primary cursor's pink
-
-# from boo berry
-berry-desaturated = "#886C9C" # originally used for comments, but didn't quite work.. maybe because boo berry has a background color..; didn't quite work for keywords either, as it was too dim and didn't match the rest of the scheme, like dirty blood.. worth keeping! currently using for atoms, which isn't bad!..
-
-# from tokyonight
-# orange-pumpkin = "#ff9e64" # orange from tokyonight, too bright but really orange! looks okay with dim modifier..
-# orange-tokyonight = "#e0af68" # yellow from tokyonight, similar to orange from noctis
-
-# TODO: "shades of purple" theme has an actual orangey orange, a nice fuschia/deep purple, a good red, and a cyan that isn't too bright
-
-# TODO: try checking out noctis variants minimus and uva
-
-# try this site for buildings shades of a color..
- # https://www.radix-ui.com/colors/custom
-
-# this site seems fun too..
- # coolors.co
diff --git a/runtime/themes/catppuccin_mocha.toml b/runtime/themes/catppuccin_mocha.toml
index d6d53f05..5e542dc8 100644
--- a/runtime/themes/catppuccin_mocha.toml
+++ b/runtime/themes/catppuccin_mocha.toml
@@ -128,8 +128,6 @@ warning = "yellow"
info = "sky"
hint = "teal"
-rainbow = ["red", "peach", "yellow", "green", "sapphire", "lavender"]
-
[palette]
rosewater = "#f5e0dc"
flamingo = "#f2cdcd"
diff --git a/runtime/themes/cyan_light.toml b/runtime/themes/cyan_light.toml
index eeb671e1..fe3f743a 100644
--- a/runtime/themes/cyan_light.toml
+++ b/runtime/themes/cyan_light.toml
@@ -1,5 +1,168 @@
-# Deprecation notice
-#
-# This theme has moved to jetbrains_cyan_light, make sure to update your configuration accordingly.
+# Cyan Light
+# Adapted from JetBrains' Cyan Light Theme https://plugins.jetbrains.com/plugin/12102-cyan-light-theme
+# Author: Abderrahmane Tahri Jouti <[email protected]>
-inherits = "jetbrains_cyan_light"
+# Original Author : Olga Berdnikova
+# LICENSE : MIT
+# Source: https://github.com/OlyaB/CyanTheme
+
+"attribute" = "blue"
+"type" = "shade07"
+"type.enum.variant" = "purple"
+"constructor" = "shade07"
+
+"constant" = "darker_blue"
+"constant.builtin.boolean" = "blue"
+"constant.character" = "blue"
+"constant.character.escape" = "dark_red"
+"constant.numeric" = "blue"
+
+"string" = "green"
+"string.regexp" = "blue"
+"string.special" = { fg = "dark_red", modifiers = ["underlined"] }
+
+"comment" = "comment_gray"
+
+"variable" = "green_blue"
+"variable.builtin" = { fg = "darker_blue" }
+"variable.parameter" = "purple"
+"variable.other.member" = "purple"
+
+"label" = { fg = "darker_blue", modifiers = ["underlined"] }
+"punctuation" = "shade06"
+
+"keyword" = "darker_blue"
+"keyword.control.exception" = "darker_blue"
+
+"operator" = "shade06"
+
+"function" = "shade07"
+"function.macro" = "yellow"
+"function.builtin" = { fg = "shade07", modifiers = ["italic"] }
+"function.special" = "dark_red"
+"function.method" = "dark_yellow"
+
+"tag" = "darker_blue"
+"special" = "shade06"
+"namespace" = "darker_blue"
+
+"markup.bold" = { fg = "shade06", modifiers = ["bold"] }
+"markup.italic" = { fg = "shade06", modifiers = ["italic"] }
+"markup.strikethrough" = { fg = "shade06", modifiers = ["crossed_out"] }
+"markup.heading" = { fg = "purple" }
+"markup.list" = "darker_blue"
+"markup.list.numbered" = "darker_blue"
+"markup.list.unnumbered" = "darker_blue"
+"markup.link.url" = "shade06"
+"markup.link.text" = { fg = "dark_blue", modifiers = ['underlined'] }
+"markup.link.label" = "dark_blue"
+"markup.quote" = "green"
+"markup.raw" = "green"
+"markup.raw.inline" = "green"
+"markup.raw.block" = "green"
+
+"diff.plus" = "green"
+"diff.plus.gutter" = "gutter_green"
+"diff.minus" = "red"
+"diff.minus.gutter" = "gutter_red"
+"diff.delta" = "blue"
+"diff.delta.gutter" = "gutter_blue"
+
+# ui specific
+"ui.background" = { bg = "shade00" }
+"ui.cursor" = { bg = "shade02" }
+"ui.cursor.primary" = { bg = "cursor_blue" }
+"ui.cursor.match" = { fg = "shade00", bg = "shade04" }
+"ui.cursor.primary.select" = { bg = "light_purple" }
+"ui.cursor.primary.insert" = { bg = "light_green" }
+
+"ui.selection" = { bg = "lighter_blue" }
+"ui.selection.primary" = { bg = "lighter_blue" }
+
+"ui.highlight" = { bg = "faint_blue" }
+"ui.cursorline.primary" = { bg = "faint_blue" }
+
+"ui.linenr" = { fg = "shade03" }
+"ui.linenr.selected" = { fg = "shade04", bg = "faint_blue", modifiers = [
+ "bold",
+] }
+
+"ui.statusline" = { fg = "shade06", bg = "shade01" }
+"ui.statusline.inactive" = { fg = "shade04", bg = "shade00" }
+"ui.statusline.normal" = { fg = "shade00", bg = "blue" }
+"ui.statusline.insert" = { fg = "shade00", bg = "green" }
+"ui.statusline.select" = { fg = "shade00", bg = "purple" }
+
+"ui.popup" = { fg = "shade04", bg = "shade01_lighter" }
+"ui.window" = { fg = "shade04", bg = "shade00" }
+"ui.help" = { fg = "shade06", bg = "shade00" }
+"ui.text" = "shade05"
+"ui.text.focus" = { fg = "shade07", bg = "light_blue" }
+"ui.text.directory" = "blue"
+
+"ui.virtual" = "shade03"
+"ui.virtual.ruler" = { bg = "shade01" }
+"ui.virtual.inlay-hint" = { fg = "shade03_darker" }
+"ui.virtual.jump-label" = { fg = "shade07", bg = "shade01", modifiers = ["bold" ] }
+
+"ui.menu" = { fg = "shade05", bg = "shade01_lighter" }
+"ui.menu.selected" = { fg = "shade07", bg = "light_blue" }
+
+"hint" = "shade04"
+"info" = "light_blue"
+"warning" = "orange"
+"error" = "red"
+
+"diagnostic" = { modifiers = [] }
+"diagnostic.hint" = { underline = { color = "shade04", style = "line" } }
+"diagnostic.info" = { underline = { color = "light_blue", style = "line" } }
+"diagnostic.warning" = { underline = { color = "orange", style = "curl" } }
+"diagnostic.error" = { underline = { color = "red", style = "curl" } }
+"diagnostic.unnecessary" = { modifiers = ["dim"] }
+"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
+
+[palette]
+shade00 = "#f2f3f7"
+shade01 = "#dadde8"
+shade02 = "#c1c6d9"
+shade03 = "#a9b0ca"
+shade04 = "#525c85"
+shade05 = "#434b6c"
+shade06 = "#343a54"
+shade07 = "#25293c"
+
+shade01_lighter = "#e6e8f0"
+shade03_darker = "#9199bb"
+shade04_lighter = "#616d9d"
+
+background = "#f2f3f7"
+foreground = "#25293c"
+
+comment_gray = "#808080"
+
+gutter_blue = "#C3D6E8"
+faint_blue = "#E8Eef1"
+lighter_blue = "#d0eaff"
+light_blue = "#99ccff"
+cursor_blue = "#80bfff"
+blue = "#0073E6"
+dark_blue = "#185b93"
+darker_blue = "#000080"
+
+purple = "#660E7A"
+light_purple = "#ED9CFF"
+
+gutter_green = "#C9DEC1"
+green = "#00733B"
+light_green = "#5DCE87"
+green_blue = "#458383"
+
+yellow = "#808000"
+dark_yellow = "#7A7A43"
+
+light_orange = "#f9c881"
+orange = "#F49810"
+
+gutter_red = "#EBBCBC"
+red = "#d90016"
+dark_red = "#7F0000"
diff --git a/runtime/themes/darcula.toml b/runtime/themes/darcula.toml
index 2b98684c..5b83afba 100644
--- a/runtime/themes/darcula.toml
+++ b/runtime/themes/darcula.toml
@@ -88,8 +88,6 @@
"warning" = "orange"
"error" = "red"
-rainbow = ["rainbow_gold", "rainbow_blue", "rainbow_orange", "rainbow_purple", "rainbow_khaki", "rainbow_turquoise"]
-
[palette]
grey00 = "#181818" # Default Background
grey01 = "#282828" # Lighter Background (Used for status bars, line number and folding marks)
@@ -110,11 +108,3 @@ grey = "#808080"
darkgreen = "#629755"
lightblue = "#6897bb"
blue = "#104158"
-
-# Rainbow bracket colors
-rainbow_gold = "#FFD700"
-rainbow_blue = "#1E90FF"
-rainbow_orange = "#FF8C00"
-rainbow_purple = "#9370DB"
-rainbow_khaki = "#F0E68C"
-rainbow_turquoise = "#00CED1"
diff --git a/runtime/themes/dark-synthwave.toml b/runtime/themes/dark-synthwave.toml
deleted file mode 100644
index 9bb8a479..00000000
--- a/runtime/themes/dark-synthwave.toml
+++ /dev/null
@@ -1,114 +0,0 @@
-# Dark Synthwave
-# Based on Dark SynthWave '84 for VS Code (https://github.com/brainomite/dark-synthwave-vscode/tree/main)
-#
-# Author : Peter Retzlaff <[email protected]>
-# License: MIT License
-
-# UI Colors
-"ui.background" = { bg = "black", fg = "blood-red" }
-"ui.cursor" = { fg = "white", modifiers = ["reversed"] }
-"ui.cursor.primary" = { fg = "white", modifiers = ["reversed"] }
-"ui.cursor.match" = { bg = "selection-blue" }
-"ui.text" = "white"
-"ui.text.focus" = { fg = "dark-grey", bg = "synth-red" }
-"ui.text.inactive" = "grey"
-"ui.linenr" = "grey"
-"ui.linenr.selected" = "white"
-"ui.statusline" = { fg = "white", bg = "black" }
-"ui.statusline.inactive" = { fg = "grey", bg = "black"}
-"ui.statusline.separator" = "synth-red"
-"ui.popup" = { fg = "#f8f8f0", bg = "#1E1E1E" }
-"ui.popup.info" = { fg = "synth-red", bg = "black" }
-"ui.window" = "synth-red"
-"ui.help" = { fg = "#f8f8f0", bg = "#1E1E1E" }
-"ui.virtual.jump-label" = {fg = "synth-red", modifiers = ["bold"]}
-"ui.selection" = { bg = "selection-blue" }
-"ui.selection.primary" = { bg = "selection-blue" }
-"ui.menu" = { fg = "white", bg = "black" }
-"ui.menu.selected" = { fg = "dark-grey", bg = "synth-red" }
-"ui.picker" = { fg = "neon-yellow" }
-"ui.picker.header.column.active" = { modifiers = ["bold"] }
-"ui.background.separator" = "synth-red"
-
-# Diagnostic colors
-"warning" = "warning"
-"error" = "error"
-"info" = "info"
-"hint" = "info"
-"diagnostic.warning" = { underline = { color = "warning", style = "curl" } }
-"diagnostic.error" = { underline = { color = "error", style = "curl" } }
-"diagnostic.info" = { underline = { color = "info", style = "curl" } }
-"diagnostic.hint" = { underline = { color = "info", style = "curl" } }
-
-# Syntax highlighting
-"comment" = { fg = "mauve", modifiers = ["italic"] }
-"constant" = "salmon"
-"constant.numeric" = "salmon"
-"constant.character.escape" = "beaming-blue"
-"constant.builtin" = "synthetic-green"
-"constant.builtin.boolean" = "synthetic-green"
-"string" = "orange"
-"string.regexp" = "salmon"
-"variable" = "pelati-red"
-"variable.builtin" = { fg = "blood-red", modifiers = ["bold"] }
-"variable.parameter" = { fg = "jess-green", modifiers = ["italic"] }
-"type" = "blood-red"
-"constructor" = "blood-red"
-"function" = "beaming-blue"
-"keyword" = "neon-yellow"
-"keyword.control" = "neon-yellow"
-"keyword.control.import" = "jade"
-"keyword.operator" = "neon-yellow"
-"keyword.directive" = "jade"
-"keyword.storage.type" = "neon-yellow"
-"keyword.storage.modifier" = "neon-yellow"
-
-# "label" = "neon-yellow"
-"namespace" = "blood-red"
-"operator" = "neon-yellow"
-# "special" = "beaming-blue"
-
-"punctuation.bracket" = "neon-yellow"
-"tag" = "jade"
-"attribute" = { fg = "neon-yellow", modifiers = ["italic"] }
-
-"markup.heading" = { fg = "#ff7edb", modifiers = ["bold"] }
-"markup.bold" = { fg = "#2ee2fa", modifiers = ["bold"] }
-"markup.italic" = { fg = "#2ee2fa", modifiers = ["italic"] }
-"markup.link.url" = { fg = "jade", modifiers = ["italic"] }
-"markup.link.text" = "neon-yellow"
-"markup.quote" = { fg = "jade", modifiers = ["italic"] }
-"markup.raw" = "pelati-red"
-"markup.raw.inline" = "pelati-red"
-"markup.raw.block" = "pelati-red"
-
-# Git gutter
-"diff.plus.gutter" = "#47ffa0"
-"diff.minus.gutter" = "error"
-"diff.delta.gutter" = "info"
-
-# bufferline
-"ui.bufferline" = { fg = "grey", bg = "#000000"}
-"ui.bufferline.active" = { fg = "dark-grey", bg = "synth-red" }
-
-[palette]
-black = "#000000"
-white = "#ffffff"
-neon-yellow = "#fede5d"
-blood-red = "#fe4450"
-pelati-red = "#f73232"
-synth-red = "#ff3366"
-salmon = "#f97e72"
-beaming-blue = "#36f9f6"
-selection-blue = "#001069"
-synthetic-green = "#1afc65"
-jess-green = "#28b881"
-orange = "#ff8b39"
-jade = "#72f1b8"
-mauve = "#848bbd"
-grey = "#808080"
-dark-grey = "#141414"
-error = "#ff5252"
-warning = "#ffab40"
-info = "#40c4ff"
-
diff --git a/runtime/themes/dark_plus.toml b/runtime/themes/dark_plus.toml
index 2d8a86c3..28ec163d 100644
--- a/runtime/themes/dark_plus.toml
+++ b/runtime/themes/dark_plus.toml
@@ -94,8 +94,6 @@
"diagnostic.unnecessary" = { modifiers = ["dim"] }
"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
-rainbow = ["#FFD700", "#DA70D6", "#179FFF"]
-
[palette]
white = "#ffffff"
orange = "#ce9178"
diff --git a/runtime/themes/doom-one.toml b/runtime/themes/doom-one.toml
deleted file mode 100644
index 60dbd874..00000000
--- a/runtime/themes/doom-one.toml
+++ /dev/null
@@ -1,127 +0,0 @@
-# Author: spentbliss <[email protected]>
-# License: MIT (originally by NTBBloodbath)
-
-"ui.background" = { bg = "bg", fg = "fg" }
-"ui.text" = "fg"
-"ui.text.focus" = { bg = "bg_highlight", fg = "cyan" }
-"ui.cursor" = { bg = "cyan", fg = "bg" }
-"ui.linenr" = "grey"
-"ui.linenr.selected" = "yellow"
-"ui.statusline" = { fg = "blue" }
-"ui.selection" = { bg = "bg_highlight" }
-"ui.selection.primary" = { bg = "bg_highlight" }
-"ui.virtual.ruler" = { bg = "bg_highlight" }
-"ui.virtual.jump-label" = { fg = "cyan", modifiers = ["bold"] }
-
-# Markdown Highlighting
-"markup.raw" = { fg = "blue", bg = "bg" }
-"markup.raw.inline" = { fg = "orange" }
-"markup.heading.1" = { fg = "#E99BEA", bg = "#4F4258"}
-"markup.heading.2" = { fg = "#51AFEF", bg = "#2F4456" }
-"markup.heading.3" = { fg = "#A9A1E1", bg = "#3F4153" }
-"markup.heading.4" = { fg = "#98BE65", bg = "#3C453D" }
-"markup.heading.5" = { fg = "#ECBE7B", bg = "#4B4641" }
-"markup.heading.6" = { fg = "#DA8549", bg = "#483C39" }
-"markup.list" = { fg = "magenta" }
-"markup.bold" = { fg = "orange", modifiers = ["bold"] }
-"markup.italic" = { fg = "orange" }
-"markup.strikethrough" = { fg = "red", modifiers = ["crossed_out"] }
-"markup.link" = { fg = "cyan" }
-"markup.quote" = { fg = "fg" }
-
-# Syntax Highlighting for Code
-"comment" = { fg = "grey" }
-"comment.line" = { fg = "grey" }
-"comment.block" = { fg = "grey" }
-"comment.documentation" = { fg = "blue" }
-
-"keyword" = "blue"
-"keyword.control" = "blue"
-"keyword.operator" = "fg"
-"keyword.function" = "blue"
-"keyword.directive" = "green"
-"keyword.storage" = "blue"
-
-"type" = "yellow"
-"type.builtin" = "yellow"
-"type.enum.variant" = "purple"
-
-"function" = "magenta"
-"function.builtin" = "fg"
-"function.method" = "fg"
-"function.macro" = "purple"
-
-"variable" = "fg"
-"variable.builtin" = "red"
-"variable.parameter" = "fg"
-
-"string" = "green"
-"string.special" = "green"
-
-"constant" = "orange"
-"constant.builtin" = "orange"
-"constant.numeric" = "orange"
-"constant.character" = "orange"
-"constant.boolean" = "orange"
-
-"attribute" = "magenta"
-"operator" = "blue"
-"tag" = { fg = "magenta", modifiers = ["bold"] }
-"tag.special" = { fg = "orange", modifiers = ["bold"] }
-"namespace" = "blue"
-"macro" = "orange"
-"label" = "red"
-
-# Interface specific
-"ui.cursorline.primary" = { bg = "bg_highlight" }
-"ui.cursorline.secondary" = { bg = "bg_alt" }
-"ui.cursorcolumn.primary" = { bg = "bg_highlight" }
-"ui.cursorcolumn.secondary" = { bg = "bg_alt" }
-"ui.statusline.normal" = { fg = "bg", bg = "blue" }
-"ui.statusline.insert" = { fg = "bg", bg = "green" }
-"ui.statusline.select" = { fg = "bg", bg = "purple" }
-
-# Git changes indicator
-"diff.plus" = "green"
-"diff.plus.gutter" = "green"
-"diff.minus" = "red"
-"diff.minus.gutter" = "red"
-"diff.delta" = "green"
-"diff.delta.gutter" = "green"
-"diff.delta.moved" = "orange"
-"diff.delta.conflict" = "purple"
-
-# Diagnostic styles
-"warning" = { fg = "yellow", modifiers = ["bold"] }
-"error" = { fg = "red", modifiers = ["bold"] }
-"info" = { fg = "cyan", modifiers = ["bold"] }
-"hint" = { fg = "blue", modifiers = ["bold"] }
-"diagnostic.error" = { fg = "red" }
-"diagnostic.warning" = { fg = "yellow" }
-"diagnostic.info" = { fg = "cyan" }
-"diagnostic.hint" = { fg = "blue" }
-
-# Popups for documentation or file picker
-"ui.popup" = { fg = "fg", bg = "bg" }
-"ui.popup.info" = { fg = "fg", bg = "bg_alt" }
-"ui.menu" = { fg = "fg", bg = "bg" }
-"ui.menu.selected" = { fg = "cyan", bg = "bg_highlight" }
-
-# Additional overrides
-"ui.virtual.whitespace" = "grey"
-"ui.virtual.indent-guide" = { fg = "grey" }
-
-[palette]
-bg = "#282C34"
-fg = "#BBC2CF"
-grey = "#5B6268"
-blue = "#51AFEF"
-green = "#98BE65"
-cyan = "#46D9FF"
-red = "#FF6C6B"
-yellow = "#ECBE7B"
-purple = "#A8A1E1"
-magenta = "#C678DD"
-orange = "#DA8548"
-bg_alt = "#21242B"
-bg_highlight = "#3C4048"
diff --git a/runtime/themes/flatwhite.toml b/runtime/themes/flatwhite.toml
index f58ee21c..6864fb10 100644
--- a/runtime/themes/flatwhite.toml
+++ b/runtime/themes/flatwhite.toml
@@ -2,10 +2,11 @@
# Adopted from https://github.com/biletskyy/flatwhite-syntax
"attribute" = { fg = "blue_text", bg = "blue_bg" }
-"comment" = { fg = "base2", bg = "base6" }
-"comment.line" = { fg = "base2", bg = "base6" }
-"comment.block" = { fg = "base2", bg = "base6" }
-"comment.block.documentation" = { fg = "base2", bg = "base6" }
+"comment" = { fg = "base3", modifiers = ["italic"] }
+"comment.line" = {}
+"comment.line.documentation" = { fg = "base2" }
+"comment.block" = {}
+"comment.block.documentation" = { fg = "base2" }
"constant" = { fg = "blue_text", bg = "blue_bg" }
"constructor" = { fg = "base1" }
"function" = { fg = "base1", modifiers = ["bold"] }
@@ -61,10 +62,12 @@
"ui.virtual" = { fg = "base5", bg = "base6" }
"ui.virtual.whitespace" = { fg = "base5" }
"ui.virtual.ruler" = { bg = "base6" }
+# Invalid modifier: "normal". See 'https://github.com/helix-editor/helix/issues/5709'
+# "ui.virtual.inlay-hint" = { fg = "base4", modifiers = ["normal"] }
+# "ui.virtual.inlay-hint.parameter" = { fg = "base3", modifiers = ["normal"] }
"ui.virtual.inlay-hint" = "base4"
"ui.virtual.inlay-hint.parameter" = "base3"
"ui.virtual.inlay-hint.type" = { fg = "base3", modifiers = ["italic"] }
-"ui.virtual.jump-label" = { bg = "orange_bg", modifiers = ["bold"] }
"ui.linenr" = { bg = "base6" }
"ui.linenr.selected" = { bg = "base6", modifiers = ["reversed"] }
diff --git a/runtime/themes/gruvbox-material.toml b/runtime/themes/gruvbox-material.toml
index c8448cf9..6f4c861e 100644
--- a/runtime/themes/gruvbox-material.toml
+++ b/runtime/themes/gruvbox-material.toml
@@ -3,4 +3,126 @@
# Ported by: @satoqz
# License: MIT
-inherits = "gruvbox_material_dark_medium"
+"attribute" = "green"
+"comment" = { fg = "grey1", modifiers = ["italic"] }
+"constant" = "fg0"
+"constant.builtin" = "purple"
+"constant.character.escape" = "green"
+"constant.numeric" = "purple"
+"constructor" = "green"
+"function" = "green"
+"keyword" = "red"
+"keyword.directive" = "purple"
+"keyword.operator" = "orange"
+"label" = "red"
+"namespace" = "yellow"
+"operator" = "orange"
+"punctuation" = "grey1"
+"punctuation.bracket" = "fg0"
+"punctuation.delimiter" = "grey1"
+"punctuation.special" = "blue"
+"special" = "green"
+"string" = "aqua"
+"string.regexp" = "green"
+"string.special.path" = "yellow"
+"string.special.symbol" = "fg0"
+"string.special.url" = { fg = "fg0", modifiers = ["underlined"] }
+"tag" = "orange"
+"type" = "yellow"
+"type.enum.variant" = "purple"
+"variable" = "fg0"
+"variable.builtin" = "purple"
+"variable.other.member" = "blue"
+"variable.parameter" = "fg0"
+
+"markup.heading.1" = "red"
+"markup.heading.2" = "orange"
+"markup.heading.3" = "yellow"
+"markup.heading.4" = "green"
+"markup.heading.5" = "blue"
+"markup.heading.6" = "purple"
+
+"markup.bold" = { fg = "fg0", modifiers = ["bold"] }
+"markup.italic" = { fg = "fg0", modifiers = ["italic"] }
+"markup.strikethrough" = { fg = "fg0", modifiers = ["crossed_out"] }
+
+"markup.link.label" = "blue"
+"markup.link.text" = "yellow"
+"markup.link.url" = { fg = "blue", modifiers = ["underlined"] }
+"markup.list" = "blue"
+"markup.list.checked" = "green"
+"markup.list.unchecked" = "grey1"
+"markup.quote" = "grey1"
+"markup.raw" = "green"
+
+"diff.delta" = "blue"
+"diff.minus" = "red"
+"diff.plus" = "green"
+
+"diagnostic.error" = { underline = { color = "red", style = "curl" } }
+"diagnostic.hint" = { underline = { color = "green", style = "curl" } }
+"diagnostic.info" = { underline = { color = "blue", style = "curl" } }
+"diagnostic.unnecessary" = { modifiers = ["dim"] }
+"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } }
+
+error = "red"
+hint = "green"
+info = "blue"
+warning = "yellow"
+
+"ui.background" = { fg = "fg0", bg = "bg0" }
+"ui.bufferline" = { fg = "fg1", bg = "bg4" }
+"ui.bufferline.active" = { fg = "bg0", bg = "grey2" }
+"ui.bufferline.background" = { bg = "bg1" }
+"ui.cursor" = { fg = "bg0", bg = "grey1" }
+"ui.cursor.primary" = { fg = "bg0", bg = "fg0" }
+"ui.cursor.match" = { bg = "bg2" }
+"ui.cursorline.primary" = { bg = "bg1" }
+"ui.help" = { fg = "grey1", bg = "bg0" }
+"ui.highlight" = { bg = "bg2" }
+"ui.linenr" = "bg3"
+"ui.linenr.selected" = "grey1"
+"ui.menu" = { fg = "fg1", bg = "bg2" }
+"ui.menu.scroll" = { fg = "grey0", bg = "bg1" }
+"ui.menu.selected" = { fg = "bg2", bg = "grey2" }
+"ui.popup" = { fg = "fg1", bg = "bg2" }
+"ui.popup.info" = { "fg" = "grey1", bg = "bg0" }
+"ui.selection" = { bg = "bg2" }
+"ui.statusline" = { fg = "fg1", bg = "bg1" }
+"ui.statusline.inactive" = { fg = "grey1", bg = "bg1" }
+"ui.statusline.insert" = { fg = "bg0", bg = "green" }
+"ui.statusline.normal" = { fg = "bg0", bg = "grey2" }
+"ui.statusline.select" = { fg = "bg0", bg = "red" }
+"ui.text" = "fg0"
+"ui.text.directory" = { fg = "blue" }
+"ui.text.focus" = { bg = "bg2" }
+"ui.text.inactive" = { fg = "grey1" }
+"ui.text.info" = "grey1"
+"ui.virtual" = "grey0"
+"ui.virtual.indent-guide" = "bg3"
+"ui.virtual.inlay-hint" = "grey0"
+"ui.virtual.jump-label" = "grey2"
+"ui.virtual.ruler" = { bg = "bg1" }
+"ui.window" = { fg = "bg3" }
+
+[palette]
+fg0 = "#d4be98"
+fg1 = "#ddc7a1"
+
+bg0 = "#282828"
+bg1 = "#32302f"
+bg2 = "#45403d"
+bg3 = "#5a524c"
+bg4 = "#504945"
+
+grey0 = "#7c6f64"
+grey1 = "#928374"
+grey2 = "#a89984"
+
+aqua = "#89b482"
+blue = "#7daea3"
+green = "#a9b665"
+orange = "#e78a4e"
+purple = "#d3869b"
+red = "#ea6962"
+yellow = "#d8a657"
diff --git a/runtime/themes/gruvbox.toml b/runtime/themes/gruvbox.toml
index 6c5bcd09..3743ee29 100644
--- a/runtime/themes/gruvbox.toml
+++ b/runtime/themes/gruvbox.toml
@@ -92,7 +92,7 @@
"ui.linenr" = { fg = "bg3" }
"ui.linenr.selected" = { fg = "yellow1" }
"ui.menu" = { fg = "fg1", bg = "bg2" }
-"ui.menu.selected" = { fg = "green1", bg = "bg1", modifiers = ["bold"] }
+"ui.menu.selected" = { fg = "bg2", bg = "blue1", modifiers = ["bold"] }
"ui.popup" = { bg = "bg1" }
"ui.picker.header.column" = { underline.style = "line" }
"ui.picker.header.column.active" = { modifiers = ["bold"], underline.style = "line" }
@@ -106,7 +106,7 @@
"ui.statusline.select" = { fg = "bg1", bg = "orange1", modifiers = ["bold"] }
"ui.text" = { fg = "fg1" }
-"ui.text.focus" = { fg = "green1", bg="bg1" }
+"ui.text.focus" = { fg = "green1" }
"ui.text.directory" = { fg = "blue1" }
"ui.virtual.inlay-hint" = { fg = "gray" }
"ui.virtual.jump-label" = { fg = "purple0", modifiers = ["bold"] }
diff --git a/runtime/themes/gruvbox_material_dark_hard.toml b/runtime/themes/gruvbox_material_dark_hard.toml
deleted file mode 100644
index d57c5438..00000000
--- a/runtime/themes/gruvbox_material_dark_hard.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-# Gruvbox Material Dark Hard for Helix
-# Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material)
-# Base theme ported by: @satoqz
-# Palette ported by: @ivan-shymkiv
-# License: MIT
-
-inherits = "gruvbox_material_dark_medium"
-
-[palette]
-bg0 = "#1d2021"
-bg1 = "#282828"
-bg2 = "#3c3836"
-bg3 = "#504945"
diff --git a/runtime/themes/gruvbox_material_dark_medium.toml b/runtime/themes/gruvbox_material_dark_medium.toml
deleted file mode 100644
index 9752748c..00000000
--- a/runtime/themes/gruvbox_material_dark_medium.toml
+++ /dev/null
@@ -1,128 +0,0 @@
-# Gruvbox Material Dark Medium for Helix
-# Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material)
-# Ported by: @satoqz
-# License: MIT
-
-"attribute" = "green"
-"comment" = { fg = "grey1", modifiers = ["italic"] }
-"constant" = "fg0"
-"constant.builtin" = "purple"
-"constant.character.escape" = "green"
-"constant.numeric" = "purple"
-"constructor" = "green"
-"function" = "green"
-"keyword" = "red"
-"keyword.directive" = "purple"
-"keyword.operator" = "orange"
-"label" = "red"
-"namespace" = "yellow"
-"operator" = "orange"
-"punctuation" = "grey1"
-"punctuation.bracket" = "fg0"
-"punctuation.delimiter" = "grey1"
-"punctuation.special" = "blue"
-"special" = "green"
-"string" = "aqua"
-"string.regexp" = "green"
-"string.special.path" = "yellow"
-"string.special.symbol" = "fg0"
-"string.special.url" = { fg = "fg0", modifiers = ["underlined"] }
-"tag" = "orange"
-"type" = "yellow"
-"type.enum.variant" = "purple"
-"variable" = "fg0"
-"variable.builtin" = "purple"
-"variable.other.member" = "blue"
-"variable.parameter" = "fg0"
-
-"markup.heading.1" = "red"
-"markup.heading.2" = "orange"
-"markup.heading.3" = "yellow"
-"markup.heading.4" = "green"
-"markup.heading.5" = "blue"
-"markup.heading.6" = "purple"
-
-"markup.bold" = { fg = "fg0", modifiers = ["bold"] }
-"markup.italic" = { fg = "fg0", modifiers = ["italic"] }
-"markup.strikethrough" = { fg = "fg0", modifiers = ["crossed_out"] }
-
-"markup.link.label" = "blue"
-"markup.link.text" = "yellow"
-"markup.link.url" = { fg = "blue", modifiers = ["underlined"] }
-"markup.list" = "blue"
-"markup.list.checked" = "green"
-"markup.list.unchecked" = "grey1"
-"markup.quote" = "grey1"
-"markup.raw" = "green"
-
-"diff.delta" = "blue"
-"diff.minus" = "red"
-"diff.plus" = "green"
-
-"diagnostic.error" = { underline = { color = "red", style = "curl" } }
-"diagnostic.hint" = { underline = { color = "green", style = "curl" } }
-"diagnostic.info" = { underline = { color = "blue", style = "curl" } }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } }
-
-error = "red"
-hint = "green"
-info = "blue"
-warning = "yellow"
-
-"ui.background" = { fg = "fg0", bg = "bg0" }
-"ui.bufferline" = { fg = "fg1", bg = "bg4" }
-"ui.bufferline.active" = { fg = "bg0", bg = "grey2" }
-"ui.bufferline.background" = { bg = "bg1" }
-"ui.cursor" = { fg = "bg0", bg = "grey1" }
-"ui.cursor.primary" = { fg = "bg0", bg = "fg0" }
-"ui.cursor.match" = { bg = "bg2" }
-"ui.cursorline.primary" = { bg = "bg1" }
-"ui.help" = { fg = "grey1", bg = "bg0" }
-"ui.highlight" = { bg = "bg2" }
-"ui.linenr" = "bg3"
-"ui.linenr.selected" = "grey1"
-"ui.menu" = { fg = "fg1", bg = "bg2" }
-"ui.menu.scroll" = { fg = "grey0", bg = "bg1" }
-"ui.menu.selected" = { fg = "bg2", bg = "grey2" }
-"ui.popup" = { fg = "fg1", bg = "bg2" }
-"ui.popup.info" = { "fg" = "grey1", bg = "bg0" }
-"ui.selection" = { bg = "bg2" }
-"ui.statusline" = { fg = "fg1", bg = "bg1" }
-"ui.statusline.inactive" = { fg = "grey1", bg = "bg1" }
-"ui.statusline.insert" = { fg = "bg0", bg = "green" }
-"ui.statusline.normal" = { fg = "bg0", bg = "grey2" }
-"ui.statusline.select" = { fg = "bg0", bg = "red" }
-"ui.text" = "fg0"
-"ui.text.directory" = { fg = "blue" }
-"ui.text.focus" = { bg = "bg2" }
-"ui.text.inactive" = { fg = "grey1" }
-"ui.text.info" = "grey1"
-"ui.virtual" = "grey0"
-"ui.virtual.indent-guide" = "bg3"
-"ui.virtual.inlay-hint" = "grey0"
-"ui.virtual.jump-label" = "grey2"
-"ui.virtual.ruler" = { bg = "bg1" }
-"ui.window" = { fg = "bg3" }
-
-[palette]
-fg0 = "#d4be98"
-fg1 = "#ddc7a1"
-
-bg0 = "#282828"
-bg1 = "#32302f"
-bg2 = "#45403d"
-bg3 = "#5a524c"
-bg4 = "#504945"
-
-grey0 = "#7c6f64"
-grey1 = "#928374"
-grey2 = "#a89984"
-
-aqua = "#89b482"
-blue = "#7daea3"
-green = "#a9b665"
-orange = "#e78a4e"
-purple = "#d3869b"
-red = "#ea6962"
-yellow = "#d8a657"
diff --git a/runtime/themes/gruvbox_material_dark_soft.toml b/runtime/themes/gruvbox_material_dark_soft.toml
deleted file mode 100644
index bb49ab21..00000000
--- a/runtime/themes/gruvbox_material_dark_soft.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Gruvbox Material Dark Soft for Helix
-# Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material)
-# Base theme ported by: @satoqz
-# Palette ported by: @ivan-shymkiv
-# License: MIT
-
-inherits = "gruvbox_material_dark_medium"
-
-[palette]
-bg0 = "#32302f"
-bg1 = "#3c3836"
-bg2 = "#504945"
-bg3 = "#665c54"
-bg4 = "#5b534d"
diff --git a/runtime/themes/gruvbox_material_light_hard.toml b/runtime/themes/gruvbox_material_light_hard.toml
deleted file mode 100644
index 0c4e3bef..00000000
--- a/runtime/themes/gruvbox_material_light_hard.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Gruvbox Material Light Hard for Helix
-# Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material)
-# Base theme ported by: @satoqz
-# Palette ported by: @ivan-shymkiv
-# License: MIT
-
-inherits = "gruvbox_material_light_medium"
-
-[palette]
-bg0 = "#f9f5d7"
-bg1 = "#f5edca"
-bg2 = "#f2e5bc"
-bg3 = "#ebdbb2"
-bg4 = "#eee0b7"
diff --git a/runtime/themes/gruvbox_material_light_medium.toml b/runtime/themes/gruvbox_material_light_medium.toml
deleted file mode 100644
index e2fb02ab..00000000
--- a/runtime/themes/gruvbox_material_light_medium.toml
+++ /dev/null
@@ -1,129 +0,0 @@
-# Gruvbox Material Light Medium for Helix
-# Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material)
-# Base theme ported by: @satoqz
-# Palette ported by: @ivan-shymkiv
-# License: MIT
-
-"attribute" = "green"
-"comment" = { fg = "grey1", modifiers = ["italic"] }
-"constant" = "fg0"
-"constant.builtin" = "purple"
-"constant.character.escape" = "green"
-"constant.numeric" = "purple"
-"constructor" = "green"
-"function" = "green"
-"keyword" = "red"
-"keyword.directive" = "purple"
-"keyword.operator" = "orange"
-"label" = "red"
-"namespace" = "yellow"
-"operator" = "orange"
-"punctuation" = "grey1"
-"punctuation.bracket" = "fg0"
-"punctuation.delimiter" = "grey1"
-"punctuation.special" = "blue"
-"special" = "green"
-"string" = "aqua"
-"string.regexp" = "green"
-"string.special.path" = "yellow"
-"string.special.symbol" = "fg0"
-"string.special.url" = { fg = "fg0", modifiers = ["underlined"] }
-"tag" = "orange"
-"type" = "yellow"
-"type.enum.variant" = "purple"
-"variable" = "fg0"
-"variable.builtin" = "purple"
-"variable.other.member" = "blue"
-"variable.parameter" = "fg0"
-
-"markup.heading.1" = "red"
-"markup.heading.2" = "orange"
-"markup.heading.3" = "yellow"
-"markup.heading.4" = "green"
-"markup.heading.5" = "blue"
-"markup.heading.6" = "purple"
-
-"markup.bold" = { fg = "fg0", modifiers = ["bold"] }
-"markup.italic" = { fg = "fg0", modifiers = ["italic"] }
-"markup.strikethrough" = { fg = "fg0", modifiers = ["crossed_out"] }
-
-"markup.link.label" = "blue"
-"markup.link.text" = "yellow"
-"markup.link.url" = { fg = "blue", modifiers = ["underlined"] }
-"markup.list" = "blue"
-"markup.list.checked" = "green"
-"markup.list.unchecked" = "grey1"
-"markup.quote" = "grey1"
-"markup.raw" = "green"
-
-"diff.delta" = "blue"
-"diff.minus" = "red"
-"diff.plus" = "green"
-
-"diagnostic.error" = { underline = { color = "red", style = "curl" } }
-"diagnostic.hint" = { underline = { color = "green", style = "curl" } }
-"diagnostic.info" = { underline = { color = "blue", style = "curl" } }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } }
-
-error = "red"
-hint = "green"
-info = "blue"
-warning = "yellow"
-
-"ui.background" = { fg = "fg0", bg = "bg0" }
-"ui.bufferline" = { fg = "fg1", bg = "bg4" }
-"ui.bufferline.active" = { fg = "bg0", bg = "grey2" }
-"ui.bufferline.background" = { bg = "bg1" }
-"ui.cursor" = { fg = "bg0", bg = "grey1" }
-"ui.cursor.primary" = { fg = "bg0", bg = "fg0" }
-"ui.cursor.match" = { bg = "bg2" }
-"ui.cursorline.primary" = { bg = "bg1" }
-"ui.help" = { fg = "grey1", bg = "bg0" }
-"ui.highlight" = { bg = "bg2" }
-"ui.linenr" = "bg3"
-"ui.linenr.selected" = "grey1"
-"ui.menu" = { fg = "fg1", bg = "bg2" }
-"ui.menu.scroll" = { fg = "grey0", bg = "bg1" }
-"ui.menu.selected" = { fg = "bg2", bg = "grey2" }
-"ui.popup" = { fg = "fg1", bg = "bg2" }
-"ui.popup.info" = { "fg" = "grey1", bg = "bg0" }
-"ui.selection" = { bg = "bg2" }
-"ui.statusline" = { fg = "fg1", bg = "bg1" }
-"ui.statusline.inactive" = { fg = "grey1", bg = "bg1" }
-"ui.statusline.insert" = { fg = "bg0", bg = "green" }
-"ui.statusline.normal" = { fg = "bg0", bg = "grey2" }
-"ui.statusline.select" = { fg = "bg0", bg = "red" }
-"ui.text" = "fg0"
-"ui.text.directory" = { fg = "blue" }
-"ui.text.focus" = { bg = "bg2" }
-"ui.text.inactive" = { fg = "grey1" }
-"ui.text.info" = "grey1"
-"ui.virtual" = "grey0"
-"ui.virtual.indent-guide" = "bg3"
-"ui.virtual.inlay-hint" = "grey0"
-"ui.virtual.jump-label" = "grey2"
-"ui.virtual.ruler" = { bg = "bg1" }
-"ui.window" = { fg = "bg3" }
-
-[palette]
-fg0 = "#654735"
-fg1 = "#4f3829"
-
-bg0 = "#fbf1c7"
-bg1 = "#f4e8be"
-bg2 = "#eee0b7"
-bg3 = "#ddccab"
-bg4 = "#e5d5ad"
-
-grey0 = "#a89984"
-grey1 = "#928374"
-grey2 = "#7c6f64"
-
-aqua = "#4c7a5d"
-blue = "#45707a"
-green = "#6c782e"
-orange = "#c35e0a"
-purple = "#945e80"
-red = "#c14a4a"
-yellow = "#b47109"
diff --git a/runtime/themes/gruvbox_material_light_soft.toml b/runtime/themes/gruvbox_material_light_soft.toml
deleted file mode 100644
index ac74f243..00000000
--- a/runtime/themes/gruvbox_material_light_soft.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Gruvbox Material Light Soft for Helix
-# Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material)
-# Base theme ported by: @satoqz
-# Palette ported by: @ivan-shymkiv
-# License: MIT
-
-inherits = "gruvbox_material_light_medium"
-
-[palette]
-bg0 = "#f2e5bc"
-bg1 = "#eddeb5"
-bg2 = "#e6d5ae"
-bg3 = "#d5c4a1"
-bg4 = "#dac9a5"
diff --git a/runtime/themes/jetbrains_cyan_light.toml b/runtime/themes/jetbrains_cyan_light.toml
deleted file mode 100644
index 026eb607..00000000
--- a/runtime/themes/jetbrains_cyan_light.toml
+++ /dev/null
@@ -1,168 +0,0 @@
-# Jetbrains Cyan Light
-# Adapted from JetBrains' Cyan Light Theme https://plugins.jetbrains.com/plugin/12102-cyan-light-theme
-# Author: Abderrahmane Tahri Jouti <[email protected]>
-
-# Original Author : Olga Berdnikova
-# LICENSE : MIT
-# Source: https://github.com/OlyaB/CyanTheme
-
-"attribute" = "blue"
-"type" = "shade07"
-"type.enum.variant" = "purple"
-"constructor" = "shade07"
-
-"constant" = "darker_blue"
-"constant.builtin.boolean" = "blue"
-"constant.character" = "blue"
-"constant.character.escape" = "dark_red"
-"constant.numeric" = "blue"
-
-"string" = "green"
-"string.regexp" = "blue"
-"string.special" = { fg = "dark_red", modifiers = ["underlined"] }
-
-"comment" = "comment_gray"
-
-"variable" = "green_blue"
-"variable.builtin" = { fg = "darker_blue" }
-"variable.parameter" = "purple"
-"variable.other.member" = "purple"
-
-"label" = { fg = "darker_blue", modifiers = ["underlined"] }
-"punctuation" = "shade06"
-
-"keyword" = "darker_blue"
-"keyword.control.exception" = "darker_blue"
-
-"operator" = "shade06"
-
-"function" = "shade07"
-"function.macro" = "yellow"
-"function.builtin" = { fg = "shade07", modifiers = ["italic"] }
-"function.special" = "dark_red"
-"function.method" = "dark_yellow"
-
-"tag" = "darker_blue"
-"special" = "shade06"
-"namespace" = "darker_blue"
-
-"markup.bold" = { fg = "shade06", modifiers = ["bold"] }
-"markup.italic" = { fg = "shade06", modifiers = ["italic"] }
-"markup.strikethrough" = { fg = "shade06", modifiers = ["crossed_out"] }
-"markup.heading" = { fg = "purple" }
-"markup.list" = "darker_blue"
-"markup.list.numbered" = "darker_blue"
-"markup.list.unnumbered" = "darker_blue"
-"markup.link.url" = "shade06"
-"markup.link.text" = { fg = "dark_blue", modifiers = ['underlined'] }
-"markup.link.label" = "dark_blue"
-"markup.quote" = "green"
-"markup.raw" = "green"
-"markup.raw.inline" = "green"
-"markup.raw.block" = "green"
-
-"diff.plus" = "green"
-"diff.plus.gutter" = "gutter_green"
-"diff.minus" = "red"
-"diff.minus.gutter" = "gutter_red"
-"diff.delta" = "blue"
-"diff.delta.gutter" = "gutter_blue"
-
-# ui specific
-"ui.background" = { bg = "shade00" }
-"ui.cursor" = { bg = "shade02" }
-"ui.cursor.primary" = { bg = "cursor_blue" }
-"ui.cursor.match" = { fg = "shade00", bg = "shade04" }
-"ui.cursor.primary.select" = { bg = "light_purple" }
-"ui.cursor.primary.insert" = { bg = "light_green" }
-
-"ui.selection" = { bg = "lighter_blue" }
-"ui.selection.primary" = { bg = "lighter_blue" }
-
-"ui.highlight" = { bg = "faint_blue" }
-"ui.cursorline.primary" = { bg = "faint_blue" }
-
-"ui.linenr" = { fg = "shade03" }
-"ui.linenr.selected" = { fg = "shade04", bg = "faint_blue", modifiers = [
- "bold",
-] }
-
-"ui.statusline" = { fg = "shade06", bg = "shade01" }
-"ui.statusline.inactive" = { fg = "shade04", bg = "shade00" }
-"ui.statusline.normal" = { fg = "shade00", bg = "blue" }
-"ui.statusline.insert" = { fg = "shade00", bg = "green" }
-"ui.statusline.select" = { fg = "shade00", bg = "purple" }
-
-"ui.popup" = { fg = "shade04", bg = "shade01_lighter" }
-"ui.window" = { fg = "shade04", bg = "shade00" }
-"ui.help" = { fg = "shade06", bg = "shade00" }
-"ui.text" = "shade05"
-"ui.text.focus" = { fg = "shade07", bg = "light_blue" }
-"ui.text.directory" = "blue"
-
-"ui.virtual" = "shade03"
-"ui.virtual.ruler" = { bg = "shade01" }
-"ui.virtual.inlay-hint" = { fg = "shade03_darker" }
-"ui.virtual.jump-label" = { fg = "shade07", bg = "shade01", modifiers = ["bold" ] }
-
-"ui.menu" = { fg = "shade05", bg = "shade01_lighter" }
-"ui.menu.selected" = { fg = "shade07", bg = "light_blue" }
-
-"hint" = "shade04"
-"info" = "light_blue"
-"warning" = "orange"
-"error" = "red"
-
-"diagnostic" = { modifiers = [] }
-"diagnostic.hint" = { underline = { color = "shade04", style = "line" } }
-"diagnostic.info" = { underline = { color = "light_blue", style = "line" } }
-"diagnostic.warning" = { underline = { color = "orange", style = "curl" } }
-"diagnostic.error" = { underline = { color = "red", style = "curl" } }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
-
-[palette]
-shade00 = "#f2f3f7"
-shade01 = "#dadde8"
-shade02 = "#c1c6d9"
-shade03 = "#a9b0ca"
-shade04 = "#525c85"
-shade05 = "#434b6c"
-shade06 = "#343a54"
-shade07 = "#25293c"
-
-shade01_lighter = "#e6e8f0"
-shade03_darker = "#9199bb"
-shade04_lighter = "#616d9d"
-
-background = "#f2f3f7"
-foreground = "#25293c"
-
-comment_gray = "#808080"
-
-gutter_blue = "#C3D6E8"
-faint_blue = "#E8Eef1"
-lighter_blue = "#d0eaff"
-light_blue = "#99ccff"
-cursor_blue = "#80bfff"
-blue = "#0073E6"
-dark_blue = "#185b93"
-darker_blue = "#000080"
-
-purple = "#660E7A"
-light_purple = "#ED9CFF"
-
-gutter_green = "#C9DEC1"
-green = "#00733B"
-light_green = "#5DCE87"
-green_blue = "#458383"
-
-yellow = "#808000"
-dark_yellow = "#7A7A43"
-
-light_orange = "#f9c881"
-orange = "#F49810"
-
-gutter_red = "#EBBCBC"
-red = "#d90016"
-dark_red = "#7F0000" \ No newline at end of file
diff --git a/runtime/themes/jetbrains_dark.toml b/runtime/themes/jetbrains_dark.toml
index 68e74333..a9da0de0 100644
--- a/runtime/themes/jetbrains_dark.toml
+++ b/runtime/themes/jetbrains_dark.toml
@@ -47,8 +47,7 @@ tag = "red213"
"ui.menu" = { bg = "blue48" }
"ui.menu.selected" = { bg = "blue110" }
"ui.menu.scroll" = { fg = "blue81", bg = "blue48" }
-"ui.selection" = { fg = "black", bg = "blue214" }
-"ui.selection.primary" = { bg = "blue131" }
+"ui.selection" = { bg = "blue131" }
"ui.cursorline.primary" = { bg = "blue46" }
"ui.cursorline.secondary" = { bg = "blue46" }
"ui.cursorcolumn.primary" = { bg = "blue46" }
@@ -97,6 +96,5 @@ blue171 = "#A1A3AB"
blue173 = "#375fad"
blue184 = "#2aacb8"
blue196 = "#bcbec4"
-blue214 = "#ced0d6"
blue245 = "#56a8f5"
blue247 = "#57aaf7"
diff --git a/runtime/themes/licenses/aura.LICENSE b/runtime/themes/licenses/aura.LICENSE
deleted file mode 100644
index 584856f8..00000000
--- a/runtime/themes/licenses/aura.LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 - * Dalton Menezes
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/runtime/themes/licenses/jetbrains_cyan_light.LICENSE b/runtime/themes/licenses/cyan_light.LICENSE
index 3a4a2fb8..3a4a2fb8 100644
--- a/runtime/themes/licenses/jetbrains_cyan_light.LICENSE
+++ b/runtime/themes/licenses/cyan_light.LICENSE
diff --git a/runtime/themes/licenses/dark-synthwave.license b/runtime/themes/licenses/dark-synthwave.license
deleted file mode 100644
index 4d5572bd..00000000
--- a/runtime/themes/licenses/dark-synthwave.license
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Aaron Young
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/runtime/themes/licenses/doom-one.LICENSE b/runtime/themes/licenses/doom-one.LICENSE
deleted file mode 100644
index 1d0112f1..00000000
--- a/runtime/themes/licenses/doom-one.LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-MIT License
-
-Copyright (c) 2025 NTBBloodbath
-
-This theme has been ported by spentbliss <[email protected]>.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/runtime/themes/licenses/modus_vivendi.LICENSE b/runtime/themes/licenses/modus_vivendi.LICENSE
index f9cc8194..7e224507 100644
--- a/runtime/themes/licenses/modus_vivendi.LICENSE
+++ b/runtime/themes/licenses/modus_vivendi.LICENSE
@@ -1,674 +1,5 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+Copyright (C) 2020-2023 Free Software Foundation, Inc.
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.”
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- modus-themes
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc.
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”
diff --git a/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE b/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE
index f9cc8194..7e224507 100644
--- a/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE
+++ b/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE
@@ -1,674 +1,5 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+Copyright (C) 2020-2023 Free Software Foundation, Inc.
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.”
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- modus-themes
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc.
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”
diff --git a/runtime/themes/licenses/modus_vivendi_tinted.LICENSE b/runtime/themes/licenses/modus_vivendi_tinted.LICENSE
index f9cc8194..7e224507 100644
--- a/runtime/themes/licenses/modus_vivendi_tinted.LICENSE
+++ b/runtime/themes/licenses/modus_vivendi_tinted.LICENSE
@@ -1,674 +1,5 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+Copyright (C) 2020-2023 Free Software Foundation, Inc.
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.”
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- modus-themes
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc.
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”
diff --git a/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE b/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE
index f9cc8194..7e224507 100644
--- a/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE
+++ b/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE
@@ -1,674 +1,5 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+Copyright (C) 2020-2023 Free Software Foundation, Inc.
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.”
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- modus-themes
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc.
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”
diff --git a/runtime/themes/licenses/noctis.LICENSE b/runtime/themes/licenses/noctis.LICENSE
deleted file mode 100644
index 44dde440..00000000
--- a/runtime/themes/licenses/noctis.LICENSE
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) 2018 Liviu Schera
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/runtime/themes/licenses/zenburn.license b/runtime/themes/licenses/zenburn.license
deleted file mode 100644
index f288702d..00000000
--- a/runtime/themes/licenses/zenburn.license
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<https://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/runtime/themes/modus_operandi.toml b/runtime/themes/modus_operandi.toml
index 84fdde50..c0c76a3d 100644
--- a/runtime/themes/modus_operandi.toml
+++ b/runtime/themes/modus_operandi.toml
@@ -83,8 +83,8 @@ punctuation = "fg-dim"
"ui.virtual.inlay-hint" = { fg = "fg-dim", modifiers = ["italic"] }
"ui.virtual.jump-label" = { fg = "yellow-cooler", modifiers = ["bold"] }
-"ui.selection" = { bg = "bg-inactive" }
-"ui.selection.primary" = { bg = "bg-active" }
+"ui.selection" = { fg = "fg-main", bg = "bg-inactive" }
+"ui.selection.primary" = { fg = "fg-main", bg = "bg-active" }
"ui.cursor" = { fg = "bg-main", bg = "fg-main" }
"ui.cursor.primary" = { fg = "bg-main", bg = "fg-dim" }
diff --git a/runtime/themes/modus_vivendi.toml b/runtime/themes/modus_vivendi.toml
index c1f13a8f..5868f4f8 100644
--- a/runtime/themes/modus_vivendi.toml
+++ b/runtime/themes/modus_vivendi.toml
@@ -86,8 +86,8 @@ punctuation = "fg-dim"
"ui.virtual.inlay-hint" = { fg = "fg-dim", modifiers = ["italic"] }
"ui.virtual.jump-label" = { fg = "yellow-cooler", modifiers = ["bold"] }
-"ui.selection" = { bg = "bg-inactive" }
-"ui.selection.primary" = { bg = "bg-active" }
+"ui.selection" = { fg = "fg-main", bg = "bg-inactive" }
+"ui.selection.primary" = { fg = "fg-main", bg = "bg-active" }
"ui.cursor" = { fg = "bg-main", bg = "fg-main" }
"ui.cursor.primary" = { fg = "bg-main", bg = "fg-dim" }
@@ -112,8 +112,6 @@ warning = "yellow-warmer"
info = "cyan-cooler"
hint = "blue-cooler"
-rainbow = ["red", "yellow-warmer", "green-intense", "cyan", "blue", "magenta-intense"]
-
[palette]
# Basic values
bg-main = "#000000"
diff --git a/runtime/themes/modus_vivendi_deuteranopia.toml b/runtime/themes/modus_vivendi_deuteranopia.toml
index 75a7689a..a787359e 100644
--- a/runtime/themes/modus_vivendi_deuteranopia.toml
+++ b/runtime/themes/modus_vivendi_deuteranopia.toml
@@ -23,8 +23,6 @@ warning = "magenta-faint"
info = "cyan"
hint = "blue"
-rainbow = ["red", "yellow-intense", "green-intense", "cyan", "blue", "magenta-intense"]
-
[palette]
# Basic values
bg-main = "#000000"
diff --git a/runtime/themes/modus_vivendi_tritanopia.toml b/runtime/themes/modus_vivendi_tritanopia.toml
index 5e44d58e..89cbee75 100644
--- a/runtime/themes/modus_vivendi_tritanopia.toml
+++ b/runtime/themes/modus_vivendi_tritanopia.toml
@@ -37,8 +37,6 @@ warning = "magenta"
info = "cyan"
hint = "blue"
-rainbow = ["red", "magenta", "green-intense", "cyan", "blue", "magenta-intense"]
-
[palette]
# Basic values
bg-main = "#000000"
diff --git a/runtime/themes/molokai.toml b/runtime/themes/molokai.toml
index 0e48f775..bfca3677 100644
--- a/runtime/themes/molokai.toml
+++ b/runtime/themes/molokai.toml
@@ -36,10 +36,6 @@ inherits = "monokai"
"ui.popup.info" = { fg = "light-blue", bg = "#000000" }
"ui.text.info" = { fg = "light-blue", bg = "#000000" }
-"ui.statusline.normal" = { fg = "#080808", bg = "#e6db74", modifiers = ["bold"] }
-"ui.statusline.insert" = { fg = "#282828", bg = "#8787af", modifiers = ["bold"] }
-"ui.statusline.select" = { fg = "#282828", bg = "#ffd700", modifiers = ["bold"] }
-
"warning" = { fg = "#ffffff", modifiers = ["bold"] }
"error" = { fg = "#ffffff", modifiers = ["bold"] }
"info" = { fg = "#ffffff", modifiers = ["bold"] }
diff --git a/runtime/themes/nightfox.toml b/runtime/themes/nightfox.toml
index 41d81e7b..b10f88bb 100644
--- a/runtime/themes/nightfox.toml
+++ b/runtime/themes/nightfox.toml
@@ -36,7 +36,6 @@
"ui.virtual.indent-guide" = { fg = "black" } # Vertical indent width guides
"ui.virtual.inlay-hint" = { fg = "comment", bg = "bg2" } # Default style for inlay hints of all kinds
"ui.virtual.jump-label" = { fg = "blue", modifiers = ["bold"] } # Style for virtual jump labels
-"ui.virtual.wrap" = { fg = "fg3" } # Soft-wrap indicator.
"ui.statusline" = { fg = "fg2", bg = "bg0" } # Status line.
"ui.statusline.inactive" = { fg = "fg3", bg = "bg0" } # Status line in unfocused windows.
diff --git a/runtime/themes/nord.toml b/runtime/themes/nord.toml
index db7b6190..e2872d4f 100644
--- a/runtime/themes/nord.toml
+++ b/runtime/themes/nord.toml
@@ -5,7 +5,7 @@
## SYNTAX HIGHLIGHTING
# Constants
-"constant" = "nord4"
+"constant" = "nord4"
"constant.builtin" = "nord9"
"constant.builtin.boolean" = "nord9"
"constant.builtin.character" = "nord15"
@@ -110,7 +110,7 @@
"ui.linenr.selected" = "nord5"
# Cursor
-"ui.cursor" = { fg = "nord4", modifiers = ["reversed"] }
+"ui.cursor" = { fg = "nord4", modifiers = [ "reversed" ] }
"ui.cursorcolumn.primary" = { bg = "nord1" }
"ui.cursorline.primary" = { bg = "nord1" }
"ui.cursor.match" = { bg = "nord3" }
@@ -119,7 +119,7 @@
"ui.highlight" = { fg = "nord8", bg = "nord2" }
# Statusline
-"ui.statusline" = { bg = "nord1" }
+"ui.statusline" = { bg = "nord1" }
"ui.statusline.inactive" = { fg = "nord8", bg = "nord1" }
"ui.statusline.insert" = { fg = "nord1", bg = "nord6" }
"ui.statusline.normal" = { fg = "nord1", bg = "nord8" }
@@ -136,9 +136,7 @@
# Bufferline
"ui.bufferline" = { fg = "nord5", bg = "nord1" }
-"ui.bufferline.active" = { fg = "nord6", bg = "nord2", underline = { color = "nord8", style = "line" }, modifiers = [
- "italic",
-] }
+"ui.bufferline.active" = { fg = "nord6", bg = "nord2", underline = { color = "nord8", style = "line" }, modifiers = [ "italic" ] }
# Markup
"markup.heading" = "nord8"
@@ -149,51 +147,48 @@
"markup.link.text" = "nord8"
"markup.raw" = "nord7"
-# Rainbow brackets
-rainbow = ["nord13", "nord15", "nord14", "nord12"]
-
[palette]
# Polar Night is made up of four darker colors that are commonly used for base elements like backgrounds or text color in bright ambiance designs.
#
# The origin color or the Polar Night palette
-nord0 = "#2e3440"
+nord0 = "#2e3440"
# A brighter shade color based on nord0
-nord1 = "#3B4252"
+nord1 = "#3B4252"
# An even more brighter shade color of nord0
-nord2 = "#434C5E"
+nord2 = "#434C5E"
# The brightest shade color based on nord0
-nord3 = "#4C566A"
+nord3 = "#4C566A"
# 10% brighter for comments, see https://github.com/nordtheme/nord/issues/94
-nord3_bright = "#616e88"
+nord3_bright = "#616e88"
# Snow Storm is made up of three bright colors that are commonly used for text colors or base UI elements in bright ambiance designs.
# The origin color or the Snow Storm palette
-nord4 = "#D8DEE9"
+nord4 = "#D8DEE9"
# A brighter shade color of nord4
-nord5 = "#E5E9F0"
+nord5 = "#E5E9F0"
# The brightest shade color based on nord4
-nord6 = "#ECEFF4"
+nord6 = "#ECEFF4"
# Frost can be described as the heart palette of Nord, a group of four bluish colors that are commonly used for primary UI component and text highlighting and essential code syntax elements.
#
# A calm and highly contrasted color reminiscent of frozen polar water
-nord7 = "#8FBCBB"
+nord7 = "#8FBCBB"
# The bright and shiny primary accent color reminiscent of pure and clear ice
-nord8 = "#88C0D0"
+nord8 = "#88C0D0"
# A more darkened and less saturated color reminiscent of arctic waters
-nord9 = "#81A1C1"
+nord9 = "#81A1C1"
# A dark and intensive color reminiscent of the deep arctic ocean
-nord10 = "#5E81AC"
+nord10 = "#5E81AC"
# Aurora consists of five colorful components reminiscent of the "Aurora borealis", sometimes referred to as polar lights or northern lights.
#
# Red
-nord11 = "#BF616A"
+nord11 = "#BF616A"
# Orange
-nord12 = "#D08770"
+nord12 = "#D08770"
# Yellow
-nord13 = "#EBCB8B"
+nord13 = "#EBCB8B"
# Green
-nord14 = "#A3BE8C"
+nord14 = "#A3BE8C"
# Purple
-nord15 = "#B48EAD"
+nord15 = "#B48EAD"
diff --git a/runtime/themes/nvchad_solarized_dark.toml b/runtime/themes/nvchad_solarized_dark.toml
deleted file mode 100644
index 91ab18fe..00000000
--- a/runtime/themes/nvchad_solarized_dark.toml
+++ /dev/null
@@ -1,168 +0,0 @@
-# Author : Uladzislau Hinko <[email protected]>
-
-"attribute" = { fg = "yellow" }
-
-"keyword" = { fg = "blue" }
-"keyword.directive" = { fg = "blue" }
-"keyword.control.import" = { fg = "blue" }
-"keyword.control.conditional" = { fg = "blue" }
-"keyword.control.repeat" = { fg = "blue" }
-"keyword.function" = { fg = "violet" }
-"keyword.storage" = { fg = "violet" }
-"keyword.storage.type" = { fg = "violet" }
-"keyword.operator" = { fg = "green" }
-
-"namespace" = { fg = "red" }
-"module" = { fg = "red" }
-
-"type" = { fg = "yellow" }
-"type.enum.variant" = { fg = "yellow" }
-"type.builtin" = { fg = "yellow" }
-"type.parameter" = { fg = "yellow" }
-"type.qualifier" = { fg = "yellow" }
-"type.definition" = { fg = "yellow" }
-
-"variable" = { fg = "base1" }
-"variable.builtin" = { fg = "red" }
-"variable.parameter" = { fg = "base1" }
-"variable.other.member" = { fg = "red" }
-
-"constant" = { fg = "orange" }
-"constant.character" = { fg = "green" }
-"constant.character.escape" = { fg = "cyan" }
-"constant.macro" = { fg = "orange" }
-"constant.builtin" = { fg = "orange" }
-"constant.numeric" = { fg = "orange" }
-"constant.numeric.integer" = { fg = "orange" }
-"constant.numeric.float" = { fg = "orange" }
-"constant.boolean" = { fg = "orange" }
-"number" = { fg = "orange" }
-
-"constructor" = { fg = "blue" }
-"function" = { fg = "blue" }
-"function.macro" = { fg = "blue" }
-"function.builtin" = { fg = "blue" }
-"function.special" = { fg = "blue" }
-"function.method" = { fg = "blue" }
-"function.call" = { fg = "blue" }
-
-"comment" = { fg = "base01" }
-"comment.documentation" = { fg = "base01" }
-
-"string" = { fg = "green" }
-"string.regexp" = { fg = "cyan" }
-"string.special" = { fg = "cyan" }
-"string.symbol" = { fg = "green" }
-"string.escape" = { fg = "cyan" }
-"character" = { fg = "green" }
-"escape" = { fg = "cyan" }
-
-"label" = { fg = "yellow" }
-"annotation" = { fg = "yellow" }
-
-"tag" = { fg = "red" }
-"tag.attribute" = { fg = "orange" }
-"tag.delimiter" = { fg = "base1" }
-
-"operator" = { fg = "base1" }
-
-"punctuation.bracket" = { fg = "magenta" }
-"punctuation.delimiter" = { fg = "base1" }
-"punctuation.special" = { fg = "magenta" }
-
-"embedded" = { fg = "green" }
-
-"markup.heading" = { fg = "blue" }
-"markup.list" = { fg = "red" }
-"markup.bold" = { fg = "yellow", modifiers = ["bold"] }
-"markup.italic" = { fg = "magenta", modifiers = ["italic"] }
-"markup.strikethrough" = { modifiers = ["crossed_out"] }
-"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] }
-"markup.link.text" = { fg = "red" }
-"markup.quote" = { fg = "cyan" }
-"markup.raw" = { fg = "green" }
-
-"diff.plus" = { fg = "green" }
-"diff.delta" = { fg = "yellow" }
-"diff.minus" = { fg = "red" }
-
-"ui.background" = { bg = "base03" }
-
-"ui.virtual.whitespace" = { fg = "base01" }
-"ui.virtual.inlay-hint" = { fg = "#586e75", modifiers = ["italic"] }
-"ui.virtual.jump-label" = { fg = "red", modifiers = ["bold"] }
-"ui.virtual.indent-guide" = { fg = "base02" }
-"ui.virtual.ruler" = { bg = "base02" }
-
-"ui.linenr" = { fg = "base01", bg = "base03" }
-"ui.linenr.selected" = { fg = "base1", bg = "base03" }
-
-"ui.cursorline" = { bg = "base025" }
-"ui.cursorline.primary" = { bg = "base02" }
-"ui.cursorline.secondary" = { bg = "base025" }
-
-"ui.cursor.primary" = { fg = "base03", bg = "base1" }
-"ui.cursor.select" = { fg = "base02", bg = "cyan" }
-"ui.cursor" = { fg = "base02", bg = "cyan" }
-"ui.cursor.insert" = { fg = "base03", bg = "base3" }
-"ui.cursor.match" = { fg = "base03", bg = "base00" }
-
-"ui.selection" = { bg = "base0175" }
-"ui.selection.primary" = { bg = "base015" }
-
-"ui.statusline" = { fg = "base1", bg = "base02" }
-"ui.statusline.normal" = { fg = "base3", bg = "blue" }
-"ui.statusline.insert" = { fg = "base3", bg = "green" }
-"ui.statusline.select" = { fg = "base3", bg = "yellow" }
-"ui.statusline.inactive" = { fg = "base01", bg = "base02" }
-
-"ui.bufferline" = { fg = "base0", bg = "base02" }
-"ui.bufferline.active" = { fg = "base3", bg = "magenta", modifiers = ["bold"] }
-"ui.bufferline.background" = { bg = "base02" }
-
-"ui.popup" = { fg = "base1", bg = "base02" }
-"ui.menu" = { fg = "base1", bg = "base02" }
-"ui.menu.selected" = { fg = "base3", bg = "blue" }
-"ui.menu.scroll" = { fg = "base1", bg = "base01" }
-"ui.window" = { fg = "base1", bg = "base02" }
-"ui.help" = { fg = "base1", bg = "base02" }
-
-"ui.popup.info" = { fg = "base1", bg = "base02" }
-"ui.text.info" = { fg = "base1", bg = "base02" }
-
-"ui.text" = { fg = "base1" }
-"ui.text.focus" = { fg = "blue", modifiers = ["bold"] }
-
-"warning" = { fg = "orange", modifiers = ["bold", "underlined"] }
-"error" = { fg = "red", modifiers = ["bold", "underlined"] }
-"info" = { fg = "blue", modifiers = ["bold", "underlined"] }
-"hint" = { fg = "base01", modifiers = ["bold", "underlined"] }
-
-"diagnostic.warning" = { underline = { style = "curl", color = "orange" } }
-"diagnostic.error" = { underline = { style = "curl", color = "red" } }
-"diagnostic.info" = { underline = { style = "curl", color = "blue" } }
-"diagnostic.hint" = { underline = { style = "curl", color = "base01" } }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
-
-[palette]
-base03 = "#002b36"
-base025 = "#06313c"
-base02 = "#0a3540"
-base0175 = "#133e49"
-base015 = "#1b4651"
-base01 = "#28535e"
-base00 = "#325d68"
-base0 = "#3c6772"
-base1 = "#93a1a1"
-base2 = "#eee8d5"
-base3 = "#fdf6e3"
-yellow = "#b58900"
-orange = "#cb4b16"
-red = "#dc322f"
-magenta = "#d33682"
-violet = "#6c71c4"
-blue = "#268bd2"
-cyan = "#2aa198"
-green = "#859900"
-white = "#ffffff"
diff --git a/runtime/themes/nvim-dark.toml b/runtime/themes/nvim-dark.toml
deleted file mode 100644
index d52f51f1..00000000
--- a/runtime/themes/nvim-dark.toml
+++ /dev/null
@@ -1,109 +0,0 @@
-# A port of Neovim's default dark color scheme created by echasnovski: https://github.com/neovim/neovim/pull/26334
-# Based on Kim Nørgaard's Neovim dark (accented) theme for Zed: https://github.com/KimNorgaard/zed-neovim-default
-
-attribute = "fog"
-keyword = { fg = "fog", modifiers = ["bold"] }
-"keyword.directive" = { fg = "fog", modifiers = ["bold"] }
-namespace = "fog"
-punctuation = "fog"
-"punctuation.delimiter" = "fog"
-operator = "fog"
-special = "aqua"
-"variable.other.member" = "sky"
-variable = "fog"
-"variable.parameter" = { fg = "aqua" }
-"variable.builtin" = "aqua"
-type = "fog"
-"type.builtin" = "aqua"
-constructor = "aqua"
-function = "aqua"
-"function.macro" = "fog"
-"function.builtin" = "aqua"
-tag = "aqua"
-comment = "stone"
-constant = "fog"
-"constant.builtin" = "fog"
-string = "leaf"
-"constant.numeric" = "fog"
-"constant.character.escape" = "aqua"
-label = { fg = "fog", modifiers = ["bold"] }
-tabstop = { modifiers = ["italic"], bg = "panel"}
-
-"markup.heading" = "fog"
-"markup.bold" = { modifiers = ["bold"] }
-"markup.italic" = { modifiers = ["italic"] }
-"markup.strikethrough" = { modifiers = ["crossed_out"] }
-"markup.link.url" = { fg = "aqua", modifiers = ["italic"] }
-"markup.link.text" = "aqua"
-"markup.raw" = "aqua"
-
-"diff.plus" = "leaf"
-"diff.minus" = "rose"
-"diff.delta" = "sun"
-
-"ui.background" = { bg = "night" }
-"ui.background.separator" = { fg = "panel" }
-"ui.linenr" = { fg = "slate" }
-"ui.linenr.selected" = { fg = "fog" }
-
-"ui.statusline" = { fg = "fog", bg = "panel" }
-"ui.statusline.inactive" = { fg = "stone", bg = "panel" }
-"ui.statusline.normal" = { bg = "aqua", fg = "panel" }
-"ui.statusline.insert" = { bg = "leaf", fg = "panel" }
-"ui.statusline.select" = { bg = "sky", fg = "panel" }
-
-"ui.popup" = { bg = "panel" }
-"ui.window" = { fg = "panel" }
-"ui.help" = { bg = "panel", fg = "fog" }
-"ui.text" = { fg = "fog" }
-"ui.text.focus" = { fg = "fog" }
-"ui.text.inactive" = "stone"
-"ui.text.directory" = { fg = "sky" }
-"ui.virtual" = { fg = "slate" }
-"ui.virtual.ruler" = { bg = "panel" }
-"ui.virtual.jump-label" = { fg = "sun", modifiers = ["bold"] }
-
-"ui.virtual.indent-guide" = { fg = "slate" }
-
-"ui.selection" = { bg = "oxford" }
-"ui.selection.primary" = { bg = "oxford" }
-"ui.cursor.select" = { bg = "aqua" }
-"ui.cursor.insert" = { bg = "fog" }
-"ui.cursor.primary.select" = { bg = "aqua" }
-"ui.cursor.primary.insert" = { bg = "fog" }
-"ui.cursor.match" = { fg = "night", bg = "slate" }
-"ui.cursor" = { modifiers = ["reversed"] }
-"ui.cursorline.primary" = { bg = "panel" }
-"ui.highlight" = { bg = "panel" }
-"ui.highlight.frameline" = { bg = "slate" }
-"ui.debug" = { fg = "slate" }
-"ui.debug.breakpoint" = { fg = "sun" }
-"ui.menu" = { fg = "fog", bg = "panel" }
-"ui.menu.selected" = { fg = "night", bg = "fog" }
-"ui.menu.scroll" = { fg = "fog", bg = "panel" }
-
-"diagnostic.hint" = { underline = { color = "stone", style = "curl" } }
-"diagnostic.info" = { underline = { color = "aqua", style = "curl" } }
-"diagnostic.warning" = { underline = { color = "sun", style = "curl" } }
-"diagnostic.error" = { underline = { color = "rose", style = "curl" } }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
-
-warning = "sun"
-error = "rose"
-info = "aqua"
-hint = "stone"
-
-[palette]
-fog = "#e0e2ea"
-stone = "#9b9ea4"
-night = "#14161b"
-panel = "#2c2e33"
-slate = "#4f5258"
-
-aqua = "#8cf8f7"
-leaf = "#b3f6c0"
-sun = "#fce094"
-rose = "#ffc0b9"
-sky = "#a6dbff"
-oxford = "#0D2847"
diff --git a/runtime/themes/nyxvamp-obsidian.toml b/runtime/themes/nyxvamp-obsidian.toml
index 62fd08dc..356b8535 100644
--- a/runtime/themes/nyxvamp-obsidian.toml
+++ b/runtime/themes/nyxvamp-obsidian.toml
@@ -3,9 +3,6 @@
inherits = "nyxvamp-radiance"
-# Rainbow parentheses colors
-rainbow = ["keyword_fg", "function_fg", "string_fg", "type_fg"]
-
# Override specific styles for obsidian variant
"function" = { fg = "function_fg", modifiers = ["bold"] }
"function.builtin" = { fg = "function_builtin_fg", modifiers = ["bold"] }
@@ -31,13 +28,13 @@ status_inactive_bg = "#0E0E10"
# Menu colors
menu_fg = "#C0C0CE"
-menu_bg = "#1E1E20"
-menu_sel_fg = "#C0C0CE"
-menu_sel_bg = "#2E2E30"
+menu_bg = "#0E0E10"
+menu_sel_fg = "#0E0E10"
+menu_sel_bg = "#F28FAD"
menu_scroll_fg = "#5E5A76"
-menu_scroll_bg = "#1E1E20"
+menu_scroll_bg = "#0E0E10"
popup_fg = "#C0C0CE"
-popup_bg = "#1E1E20"
+popup_bg = "#0E0E10"
# UI virtual
virtual_ruler_bg = "#191921" # Slightly lighter than background, close to comment color
@@ -62,15 +59,15 @@ variable_builtin_fg = "#F28FAD"
type_fg = "#A0A0D0" # Muted lavender types
type_builtin_fg = "#A0A0D0"
attribute_fg = "#F5C2E7"
-namespace_fg = "#A0A0D0" # Muted lavender namespaces (Base16 base0E)
+namespace_fg = "#A090C0" # Muted purple namespaces
punctuation_fg = "#C0C0CE"
symbol_fg = "#F28FAD"
# Diagnostics
-error_fg = "#F28FAD" # Base16 base08 - red errors
-warning_fg = "#D8A080" # Base16 base09 - orange warnings
-info_fg = "#7FAFD7" # Base16 base0B - blue info
-hint_fg = "#7BB5A8" # Base16 base0C - cyan hints
+error_fg = "#D78284" # Muted red errors
+warning_fg = "#D5B880" # Muted yellow warnings
+info_fg = "#7A9CCC" # Muted blue info
+hint_fg = "#7BB5A8" # Muted cyan hints
# Diff colors
diff_add_fg = "#86BA75" # Muted green additions
diff --git a/runtime/themes/nyxvamp-radiance.toml b/runtime/themes/nyxvamp-radiance.toml
index 27f7d3f0..e2d085f2 100644
--- a/runtime/themes/nyxvamp-radiance.toml
+++ b/runtime/themes/nyxvamp-radiance.toml
@@ -1,15 +1,9 @@
# nyxvamp - radiance variant
# author: <[email protected]>
-# Rainbow parentheses colors
-rainbow = ["keyword_fg", "function_fg", "constant_fg", "string_fg"]
-
# UI Elements
"ui.background" = { bg = "background", fg = "foreground" }
"ui.text" = { fg = "foreground" }
-"ui.text.focus" = { fg = "menu_sel_fg", bg = "menu_sel_bg" }
-"ui.text.inactive" = { fg = "comment_fg" }
-"ui.text.info" = { fg = "menu_fg", bg = "menu_bg" }
"ui.cursor" = { fg = "cursor_fg", bg = "cursor_bg" }
"ui.cursorline.primary" = { bg = "cursorline" }
"ui.selection" = { bg = "selection" }
@@ -21,18 +15,9 @@ rainbow = ["keyword_fg", "function_fg", "constant_fg", "string_fg"]
"ui.menu.selected" = { fg = "menu_sel_fg", bg = "menu_sel_bg" }
"ui.menu.scroll" = { fg = "menu_scroll_fg", bg = "menu_scroll_bg" }
"ui.popup" = { fg = "popup_fg", bg = "popup_bg" }
-"ui.popup.info" = { fg = "menu_fg", bg = "menu_bg" }
"ui.match_paren" = { fg = "match_paren_fg", bg = "match_paren_bg", modifiers = ["bold"] }
"ui.virtual" = { fg = "comment_fg" }
"ui.virtual.ruler" = { bg = "virtual_ruler_bg" }
-"ui.highlight" = { fg = "menu_sel_fg", bg = "menu_sel_bg" }
-"ui.picker.header" = { fg = "menu_fg", bg = "menu_bg" }
-"ui.picker.header.column" = { fg = "menu_fg", bg = "menu_bg" }
-"ui.picker.header.column.active" = { fg = "menu_sel_fg", bg = "menu_sel_bg" }
-"ui.window" = { fg = "foreground" }
-"ui.help" = { fg = "menu_fg", bg = "menu_bg" }
-"ui.text.directory" = { fg = "function_fg", modifiers = ["bold"] }
-"ui.selection.primary" = { bg = "selection" }
# Syntax Highlighting
"comment" = { fg = "comment_fg", modifiers = ["italic"] }
@@ -57,11 +42,6 @@ rainbow = ["keyword_fg", "function_fg", "constant_fg", "string_fg"]
"symbol" = { fg = "symbol_fg", modifiers = ["italic"] }
# Diagnostics
-"warning" = { fg = "warning_fg" }
-"error" = { fg = "error_fg" }
-"info" = { fg = "info_fg" }
-"hint" = { fg = "hint_fg" }
-"diagnostic" = { fg = "error_fg" }
"diagnostic.error" = { fg = "error_fg", modifiers = ["bold"] }
"diagnostic.warning" = { fg = "warning_fg", modifiers = ["bold"] }
"diagnostic.info" = { fg = "info_fg", modifiers = ["bold"] }
@@ -87,50 +67,50 @@ foreground = "#1E1E2E" # Deep navy foreground (from your vis
cursor_fg = "#F7F7FF" # Off-white cursor text
cursor_bg = "#9655FF" # Deep purple cursor (from your visual identity)
cursorline = "#E8E8F0" # Slightly darker than background
-selection = "#E8D5FF" # Light purple selection that matches theme palette
-line_nr = "#5A5570" # Darker gray for line numbers
+selection = "#FEF5BC" # Soft yellow selection (from your visual identity)
+line_nr = "#6E6A86" # Medium gray for line numbers
line_nr_selected = "#1E1E2E" # Deep navy for selected line number
status_fg = "#1E1E2E" # Deep navy
status_bg = "#E8E8F0" # Light gray
-status_inactive_fg = "#5A5570" # Darker gray
+status_inactive_fg = "#6E6A86" # Medium gray
status_inactive_bg = "#F7F7FF" # Off-white
menu_fg = "#1E1E2E" # Deep navy
menu_bg = "#E8E8F0" # Light gray
-menu_sel_fg = "#1E1E2E" # Dark navy text for better contrast
-menu_sel_bg = "#E8D5FF" # Light purple selection
-menu_scroll_fg = "#5A5570" # Darker gray
+menu_sel_fg = "#F7F7FF" # Off-white
+menu_sel_bg = "#FEF5BC" # Soft yellow selection
+menu_scroll_fg = "#6E6A86" # Medium gray
menu_scroll_bg = "#E8E8F0" # Light gray
popup_fg = "#1E1E2E" # Deep navy
popup_bg = "#E8E8F0" # Light gray
match_paren_fg = "#1E1E2E" # Deep navy
-match_paren_bg = "#E8D5FF" # Light purple matching selection
+match_paren_bg = "#FEF5BC" # Soft yellow
virtual_ruler_bg = "#EAEAF0" # Slightly lighter than comment color background
-comment_fg = "#5A5570" # Darker gray comments for better contrast
-string_fg = "#B8860B" # Dark golden rod - much better contrast on light background
-string_special_fg = "#9F1239" # Even darker pink special strings
-constant_fg = "#9F1239" # Even darker pink constants for maximum contrast
-constant_builtin_fg = "#9F1239" # Even darker pink built-in constants
-number_fg = "#C2410C" # Darker orange numbers for better contrast
-boolean_fg = "#9F1239" # Even darker pink booleans
+comment_fg = "#6E6A86" # Medium gray comments
+string_fg = "#FEF5BC" # Soft yellow strings (from your visual identity)
+string_special_fg = "#F28FAD" # Pink special strings
+constant_fg = "#F28FAD" # Pink constants
+constant_builtin_fg = "#F28FAD" # Pink built-in constants
+number_fg = "#F8BD96" # Peach numbers
+boolean_fg = "#F28FAD" # Pink booleans
function_fg = "#005F87" # Dark blue functions (more distinguishable)
function_builtin_fg = "#005F87" # Dark blue built-in functions
keyword_fg = "#9655FF" # Deep purple keywords
keyword_control_fg = "#9655FF" # Deep purple control keywords
-operator_fg = "#4A4560" # Darker purple-gray operators for better contrast
+operator_fg = "#6E6A86" # Medium gray operators (adjusted for better contrast)
variable_fg = "#1E1E2E" # Deep navy variables
-variable_builtin_fg = "#9F1239" # Even darker pink built-in variables
-type_fg = "#6B46C1" # Darker purple types for better contrast
-type_builtin_fg = "#6B46C1" # Darker purple built-in types for better contrast
+variable_builtin_fg = "#F28FAD" # Pink built-in variables
+type_fg = "#C9CBFF" # Lavender types
+type_builtin_fg = "#C9CBFF" # Lavender built-in types
attribute_fg = "#9655FF" # Deep purple attributes
-namespace_fg = "#6B46C1" # Darker purple namespaces (Base16 base0E)
+namespace_fg = "#9655FF" # Deep purple namespaces
punctuation_fg = "#1E1E2E" # Deep navy punctuation
-symbol_fg = "#9F1239" # Even darker pink symbols (atoms) for maximum contrast
+symbol_fg = "#F28FAD" # Pink symbols (e.g., Elixir atoms)
-error_fg = "#9F1239" # Base16 base08 - red errors
-warning_fg = "#C2410C" # Base16 base09 - orange warnings
-info_fg = "#005F87" # Base16 base0B - blue info
-hint_fg = "#8BD5CA" # Base16 base0C - cyan hints
+error_fg = "#E78284" # Soft red errors
+warning_fg = "#E5C890" # Soft yellow warnings
+info_fg = "#8CAAEE" # Soft blue info
+hint_fg = "#8BD5CA" # Soft cyan hints
diff_add_fg = "#A6DA95" # Soft green additions
diff_delete_fg = "#E78284" # Soft red deletions
@@ -141,4 +121,4 @@ markup_bold_fg = "#1E1E2E" # Deep navy bold text
markup_italic_fg = "#1E1E2E" # Deep navy italic text
markup_link_url_fg = "#005F87" # Dark blue links
markup_link_text_fg = "#9655FF" # Deep purple link text
-markup_quote_fg = "#5A5570" # Darker gray quotes
+markup_quote_fg = "#6E6A86" # Gray quotes
diff --git a/runtime/themes/nyxvamp-transparent.toml b/runtime/themes/nyxvamp-transparent.toml
deleted file mode 100644
index 46c2f8a1..00000000
--- a/runtime/themes/nyxvamp-transparent.toml
+++ /dev/null
@@ -1,54 +0,0 @@
-# nyxvamp: override variant (fully transparent)
-# author: zoedsoupe <[email protected]>
-
-inherits = "nyxvamp-veil"
-
-# Override UI elements for transparency while maintaining readability
-"ui.background" = {}
-"ui.statusline" = { fg = "status_fg" }
-"ui.statusline.inactive" = { fg = "status_inactive_fg" }
-"ui.cursorline.primary" = {}
-"ui.virtual.ruler" = {}
-
-# Keep menus fully transparent but improve text contrast
-"ui.menu" = { fg = "bright_text" }
-"ui.menu.selected" = { fg = "selected_bright", bg = "selection_subtle", modifiers = ["bold"] }
-"ui.menu.scroll" = { fg = "menu_scroll_fg" }
-
-# Popups remain transparent with better text
-"ui.popup" = { fg = "bright_text" }
-"ui.popup.info" = { fg = "bright_text" }
-
-# Improve picker visibility while keeping transparency
-"ui.picker.header" = { fg = "header_bright", modifiers = ["bold", "underlined"] }
-"ui.picker.header.column" = { fg = "header_bright" }
-"ui.picker.header.column.active" = { fg = "active_column_fg", bg = "active_column_bg", modifiers = ["bold", "underlined"] }
-
-# Focus and selection improvements
-"ui.text.focus" = { fg = "selected_bright", bg = "selection_subtle", modifiers = ["bold"] }
-"ui.text.inactive" = { fg = "text_inactive_fg" }
-"ui.text.directory" = { fg = "directory_fg", modifiers = ["italic"] }
-
-# Improve other UI elements
-"ui.match_paren" = { fg = "match_paren_fg", bg = "match_paren_highlight_bg", modifiers = ["bold"] }
-"ui.selection" = { bg = "selection_transparent" }
-"ui.selection.primary" = { bg = "selection_primary_transparent" }
-
-# Add palette for transparent-specific colors
-[palette]
-# Much brighter colors for transparent backgrounds - maximum readability
-bright_text = "#FFFFFF" # Pure white for maximum contrast on any background
-selected_bright = "#FF6B9D" # Bright pink that's still muted but very visible
-header_bright = "#5DADE2" # Bright blue but not harsh
-directory_fg = "#E8D5FF" # Very bright lavender for directories
-text_inactive_fg = "#A0A0A0" # Bright gray for inactive text
-
-# Stronger selection backgrounds for transparent theme
-selection_subtle = "#DDA0DD50" # 31% muted plum selection
-match_paren_highlight_bg = "#DDA0DD40" # 25% muted plum highlight
-selection_transparent = "#483D8B40" # 25% dark slate blue selection
-selection_primary_transparent = "#483D8B50" # 31% dark slate blue primary
-
-# Active column highlighting for better visibility
-active_column_fg = "#1E1E2E" # Dark text for contrast
-active_column_bg = "#87CEEB80" # 50% sky blue background - matches header color
diff --git a/runtime/themes/nyxvamp-veil.toml b/runtime/themes/nyxvamp-veil.toml
index 1d385ba0..60d5d7d6 100644
--- a/runtime/themes/nyxvamp-veil.toml
+++ b/runtime/themes/nyxvamp-veil.toml
@@ -3,9 +3,6 @@
inherits = "nyxvamp-radiance"
-# Rainbow parentheses colors
-rainbow = ["keyword_fg", "function_fg", "string_fg", "number_fg"]
-
# Override specific styles for veil variant
"function" = { fg = "function_fg", modifiers = ["bold"] }
"function.builtin" = { fg = "function_builtin_fg", modifiers = ["bold"] }
@@ -25,15 +22,15 @@ line_nr_selected = "#D9E0EE" # Foreground color for selected line number
# Status line colors
status_fg = "#D9E0EE"
-status_bg = "#2E2E3E"
+status_bg = "#302D41"
status_inactive_fg = "#6E6A86"
status_inactive_bg = "#1E1E2E"
# Menu colors
menu_fg = "#D9E0EE"
menu_bg = "#1E1E2E"
-menu_sel_fg = "#D9E0EE"
-menu_sel_bg = "#494D64"
+menu_sel_fg = "#1E1E2E"
+menu_sel_bg = "#F5C2E7"
menu_scroll_fg = "#6E6A86"
menu_scroll_bg = "#1E1E2E"
popup_fg = "#D9E0EE"
@@ -62,15 +59,15 @@ variable_builtin_fg = "#F28FAD" # Pink built-in variables
type_fg = "#C9CBFF" # Lavender types
type_builtin_fg = "#C9CBFF" # Lavender built-in types
attribute_fg = "#F5C2E7" # Pink attributes
-namespace_fg = "#C9CBFF" # Lavender namespaces (Base16 base0E)
+namespace_fg = "#DDB6F2" # Purple namespaces
punctuation_fg = "#D9E0EE" # Foreground color for punctuation
symbol_fg = "#F28FAD" # Pink symbols (e.g., Elixir atoms)
# Diagnostics
-error_fg = "#F28FAD" # Base16 base08 - red errors
-warning_fg = "#F8BD96" # Base16 base09 - orange warnings
-info_fg = "#96CDFB" # Base16 base0B - blue info
-hint_fg = "#8BD5CA" # Base16 base0C - cyan hints
+error_fg = "#E78284" # Red errors
+warning_fg = "#E5C890" # Yellow warnings
+info_fg = "#8CAAEE" # Blue info
+hint_fg = "#8BD5CA" # Cyan hints
# Diff colors
diff_add_fg = "#A6DA95" # Green additions
diff --git a/runtime/themes/onedarker.toml b/runtime/themes/onedarker.toml
index b65bd86b..365cee49 100644
--- a/runtime/themes/onedarker.toml
+++ b/runtime/themes/onedarker.toml
@@ -20,7 +20,6 @@
"keyword.operator" = { fg = "white" }
"special" = { fg = "blue" }
"string" = { fg = "green" }
-"tag" = { fg = "purple" }
"type" = { fg = "yellow" }
"variable" = { fg = "white" }
"variable.builtin" = { fg = "red" }
@@ -61,7 +60,6 @@
"ui.virtual.whitespace" = { fg = "light-gray" }
"ui.virtual.ruler" = { bg = "gray" }
"ui.virtual.inlay-hint" = { fg = "light-gray" }
-"ui.virtual.jump-label" = { fg = "gold", modifiers = ["bold", "underlined"] }
"ui.cursor" = { fg = "white", modifiers = ["reversed"] }
"ui.cursor.primary" = { fg = "white", modifiers = ["reversed"] }
diff --git a/runtime/themes/rose_pine.toml b/runtime/themes/rose_pine.toml
index 33c71486..49296705 100644
--- a/runtime/themes/rose_pine.toml
+++ b/runtime/themes/rose_pine.toml
@@ -45,7 +45,7 @@
"ui.virtual.inlay-hint" = { fg = "subtle" }
"ui.menu" = { fg = "subtle", bg = "surface" }
-"ui.menu.selected" = { fg = "text", bg = "overlay" }
+"ui.menu.selected" = { fg = "text" }
"ui.menu.scroll" = { fg = "muted", bg = "highlight_med" }
"ui.selection" = { bg = "overlay" }
diff --git a/runtime/themes/sidra.toml b/runtime/themes/sidra.toml
index 81a9222e..44a9474f 100644
--- a/runtime/themes/sidra.toml
+++ b/runtime/themes/sidra.toml
@@ -96,37 +96,22 @@ warning = "cl_warning"
# === ATTRIBUTES & KEYWORDS ===
-attribute = "#a7bf67" # Olive green
-namespace = "#7095bf" # Steel blue
-
-"keyword" = { fg = "#d37a78", modifiers = ["bold"] }
-"keyword.control" = { fg = "#d37a78", modifiers = ["bold"] }
-"keyword.control.conditional" = { fg = "#82AAFF", modifiers = ["bold"] }
-"keyword.control.repeat" = { fg = "#d37a78", modifiers = ["bold"] }
-"keyword.control.import" = { fg = "#C678DD", modifiers = ["bold"] }
-"keyword.control.return" = { fg = "#88aece", modifiers = ["bold"] }
-"keyword.control.exception" = { fg = "#FF79C6", modifiers = ["bold"] }
-"keyword.operator" = { fg = "#528BFF" }
-"keyword.function" = { fg = "#d37a78", modifiers = ["bold"] }
-"keyword.storage" = { fg = "#C678DD", modifiers = ["bold"] }
-"keyword.storage.type" = { fg = "#56B6C2", modifiers = ["bold"] }
-"keyword.storage.modifier" = { fg = "#56B6C2", modifiers = ["bold"] }
-
+attribute = "#a7bf67" # Olive green
+keyword = "#A4A2B4" # Muted lavender gray
+"keyword.directive" = "#D3D3D3" # Light gray (used to be "light-gray")
+namespace = "#7095bf" # Steel blue
# === SYMBOLS & OPERATORS ===
-"punctuation" = "#FFFFFF" # White
-"punctuation.delimiter" = "#F3F2CC" # White (delimiter punctuation)
-"punctuation.bracket" = "#FFFFFF" # Yellow
-"punctuation.special" = "#ffd700" # Yello
-operator = "#F3F2CC" # Dusty brown (used to be "muddy")
+punctuation = "#FFFFFF" # White
+"punctuation.delimiter" = "#FFFFFF" # White (delimiter punctuation)
+operator = "#987654" # Dusty brown (used to be "muddy")
special = "#c90076" # Pink Color
# === VARIABLES ===
-"variable" = "#F3F2CC" # Soft green
-"variable.other" = "#cfba8b" # Pale mint green (special language svars)
-"variable.other.member" = "#AB9DF2" # Pale mint green (special language svars)
-"variable.builtin" = "#FC9867" # Blue
-"variable.parameter" = "#F3F2CC" # Pale mint green
+variable = "#7ec67f" # Soft green
+"variable.other.member" = "#7ec67f" # Soft green (class or object members)
+"variable.parameter" = "#a8ffb4" # Pale mint green
+"variable.builtin" = "#a8ffb4" # Pale mint green (special language vars)
# === TYPES ===
type = "#efbe4c" # Golden yellow
@@ -134,30 +119,30 @@ type = "#efbe4c" # Golden yellow
constructor = "#c19ef7" # Light lilac
# === FUNCTIONS ===
-"function" = "#FAD566" # Green
-"function.macro" = "#FAD566" # Green
-"function.method" = "#FAD566" # Green
+function = "#987654" # Dusty brown (used to be "muddy")
+"function.macro" = "#987654" # Dusty brown (macro functions)
"function.builtin" = "#db985e" # Orange tan
-"function.special" = "#db985e" # Orange tan
# === TAGS ===
tag = "#d37a78" # Soft salmon pink
# === COMMENTS ===
-comment = "#646f69" # Light gray
+comment = "#D3D3D3" # Light gray
# === CONSTANTS ===
constant = "#A5C4D4" # Pale blue
-"constant.builtin" = "#76c490" # Bright yellow
-"constant.numeric" = "#86c1b9" # Muted violet
+"constant.builtin" = "#f1fa8c" # Bright yellow
+"constant.numeric" = "#b577b0" # Muted violet
"constant.character.escape" = "#c95c56" # Coral red (escape characters)
# === STRINGS ===
-string = "#A9DC76" # Sandy yellow-orange
+string = "#d6a560" # Sandy yellow-orange
# === LABELS ===
label = "#abcc8a" # Pale green
+
+
# ===========================
# Color Palette
# ===========================
@@ -190,7 +175,7 @@ markup_raw = "#808080" # Medium gray
# ===== PRIMARY UI COLORS =====
foreground = "#D3D3D3" # Light gray (default text)
-background = "#232323" # Very dark gray (background)
+background = "#1f1f21" # Very dark gray (background)
# ===== UI INTERFACE COLORS =====
diff --git a/runtime/themes/ttox_soft.toml b/runtime/themes/ttox_soft.toml
deleted file mode 100644
index b4fe71cb..00000000
--- a/runtime/themes/ttox_soft.toml
+++ /dev/null
@@ -1,37 +0,0 @@
-# Author : Samuel Guyah <[email protected]>
-
-"ui.selection" = { fg = "white", bg = "gray" }
-"ui.cursor" = { fg = "black", bg = "light-gray" }
-"ui.cursor.primary" = { fg = "black", bg = "light-gray" }
-"ui.cursor.match" = { modifiers = ["underlined"] }
-"ui.background.separator" = "gray"
-"ui.linenr" = "gray"
-"ui.linenr.selected" = { fg = "white", bg = "gray" }
-"ui.statusline" = { bg = "black", fg = "white" }
-"ui.menu" = { fg = "white", bg = "black" }
-"ui.menu.selected" = { bg = "light-gray", fg = "black" }
-"ui.popup" = { fg = "white", bg = "black" }
-"ui.help" = { fg = "white", bg = "black" }
-"ui.virtual.ruler" = { underline = { style = "line" } }
-"ui.bufferline" = { fg = "white", bg = "black" }
-"ui.bufferline.active" = { fg = "black", bg = "white" }
-"ui.bufferline.background" = { bg = "black" }
-
-
-"string" = { fg = "light-green" }
-"constant" = { fg = "light-cyan" }
-"comment" = { fg = "light-magenta" }
-
-"diff.plus" = "green"
-"diff.minus" = "red"
-"diff.delta" = "gray"
-
-"warning" = { fg = "light-yellow" }
-"error" = { fg = "light-red" }
-"hint" = { fg = "light-blue" }
-
-"diagnostic.warning" = { fg = "light-yellow" }
-"diagnostic.error" = { fg = "light-red" }
-"diagnostic.hint" = { fg = "light-blue" }
-"diagnostic.unnecessary" = { modifiers = ["dim"] }
-"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
diff --git a/runtime/themes/zenburn.toml b/runtime/themes/zenburn.toml
index c40f4cdf..74ef78ed 100644
--- a/runtime/themes/zenburn.toml
+++ b/runtime/themes/zenburn.toml
@@ -1,278 +1,66 @@
-# Port of Vim's Zenburn theme (https://github.com/jnurmine/Zenburn/)
-# based on theli-ua's Helix port (https://github.com/theli-ua/helix/tree/zenburn)
-# Author: Jakob Jordan <jakobjordan(at)posteo.de>
-# License: GNU GPL <http://www.gnu.org/licenses/gpl.html>
+# A unofficial port of VIM's zenburn theme: https://github.com/jnurmine/Zenburn/
-# "attribute"
-"type" = "zb-type-fg"
-"type.builtin" = { fg = "zb-type-fg", modifiers = ["bold"] }
-"type.parameter" = { fg = "zb-typedef-fg", modifiers = ["bold"] }
-"type.enum" = { fg = "zb-structure-fg", modifiers = ["bold"] }
-# "type.enum.variant"
-"constructor" = "zb-type-fg"
-"constant" = { fg = "zb-constant-fg", modifiers = ["bold"] }
-# "constant.builtin"
-"constant.builtin.boolean" = "zb-boolean-fg"
-"constant.character" = { fg = "zb-character-fg", modifiers = ["bold"] }
-# "constant.character.escape"
-"constant.numeric.integer" = { fg = "zb-number-fg" }
-"constant.numeric.float" = { fg = "zb-float-fg" }
-"string" = "zb-string-fg"
-# "string.regexp"
-# "string.special"
-# "string.special.path"
-# "string.special.url"
-# "string.special.symbol"
-"comment" = "zb-comment-fg"
-# "comment.line"
-"comment.line.documentation" = { fg = "zb-specialcomment-fg", modifiers = ["bold"] }
-# "comment.block"
-"comment.block.documentation" = { fg = "zb-specialcomment-fg", modifiers = ["bold"] }
-"variable" = "zb-identifier-fg"
-"variable.builtin" = { modifiers = ["bold"] }
-# "variable.parameter"
-# "variable.other"
-# "variable.other.member"
-# "variable.other.member.private"
-"label" = { fg = "zb-label-fg", underline = { style = 'line' } }
-# "punctuation"
-"punctuation.delimiter" = "zb-delimiter-fg"
-# "punctuation.bracket"
-"punctuation.special" = "zb-special-fg"
-"keyword" = { fg = "zb-keyword-fg", modifiers = ["bold"] }
-# "keyword.control"
-"keyword.control.conditional" = { fg = "zb-conditional-fg", modifiers = ["bold"] }
-"keyword.control.repeat" = { fg = "zb-repeat-fg", modifiers = ["bold"] }
-"keyword.control.import" = { fg = "zb-preproc-fg", modifiers = ["bold"] }
-# "keyword.control.return"
-"keyword.control.exception" = { fg = "zb-exception-fg", modifiers = ["bold"] }
-# "keyword.operator"
-# "keyword.directive"
-# "keyword.function"
-# "keyword.storage"
-"keyword.storage.type" = { fg = "zb-storageclass-fg", modifiers = ["bold"] }
-# "keyword.storage.modifier"
-"operator" = "zb-operator-fg"
-"function" = "zb-function-fg"
-"function.builtin" = { fg = "zb-function-fg", modifiers = ["bold"] }
-# "function.method"
-# "function.method.private"
-"function.macro" = { fg = "zb-macro-fg", modifiers = ["bold"] }
-# "function.special"
-"tag" = { fg = "zb-tag-fg", modifiers = ["bold"] }
-# "tag.builtin"
-"namespace" = { fg = "zb-include-fg", modifiers = ["bold"] }
-"special" = "zb-special-fg"
-# "markup"
-"markup.heading" = { fg = "zb-constant-fg", modifiers = ["bold"] }
-# "markup.heading.marker"
-# "markup.heading.1"
-# "markup.heading.2"
-# "markup.heading.3"
-# "markup.heading.4"
-# "markup.heading.5"
-# "markup.heading.6"
-"markup.list" = "zb-number-fg"
-# "markup.list.unnumbered"
-# "markup.list.numbered"
-# "markup.list.checked"
-# "markup.list.unchecked"
-"markup.bold" = { modifiers = ["bold"] }
-"markup.italic" = { modifiers = ["italic"] }
-"markup.strikethrough" = { modifiers = ["crossed_out"] }
-"markup.link" = { underline.style = "line" }
-# "markup.link.url"
-# "markup.link.label"
-# "markup.link.text" = "zb-cyan"
-"markup.quote" = "zb-comment-fg"
-"markup.raw" = "zb-delimiter-fg"
-# "markup.raw.inline"
-# "markup.raw.block"
-# "diff"
-"diff.plus" = { fg = "zb-diffadd-fg", bg = "zb-diffadd-bg", modifiers = ["bold"] }
-"diff.plus.gutter" = "zb-diffadd-fg"
-"diff.minus" = { fg = "zb-diffdelete-fg", bg = "zb-diffdelete-bg" }
-"diff.minus.gutter" = "zb-string-fg"
-"diff.delta" = { bg = "zb-diffchange-bg" }
-# "diff.delta.moved"
-# "diff.delta.conflict"
-"diff.delta.gutter" = "zb-normal-fg"
+"ui.background" = { bg = "bg" }
+"ui.menu" = { fg = "#9f9f9f", bg = "uibg" }
+"ui.menu.selected" = { fg = "#d0d0a0", bg = "#242424", modifiers = ["bold"] }
+"ui.linenr" = { fg = "#9fafaf", bg = "#262626"}
+"ui.linenr.selected" = { modifiers = ["bold"]}
+"ui.popup" = { bg = "uibg" }
+"ui.selection" = { bg = "#304a3d" }
+"ui.selection.primary" = { bg = "#2f2f2f" }
+"comment" = { fg = "comment" }
+"ui.virtual.inlay-hint" = { fg = "#9f9f9f" }
+"comment.block.documentation" = { fg = "black", modifiers = ["bold"] }
+"comment.line.documentation" = { fg = "black", modifiers = ["bold"] }
+"ui.statusline" = { bg = "statusbg", fg = "#ccdc90" }
+"ui.statusline.inactive" = { fg = '#2e3330', bg = '#88b090' }
+"ui.cursor" = { fg = "#000d18", bg = "#8faf9f", modifiers = ["bold"] }
+"ui.text" = { fg = "normal"}
+"operator" = { fg = "#f0efd0" , modifiers = []}
+"variable" = "normal"
+"variable.builtin" = {fg = "constant", modifiers = ["bold"]}
+"constant.numeric" = "numeric"
+"constant" = { fg = "constant", modifiers = ["bold"] }
+"type" = { fg = "#dfdfbf", modifiers = ["bold"] }
+"ui.cursor.match" = { fg = "#343434", bg = "#284f28", modifiers = ["bold"] }
+"string" = "#cc9393"
+"variable.other.member" = "#efef8f"
+"constant.character.escape" = { fg = "#dca3a3", modifiers = ["bold"]}
+"function" = "#efef8f"
+"function.macro" = { fg = "#ffcfaf", modifiers = ["bold"] }
+"special" = "#cfbfaf"
+"keyword" = { fg = "#f0dfaf", modifiers = ["bold"]}
+"keyword.storage-class" = { fg = "#c3bf9f", modifiers = ["bold"]}
+"label" = { fg = "#dfcfaf", modifiers = ["underlined"] }
+"ui.help" = { fg = "white", bg = "black" }
+"ui.virtual.ruler" = { bg = "#484848" }
+"ui.virtual.whitespace" = { fg = "#5b605e", modifiers = ["bold"]}
-"ui.background" = { bg = "zb-normal-bg" }
-# "ui.background.separator"
-"ui.cursor" = { fg = "zb-cursor-fg", bg = "zb-cursor-bg", modifiers = ["bold"] }
-# "ui.cursor.normal"
-# "ui.cursor.insert"
-# "ui.cursor.select"
-"ui.cursor.match" = { fg = "zb-matchparen-fg", bg = "zb-matchparen-bg", modifiers = ["bold"] }
-# "ui.cursor.primary"
-# "ui.cursor.primary.normal"
-# "ui.cursor.primary.insert"
-# "ui.cursor.primary.select"
-# "ui.debug.breakpoint"
-# "ui.debug.active"
-"ui.gutter" = { bg = "zb-linenr-bg" }
-# ui.gutter.selected Gutter for the line the cursor is on
-"ui.linenr" = { fg = "zb-linenr-fg", bg = "zb-linenr-bg" }
-"ui.linenr.selected" = { fg = "zb-cursorlinenr-fg", bg = "zb-cursorlinenr-bg", modifiers = ["bold"] }
-"ui.statusline" = { bg = "zb-statusline-fg", fg = "zb-statusline-bg", modifiers = ["bold"] }
-"ui.statusline.inactive" = { bg = "zb-statuslinenc-fg", fg = "zb-statuslinenc-bg", modifiers = [] }
-# "ui.statusline.normal"
-# "ui.statusline.insert"
-# "ui.statusline.select"
-# "ui.statusline.separator"
-# "ui.bufferline"
-# "ui.bufferline.active"
-# "ui.bufferline.background"
-"ui.popup" = { fg = "zb-pmenu-fg", bg = "zb-pmenu-bg" }
-# "ui.popup.info"
-# "ui.picker.header"
-# "ui.picker.header.column"
-# "ui.picker.header.column.active"
-# "ui.window" = "zb-lineno"
-"ui.help" = { fg = "zb-pmenu-fg", bg = "zb-pmenu-bg" }
-"ui.text" = "zb-normal-fg"
-"ui.text.focus" = { modifiers = ["bold"] }
-# "ui.text.inactive"
-"ui.text.info" = { fg = "zb-pmenu-fg", bg = "zb-pmenu-bg" }
-"ui.virtual.ruler" = { bg = "zb-colorcolumn-bg" }
-"ui.virtual.whitespace" = { fg = "zb-nontext-fg", modifiers = ["bold"] }
-"ui.virtual.indent-guide" = { fg = "zb-colorcolumn-bg" }
-# "ui.virtual.inlay-hint"
-# "ui.virtual.inlay-hint.parameter"
-# "ui.virtual.inlay-hint.type"
-# "ui.virtual.wrap"
-"ui.virtual.jump-label" = { modifiers = ["bold"] }
-"ui.menu" = { fg = "zb-pmenu-fg", bg = "zb-pmenu-bg" }
-"ui.menu.selected" = { fg = "zb-pmenusel-fg", bg = "zb-pmenusel-bg", modifiers = ["bold"] }
-# "ui.menu.scroll"
-"ui.selection" = { bg = "#373737" }
-"ui.selection.primary" = { bg = "zb-visual-bg" }
-# "ui.highlight"
-# "ui.highlight.frameline"
-"ui.cursorline.primary" = { bg = "zb-cursorline-bg" }
-# "ui.cursorline.secondary"
-"ui.cursorcolumn.primary" = { bg = "zb-cursorcolumn-bg" }
-# "ui.cursorcolumn.secondary"
-"warning" = { fg = "zb-error-fg", modifiers = ["bold"] }
-"error" = { fg = "zb-error-fg", modifiers = ["bold"] }
-"info" = { fg = "zb-todo-fg", modifiers = ["bold"] }
-"hint" = { fg = "zb-todo-fg", modifiers = ["bold"] }
-# "diagnostic"
-"diagnostic.hint" = { fg = "zb-todo-fg", bg = "zb-todo-bg", modifiers = ["bold"] }
-"diagnostic.info" = { fg = "zb-todo-fg", bg = "zb-todo-bg", modifiers = ["bold"] }
-"diagnostic.warning" = { fg = "zb-error-fg", bg = "zb-error-bg", modifiers = ["bold"] }
-"diagnostic.error" = { fg = "zb-error-fg", bg = "zb-error-bg", modifiers = ["bold"] }
-"diagnostic.unnecessary" = { fg = "zb-todo-fg", bg = "zb-todo-bg", modifiers = ["bold"] }
-"diagnostic.deprecated"= { fg = "zb-todo-fg", bg = "zb-todo-bg", modifiers = ["bold"] }
+"punctuation.delimiter" = "#8f8f8f"
-[palette]
-"zb-boolean-fg" = "#dca3a3"
-"zb-character-fg" = "#dca3a3" # gui=bold
-"zb-comment-fg" = "#7f9f7f"
-"zb-conditional-fg" = "#f0dfaf" # gui=bold
-"zb-constant-fg" = "#dca3a3" # gui=bold
-"zb-cursor-fg" = "#000d18"
-"zb-cursor-bg" = "#8faf9f" # gui=bold
-"zb-debug-fg" = "#bca3a3" # gui=bold
-"zb-define-fg" = "#ffcfaf" # gui=bold
-"zb-delimiter-fg" = "#8f8f8f"
-"zb-diffadd-fg" = "#709080"
-"zb-diffadd-bg" = "#313c36" # gui=bold
-"zb-diffchange-bg" = "#333333"
-"zb-diffdelete-fg" = "#333333"
-"zb-diffdelete-bg" = "#464646"
-"zb-difftext-fg" = "#ecbcbc"
-"zb-difftext-bg" = "#41363c" # gui=bold
-"zb-directory-fg" = "#9fafaf" # gui=bold
-"zb-errormsg-fg" = "#80d4aa"
-"zb-errormsg-bg" = "#2f2f2f" # gui=bold
-"zb-exception-fg" = "#c3bf9f" # gui=bold
-"zb-float-fg" = "#c0bed1"
-# "zb-foldcolumn-fg" = "#93b3a3"
-# "zb-foldcolumn-bg" = "#3f4040"
-# "zb-folded-fg" = "#93b3a3"
-# "zb-folded-bg" = "#3f4040"
-"zb-function-fg" = "#efef8f"
-"zb-identifier-fg" = "#efdcbc"
-"zb-incsearch-fg" = "#f8f893"
-"zb-incsearch-bg" = "#385f38"
-"zb-keyword-fg" = "#f0dfaf" # gui=bold
-"zb-macro-fg" = "#ffcfaf" # gui=bold
-"zb-modemsg-fg" = "#ffcfaf" # gui=none
-"zb-moremsg-fg" = "#ffffff" # gui=bold
-"zb-number-fg" = "#8cd0d3"
-"zb-operator-fg" = "#f0efd0"
-"zb-pmenusbar-fg" = "#000000"
-"zb-pmenusbar-bg" = "#2e3330"
-"zb-pmenuthumb-fg" = "#040404"
-"zb-pmenuthumb-bg" = "#a0afa0"
-"zb-precondit-fg" = "#dfaf8f" # gui=bold
-"zb-preproc-fg" = "#ffcfaf" # gui=bold
-"zb-question-fg" = "#ffffff" # gui=bold
-"zb-repeat-fg" = "#ffd7a7" # gui=bold
-"zb-search-fg" = "#ffffe0"
-"zb-search-bg" = "#284f28"
-"zb-signcolumn-fg" = "#9fafaf" # gui=bold
-"zb-specialchar-fg" = "#dca3a3" # gui=bold
-"zb-specialcomment-fg" = "#82a282" # gui=bold
-"zb-special-fg" = "#cfbfaf"
-"zb-specialkey-fg" = "#9ece9e"
-"zb-statement-fg" = "#e3ceab" # gui=none
-"zb-statusline-fg" = "#313633"
-"zb-statusline-bg" = "#ccdc90"
-"zb-statuslinenc-fg" = "#2e3330"
-"zb-statuslinenc-bg" = "#88b090"
-"zb-storageclass-fg" = "#c3bf9f" # gui=bold
-"zb-string-fg" = "#cc9393"
-"zb-structure-fg" = "#efefaf" # gui=bold
-"zb-tag-fg" = "#e89393" # gui=bold
-"zb-title-fg" = "#efefef" # gui=bold
-"zb-todo-fg" = "#dfdfdf" # gui=bold
-"zb-todo-bg" = "#575757"
-"zb-typedef-fg" = "#dfe4cf" # gui=bold
-"zb-type-fg" = "#dfdfbf" # gui=bold
-"zb-underlined-fg" = "#dcdccc" # gui=underline
-"zb-vertsplit-fg" = "#2e3330"
-"zb-vertsplit-bg" = "#688060"
-# "zb-visualnos-fg" = "#333333"
-# "zb-visualnos-bg" = "#f18c96" # gui=bold,underline
-"zb-warningmsg-fg" = "#ffffff"
-"zb-warningmsg-bg" = "#333333" # gui=bold
-"zb-wildmenu-fg" = "#cbecd0"
-"zb-wildmenu-bg" = "#2c302d" # gui=underline
+"ui.virtual.indent-guide" = "#4f4f4f"
+
+"diff.plus" = {fg = "#709080"}
+"diff.delta" = {fg = "#464646"}
+"diff.minus" = {fg = "#cc9393"}
-"zb-normal-fg" = "#dcdccc"
-"zb-normal-bg" = "#3f3f3f"
-"zb-conceal-fg" = "#8f8f8f"
-"zb-conceal-bg" = "#484848"
-"zb-colorcolumn-bg" = "#484848"
-"zb-cursorline-bg" = "#434443"
-"zb-cursorlinenr-fg" = "#d2d39b"
-"zb-cursorlinenr-bg" = "#262626"
-"zb-cursorcolumn-bg" = "#4f4f4f"
-"zb-foldcolumn-bg" = "#333333"
-"zb-folded-bg" = "#333333"
-"zb-linenr-fg" = "#9fafaf"
-"zb-linenr-bg" = "#262626"
-"zb-nontext-fg" = "#5b605e" # gui=bold
-"zb-pmenu-fg" = "#9f9f9f"
-"zb-pmenu-bg" = "#2c2e2e"
-"zb-pmenusel-fg" = "#d0d0a0"
-"zb-pmenusel-bg" = "#242424" # gui=bold
-"zb-matchparen-fg" = "#ffffe0"
-"zb-matchparen-bg" = "#284f28" # gui=bold
-"zb-signcolumn-bg" = "#343434"
-"zb-specialkey-bg" = "#444444"
-"zb-tabline-fg" = "#d0d0b8"
-"zb-tabline-bg" = "#222222" # gui=none
-"zb-tablinesel-fg" = "#f0f0b0"
-"zb-tablinesel-bg" = "#333333" # gui=bold
-"zb-tablinefill-fg" = "#dccdcc"
-"zb-tablinefill-bg" = "#101010" # gui=none
-"zb-visual-bg" = "#2f2f2f"
-"zb-visualnos-bg" = "#2f2f2f"
-"zb-error-fg" = "#e37170"
-"zb-error-bg" = "#3d3535" # gui=bold
-"zb-include-fg" = "#dfaf8f" # gui=bold
-"zb-label-fg" = "#dfcfaf" # gui=underline
+"diagnostic" = {bg = "statusbg"}
+"diagnostic.error" = { fg = "errorfg", bg = "errorbg"}
+"diagnostic.unnecessary" = { modifiers = ["dim"] }
+"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
+"ui.gutter" = { bg = "statusbg" }
+"hint" = {fg = "numeric", bg = "statusbg"}
+"warning" = "numeric"
+"error" = "errorfg"
+
+[palette]
+comment = "#7f9f7f"
+bg = "#3f3f3f"
+uibg = "#2c2e2e"
+constant = "#dca3a3"
+normal = "#dcdccc"
+todo = "#dfdfdf"
+errorfg = "#e37170"
+errorbg = "#3d3535"
+statusbg = "#313633"
+numeric = "#8cd0d3"
diff --git a/runtime/tutor b/runtime/tutor
index 30c0f102..54a4dde2 100644
--- a/runtime/tutor
+++ b/runtime/tutor
@@ -337,7 +337,7 @@
1. Move the cursor to the line marked '-->' below.
2. Type 2w to move 2 words forward.
3. Type 3e to move to the end of the third word forward.
- 4. Type 2b to move 2 words backwards.
+ 4. Type 2b to move 2 words backwards
5. Try the above with different numbers.
--> This is just a line with words you can move around in.
@@ -755,7 +755,7 @@
1. Move the cursor to the line marked '-->' below.
2. Type w to select "watermelons" and then y to yank it.
3. Select "oranges" with w.
- 4. Type R to replace "oranges" with "watermelons".
+ 4. Type R to replace "oranges" with "watermelons"
--> I like watermelons because oranges are refreshing.
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
new file mode 100644
index 00000000..74c6fc7a
--- /dev/null
+++ b/rust-toolchain.toml
@@ -0,0 +1,3 @@
+[toolchain]
+channel = "1.82.0"
+components = ["rustfmt", "rust-src", "clippy"]
diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml
index 5421aca5..25d8955e 100644
--- a/xtask/Cargo.toml
+++ b/xtask/Cargo.toml
@@ -16,4 +16,4 @@ helix-term = { path = "../helix-term" }
helix-core = { path = "../helix-core" }
helix-view = { path = "../helix-view" }
helix-loader = { path = "../helix-loader" }
-toml.workspace = true
+toml = "0.8"
diff --git a/xtask/src/docgen.rs b/xtask/src/docgen.rs
index 79ecfea1..d31c396d 100644
--- a/xtask/src/docgen.rs
+++ b/xtask/src/docgen.rs
@@ -36,8 +36,7 @@ pub fn typable_commands() -> Result<String, DynError> {
"Description".to_owned(),
]));
- // escape | so it doesn't get rendered as a column separator
- let cmdify = |s: &str| format!("`:{}`", s.replace('|', "\\|"));
+ let cmdify = |s: &str| format!("`:{}`", s);
for cmd in TYPABLE_COMMAND_LIST {
let names = std::iter::once(&cmd.name)
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 7bb7e8c9..d4995ce3 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -36,8 +36,6 @@ pub mod tasks {
let grammar = syntax_config.grammar;
LanguageData::compile_indent_query(grammar, config)?;
LanguageData::compile_textobject_query(grammar, config)?;
- LanguageData::compile_tag_query(grammar, config)?;
- LanguageData::compile_rainbow_query(grammar, config)?;
}
println!("Query check succeeded");