├── rustfmt.toml ├── book ├── .gitignore ├── theme │ └── favicon.png ├── src │ ├── ecosystem.md │ └── guides │ │ └── README.md └── book.toml ├── runtime ├── grammars │ └── .gitkeep ├── queries │ ├── haxe │ │ ├── tags.scm │ │ ├── folds.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── crystal │ │ ├── tags.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── indents.scm │ ├── glsl │ │ ├── folds.scm │ │ ├── locals.scm │ │ ├── textobjects.scm │ │ ├── injections.scm │ │ └── indents.scm │ ├── env │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── opencl │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── tcl │ │ ├── folds.scm │ │ └── indents.scm │ ├── tfvars │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── webc │ │ ├── highlights.scm │ │ └── injections.scm │ ├── xml │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── textobjects.scm │ │ └── rainbows.scm │ ├── blade │ │ ├── rainbows.scm │ │ ├── textobjects.scm │ │ ├── folds.scm │ │ └── highlights.scm │ ├── docker-bake │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ └── textobjects.scm │ ├── dune │ │ └── highlights.scm │ ├── earthfile │ │ ├── indents.scm │ │ ├── textobjects.scm │ │ └── injections.scm │ ├── erb │ │ ├── highlights.scm │ │ └── injections.scm │ ├── gitlab-ci │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ └── textobjects.scm │ ├── helm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── hy │ │ └── highlights.scm │ ├── iex │ │ ├── highlights.scm │ │ └── injections.scm │ ├── jjconfig │ │ ├── indents.scm │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── json-ld │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── jsonc │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ └── highlights.scm │ ├── mojo │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── msbuild │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── nunjucks │ │ ├── highlights.scm │ │ └── injections.scm │ ├── pkgbuild │ │ ├── indents.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── racket │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── sage │ │ ├── highlights.scm │ │ ├── textobjects.scm │ │ └── injections.scm │ ├── svelte │ │ ├── locals.scm │ │ ├── folds.scm │ │ └── indents.scm │ ├── systemd │ │ └── highlights.scm │ ├── common-lisp │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── cross-config │ │ ├── rainbows.scm │ │ ├── highlights.scm │ │ ├── textobjects.scm │ │ └── injections.scm │ ├── docker-compose │ │ ├── indents.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── git-notes │ │ └── highlights.scm │ ├── javascript │ │ ├── rainbows.scm │ │ ├── indents.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── miseconfig │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── nestedtext │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── quarto │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── rmarkdown │ │ ├── indents.scm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── snakemake │ │ ├── locals.scm │ │ ├── injections.scm │ │ ├── folds.scm │ │ └── indents.scm │ ├── starlark │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ ├── textobjects.scm │ │ └── injections.scm │ ├── wikitext │ │ └── folds.scm │ ├── woodpecker-ci │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ ├── textobjects.scm │ │ └── tags.scm │ ├── git-cliff-config │ │ ├── highlights.scm │ │ ├── rainbows.scm │ │ └── textobjects.scm │ ├── gjs │ │ ├── locals.scm │ │ ├── tags.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── gts │ │ ├── locals.scm │ │ ├── tags.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── llvm-mir-yaml │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── ocaml-interface │ │ ├── highlights.scm │ │ └── injections.scm │ ├── markdown-rustdoc │ │ └── highlights.scm │ ├── rust-format-args-macro │ │ ├── indents.scm │ │ ├── locals.scm │ │ ├── rainbows.scm │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── jsdoc │ │ ├── highlights.scm │ │ └── injections.scm │ ├── debian │ │ └── highlights.scm │ ├── doxyfile │ │ ├── tags.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── textobjects.scm │ │ └── highlights.scm │ ├── heex │ │ └── textobjects.scm │ ├── kdl │ │ ├── indents.scm │ │ └── tags.scm │ ├── tablegen │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── tsx │ │ ├── rainbows.scm │ │ ├── tags.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── adl │ │ ├── textobjects.scm │ │ └── indents.scm │ ├── cpp │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── textobjects.scm │ │ └── tags.scm │ ├── haskell-persistent │ │ └── folds.scm │ ├── llvm-mir │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── bash │ │ ├── tags.scm │ │ ├── indents.scm │ │ ├── textobjects.scm │ │ └── rainbows.scm │ ├── beancount │ │ └── folds.scm │ ├── scss │ │ ├── rainbows.scm │ │ └── injections.scm │ ├── gas │ │ ├── textobjects.scm │ │ └── injections.scm │ ├── hosts │ │ └── highlights.scm │ ├── vim │ │ └── folds.scm │ ├── css │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── rainbows.scm │ ├── git-commit │ │ ├── textobjects.scm │ │ └── injections.scm │ ├── nearley │ │ ├── rainbows.scm │ │ └── injections.scm │ ├── lean │ │ ├── locals.scm │ │ ├── injections.scm │ │ └── folds.scm │ ├── sql │ │ └── textobjects.scm │ ├── c │ │ ├── injections.scm │ │ └── tags.scm │ ├── capnp │ │ ├── injections.scm │ │ ├── folds.scm │ │ └── indents.scm │ ├── d │ │ ├── injections.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── dart │ │ ├── injections.scm │ │ └── locals.scm │ ├── dockerfile │ │ └── textobjects.scm │ ├── dtd │ │ └── injections.scm │ ├── fidl │ │ ├── injections.scm │ │ └── folds.scm │ ├── gomod │ │ ├── injections.scm │ │ └── highlights.scm │ ├── groovy │ │ ├── folds.scm │ │ ├── locals.scm │ │ └── injections.scm │ ├── hare │ │ ├── injections.scm │ │ └── locals.scm │ ├── hcl │ │ ├── folds.scm │ │ ├── injections.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── janet │ │ ├── injections.scm │ │ └── rainbows.scm │ ├── koto │ │ ├── injections.scm │ │ ├── folds.scm │ │ └── rainbows.scm │ ├── ld │ │ ├── injections.scm │ │ └── indents.scm │ ├── llvm │ │ ├── injections.scm │ │ ├── indents.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── markdown │ │ └── tags.scm │ ├── nasm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── ocaml │ │ ├── injections.scm │ │ ├── indents.scm │ │ └── locals.scm │ ├── quint │ │ └── injections.scm │ ├── r │ │ ├── injections.scm │ │ └── locals.scm │ ├── rego │ │ └── injections.scm │ ├── slint │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── indents.scm │ ├── smali │ │ ├── injections.scm │ │ ├── folds.scm │ │ └── locals.scm │ ├── t32 │ │ └── injections.scm │ ├── task │ │ ├── injections.scm │ │ └── highlights.scm │ ├── toml │ │ ├── injections.scm │ │ ├── textobjects.scm │ │ └── rainbows.scm │ ├── unison │ │ ├── injections.scm │ │ ├── rainbows.scm │ │ ├── indents.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── verilog │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── wgsl │ │ ├── injections.scm │ │ ├── indents.scm │ │ ├── tags.scm │ │ ├── textobjects.scm │ │ └── rainbows.scm │ ├── yara │ │ └── injections.scm │ ├── yuck │ │ └── injections.scm │ ├── zig │ │ ├── injections.scm │ │ └── indents.scm │ ├── basic │ │ ├── indents.scm │ │ ├── textobjects.scm │ │ └── tags.scm │ ├── c-sharp │ │ └── injections.scm │ ├── caddyfile │ │ ├── injections.scm │ │ ├── indents.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── clojure │ │ ├── injections.scm │ │ └── rainbows.scm │ ├── dot │ │ └── injections.scm │ ├── elvish │ │ └── injections.scm │ ├── fortran │ │ ├── injections.scm │ │ └── folds.scm │ ├── gdscript │ │ ├── injections.scm │ │ └── tags.scm │ ├── gowork │ │ ├── injections.scm │ │ └── highlights.scm │ ├── hyprlang │ │ ├── indents.scm │ │ └── injections.scm │ ├── inko │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── tags.scm │ ├── jsonnet │ │ └── injections.scm │ ├── kconfig │ │ ├── injections.scm │ │ ├── folds.scm │ │ ├── indents.scm │ │ └── locals.scm │ ├── markdoc │ │ └── injections.scm │ ├── matlab │ │ ├── injections.scm │ │ ├── folds.scm │ │ ├── locals.scm │ │ ├── textobjects.scm │ │ └── indents.scm │ ├── pascal │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── powershell │ │ └── injections.scm │ ├── prolog │ │ ├── injections.scm │ │ ├── folds.scm │ │ └── indents.scm │ ├── properties │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── protobuf │ │ ├── injections.scm │ │ ├── indents.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── purescript │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── robots.txt │ │ ├── tags.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── thrift │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── folds.scm │ ├── tsq │ │ ├── folds.scm │ │ ├── rainbows.scm │ │ └── injections.scm │ ├── ledger │ │ └── injections.scm │ ├── pug │ │ └── injections.scm │ ├── qml │ │ ├── indents.scm │ │ └── injections.scm │ ├── shellcheckrc │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── _gjs │ │ └── highlights.scm │ ├── cairo │ │ └── injections.scm │ ├── json │ │ ├── textobjects.scm │ │ ├── indents.scm │ │ ├── rainbows.scm │ │ └── highlights.scm │ ├── jsx │ │ ├── tags.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── textobjects.scm │ │ └── rainbows.scm │ ├── pip-requirements │ │ └── injections.scm │ ├── koka │ │ └── injections.scm │ ├── make │ │ ├── indents.scm │ │ └── injections.scm │ ├── odin │ │ └── injections.scm │ ├── typescript │ │ ├── indents.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── textobjects.scm │ │ └── rainbows.scm │ ├── _typescript │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── dhall │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── java │ │ └── injections.scm │ ├── pest │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── ron │ │ ├── injections.scm │ │ ├── tags.scm │ │ ├── rainbows.scm │ │ └── indents.scm │ ├── slang │ │ ├── indents.scm │ │ └── injections.scm │ ├── sway │ │ ├── injections.scm │ │ └── locals.scm │ ├── wesl │ │ ├── injections.scm │ │ └── locals.scm │ ├── go-format-string │ │ ├── rainbows.scm │ │ └── highlights.scm │ ├── po │ │ ├── textobjects.scm │ │ └── highlights.scm │ ├── twig │ │ └── injections.scm │ ├── hocon │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── htmldjango │ │ ├── injections.scm │ │ └── highlights.scm │ ├── supercollider │ │ └── folds.scm │ ├── _jsx │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── elm │ │ └── injections.scm │ ├── fish │ │ ├── textobjects.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── wren │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── hurl │ │ ├── textobjects.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── ripple │ │ ├── readme.md │ │ ├── brackets.scm │ │ ├── folds.scm │ │ └── injections.scm │ ├── spicedb │ │ ├── tags.scm │ │ └── injections.scm │ ├── just │ │ ├── folds.scm │ │ ├── indents.scm │ │ └── tags.scm │ ├── sourcepawn │ │ └── injections.scm │ ├── tera │ │ ├── injections.scm │ │ └── locals.scm │ ├── fga │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── freebasic │ │ ├── tags.scm │ │ ├── textobjects.scm │ │ └── indents.scm │ ├── git-config │ │ └── textobjects.scm │ ├── jjdescription │ │ ├── injections.scm │ │ └── highlights.scm │ ├── nickel │ │ ├── injections.scm │ │ └── indents.scm │ ├── org │ │ └── injections.scm │ ├── cpon │ │ ├── indents.scm │ │ └── highlights.scm │ ├── typespec │ │ ├── injections.scm │ │ └── indents.scm │ ├── pem │ │ └── highlights.scm │ ├── scheme │ │ ├── textobjects.scm │ │ ├── injections.scm │ │ └── rainbows.scm │ ├── yaml │ │ ├── rainbows.scm │ │ └── textobjects.scm │ ├── jinja │ │ ├── injections.scm │ │ └── highlights.scm │ ├── passwd │ │ └── highlights.scm │ ├── perl │ │ ├── injections.scm │ │ ├── textobjects.scm │ │ └── fold.scm │ ├── git-rebase │ │ └── injections.scm │ ├── scfg │ │ └── highlights.scm │ ├── awk │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── diff │ │ └── highlights.scm │ ├── latex │ │ ├── injections.scm │ │ ├── folds.scm │ │ └── textobjects.scm │ ├── cmake │ │ ├── injections.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── ejs │ │ ├── highlights.scm │ │ └── injections.scm │ ├── todotxt │ │ └── highlights.scm │ ├── gotmpl │ │ ├── injections.scm │ │ └── locals.scm │ ├── nu │ │ ├── folds.scm │ │ └── indents.scm │ ├── tact │ │ └── injections.scm │ ├── textproto │ │ ├── indents.scm │ │ ├── textobjects.scm │ │ └── highlights.scm │ ├── v │ │ ├── injections.scm │ │ └── indents.scm │ ├── jq │ │ ├── textobjects.scm │ │ └── locals.scm │ ├── typst │ │ ├── tags.scm │ │ └── injections.scm │ ├── vento │ │ ├── injections.scm │ │ └── highlights.scm │ ├── lua │ │ ├── rainbows.scm │ │ ├── folds.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── dunstrc │ │ └── highlights.scm │ ├── git-attributes │ │ └── highlights.scm │ ├── elixir │ │ ├── indents.scm │ │ └── rainbows.scm │ ├── prql │ │ └── injections.scm │ ├── strace │ │ └── highlights.scm │ ├── elisp │ │ └── tags.scm │ ├── fsharp │ │ └── injections.scm │ ├── haskell │ │ ├── locals.scm │ │ └── injections.scm │ ├── wit │ │ └── indents.scm │ ├── csv │ │ └── highlights.scm │ ├── astro │ │ └── injections.scm │ ├── slisp │ │ └── tags.scm │ ├── bovex │ │ └── rainbows.scm │ ├── gleam │ │ ├── locals.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── ohm │ │ └── injections.scm │ ├── log │ │ └── highlights.scm │ ├── ini │ │ └── highlights.scm │ ├── templ │ │ └── injections.scm │ ├── html │ │ ├── rainbows.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── strictdoc │ │ └── injections.scm │ ├── amber │ │ ├── tags.scm │ │ └── injections.scm │ ├── nginx │ │ └── injections.scm │ ├── circom │ │ └── locals.scm │ ├── kotlin │ │ ├── locals.scm │ │ ├── folds.scm │ │ └── tags.scm │ ├── php-only │ │ └── injections.scm │ ├── markdown.inline │ │ └── injections.scm │ ├── xit │ │ └── highlights.scm │ ├── eex │ │ ├── highlights.scm │ │ └── injections.scm │ ├── lpf │ │ └── highlights.scm │ ├── mail │ │ └── textobjects.scm │ ├── nix │ │ ├── textobjects.scm │ │ ├── rainbows.scm │ │ └── indents.scm │ ├── teal │ │ └── folds.scm │ ├── ungrammar │ │ └── highlights.scm │ ├── julia │ │ └── folds.scm │ ├── meson │ │ └── indents.scm │ ├── ada │ │ ├── locals.scm │ │ └── folds.scm │ ├── ruby │ │ ├── indents.scm │ │ └── rainbows.scm │ ├── wast │ │ └── highlights.scm │ ├── regex │ │ └── rainbows.scm │ ├── solidity │ │ └── locals.scm │ ├── json5 │ │ └── highlights.scm │ ├── php │ │ ├── indents.scm │ │ └── rainbows.scm │ ├── cylc │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── gherkin │ │ └── highlights.scm │ ├── erlang │ │ └── rainbows.scm │ ├── scala │ │ ├── locals.scm │ │ └── indents.scm │ ├── eiffel │ │ └── textobjects.scm │ ├── swift │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── cython │ │ ├── tags.scm │ │ └── injections.scm │ ├── python │ │ └── tags.scm │ ├── uxntal │ │ └── highlights.scm │ ├── rshtml │ │ └── injections.scm │ ├── ldif │ │ └── highlights.scm │ ├── godot-resource │ │ └── textobjects.scm │ ├── prisma │ │ └── textobjects.scm │ ├── luau │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── spade │ │ └── indents.scm │ ├── xtc │ │ └── highlights.scm │ ├── _javascript │ │ └── locals.scm │ ├── ecma │ │ ├── indents.scm │ │ └── locals.scm │ ├── haskell-literate │ │ ├── highlights.scm │ │ └── injections.scm │ ├── rust │ │ └── locals.scm │ ├── wat │ │ └── highlights.scm │ └── jjrevset │ │ └── highlights.scm └── themes │ ├── cyan_light.toml │ ├── gruvbox-material.toml │ ├── gruvbox_dark_soft.toml │ ├── gruvbox_light_hard.toml │ ├── gruvbox_light_soft.toml │ ├── tokyonight_storm.toml │ ├── flexoki_dark.toml │ ├── gruvbox_material_dark_hard.toml │ ├── material_palenight.toml │ ├── gruvbox_material_dark_soft.toml │ ├── material_darker.toml │ ├── gruvbox_material_light_hard.toml │ ├── gruvbox_material_light_soft.toml │ ├── material_oceanic.toml │ ├── gruvbox_dark_hard.toml │ ├── darcula-solid.toml │ ├── neonotte84.toml │ ├── seoul256-dark-soft.toml │ └── poimandres_storm.toml ├── contrib ├── themes ├── helix.png ├── helix-256p.ico └── hx_launcher.sh ├── helix-term ├── .gitignore ├── src │ └── ui │ │ └── lsp.rs └── tests │ └── test │ ├── languages │ └── mod.rs │ └── auto_indent.rs ├── helix-core ├── .gitignore └── src │ ├── increment │ └── mod.rs │ ├── snippets.rs │ └── wrap.rs ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ └── enhancement.md ├── helix-view ├── src │ └── annotations.rs └── tests │ └── encoding │ ├── big5_in.txt │ ├── euc_kr_in.txt │ ├── gb18030_in.txt │ ├── jis0208_in.txt │ ├── jis0212_in.txt │ ├── big5_out_ref.txt │ ├── shift_jis_in.txt │ ├── euc_kr_out_ref.txt │ ├── gb18030_out_ref.txt │ ├── jis0208_out_ref.txt │ └── shift_jis_out_ref.txt ├── screenshot.png ├── helix-tui ├── .gitignore ├── src │ └── lib.rs └── README.md ├── .gitignore ├── rust-toolchain.toml ├── .envrc ├── helix-stdx └── src │ └── lib.rs ├── helix-loader └── src │ └── main.rs ├── shell.nix ├── .gitattributes ├── helix-parsec └── Cargo.toml ├── helix-dap-types └── Cargo.toml └── helix-lsp-types └── README.md /rustfmt.toml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /book/.gitignore: -------------------------------------------------------------------------------- 1 | book 2 | -------------------------------------------------------------------------------- /runtime/grammars/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /contrib/themes: -------------------------------------------------------------------------------- 1 | ../runtime/themes -------------------------------------------------------------------------------- /helix-term/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /runtime/queries/haxe/tags.scm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /runtime/queries/crystal/tags.scm: -------------------------------------------------------------------------------- 1 | ;; 2 | -------------------------------------------------------------------------------- /helix-core/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /runtime/queries/glsl/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | open_collective: helix-editor 2 | -------------------------------------------------------------------------------- /runtime/queries/env/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: bash -------------------------------------------------------------------------------- /runtime/queries/glsl/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/opencl/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/tcl/folds.scm: -------------------------------------------------------------------------------- 1 | (braced_word) @fold 2 | -------------------------------------------------------------------------------- /runtime/queries/tfvars/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/webc/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html -------------------------------------------------------------------------------- /runtime/queries/webc/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html -------------------------------------------------------------------------------- /runtime/queries/xml/indents.scm: -------------------------------------------------------------------------------- 1 | (element) @indent 2 | -------------------------------------------------------------------------------- /helix-view/src/annotations.rs: -------------------------------------------------------------------------------- 1 | pub mod diagnostics; 2 | -------------------------------------------------------------------------------- /runtime/queries/blade/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | -------------------------------------------------------------------------------- /runtime/queries/blade/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-bake/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/dune/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/earthfile/indents.scm: -------------------------------------------------------------------------------- 1 | (target) @indent 2 | -------------------------------------------------------------------------------- /runtime/queries/erb/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ejs 2 | -------------------------------------------------------------------------------- /runtime/queries/gitlab-ci/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/glsl/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/helm/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: gotmpl 2 | -------------------------------------------------------------------------------- /runtime/queries/helm/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: gotmpl 2 | -------------------------------------------------------------------------------- /runtime/queries/hy/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/iex/highlights.scm: -------------------------------------------------------------------------------- 1 | (prompt) @comment 2 | -------------------------------------------------------------------------------- /runtime/queries/jjconfig/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/json-ld/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: json 2 | -------------------------------------------------------------------------------- /runtime/queries/jsonc/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: json 2 | -------------------------------------------------------------------------------- /runtime/queries/jsonc/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: json 2 | -------------------------------------------------------------------------------- /runtime/queries/mojo/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/mojo/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/mojo/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/msbuild/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: xml 2 | -------------------------------------------------------------------------------- /runtime/queries/msbuild/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: xml 2 | -------------------------------------------------------------------------------- /runtime/queries/msbuild/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: xml 2 | -------------------------------------------------------------------------------- /runtime/queries/nunjucks/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: jinja -------------------------------------------------------------------------------- /runtime/queries/nunjucks/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: jinja -------------------------------------------------------------------------------- /runtime/queries/opencl/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/opencl/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/pkgbuild/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: bash 2 | -------------------------------------------------------------------------------- /runtime/queries/racket/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/racket/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/sage/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/svelte/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | -------------------------------------------------------------------------------- /runtime/queries/systemd/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ini 2 | -------------------------------------------------------------------------------- /runtime/queries/tfvars/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/tfvars/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/tfvars/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/common-lisp/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/common-lisp/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/cross-config/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-bake/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-bake/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-bake/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-bake/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-compose/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/git-notes/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | -------------------------------------------------------------------------------- /runtime/queries/gitlab-ci/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/gitlab-ci/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/javascript/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/jjconfig/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/jjconfig/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/json-ld/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: json 2 | -------------------------------------------------------------------------------- /runtime/queries/miseconfig/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/miseconfig/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/miseconfig/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/mojo/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/nestedtext/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/nestedtext/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/nestedtext/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/nestedtext/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/pkgbuild/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: bash 2 | -------------------------------------------------------------------------------- /runtime/queries/pkgbuild/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: bash 2 | -------------------------------------------------------------------------------- /runtime/queries/pkgbuild/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: bash 2 | -------------------------------------------------------------------------------- /runtime/queries/quarto/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/quarto/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/quarto/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/racket/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/racket/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/rmarkdown/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/sage/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/snakemake/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/starlark/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/starlark/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/starlark/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/starlark/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/wikitext/folds.scm: -------------------------------------------------------------------------------- 1 | (section) @fold 2 | 3 | -------------------------------------------------------------------------------- /runtime/queries/woodpecker-ci/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/woodpecker-ci/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/common-lisp/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/common-lisp/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/cross-config/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/cross-config/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-compose/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-compose/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-compose/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/git-cliff-config/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/git-cliff-config/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/tags.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/tags.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir-yaml/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/ocaml-interface/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ocaml 2 | -------------------------------------------------------------------------------- /runtime/queries/rmarkdown/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/rmarkdown/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/woodpecker-ci/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /helix-term/src/ui/lsp.rs: -------------------------------------------------------------------------------- 1 | pub mod hover; 2 | pub mod signature_help; 3 | -------------------------------------------------------------------------------- /runtime/queries/git-cliff-config/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: toml 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ecma,_javascript,_gjs 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ecma,_typescript,_gjs 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/markdown-rustdoc/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/rust-format-args-macro/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: rust 2 | -------------------------------------------------------------------------------- /runtime/queries/rust-format-args-macro/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: rust 2 | -------------------------------------------------------------------------------- /runtime/queries/rust-format-args-macro/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: rust 2 | -------------------------------------------------------------------------------- /runtime/queries/haxe/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (array) 4 | ] @fold 5 | -------------------------------------------------------------------------------- /runtime/queries/jsdoc/highlights.scm: -------------------------------------------------------------------------------- 1 | (tag_name) @keyword 2 | (type) @type 3 | -------------------------------------------------------------------------------- /runtime/queries/rust-format-args-macro/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: rust 2 | -------------------------------------------------------------------------------- /runtime/queries/rust-format-args-macro/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: rust 2 | -------------------------------------------------------------------------------- /runtime/queries/debian/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (field_name) @tag 3 | -------------------------------------------------------------------------------- /runtime/queries/doxyfile/tags.scm: -------------------------------------------------------------------------------- 1 | (option 2 | key: (_) @definition.constant) 3 | -------------------------------------------------------------------------------- /runtime/queries/heex/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.around @comment.inside 2 | -------------------------------------------------------------------------------- /runtime/queries/jsonc/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: json 2 | (comment) @comment 3 | -------------------------------------------------------------------------------- /runtime/queries/kdl/indents.scm: -------------------------------------------------------------------------------- 1 | (node_children) @indent 2 | 3 | "}" @outdent 4 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir-yaml/indents.scm: -------------------------------------------------------------------------------- 1 | (block_mapping_pair) @indent 2 | 3 | -------------------------------------------------------------------------------- /runtime/queries/tablegen/indents.scm: -------------------------------------------------------------------------------- 1 | (statement) @indent 2 | 3 | "}" @outdent 4 | -------------------------------------------------------------------------------- /runtime/queries/tsx/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: typescript 2 | ; inherits: jsx 3 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/screenshot.png -------------------------------------------------------------------------------- /contrib/helix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/contrib/helix.png -------------------------------------------------------------------------------- /helix-term/tests/test/languages/mod.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | mod go; 4 | mod yaml; 5 | -------------------------------------------------------------------------------- /runtime/queries/adl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (struct (_) @function.inside) @function.around 2 | -------------------------------------------------------------------------------- /runtime/queries/cpp/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | 3 | (access_specifier) @outdent 4 | -------------------------------------------------------------------------------- /runtime/queries/haskell-persistent/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (entity_definition) 3 | ] @fold 4 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir/indents.scm: -------------------------------------------------------------------------------- 1 | (basic_block) @indent 2 | 3 | (label) @outdent 4 | -------------------------------------------------------------------------------- /runtime/queries/bash/tags.scm: -------------------------------------------------------------------------------- 1 | (function_definition name: (word) @definition.function) 2 | -------------------------------------------------------------------------------- /runtime/queries/beancount/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (transaction) 3 | (section) 4 | ] @fold 5 | -------------------------------------------------------------------------------- /runtime/queries/scss/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: css 2 | 3 | (parameters) @rainbow.scope 4 | -------------------------------------------------------------------------------- /book/theme/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/book/theme/favicon.png -------------------------------------------------------------------------------- /contrib/helix-256p.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/contrib/helix-256p.ico -------------------------------------------------------------------------------- /runtime/queries/earthfile/textobjects.scm: -------------------------------------------------------------------------------- 1 | (target (block) @function.inside) @function.around 2 | -------------------------------------------------------------------------------- /runtime/queries/gas/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | -------------------------------------------------------------------------------- /runtime/queries/hosts/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (ip) @namespace 3 | (host) @string 4 | -------------------------------------------------------------------------------- /runtime/queries/kdl/tags.scm: -------------------------------------------------------------------------------- 1 | (node (identifier) @definition.struct 2 | children: _ 3 | ) 4 | -------------------------------------------------------------------------------- /runtime/queries/vim/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (if_statement) 3 | (function_definition) 4 | ] @fold 5 | -------------------------------------------------------------------------------- /helix-tui/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | Cargo.lock 3 | *.log 4 | *.rs.rustfmt 5 | .gdb_history 6 | .idea/ 7 | -------------------------------------------------------------------------------- /runtime/queries/css/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | ] @indent 4 | 5 | [ 6 | "}" 7 | ] @outdent 8 | -------------------------------------------------------------------------------- /runtime/queries/git-commit/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | -------------------------------------------------------------------------------- /runtime/queries/nearley/rainbows.scm: -------------------------------------------------------------------------------- 1 | ((group) @rainbow.scope) 2 | 3 | ["(" ")"] @rainbow.bracket 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .direnv 3 | helix-term/rustfmt.toml 4 | result 5 | runtime/grammars 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /runtime/queries/lean/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (module) 3 | (namespace) 4 | (section) 5 | ] @local.scope 6 | -------------------------------------------------------------------------------- /runtime/queries/sql/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | -------------------------------------------------------------------------------- /runtime/queries/c/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/capnp/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/css/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/d/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/dart/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/dockerfile/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | -------------------------------------------------------------------------------- /runtime/queries/doxyfile/indents.scm: -------------------------------------------------------------------------------- 1 | (option 2 | value: (_) @anchor 3 | (#set! "scope" "tail")) @align 4 | -------------------------------------------------------------------------------- /runtime/queries/dtd/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/fidl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/gas/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/gomod/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/groovy/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (argument_list) 3 | (closure) 4 | (list) 5 | (map) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /runtime/queries/hare/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/hcl/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (comment) 3 | (block) 4 | (heredoc_template) 5 | (object) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /runtime/queries/hcl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/janet/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/koto/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/ld/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/lean/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "markdown")) 3 | -------------------------------------------------------------------------------- /runtime/queries/llvm/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/markdown/tags.scm: -------------------------------------------------------------------------------- 1 | ; TODO: have symbol types for markup? 2 | (atx_heading) @definition.class 3 | -------------------------------------------------------------------------------- /runtime/queries/nasm/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/ocaml/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/quint/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/r/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/rego/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/sage/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/slint/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/smali/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/t32/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/task/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/toml/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/unison/injections.scm: -------------------------------------------------------------------------------- 1 | ((doc_block) @injection.content (#set! injection.language "markdown")) 2 | -------------------------------------------------------------------------------- /runtime/queries/verilog/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) -------------------------------------------------------------------------------- /runtime/queries/wgsl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/xml/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/yara/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/yuck/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/zig/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.82.0" 3 | components = ["rustfmt", "rust-src", "clippy"] 4 | -------------------------------------------------------------------------------- /book/src/ecosystem.md: -------------------------------------------------------------------------------- 1 | # Ecosystem 2 | 3 | This section has information related to the wider Helix ecosystem. 4 | -------------------------------------------------------------------------------- /contrib/hx_launcher.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | HELIX_RUNTIME=/usr/lib/helix/runtime exec /usr/lib/helix/hx "$@" 4 | -------------------------------------------------------------------------------- /runtime/queries/basic/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (for_statement) 3 | ] @indent 4 | 5 | [ 6 | "NEXT" 7 | ] @outdent 8 | -------------------------------------------------------------------------------- /runtime/queries/c-sharp/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/caddyfile/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/clojure/injections.scm: -------------------------------------------------------------------------------- 1 | ((regex_lit) @injection.content 2 | (#set! injection.language "regex")) 3 | -------------------------------------------------------------------------------- /runtime/queries/dot/injections.scm: -------------------------------------------------------------------------------- 1 | ((html_internal) @injection.content 2 | (#set! injection.language "html")) 3 | -------------------------------------------------------------------------------- /runtime/queries/elvish/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/fortran/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/gdscript/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/gowork/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/hyprlang/indents.scm: -------------------------------------------------------------------------------- 1 | (section) @indent 2 | 3 | (section 4 | "}" @outdent) 5 | 6 | "}" @extend 7 | -------------------------------------------------------------------------------- /runtime/queries/inko/injections.scm: -------------------------------------------------------------------------------- 1 | ((line_comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/jsonnet/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/kconfig/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/llvm/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_body) 3 | (instruction) 4 | ] @indent 5 | 6 | "}" @outdent 7 | -------------------------------------------------------------------------------- /runtime/queries/markdoc/injections.scm: -------------------------------------------------------------------------------- 1 | ((markdown) @injection.content 2 | (#set! injection.language "markdown")) 3 | -------------------------------------------------------------------------------- /runtime/queries/matlab/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/nearley/injections.scm: -------------------------------------------------------------------------------- 1 | ((cont) @injection.content 2 | (#set! injection.language "javascript")) 3 | -------------------------------------------------------------------------------- /runtime/queries/pascal/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/powershell/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/prolog/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/properties/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/protobuf/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/purescript/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/robots.txt/tags.scm: -------------------------------------------------------------------------------- 1 | (rule 2 | (directive 3 | (userAgent)) 4 | (value) @definition.module) 5 | -------------------------------------------------------------------------------- /runtime/queries/starlark/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/thrift/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/tsq/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (named_node) 3 | (predicate) 4 | (grouping) 5 | (list) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /runtime/queries/ledger/injections.scm: -------------------------------------------------------------------------------- 1 | ([(comment) (note)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/ocaml-interface/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/pug/injections.scm: -------------------------------------------------------------------------------- 1 | ((javascript) @injection.content 2 | (#set! injection.language "javascript") 3 | ) 4 | -------------------------------------------------------------------------------- /runtime/queries/qml/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (enum_body) 3 | (ui_object_initializer) 4 | ] @indent 5 | 6 | "}" @outdent 7 | -------------------------------------------------------------------------------- /runtime/queries/robots.txt/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/shellcheckrc/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /helix-view/tests/encoding/big5_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/big5_in.txt -------------------------------------------------------------------------------- /runtime/queries/_gjs/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (glimmer_opening_tag) 3 | (glimmer_closing_tag) 4 | ] @constant.builtin 5 | 6 | -------------------------------------------------------------------------------- /runtime/queries/cairo/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | -------------------------------------------------------------------------------- /runtime/queries/hyprlang/injections.scm: -------------------------------------------------------------------------------- 1 | (exec 2 | (string) @injection.content 3 | (#set! injection.language "bash")) 4 | -------------------------------------------------------------------------------- /runtime/queries/json/textobjects.scm: -------------------------------------------------------------------------------- 1 | (pair 2 | (_) @entry.inside) @entry.around 3 | 4 | (array 5 | (_) @entry.around) 6 | -------------------------------------------------------------------------------- /runtime/queries/jsx/tags.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/pip-requirements/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/tsx/tags.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/wgsl/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (struct_declaration) 3 | (compound_statement) 4 | ] @indent 5 | 6 | "}" @outdent 7 | -------------------------------------------------------------------------------- /helix-view/tests/encoding/euc_kr_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/euc_kr_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/gb18030_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/gb18030_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/jis0208_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/jis0208_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/jis0212_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/jis0212_in.txt -------------------------------------------------------------------------------- /runtime/queries/javascript/indents.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/javascript/locals.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/javascript/tags.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/jsx/highlights.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: ecma,_javascript,_jsx 4 | -------------------------------------------------------------------------------- /runtime/queries/jsx/indents.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/jsx/injections.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/jsx/locals.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/koka/injections.scm: -------------------------------------------------------------------------------- 1 | ([(linecomment) (blockcomment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/make/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (define_directive) 3 | (rule) 4 | ] @indent 5 | 6 | [ 7 | "endef" 8 | ] @outdent 9 | -------------------------------------------------------------------------------- /runtime/queries/odin/injections.scm: -------------------------------------------------------------------------------- 1 | ([(comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/prolog/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (directive_term) 3 | (clause_term) 4 | (arg_list) 5 | (list_notation) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /runtime/queries/task/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (datetime) @type 3 | (identifier) @variable 4 | (keyword) @keyword 5 | -------------------------------------------------------------------------------- /runtime/queries/tsx/highlights.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: ecma,_typescript,_jsx 4 | -------------------------------------------------------------------------------- /runtime/queries/tsx/indents.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/tsx/injections.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/tsx/locals.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/typescript/indents.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/typescript/locals.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/typescript/tags.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _typescript,ecma 4 | -------------------------------------------------------------------------------- /helix-view/tests/encoding/big5_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/big5_out_ref.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/shift_jis_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/shift_jis_in.txt -------------------------------------------------------------------------------- /runtime/queries/_typescript/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (enum_declaration) 3 | (interface_declaration) 4 | (object_type) 5 | ] @indent 6 | -------------------------------------------------------------------------------- /runtime/queries/dhall/injections.scm: -------------------------------------------------------------------------------- 1 | ([(block_comment) (line_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/doxyfile/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment 2 | body: (_) @injection.content) 3 | (#set! injection.language "comment")) 4 | -------------------------------------------------------------------------------- /runtime/queries/glsl/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | 3 | ((preproc_arg) @injection.content 4 | (#set! injection.language "glsl")) 5 | -------------------------------------------------------------------------------- /runtime/queries/java/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/javascript/highlights.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: ecma,_javascript 4 | -------------------------------------------------------------------------------- /runtime/queries/javascript/injections.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/javascript/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/json/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (object) 3 | (array) 4 | ] @indent 5 | 6 | [ 7 | "]" 8 | "}" 9 | ] @outdent 10 | -------------------------------------------------------------------------------- /runtime/queries/jsx/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/pest/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (expression) 3 | ] @indent 4 | 5 | [ 6 | "]" 7 | "}" 8 | ")" 9 | ] @outdent 10 | -------------------------------------------------------------------------------- /runtime/queries/ron/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/ron/tags.scm: -------------------------------------------------------------------------------- 1 | (struct_entry 2 | (identifier) @definition.struct) 3 | 4 | (map_entry (string) @definition.struct) 5 | -------------------------------------------------------------------------------- /runtime/queries/scss/injections.scm: -------------------------------------------------------------------------------- 1 | ([(comment) (single_line_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/slang/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hlsl 2 | 3 | [ 4 | (interface_specifier) 5 | (extension_specifier) 6 | ] @indent 7 | -------------------------------------------------------------------------------- /runtime/queries/sway/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/tsx/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/typescript/highlights.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: ecma,_typescript 4 | -------------------------------------------------------------------------------- /runtime/queries/typescript/injections.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/typescript/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/wesl/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /helix-view/tests/encoding/euc_kr_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/euc_kr_out_ref.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/gb18030_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/gb18030_out_ref.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/jis0208_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/jis0208_out_ref.txt -------------------------------------------------------------------------------- /runtime/queries/basic/textobjects.scm: -------------------------------------------------------------------------------- 1 | (for_statement) @function.around 2 | 3 | (comment) @comment.inside 4 | (comment)+ @comment.around 5 | -------------------------------------------------------------------------------- /runtime/queries/go-format-string/rainbows.scm: -------------------------------------------------------------------------------- 1 | (explicit_argument_index_expr) @rainbow.scope 2 | 3 | [ 4 | "[" "]" 5 | ] @rainbow.bracket 6 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir/injections.scm: -------------------------------------------------------------------------------- 1 | ([ (comment) (multiline_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/po/textobjects.scm: -------------------------------------------------------------------------------- 1 | (msgid) @parameter.inside 2 | 3 | (comment) @comment.inside 4 | (comment)+ @comment.around 5 | 6 | 7 | -------------------------------------------------------------------------------- /runtime/queries/tablegen/injections.scm: -------------------------------------------------------------------------------- 1 | ([ (comment) (multiline_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/twig/injections.scm: -------------------------------------------------------------------------------- 1 | ((content) @injection.content 2 | (#set! injection.language "html") 3 | (#set! injection.combined)) 4 | -------------------------------------------------------------------------------- /helix-view/tests/encoding/shift_jis_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Axlefublr/helix/HEAD/helix-view/tests/encoding/shift_jis_out_ref.txt -------------------------------------------------------------------------------- /runtime/queries/hocon/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (object) 3 | (array) 4 | ] @indent 5 | 6 | [ 7 | "]" 8 | "}" 9 | ] @outdent 10 | 11 | -------------------------------------------------------------------------------- /runtime/queries/htmldjango/injections.scm: -------------------------------------------------------------------------------- 1 | ((content) @injection.content 2 | (#set! injection.language "html") 3 | (#set! injection.combined)) 4 | -------------------------------------------------------------------------------- /runtime/queries/properties/locals.scm: -------------------------------------------------------------------------------- 1 | (property 2 | (key) @local.definition.attribute) 3 | 4 | (substitution 5 | (key) @local.reference) 6 | -------------------------------------------------------------------------------- /runtime/queries/supercollider/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_call) 3 | (code_block) 4 | (function_block) 5 | (control_structure) 6 | ] @fold 7 | 8 | -------------------------------------------------------------------------------- /runtime/queries/_jsx/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (jsx_element) 3 | (jsx_self_closing_element) 4 | ] @indent 5 | 6 | (parenthesized_expression) @indent 7 | -------------------------------------------------------------------------------- /runtime/queries/caddyfile/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (matcher_block) 4 | ] @indent 5 | 6 | ((global_options) @indent) 7 | 8 | "}" @outdent 9 | -------------------------------------------------------------------------------- /runtime/queries/elm/injections.scm: -------------------------------------------------------------------------------- 1 | ; Parse glsl where defined 2 | 3 | ((glsl_content) @injection.content 4 | (#set! injection.language "glsl")) 5 | -------------------------------------------------------------------------------- /runtime/queries/fish/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_definition) @function.around 2 | 3 | (comment) @comment.inside 4 | 5 | (comment)+ @comment.around 6 | -------------------------------------------------------------------------------- /runtime/queries/robots.txt/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | (rule (_) @entry.inside) @entry.around 5 | -------------------------------------------------------------------------------- /runtime/queries/wren/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment") 3 | (#set! injection.include-children)) 4 | -------------------------------------------------------------------------------- /runtime/queries/hurl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | (entry (_) @function.inside) @function.around 6 | -------------------------------------------------------------------------------- /runtime/queries/ripple/readme.md: -------------------------------------------------------------------------------- 1 | Taken from https://github.com/Ripple-TS/ripple/tree/6ccf86deaf03d48b2ca325b61bb129601628f8c6/packages/tree-sitter/queries 2 | -------------------------------------------------------------------------------- /runtime/queries/slint/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (component) 3 | (component_definition) 4 | (function_definition) 5 | (imperative_block) 6 | ] @local.scope 7 | -------------------------------------------------------------------------------- /runtime/queries/spicedb/tags.scm: -------------------------------------------------------------------------------- 1 | (object_definition 2 | name: (type_identifier) @name) @definition.type 3 | 4 | (type_identifier) @name @reference.type 5 | -------------------------------------------------------------------------------- /runtime/queries/fidl/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (layout_declaration) 3 | (protocol_declaration) 4 | (resource_declaration) 5 | (service_declaration) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /runtime/queries/json/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (object) 3 | (array) 4 | ] @rainbow.scope 5 | 6 | [ 7 | "[" "]" 8 | "{" "}" 9 | ] @rainbow.bracket 10 | -------------------------------------------------------------------------------- /runtime/queries/just/folds.scm: -------------------------------------------------------------------------------- 1 | ; Define collapse points 2 | 3 | ([ 4 | (recipe) 5 | (string) 6 | (external_command) 7 | ] @fold 8 | (#trim! @fold)) 9 | -------------------------------------------------------------------------------- /runtime/queries/koto/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (assign) 3 | (comment) 4 | (function) 5 | (list) 6 | (map) 7 | (tuple) 8 | (string) 9 | ] @fold 10 | -------------------------------------------------------------------------------- /runtime/queries/snakemake/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | 3 | (wildcard 4 | (constraint) @injection.content 5 | (#set! injection.language "regex")) 6 | -------------------------------------------------------------------------------- /runtime/queries/sourcepawn/injections.scm: -------------------------------------------------------------------------------- 1 | ; Parse JSDoc annotations in comments 2 | 3 | ((comment) @injection.content 4 | (#set! injection.language "jsdoc")) 5 | -------------------------------------------------------------------------------- /runtime/queries/tera/injections.scm: -------------------------------------------------------------------------------- 1 | (frontmatter (content) @injection.content 2 | (#set! injection.language "yaml") 3 | (#set! injection.combined) 4 | ) 5 | -------------------------------------------------------------------------------- /runtime/queries/toml/textobjects.scm: -------------------------------------------------------------------------------- 1 | (pair 2 | (_) @entry.inside) @entry.around 3 | 4 | (array 5 | (_) @entry.around) 6 | 7 | (comment)+ @comment.around 8 | -------------------------------------------------------------------------------- /runtime/queries/doxyfile/textobjects.scm: -------------------------------------------------------------------------------- 1 | (option 2 | value: (_) @entry.inside) @entry.around 3 | 4 | (comment) @comment.inside 5 | (comment)+ @comment.around 6 | -------------------------------------------------------------------------------- /runtime/queries/fga/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (source_file) 3 | (type_declaration) 4 | (relations) 5 | (condition_declaration) 6 | ] @indent 7 | 8 | "}" @outdent 9 | -------------------------------------------------------------------------------- /runtime/queries/freebasic/tags.scm: -------------------------------------------------------------------------------- 1 | (sub_declaration name: (identifier) @definition.function) 2 | 3 | (function_declaration name: (identifier) @definition.function) 4 | -------------------------------------------------------------------------------- /runtime/queries/git-config/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | (variable 6 | (_) @entry.inside) @entry.around 7 | -------------------------------------------------------------------------------- /runtime/queries/jjdescription/injections.scm: -------------------------------------------------------------------------------- 1 | (((scissors_inner) @injection.content) 2 | (#set! injection.include-children) 3 | (#set! injection.language "diff")) 4 | -------------------------------------------------------------------------------- /runtime/queries/nickel/injections.scm: -------------------------------------------------------------------------------- 1 | (annot_atom doc: (static_string) 2 | @injection.content 3 | (#set! injection.language "markdown")) 4 | -------------------------------------------------------------------------------- /runtime/queries/org/injections.scm: -------------------------------------------------------------------------------- 1 | (block parameter: (expr) @injection.language 2 | (contents) @injection.content 3 | (#set! injection.include-children)) 4 | 5 | -------------------------------------------------------------------------------- /runtime/queries/properties/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | (property (key) @parameter.inside) @parameter.around 5 | -------------------------------------------------------------------------------- /runtime/queries/ron/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (struct) 3 | (map) 4 | (tuple) 5 | (array) 6 | ] @rainbow.scope 7 | 8 | ["(" ")" "[" "]" "{" "}"] @rainbow.bracket 9 | -------------------------------------------------------------------------------- /runtime/queries/cpon/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (meta) 3 | (map) 4 | (imap) 5 | (array) 6 | ] @indent 7 | 8 | [ 9 | "]" 10 | "}" 11 | ">" 12 | ] @outdent 13 | -------------------------------------------------------------------------------- /runtime/queries/env/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | (variable_assignment 6 | (_) @entry.inside) @entry.around 7 | -------------------------------------------------------------------------------- /runtime/queries/typespec/injections.scm: -------------------------------------------------------------------------------- 1 | ([ 2 | (single_line_comment) 3 | (multi_line_comment) 4 | ] @injection.content 5 | (#set! injection.language "comment")) 6 | -------------------------------------------------------------------------------- /runtime/queries/xml/textobjects.scm: -------------------------------------------------------------------------------- 1 | (element (start_tag) (_)* @xml-element.inside (end_tag)) 2 | 3 | (element) @xml-element.around 4 | 5 | (comment) @comment.around 6 | -------------------------------------------------------------------------------- /runtime/queries/basic/tags.scm: -------------------------------------------------------------------------------- 1 | (for_statement 2 | variable: (identifier) @definition.variable) 3 | 4 | (let_statement 5 | variable: (identifier) @definition.variable) 6 | -------------------------------------------------------------------------------- /runtime/queries/kconfig/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (config) 3 | (menuconfig) 4 | (choice) 5 | (comment_entry) 6 | (menu) 7 | (if) 8 | (help_text) 9 | ] @fold 10 | -------------------------------------------------------------------------------- /runtime/queries/pem/highlights.scm: -------------------------------------------------------------------------------- 1 | (label) @constant 2 | 3 | (preeb) @keyword 4 | (posteb) @keyword 5 | 6 | (base64pad) @string.special.symbol 7 | (laxbase64text) @string 8 | -------------------------------------------------------------------------------- /runtime/queries/ron/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (array) 3 | (map) 4 | (tuple) 5 | (struct) 6 | ] @indent 7 | 8 | [ 9 | "}" 10 | "]" 11 | ")" 12 | ] @outdent 13 | -------------------------------------------------------------------------------- /runtime/queries/scheme/textobjects.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (comment) 3 | (block_comment) 4 | ] @comment.inside 5 | 6 | (comment)+ @comment.around 7 | (block_comment) @comment.around 8 | -------------------------------------------------------------------------------- /runtime/queries/yaml/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (flow_sequence) 3 | (flow_mapping) 4 | ] @rainbow.scope 5 | 6 | [ 7 | "[" "]" 8 | "{" "}" 9 | ] @rainbow.bracket 10 | -------------------------------------------------------------------------------- /runtime/queries/yaml/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | (block_mapping_pair 6 | (_) @entry.inside) @entry.around 7 | 8 | -------------------------------------------------------------------------------- /runtime/queries/adl/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (struct) 3 | (union) 4 | 5 | (array) 6 | (object) 7 | ] @indent 8 | 9 | ; [ 10 | ; "}" 11 | ; "]" 12 | ; ] @outdent 13 | -------------------------------------------------------------------------------- /runtime/queries/cpp/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | (raw_string_literal 3 | delimiter: (raw_string_delimiter) @injection.language 4 | (raw_string_content) @injection.content) 5 | -------------------------------------------------------------------------------- /runtime/queries/jinja/injections.scm: -------------------------------------------------------------------------------- 1 | ((source_file) @injection.content 2 | (#set! injection.combined) 3 | (#set! injection.include-children) 4 | (#set! injection.language "html")) -------------------------------------------------------------------------------- /runtime/queries/passwd/highlights.scm: -------------------------------------------------------------------------------- 1 | (user) @namespace 2 | (auth) @keyword 3 | (uid) @constant 4 | (gid) @constant 5 | (gecos) @string 6 | (home) @variable 7 | (shell) @attribute 8 | -------------------------------------------------------------------------------- /runtime/queries/perl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | ((pod) @injection.content 4 | (#set! injection.language "pod")) 5 | -------------------------------------------------------------------------------- /runtime/queries/hurl/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (json_object) 3 | (json_array) 4 | (xml_tag) 5 | ] @indent 6 | 7 | [ 8 | "}" 9 | "]" 10 | (xml_close_tag) 11 | ] @outdent 12 | -------------------------------------------------------------------------------- /runtime/queries/jsdoc/injections.scm: -------------------------------------------------------------------------------- 1 | ; Parse general comment tags 2 | 3 | ((document) @injection.content 4 | (#set! injection.include-children) 5 | (#set! injection.language "comment")) -------------------------------------------------------------------------------- /runtime/queries/snakemake/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | 3 | [ 4 | (rule_definition) 5 | (rule_inheritance) 6 | (module_definition) 7 | (checkpoint_definition) 8 | ] @fold 9 | -------------------------------------------------------------------------------- /runtime/queries/zig/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (switch_expression) 4 | (initializer_list) 5 | ] @indent 6 | 7 | [ 8 | "}" 9 | "]" 10 | ")" 11 | ] @outdent 12 | -------------------------------------------------------------------------------- /runtime/queries/caddyfile/locals.scm: -------------------------------------------------------------------------------- 1 | (block) @local.scope 2 | 3 | (named_matcher (matcher_identifier (matcher_name)) @local.definition.function.macro) 4 | 5 | (matcher) @local.reference 6 | -------------------------------------------------------------------------------- /runtime/queries/git-rebase/injections.scm: -------------------------------------------------------------------------------- 1 | (((command) @attribute 2 | (message)? @injection.content) 3 | (#match? @attribute "^(x|exec)$") 4 | (#set! injection.language "bash") 5 | ) 6 | -------------------------------------------------------------------------------- /runtime/queries/scfg/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | "{" 3 | "}" 4 | ] @punctuation.bracket 5 | 6 | 7 | (comment) @comment 8 | (directive_name) @type 9 | (directive_params) @parameter 10 | -------------------------------------------------------------------------------- /runtime/queries/awk/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((regex_pattern) @injection.content 5 | (#set! injection.language "regex")) 6 | -------------------------------------------------------------------------------- /runtime/queries/diff/highlights.scm: -------------------------------------------------------------------------------- 1 | [(addition) (new_file)] @diff.plus 2 | [(deletion) (old_file)] @diff.minus 3 | 4 | (commit) @constant 5 | (location) @attribute 6 | (command) @markup.bold 7 | -------------------------------------------------------------------------------- /runtime/queries/groovy/locals.scm: -------------------------------------------------------------------------------- 1 | (function_definition) @local.scope 2 | 3 | (parameter 4 | name: (identifier) @local.definition.variable.parameter) 5 | 6 | (identifier) @local.reference 7 | -------------------------------------------------------------------------------- /runtime/queries/latex/injections.scm: -------------------------------------------------------------------------------- 1 | ([ 2 | (comment) 3 | (line_comment) 4 | (block_comment) 5 | (comment_environment) 6 | ] @injection.content (#set! injection.language "comment")) 7 | -------------------------------------------------------------------------------- /runtime/queries/make/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((shell_text) @injection.content 5 | (#set! injection.language "bash")) 6 | -------------------------------------------------------------------------------- /runtime/queries/spicedb/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((caveat_expr) @injection.content 5 | (#set! injection.language "cel")) 6 | -------------------------------------------------------------------------------- /runtime/queries/cmake/injections.scm: -------------------------------------------------------------------------------- 1 | ((line_comment) @injection.content 2 | (#set! injection.language "comment")) 3 | ((bracket_comment) @injection.content 4 | (#set! injection.language "comment")) 5 | -------------------------------------------------------------------------------- /runtime/queries/cpp/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | 3 | (lambda_expression 4 | body: (_) @function.inside) @function.around 5 | 6 | (class_specifier 7 | body: (_) @class.inside) @class.around 8 | -------------------------------------------------------------------------------- /runtime/queries/ejs/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment_directive) @comment 2 | 3 | [ 4 | "<%#" 5 | "<%" 6 | "<%=" 7 | "<%_" 8 | "<%-" 9 | "%>" 10 | "-%>" 11 | "_%>" 12 | ] @keyword 13 | -------------------------------------------------------------------------------- /runtime/queries/gdscript/tags.scm: -------------------------------------------------------------------------------- 1 | (class_definition (name) @name) @definition.class 2 | 3 | (function_definition (name) @name) @definition.function 4 | 5 | (call (identifier) @name) @reference.call 6 | -------------------------------------------------------------------------------- /runtime/queries/groovy/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((groovy_doc) @injection.content 5 | (#set! injection.language "comment")) 6 | -------------------------------------------------------------------------------- /runtime/queries/purescript/locals.scm: -------------------------------------------------------------------------------- 1 | (signature name: (variable) @local.definition.function) 2 | (function name: (variable) @local.definition.function) 3 | (exp_name (variable)) @local.reference 4 | -------------------------------------------------------------------------------- /runtime/queries/scheme/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((block_comment) @injection.content 5 | (#set! injection.language "comment")) 6 | -------------------------------------------------------------------------------- /runtime/queries/slang/injections.scm: -------------------------------------------------------------------------------- 1 | ((preproc_arg) @injection.content 2 | (#set! injection.language "slang")) 3 | 4 | ((comment) @injection.content 5 | (#set! injection.language "comment")) 6 | -------------------------------------------------------------------------------- /runtime/queries/todotxt/highlights.scm: -------------------------------------------------------------------------------- 1 | (done_task) @comment 2 | (task (priority) @keyword) 3 | (task (date) @comment) 4 | (task (kv) @comment) 5 | (task (project) @string) 6 | (task (context) @type) 7 | -------------------------------------------------------------------------------- /runtime/queries/tsq/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (list) 3 | (predicate) 4 | (grouping) 5 | (named_node) 6 | ] @rainbow.scope 7 | 8 | [ 9 | "(" ")" 10 | "[" "]" 11 | ] @rainbow.bracket 12 | -------------------------------------------------------------------------------- /runtime/queries/r/locals.scm: -------------------------------------------------------------------------------- 1 | ; locals.scm 2 | 3 | (function_definition) @local.scope 4 | 5 | (formal_parameters (identifier) @local.definition.variable.parameter) 6 | 7 | (identifier) @local.reference 8 | -------------------------------------------------------------------------------- /runtime/themes/cyan_light.toml: -------------------------------------------------------------------------------- 1 | # Deprecation notice 2 | # 3 | # This theme has moved to jetbrains_cyan_light, make sure to update your configuration accordingly. 4 | 5 | inherits = "jetbrains_cyan_light" 6 | -------------------------------------------------------------------------------- /runtime/queries/cmake/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (if_condition) 3 | (foreach_loop) 4 | (while_loop) 5 | (function_def) 6 | (macro_def) 7 | (normal_command) 8 | ] @indent 9 | 10 | ")" @outdent 11 | -------------------------------------------------------------------------------- /runtime/queries/protobuf/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (message_body) 3 | (enum_body) 4 | (oneof_body) 5 | (service_body) 6 | (rpc_body) 7 | (block_lit) 8 | ] @indent 9 | 10 | "}" @outdent 11 | 12 | -------------------------------------------------------------------------------- /runtime/queries/unison/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (literal_list) 3 | (parenthesized_or_tuple_pattern) 4 | ] @rainbow.scope 5 | 6 | [ 7 | "(" ")" 8 | "{" "}" 9 | "[" "]" 10 | ] @rainbow.bracket 11 | -------------------------------------------------------------------------------- /book/src/guides/README.md: -------------------------------------------------------------------------------- 1 | # Guides 2 | 3 | This section contains guides for adding new language server configurations, 4 | tree-sitter grammars, textobject and rainbow bracket queries, and other similar items. 5 | -------------------------------------------------------------------------------- /runtime/queries/gotmpl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | ((text) @injection.content 4 | (#set! injection.language "html") 5 | (#set! injection.combined)) 6 | -------------------------------------------------------------------------------- /runtime/queries/hocon/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | (pair 6 | (_) @entry.inside) @entry.around 7 | 8 | (array 9 | (_) @entry.around) 10 | 11 | -------------------------------------------------------------------------------- /runtime/queries/kconfig/indents.scm: -------------------------------------------------------------------------------- 1 | (help_text (text) @align) 2 | 3 | [ 4 | (config) 5 | (menuconfig) 6 | (choice) 7 | (comment_entry) 8 | (menu) 9 | (if) 10 | (help_text) 11 | ] @indent 12 | -------------------------------------------------------------------------------- /runtime/queries/nu/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (attribute_list) 3 | (block) 4 | (command_list) 5 | (parameter_bracks) 6 | (record_body) 7 | (val_list) 8 | (val_table) 9 | (val_closure) 10 | ] @fold 11 | -------------------------------------------------------------------------------- /runtime/queries/scheme/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (list) 3 | (vector) 4 | (byte_vector) 5 | ] @rainbow.scope 6 | 7 | [ 8 | "#(" "#vu8(" 9 | "(" ")" 10 | "[" "]" 11 | "{" "}" 12 | ] @rainbow.bracket 13 | -------------------------------------------------------------------------------- /runtime/queries/tact/injections.scm: -------------------------------------------------------------------------------- 1 | ; See: https://docs.helix-editor.com/guides/injection.html 2 | 3 | ((comment) @injection.content 4 | (#set! injection.language "comment") 5 | (#match? @injection.content "^//")) -------------------------------------------------------------------------------- /runtime/queries/gowork/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | "replace" 3 | "go" 4 | "use" 5 | ] @keyword 6 | 7 | "=>" @operator 8 | 9 | (comment) @comment 10 | 11 | [ 12 | (version) 13 | (go_version) 14 | ] @string 15 | -------------------------------------------------------------------------------- /runtime/queries/jinja/highlights.scm: -------------------------------------------------------------------------------- 1 | (expression) @string 2 | (statement) @variable.builtin 3 | (keyword) @keyword 4 | (comment) @comment 5 | (identifier) @variable.parameter 6 | (operator) @operator 7 | (string) @string -------------------------------------------------------------------------------- /runtime/queries/textproto/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (message_value) 3 | (message_list) 4 | (scalar_list) 5 | ] @indent 6 | 7 | [ 8 | (close_arrow) 9 | (close_square) 10 | (close_squiggly) 11 | ] @outdent 12 | -------------------------------------------------------------------------------- /runtime/queries/v/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((sql_expression) @injection.content 5 | (#set! injection.language "sql")) 6 | 7 | -------------------------------------------------------------------------------- /runtime/queries/jq/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | (funcdef 5 | (query) @function.inside) @function.around 6 | 7 | (objectkeyval 8 | (_) @entry.inside) @entry.around 9 | -------------------------------------------------------------------------------- /runtime/queries/toml/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (table_array_element) 3 | (table) 4 | (array) 5 | (inline_table) 6 | ] @rainbow.scope 7 | 8 | [ 9 | "[[" "]]" 10 | "[" "]" 11 | "{" "}" 12 | ] @rainbow.bracket 13 | -------------------------------------------------------------------------------- /runtime/queries/typst/tags.scm: -------------------------------------------------------------------------------- 1 | ; should be a heading 2 | (heading (text) @definition.class) 3 | 4 | ; should be a label/reference/tag 5 | (heading (label) @definition.function) 6 | (content (label) @definition.function) 7 | -------------------------------------------------------------------------------- /runtime/queries/vento/injections.scm: -------------------------------------------------------------------------------- 1 | ((content) @injection.content 2 | (#set! injection.language "html") 3 | (#set! injection.combined)) 4 | 5 | ((code) @injection.content 6 | (#set! injection.language "javascript")) 7 | -------------------------------------------------------------------------------- /runtime/queries/clojure/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (list_lit) 3 | (map_lit) 4 | (vec_lit) 5 | (anon_fn_lit) 6 | ] @rainbow.scope 7 | 8 | [ 9 | "(" ")" 10 | "#" 11 | "{" "}" 12 | "[" "]" 13 | ] @rainbow.bracket 14 | -------------------------------------------------------------------------------- /runtime/queries/koto/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (args) 3 | (call_args) 4 | (index) 5 | (list) 6 | (map) 7 | (parenthesized) 8 | (tuple) 9 | ] @rainbow.scope 10 | 11 | ["(" ")" "[" "]" "{" "}"] @rainbow.bracket 12 | -------------------------------------------------------------------------------- /runtime/queries/lean/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (namespace) 3 | (section) 4 | 5 | (instance) 6 | (def) 7 | (theorem) 8 | (example) 9 | 10 | (product) 11 | (array) 12 | (list) 13 | 14 | (string) 15 | ] @fold 16 | -------------------------------------------------------------------------------- /runtime/queries/lua/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (table_constructor) 3 | (bracket_index_expression) 4 | (parameters) 5 | (arguments) 6 | (field) 7 | ] @rainbow.scope 8 | 9 | ["(" ")" "[" "]" "{" "}"] @rainbow.bracket 10 | -------------------------------------------------------------------------------- /runtime/queries/vento/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | 3 | (keyword) @keyword 4 | 5 | (tag 6 | [ 7 | "{{" 8 | "{{-" 9 | "}}" 10 | "-}}" 11 | ] @punctuation.bracket) 12 | 13 | "|>" @operator 14 | -------------------------------------------------------------------------------- /runtime/queries/bash/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_definition) 3 | (if_statement) 4 | (for_statement) 5 | (while_statement) 6 | (case_statement) 7 | (pipeline) 8 | ] @indent 9 | 10 | [ 11 | "}" 12 | ] @outdent 13 | -------------------------------------------------------------------------------- /runtime/queries/freebasic/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_declaration) @function.around 2 | 3 | (sub_declaration) @function.around 4 | 5 | (for_statement) @function.around 6 | 7 | (comment) @comment.inside 8 | (comment)+ @comment.around 9 | -------------------------------------------------------------------------------- /runtime/queries/hcl/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (object) 3 | (block) 4 | (tuple) 5 | (for_tuple_expr) 6 | (for_object_expr) 7 | ] @indent 8 | 9 | [ 10 | (object_end) 11 | (block_end) 12 | (tuple_end) 13 | ] @outdent 14 | -------------------------------------------------------------------------------- /runtime/queries/slint/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (anon_struct_block) 3 | (assignment_block) 4 | (block) 5 | (enum_block) 6 | (global_block) 7 | (imperative_block) 8 | (struct_block) 9 | ] @indent 10 | 11 | "}" @outdent 12 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | watch_file shell.nix 2 | watch_file default.nix 3 | watch_file flake.lock 4 | watch_file rust-toolchain.toml 5 | 6 | # try to use flakes, if it fails use normal nix (ie. shell.nix) 7 | use flake || use nix 8 | eval "$shellHook" 9 | -------------------------------------------------------------------------------- /runtime/queries/latex/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (chapter) 3 | (part) 4 | (section) 5 | (subsection) 6 | (subsubsection) 7 | (paragraph) 8 | (subparagraph) 9 | 10 | (environment) 11 | (displayed_equation) 12 | ] @fold 13 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox-material.toml: -------------------------------------------------------------------------------- 1 | # Gruvbox Material for Helix 2 | # Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material) 3 | # Ported by: @satoqz 4 | # License: MIT 5 | 6 | inherits = "gruvbox_material_dark_medium" 7 | -------------------------------------------------------------------------------- /helix-tui/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod backend; 2 | pub mod buffer; 3 | pub mod layout; 4 | pub mod symbols; 5 | pub mod terminal; 6 | pub mod text; 7 | pub mod widgets; 8 | 9 | pub use self::terminal::{Terminal, TerminalOptions, Viewport}; 10 | -------------------------------------------------------------------------------- /runtime/queries/blade/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | 3 | ((directive_start) @start 4 | (directive_end) @end.after 5 | (#set! role block)) 6 | 7 | ((bracket_start) @start 8 | (bracket_end) @end 9 | (#set! role block)) 10 | -------------------------------------------------------------------------------- /runtime/queries/dunstrc/highlights.scm: -------------------------------------------------------------------------------- 1 | (assign 2 | (key) @attribute) 3 | 4 | (comment) @comment.line 5 | 6 | [ 7 | "[" 8 | "]" 9 | ] @punctuation.bracket 10 | 11 | "=" @operator 12 | 13 | (section 14 | (name) @namespace) 15 | -------------------------------------------------------------------------------- /runtime/queries/erb/injections.scm: -------------------------------------------------------------------------------- 1 | ((content) @injection.content 2 | (#set! injection.language "html") 3 | (#set! injection.combined)) 4 | 5 | ((code) @injection.content 6 | (#set! injection.language "ruby") 7 | (#set! injection.combined)) 8 | -------------------------------------------------------------------------------- /runtime/queries/fish/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_definition) 3 | (while_statement) 4 | (for_statement) 5 | (if_statement) 6 | (begin_statement) 7 | (switch_statement) 8 | ] @indent 9 | 10 | [ 11 | "end" 12 | ] @outdent 13 | -------------------------------------------------------------------------------- /runtime/queries/git-attributes/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: git-ignore 2 | 3 | (attribute) @variable 4 | (value) @string 5 | 6 | (quoted_pattern ["\""] @string) 7 | 8 | (attribute_unset) @operator 9 | (attribute_set_to) @operator 10 | -------------------------------------------------------------------------------- /runtime/queries/git-commit/injections.scm: -------------------------------------------------------------------------------- 1 | ((diff) @injection.content 2 | (#set! injection.language "diff")) 3 | 4 | ((rebase_command) @injection.content 5 | (#set! injection.include-children) 6 | (#set! injection.language "git-rebase")) 7 | -------------------------------------------------------------------------------- /runtime/queries/ld/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (sections) 3 | (memory) 4 | (section) 5 | (phdrs) 6 | (overlay_section) 7 | (version) 8 | (vers_node) 9 | (vers_defns) 10 | ] @indent 11 | 12 | "}" @outdent @extend.prevent-once 13 | -------------------------------------------------------------------------------- /runtime/queries/lua/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (do_statement) 3 | (while_statement) 4 | (repeat_statement) 5 | (if_statement) 6 | (for_statement) 7 | (function_declaration) 8 | (function_definition) 9 | (table_constructor) 10 | ] @fold 11 | -------------------------------------------------------------------------------- /runtime/queries/ocaml/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (let_binding) 3 | (type_binding) 4 | (structure) 5 | (signature) 6 | (record_declaration) 7 | (function_expression) 8 | (match_case) 9 | ] @indent 10 | 11 | "}" @outdent 12 | 13 | -------------------------------------------------------------------------------- /runtime/queries/unison/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (term_definition) 3 | (pattern) 4 | (exp_if) 5 | (constructor) 6 | (delay_block) 7 | (type_signature) 8 | ] @indent 9 | 10 | [(kw_then) (kw_else) (cases)] @indent.always @extend 11 | -------------------------------------------------------------------------------- /runtime/queries/wren/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (method_definition) 3 | ] @local.scope 4 | 5 | (name) @local.reference 6 | (field) @local.reference 7 | (static_field) @local.reference 8 | 9 | (parameter) @local.definition.variable.parameter 10 | -------------------------------------------------------------------------------- /runtime/queries/elixir/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (after_block) 3 | (anonymous_function) 4 | (catch_block) 5 | (do_block) 6 | (else_block) 7 | (rescue_block) 8 | (stab_clause) 9 | ] @indent 10 | 11 | [ 12 | "end" 13 | ] @outdent 14 | -------------------------------------------------------------------------------- /runtime/queries/prql/injections.scm: -------------------------------------------------------------------------------- 1 | ((s_string) @injection.content 2 | (#set! injection.language "sql")) 3 | 4 | (from_text 5 | (keyword_from_text) 6 | (keyword_json) 7 | (literal) @injection.content 8 | (#set! injection.language "json")) 9 | -------------------------------------------------------------------------------- /runtime/queries/strace/highlights.scm: -------------------------------------------------------------------------------- 1 | (syscall) @function.builtin 2 | (integer) @constant.numeric 3 | (pointer) @constant.numeric 4 | (value) @label 5 | (string) @string 6 | (comment) @comment 7 | (errorName) @error 8 | (errorDescription) @error 9 | -------------------------------------------------------------------------------- /runtime/queries/ejs/injections.scm: -------------------------------------------------------------------------------- 1 | ((content) @injection.content 2 | (#set! injection.language "html") 3 | (#set! injection.combined)) 4 | 5 | ((code) @injection.content 6 | (#set! injection.language "javascript") 7 | (#set! injection.combined)) 8 | -------------------------------------------------------------------------------- /runtime/queries/elisp/tags.scm: -------------------------------------------------------------------------------- 1 | ;; defun/defsubst 2 | (function_definition name: (symbol) @name) @definition.function 3 | 4 | ;; Treat macros as function definitions for the sake of TAGS. 5 | (macro_definition name: (symbol) @name) @definition.function 6 | -------------------------------------------------------------------------------- /runtime/queries/fsharp/injections.scm: -------------------------------------------------------------------------------- 1 | ([ 2 | (line_comment) 3 | (block_comment_content) 4 | ] @injection.content 5 | (#set! injection.language "comment")) 6 | 7 | ((xml_doc (xml_doc_content) @injection.content) 8 | (#set! injection.language "xml")) 9 | -------------------------------------------------------------------------------- /runtime/queries/haskell/locals.scm: -------------------------------------------------------------------------------- 1 | (signature name: (variable) @local.definition.function) 2 | (function name: (variable) @local.definition.function) 3 | (pattern/variable) @local.definition.variable.parameter 4 | (expression/variable) @local.reference 5 | -------------------------------------------------------------------------------- /runtime/queries/iex/injections.scm: -------------------------------------------------------------------------------- 1 | ((evaluation_block (prompt_line (expression) @injection.content)) 2 | (#set! injection.language "elixir") 3 | (#set! injection.combined)) 4 | 5 | ((result) @injection.content 6 | (#set! injection.language "elixir")) 7 | -------------------------------------------------------------------------------- /runtime/queries/tcl/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (braced_word_simple) 3 | (namespace) 4 | (command) 5 | (conditional) 6 | (foreach) 7 | (while) 8 | (try) 9 | (procedure) 10 | (command_substitution) 11 | ] @indent 12 | 13 | [ "}" "]" ] @outdent 14 | -------------------------------------------------------------------------------- /helix-tui/README.md: -------------------------------------------------------------------------------- 1 | # helix-tui 2 | 3 | This library is a fork of the great library 4 | [tui-rs](https://github.com/fdehau/tui-rs/). We've mainly relied on the double 5 | buffer implementation and render diffing, side-stepping its widget and 6 | layouting. 7 | -------------------------------------------------------------------------------- /runtime/queries/latex/textobjects.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (generic_command) 3 | ] @function.around 4 | 5 | [ 6 | (chapter) 7 | (part) 8 | (section) 9 | (subsection) 10 | (subsubsection) 11 | (paragraph) 12 | (subparagraph) 13 | ] @class.around 14 | -------------------------------------------------------------------------------- /runtime/queries/llvm/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | (function_body) @local.scope 4 | 5 | ; Definitions 6 | 7 | (argument 8 | (value (var (local_var) @local.definition.variable.parameter))) 9 | 10 | ; References 11 | (local_var) @local.reference 12 | -------------------------------------------------------------------------------- /runtime/queries/wit/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (use_items) 3 | (fields) 4 | (variant_items) 5 | (variant_payload) 6 | (flags) 7 | (enum_items) 8 | (union_items) 9 | (args) 10 | (resource_items) 11 | ] @indent 12 | 13 | [ "}" ")" ] @outdent 14 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_dark_soft.toml: -------------------------------------------------------------------------------- 1 | # Author : broke 2 | # The theme uses the gruvbox dark palette with soft contrast: github.com/morhetz/gruvbox 3 | 4 | inherits = "gruvbox" 5 | 6 | [palette] 7 | bg0 = "#32302f" # main background 8 | -------------------------------------------------------------------------------- /runtime/queries/csv/highlights.scm: -------------------------------------------------------------------------------- 1 | (first)@type 2 | (second)@function 3 | (third)@constant 4 | (fourth)@operator 5 | (fifth)@type 6 | (sixth)@function 7 | (seventh)@constant 8 | 9 | [ 10 | ";" 11 | "," 12 | "|" 13 | ] @punctuation.delimiter 14 | 15 | -------------------------------------------------------------------------------- /runtime/queries/inko/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (method) 3 | (block) 4 | ] @local.scope 5 | 6 | (argument name: _ @local.definition.variable.parameter) 7 | (named_argument name: _ @local.definition.variable.parameter) 8 | 9 | (identifier) @local.reference 10 | -------------------------------------------------------------------------------- /helix-stdx/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Extensions to the standard library. A collection of helper functions 2 | //! used throughout helix. 3 | 4 | pub mod env; 5 | pub mod faccess; 6 | pub mod path; 7 | pub mod range; 8 | pub mod rope; 9 | 10 | pub use range::Range; 11 | -------------------------------------------------------------------------------- /runtime/queries/astro/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | 3 | ((frontmatter 4 | (raw_text) @injection.content) 5 | (#set! injection.language "typescript")) 6 | 7 | ((interpolation 8 | (raw_text) @injection.content) 9 | (#set! injection.language "tsx")) 10 | -------------------------------------------------------------------------------- /runtime/queries/haxe/injections.scm: -------------------------------------------------------------------------------- 1 | ((interpolation) @injection.content 2 | (#set! injection.language "haxe")) 3 | ((comment) @injection.content 4 | (#set! injection.language "jsdoc")) 5 | ; ((comment) @injection.content 6 | ; (#set! injection.language "comment")) 7 | -------------------------------------------------------------------------------- /runtime/queries/nickel/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (fun_expr) 3 | (let_expr) 4 | (match_expr) 5 | (ite_expr) 6 | 7 | (uni_record) 8 | (str_chunks_multi) 9 | "[" 10 | "[|" 11 | ] @indent 12 | 13 | [ 14 | "}" 15 | "]" 16 | "|]" 17 | ] @outdent 18 | -------------------------------------------------------------------------------- /runtime/queries/thrift/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (document) 5 | (definition) 6 | ] @local.scope 7 | 8 | ; References 9 | 10 | (identifier) @local.reference 11 | 12 | ; Definitions 13 | 14 | (annotation_identifier) @local.definition.attribute 15 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_light_hard.toml: -------------------------------------------------------------------------------- 1 | # Author : Twinkle 2 | # The theme uses the gruvbox light palette with hard contrast: github.com/morhetz/gruvbox 3 | 4 | inherits = "gruvbox_light" 5 | 6 | [palette] 7 | bg0 = "#f9f5d7" # main background 8 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_light_soft.toml: -------------------------------------------------------------------------------- 1 | # Author : Twinkle 2 | # The theme uses the gruvbox light palette with soft contrast: github.com/morhetz/gruvbox 3 | 4 | inherits = "gruvbox_light" 5 | 6 | [palette] 7 | bg0 = "#f2e5bc" # main background 8 | -------------------------------------------------------------------------------- /runtime/queries/matlab/folds.scm: -------------------------------------------------------------------------------- 1 | [(if_statement) 2 | (for_statement) 3 | (while_statement) 4 | (switch_statement) 5 | (try_statement) 6 | (function_definition) 7 | (class_definition) 8 | (enumeration) 9 | (events) 10 | (methods) 11 | (properties)] @fold 12 | -------------------------------------------------------------------------------- /runtime/queries/slisp/tags.scm: -------------------------------------------------------------------------------- 1 | ;; def 2 | (function_definition name: (symbol) @name) @definition.function 3 | 4 | ;; ext 5 | (external_definition name: (symbol) @name) @definition.function 6 | 7 | ;; mac 8 | (macro_definition name: (symbol) @name) @definition.function 9 | -------------------------------------------------------------------------------- /runtime/queries/textproto/textobjects.scm: -------------------------------------------------------------------------------- 1 | (message_field 2 | (_) @entry.inside) @entry.around 3 | 4 | (scalar_field 5 | (_) @entry.inside) @entry.around 6 | 7 | (message_list 8 | (_) @entry.around) 9 | 10 | (scalar_list 11 | (_) @entry.around) 12 | 13 | -------------------------------------------------------------------------------- /runtime/queries/bovex/rainbows.scm: -------------------------------------------------------------------------------- 1 | ["(" ")" "[" "]" "{" "}"] @rainbow.bracket 2 | [ 3 | (tuple_expr) 4 | (record_expr) 5 | (layout_lit) 6 | (layout_antiquote) 7 | (tuple_pat) 8 | (record_pat) 9 | (atomic_type) 10 | (record_type) 11 | ] @rainbow.scope 12 | -------------------------------------------------------------------------------- /runtime/queries/fortran/folds.scm: -------------------------------------------------------------------------------- 1 | ;; by @oponkork 2 | [ 3 | (if_statement) 4 | (where_statement) 5 | (enum_statement) 6 | (do_loop_statement) 7 | (derived_type_definition) 8 | (function) 9 | (subroutine) 10 | (module_procedure) 11 | (interface) 12 | ] @fold 13 | -------------------------------------------------------------------------------- /runtime/queries/gleam/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | (function) @local.scope 3 | 4 | (case_clause) @local.scope 5 | 6 | ; Definitions 7 | (function_parameter name: (identifier) @local.definition.variable.parameter) 8 | 9 | ; References 10 | (identifier) @local.reference 11 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir/textobjects.scm: -------------------------------------------------------------------------------- 1 | (basic_block) @function.around 2 | 3 | (argument) @parameter.inside 4 | 5 | [ 6 | (comment) 7 | (multiline_comment) 8 | ] @comment.inside 9 | 10 | (comment)+ @comment.around 11 | 12 | (multiline_comment) @comment.around 13 | -------------------------------------------------------------------------------- /runtime/queries/ohm/injections.scm: -------------------------------------------------------------------------------- 1 | ; See: https://docs.helix-editor.com/guides/injection.html 2 | 3 | ((singleline_comment) @injection.content 4 | (#set! injection.language "comment")) 5 | 6 | ((multiline_comment) @injection.content 7 | (#set! injection.language "comment")) 8 | -------------------------------------------------------------------------------- /runtime/queries/fga/textobjects.scm: -------------------------------------------------------------------------------- 1 | (condition_declaration 2 | body: (_) @function.inside) @function.around 3 | 4 | (param 5 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 6 | 7 | (comment) @comment.inside 8 | 9 | (comment)+ @comment.around 10 | -------------------------------------------------------------------------------- /runtime/queries/log/highlights.scm: -------------------------------------------------------------------------------- 1 | (trace) @comment 2 | (debug) @hint 3 | (info) @info 4 | (warn) @warning 5 | (error) @error 6 | (year_month_day) @keyword 7 | (time) @constant 8 | (string_literal) @string 9 | (number) @constant.numeric 10 | (constant) @constant.builtin 11 | -------------------------------------------------------------------------------- /runtime/queries/pest/injections.scm: -------------------------------------------------------------------------------- 1 | ((line_comment) @injection.content 2 | (#set! injection.language "comment") 3 | (#set! injection.include-children)) 4 | 5 | ((block_comment) @injection.content 6 | (#set! injection.language "comment") 7 | (#set! injection.include-children)) 8 | -------------------------------------------------------------------------------- /runtime/queries/pest/textobjects.scm: -------------------------------------------------------------------------------- 1 | (grammar_rule (_) @class.inside) @class.around 2 | (term (_) @entry.inside) @entry.around 3 | 4 | (line_comment) @comment.inside 5 | (line_comment)+ @comment.around 6 | 7 | (block_comment) @comment.inside 8 | (block_comment)+ @comment.around 9 | -------------------------------------------------------------------------------- /runtime/queries/svelte/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | 3 | [ 4 | (if_statement) 5 | (else_if_block) 6 | (else_block) 7 | (each_statement) 8 | (await_statement) 9 | (then_block) 10 | (catch_block) 11 | (key_statement) 12 | (snippet_statement) 13 | ] @fold 14 | -------------------------------------------------------------------------------- /runtime/queries/tera/locals.scm: -------------------------------------------------------------------------------- 1 | (identifier) @local.reference 2 | (assignment_expression 3 | left: (identifier) @local.definition.variable) 4 | (macro_statement 5 | (parameter_list 6 | (identifier) @local.definition.variable.parameter)) 7 | (macro_statement) @local.scope 8 | -------------------------------------------------------------------------------- /runtime/queries/gleam/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ; Inject markdown into documentation comments 5 | ((doc_comment_content) @injection.content 6 | (#set! injection.language "markdown") 7 | (#set! injection.combined)) 8 | -------------------------------------------------------------------------------- /runtime/queries/ini/highlights.scm: -------------------------------------------------------------------------------- 1 | (section_name 2 | (text) @type) 3 | 4 | (comment) @comment 5 | 6 | [ 7 | "[" 8 | "]" 9 | ] @punctuation.bracket 10 | 11 | "=" @operator 12 | 13 | (setting 14 | (setting_name) @variable.other.member 15 | ((setting_value) @string)?) 16 | -------------------------------------------------------------------------------- /runtime/queries/templ/injections.scm: -------------------------------------------------------------------------------- 1 | ((script_block_text) @injection.content (#set! injection.language "javascript")) 2 | ((script_element_text) @injection.content (#set! injection.language "javascript")) 3 | 4 | ((style_element_text) @injection.content (#set! injection.language "css")) 5 | -------------------------------------------------------------------------------- /runtime/queries/typst/injections.scm: -------------------------------------------------------------------------------- 1 | (raw_blck 2 | (blob) @injection.shebang @injection.content) 3 | 4 | (raw_blck 5 | lang: (ident) @injection.language 6 | (blob) @injection.content) 7 | 8 | ((comment) 9 | @injection.content 10 | (#set! injection.language "comment")) 11 | -------------------------------------------------------------------------------- /runtime/queries/bash/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_definition 2 | body: (_) @function.inside) @function.around 3 | 4 | (command 5 | argument: (_) @parameter.inside) 6 | 7 | (comment) @comment.inside 8 | 9 | (comment)+ @comment.around 10 | 11 | (array 12 | (_) @entry.around) 13 | -------------------------------------------------------------------------------- /runtime/queries/gotmpl/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (if_action) 3 | (range_action) 4 | (block_action) 5 | (with_action) 6 | (define_action) 7 | ] @local.scope 8 | 9 | (variable_definition 10 | variable: (variable) @local.definition.variable) 11 | 12 | (variable) @local.reference 13 | -------------------------------------------------------------------------------- /runtime/queries/just/indents.scm: -------------------------------------------------------------------------------- 1 | ; This query specifies how to auto-indent logical blocks. 2 | ; 3 | ; Better documentation with diagrams is in https://docs.helix-editor.com/guides/indent.html 4 | 5 | [ 6 | (recipe) 7 | (string) 8 | (external_command) 9 | ] @indent @extend 10 | -------------------------------------------------------------------------------- /runtime/queries/nu/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (expr_parenthesized) 3 | (parameter_bracks) 4 | (ctrl_match) 5 | 6 | (val_record) 7 | (val_list) 8 | (val_closure) 9 | (val_table) 10 | 11 | (block) 12 | ] @indent 13 | 14 | [ 15 | "}" 16 | "]" 17 | ")" 18 | ] @outdent 19 | -------------------------------------------------------------------------------- /runtime/queries/thrift/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (annotation_definition) 3 | (enum_definition) 4 | (exception_definition) 5 | (function_definition) 6 | (senum_definition) 7 | (service_definition) 8 | (struct_definition) 9 | (union_definition) 10 | 11 | (comment) 12 | ] @fold 13 | -------------------------------------------------------------------------------- /runtime/queries/_jsx/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | (jsx_self_closing_element) @xml-element.around @xml-element.inside 4 | 5 | (jsx_element (jsx_opening_element) (_)* @xml-element.inside (jsx_closing_element)) 6 | 7 | (jsx_element) @xml-element.around 8 | -------------------------------------------------------------------------------- /runtime/queries/_typescript/textobjects.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (interface_declaration 3 | body:(_) @class.inside) 4 | (type_alias_declaration 5 | value: (_) @class.inside) 6 | ] @class.around 7 | 8 | (enum_body 9 | (_) @entry.around) 10 | 11 | (enum_assignment (_) @entry.inside) 12 | 13 | -------------------------------------------------------------------------------- /runtime/queries/capnp/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (annotation_targets) 3 | (const_list) 4 | (enum) 5 | (interface) 6 | (implicit_generics) 7 | (generics) 8 | (group) 9 | (method_parameters) 10 | (named_return_types) 11 | (struct) 12 | (struct_shorthand) 13 | (union) 14 | ] @fold 15 | -------------------------------------------------------------------------------- /runtime/queries/gomod/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | "require" 3 | "replace" 4 | "go" 5 | "toolchain" 6 | "tool" 7 | "exclude" 8 | "retract" 9 | "module" 10 | ] @keyword 11 | 12 | "=>" @operator 13 | 14 | (comment) @comment 15 | 16 | [ 17 | (version) 18 | (go_version) 19 | ] @string 20 | -------------------------------------------------------------------------------- /runtime/queries/html/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (doctype) 3 | (erroneous_end_tag) 4 | ] @rainbow.scope 5 | 6 | ([ 7 | (element) 8 | (script_element) 9 | (style_element) 10 | ] @rainbow.scope 11 | (#set! rainbow.include-children)) 12 | 13 | ["<" ">" ""] @rainbow.bracket 14 | -------------------------------------------------------------------------------- /runtime/queries/prolog/indents.scm: -------------------------------------------------------------------------------- 1 | (functional_notation 2 | (atom) 3 | (open_ct) @indent 4 | (close) @outdent) 5 | 6 | (list_notation 7 | (open_list) @indent 8 | (close_list) @outdent) 9 | 10 | (curly_bracketed_notation 11 | (open_curly) @indent 12 | (close_curly) @outdent) 13 | -------------------------------------------------------------------------------- /runtime/queries/strictdoc/injections.scm: -------------------------------------------------------------------------------- 1 | 2 | ((text_part) @injection.content 3 | (#set! injection.language "rst") 4 | (#set! injection.include-children)) 5 | 6 | ((single_line_text_part) @injection.content 7 | (#set! injection.language "rst") 8 | (#set! injection.include-children)) 9 | 10 | -------------------------------------------------------------------------------- /runtime/queries/amber/tags.scm: -------------------------------------------------------------------------------- 1 | ; Function definitions 2 | (function_definition 3 | name: (variable) @name) @definition.function 4 | 5 | ; Function calls 6 | (function_call 7 | name: (variable) @name) @reference.call 8 | 9 | ; Main block as entry point 10 | (main_block) @definition.function 11 | -------------------------------------------------------------------------------- /runtime/queries/hcl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | (function_arguments 5 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 6 | 7 | (attribute 8 | (_) @entry.inside) @entry.around 9 | 10 | (tuple 11 | (_) @entry.around) 12 | -------------------------------------------------------------------------------- /runtime/queries/nginx/injections.scm: -------------------------------------------------------------------------------- 1 | ((lua_code) @injection.content 2 | (#set! injection.language "lua") 3 | (#set! injection.combined)) 4 | 5 | ((regex) @injection.content 6 | (#set! injection.language "regex")) 7 | 8 | ((comment) @injection.content 9 | (#set! injection.language "comment")) 10 | -------------------------------------------------------------------------------- /runtime/queries/verilog/textobjects.scm: -------------------------------------------------------------------------------- 1 | 2 | (function_declaration 3 | (function_body_declaration 4 | (function_identifier 5 | (function_identifier 6 | (simple_identifier) @function.inside)))) @function.around 7 | 8 | (comment) @comment.inside 9 | 10 | (comment)+ @comment.around 11 | -------------------------------------------------------------------------------- /helix-loader/src/main.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use helix_loader::grammar::fetch_grammars; 3 | 4 | // This binary is used in the Release CI as an optimization to cut down on 5 | // compilation time. This is not meant to be run manually. 6 | 7 | fn main() -> Result<()> { 8 | fetch_grammars() 9 | } 10 | -------------------------------------------------------------------------------- /runtime/queries/awk/textobjects.scm: -------------------------------------------------------------------------------- 1 | 2 | (func_def name: (identifier) (block) @function.inside) @function.around 3 | 4 | (param_list (_) @parameter.inside) @parameter.around 5 | 6 | (args (_) @parameter.inside) @parameter.around 7 | 8 | (comment) @comment.inside 9 | 10 | (comment)+ @comment.around 11 | -------------------------------------------------------------------------------- /runtime/queries/cmake/textobjects.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (macro_def) 3 | (function_def) 4 | ] @function.around 5 | 6 | (argument) @parameter.inside 7 | 8 | [ 9 | (bracket_comment) 10 | (line_comment) 11 | ] @comment.inside 12 | 13 | (line_comment)+ @comment.around 14 | 15 | (bracket_comment) @comment.around -------------------------------------------------------------------------------- /runtime/queries/janet/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (par_arr_lit) 3 | (par_tup_lit) 4 | (sqr_arr_lit) 5 | (sqr_tup_lit) 6 | (tbl_lit) 7 | (struct_lit) 8 | (short_fn_lit) 9 | ] @rainbow.scope 10 | 11 | [ 12 | "(" "@(" ")" 13 | "[" "@[" "]" 14 | "{" "@{" "}" 15 | "|" 16 | ] @rainbow.bracket 17 | -------------------------------------------------------------------------------- /runtime/queries/jjdescription/highlights.scm: -------------------------------------------------------------------------------- 1 | (text) @string 2 | (filepath) @string.special.path 3 | 4 | (change type: "A" @diff.plus) 5 | (change type: "D" @diff.minus) 6 | (change type: "M" @diff.delta) 7 | (change type: "C" @diff.plus) 8 | (change type: "R" @diff.delta) 9 | 10 | (comment) @comment 11 | -------------------------------------------------------------------------------- /runtime/queries/circom/locals.scm: -------------------------------------------------------------------------------- 1 | (function_definition) @local.scope 2 | (template_definition) @local.scope 3 | (main_component_definition) @local.scope 4 | (block_statement) @local.scope 5 | 6 | (parameter name: (identifier) @local.definition.variable.parameter) 7 | 8 | 9 | (identifier) @local.reference 10 | -------------------------------------------------------------------------------- /runtime/queries/inko/tags.scm: -------------------------------------------------------------------------------- 1 | (class 2 | name: _ @definition.struct) 3 | 4 | (trait 5 | name: _ @definition.interface) 6 | 7 | (external_function 8 | name: _ @definition.function) 9 | 10 | (method 11 | name: _ @definition.function) 12 | 13 | (define_constant 14 | name: _ @definition.constant) 15 | -------------------------------------------------------------------------------- /runtime/queries/kotlin/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (class_declaration) 5 | (function_declaration) 6 | ] @local.scope 7 | 8 | ; Definitions 9 | 10 | (type_parameter 11 | (type_identifier) @local.definition.type.parameter) 12 | 13 | ; References 14 | 15 | (type_identifier) @local.reference 16 | -------------------------------------------------------------------------------- /runtime/queries/po/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (msgctxt) 3 | (msgid) 4 | (msgid_plural) 5 | (msgstr) 6 | ]@keyword 7 | 8 | (comment) @comment 9 | (comment (comment_reference (text) @string.special.path)) 10 | (comment (comment_flag (text) @label)) 11 | 12 | (number) @constant.numeric 13 | (string) @string 14 | -------------------------------------------------------------------------------- /runtime/queries/v/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (struct_declaration) 3 | (function_declaration) 4 | (if_expression) 5 | (match_expression) 6 | (for_statement) 7 | (unsafe_expression) 8 | (var_declaration) 9 | (const_declaration) 10 | ] @indent 11 | 12 | [ 13 | "]" 14 | ")" 15 | "}" 16 | ] @outdent 17 | -------------------------------------------------------------------------------- /runtime/queries/css/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (keyframe_block_list) 3 | (block) 4 | (attribute_selector) 5 | (feature_query) 6 | (parenthesized_query) 7 | (selector_query) 8 | (parenthesized_value) 9 | (arguments) 10 | ] @rainbow.scope 11 | 12 | [ 13 | "{" "}" 14 | "(" ")" 15 | ] @rainbow.bracket 16 | -------------------------------------------------------------------------------- /runtime/queries/matlab/locals.scm: -------------------------------------------------------------------------------- 1 | (function_definition name: (identifier) @local.definition.function ?) @local.scope 2 | (function_arguments (identifier)* @local.definition.variable.parameter) 3 | 4 | (lambda (arguments (identifier) @local.definition.variable.parameter)) @local.scope 5 | 6 | (identifier) @local.reference 7 | -------------------------------------------------------------------------------- /runtime/queries/php-only/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | (heredoc 5 | (heredoc_body) @injection.content 6 | (heredoc_end) @injection.language) 7 | 8 | (nowdoc 9 | (nowdoc_body) @injection.content 10 | (heredoc_end) @injection.language) 11 | -------------------------------------------------------------------------------- /runtime/queries/freebasic/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (for_statement) 3 | (if_statement) 4 | (while_statement) 5 | (do_statement) 6 | (function_declaration) 7 | (sub_declaration) 8 | ] @indent 9 | 10 | [ 11 | "NEXT" 12 | "END IF" 13 | "WEND" 14 | "LOOP" 15 | "END FUNCTION" 16 | "END SUB" 17 | ] @outdent 18 | -------------------------------------------------------------------------------- /runtime/queries/html/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((script_element 5 | (raw_text) @injection.content) 6 | (#set! injection.language "javascript")) 7 | 8 | ((style_element 9 | (raw_text) @injection.content) 10 | (#set! injection.language "css")) 11 | -------------------------------------------------------------------------------- /runtime/queries/markdown.inline/injections.scm: -------------------------------------------------------------------------------- 1 | 2 | ((html_tag) @injection.content 3 | (#set! injection.language "html") 4 | (#set! injection.include-unnamed-children) 5 | (#set! injection.combined)) 6 | 7 | ((latex_block) @injection.content (#set! injection.language "latex") (#set! injection.include-unnamed-children)) 8 | -------------------------------------------------------------------------------- /runtime/queries/smali/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (annotation_directive) 3 | (array_data_directive) 4 | (field_definition) 5 | (method_definition) 6 | (packed_switch_directive) 7 | (param_directive) 8 | (parameter_directive) 9 | (sparse_switch_directive) 10 | (subannotation_directive) 11 | (list) 12 | ] @fold 13 | -------------------------------------------------------------------------------- /runtime/queries/xit/highlights.scm: -------------------------------------------------------------------------------- 1 | (headline) @markup.heading 2 | 3 | (open_checkbox) @markup.list 4 | (ongoing_checkbox) @keyword.control 5 | (checked_checkbox) @diff.plus 6 | (obsolete_checkbox) @comment.unused 7 | 8 | (checked_task) @comment.unused 9 | (obsolete_task) @comment.unused 10 | 11 | (priority) @error 12 | -------------------------------------------------------------------------------- /runtime/queries/d/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (parameters) 3 | (template_parameters) 4 | (expression_statement) 5 | (aggregate_body) 6 | (function_body) 7 | (scope_statement) 8 | (block_statement) 9 | (case_statement) 10 | ] @indent 11 | 12 | [ 13 | (case) 14 | (default) 15 | "}" 16 | "]" 17 | ] @outdent 18 | -------------------------------------------------------------------------------- /runtime/queries/eex/highlights.scm: -------------------------------------------------------------------------------- 1 | ; https://github.com/connorlay/tree-sitter-eex/blob/f742f2fe327463335e8671a87c0b9b396905d1d1/queries/highlights.scm 2 | 3 | ; wrapping in (directive .. ) prevents us from highlighting '%>' in a comment as a keyword 4 | (directive ["<%" "<%=" "<%%" "<%%=" "%>"] @keyword) 5 | 6 | (comment) @comment 7 | -------------------------------------------------------------------------------- /runtime/queries/jsx/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ecma 2 | 3 | [ 4 | (jsx_expression) 5 | ] @rainbow.scope 6 | 7 | (jsx_opening_element ["<" ">"] @rainbow.bracket) @rainbow.scope 8 | (jsx_closing_element [""] @rainbow.bracket) @rainbow.scope 9 | (jsx_self_closing_element ["<" "/>"] @rainbow.bracket) @rainbow.scope 10 | -------------------------------------------------------------------------------- /runtime/queries/unison/tags.scm: -------------------------------------------------------------------------------- 1 | (term_definition 2 | name: (regular_identifier) @name) @definition.function 3 | 4 | (type_declaration 5 | (type_kw) 6 | (type_constructor 7 | ((type_name (regular_identifier) @name)) @definition.type)) 8 | 9 | (ability_declaration 10 | (ability_name) @type _) @definition.type 11 | -------------------------------------------------------------------------------- /runtime/themes/tokyonight_storm.toml: -------------------------------------------------------------------------------- 1 | # Author: Paul Graydon 2 | 3 | inherits = "tokyonight" 4 | 5 | [palette] 6 | border = "#1d202f" 7 | bg = "#24283b" 8 | bg-inlay = "#233745" 9 | bg-selection = "#373d5a" 10 | bg-menu = "#1f2335" 11 | bg-focus = "#2e3c64" 12 | border-highlight = "#29a4bd" 13 | -------------------------------------------------------------------------------- /runtime/queries/jq/locals.scm: -------------------------------------------------------------------------------- 1 | ;; From nvim-treesitter, contributed by @ObserverOfTime et al. 2 | 3 | (funcdef 4 | (identifier) @local.definition.function) 5 | 6 | (funcdefargs 7 | (identifier) @local.definition.variable.parameter) 8 | 9 | (funcname) @local.reference 10 | 11 | (index 12 | (identifier) @local.reference) 13 | -------------------------------------------------------------------------------- /runtime/queries/lpf/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | "SYSCONFIG" 3 | "BLOCK" 4 | "LOCATE" 5 | "COMP" 6 | "FREQUENCY" 7 | "PORT" 8 | "IOBUF" 9 | ] @keyword 10 | 11 | ["SITE"] @keyword.storage 12 | 13 | ["="] @operator 14 | 15 | ((number) @constant.numeric) 16 | 17 | ((string) @string) 18 | ((line_comment) @comment) 19 | 20 | -------------------------------------------------------------------------------- /runtime/queries/mail/textobjects.scm: -------------------------------------------------------------------------------- 1 | (atom_block 2 | (atom) @entry.inside) @entry.around 3 | 4 | (email_address) @entry.around 5 | (header_other 6 | (header_unstructured) @entry.around) 7 | 8 | (quoted_block)+ @comment.around 9 | 10 | (body_block)+ @function.around 11 | 12 | (header_subject 13 | (subject) @function.around) 14 | -------------------------------------------------------------------------------- /runtime/queries/nix/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | (formals 5 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 6 | 7 | (function_expression 8 | body: (_) @function.inside) @function.around 9 | 10 | (binding 11 | (_) @entry.inside) @entry.around 12 | 13 | -------------------------------------------------------------------------------- /runtime/queries/wgsl/tags.scm: -------------------------------------------------------------------------------- 1 | (struct_declaration 2 | name: (identifier) @definition.struct) 3 | 4 | (function_declaration 5 | name: (identifier) @definition.function) 6 | 7 | (global_variable_declaration 8 | (variable_declaration 9 | (variable_identifier_declaration 10 | name: (identifier) @definition.constant))) 11 | -------------------------------------------------------------------------------- /runtime/queries/wgsl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_declaration 2 | body: (_) @function.inside) @function.around 3 | 4 | (struct_declaration) @class.around 5 | 6 | [ 7 | (struct_member) 8 | (parameter) 9 | (variable_declaration) 10 | ] @parameter.around 11 | 12 | (comment) @comment.inside 13 | 14 | (comment)+ @comment.around 15 | -------------------------------------------------------------------------------- /helix-core/src/increment/mod.rs: -------------------------------------------------------------------------------- 1 | mod date_time; 2 | mod integer; 3 | 4 | pub fn integer(selected_text: &str, amount: i64) -> Option { 5 | integer::increment(selected_text, amount) 6 | } 7 | 8 | pub fn date_time(selected_text: &str, amount: i64) -> Option { 9 | date_time::increment(selected_text, amount) 10 | } 11 | -------------------------------------------------------------------------------- /runtime/queries/c/tags.scm: -------------------------------------------------------------------------------- 1 | (function_declarator 2 | declarator: [(identifier) (field_identifier)] @definition.function) 3 | 4 | (preproc_function_def name: (identifier) @definition.function) 5 | 6 | (type_definition 7 | declarator: (type_identifier) @definition.type) 8 | 9 | (preproc_def name: (identifier) @definition.constant) 10 | -------------------------------------------------------------------------------- /runtime/queries/teal/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (do_statement) 3 | (numeric_for_statement) 4 | (generic_for_statement) 5 | (while_statement) 6 | (repeat_statement) 7 | (if_statement) 8 | (function_statement) 9 | (record_declaration) 10 | (interface_declaration) 11 | (enum_declaration) 12 | (anon_function) 13 | (table_constructor) 14 | ] @fold 15 | 16 | -------------------------------------------------------------------------------- /runtime/queries/ungrammar/highlights.scm: -------------------------------------------------------------------------------- 1 | (line_comment) @comment 2 | 3 | (identifier) @function 4 | 5 | (labeled_rule 6 | (identifier) @type) 7 | 8 | (node_rule 9 | (identifier) @variable.parameter) 10 | 11 | (token) @string 12 | 13 | [ 14 | "=" 15 | "|" 16 | ":" 17 | "(" 18 | ")" 19 | "?" 20 | "*" 21 | ] @operator 22 | -------------------------------------------------------------------------------- /runtime/queries/blade/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | 3 | (directive) @keyword.directive 4 | (directive_start) @keyword.directive 5 | (directive_end) @keyword.directive 6 | (comment) @comment 7 | 8 | ; merged with blade punctuation 9 | [ 10 | "{{" 11 | "}}" 12 | "{!!" 13 | "!!}" 14 | "(" 15 | ")" 16 | ] @punctuation.bracket 17 | -------------------------------------------------------------------------------- /runtime/queries/cross-config/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ; https://github.com/cross-rs/cross/blob/main/docs/config_file.md 5 | (pair 6 | (bare_key) @_key (#eq? @_key "pre-build") 7 | (array 8 | (string) @injection.content) 9 | (#set! injection.language "bash")) 10 | -------------------------------------------------------------------------------- /runtime/queries/earthfile/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((line_continuation_comment) @injection.content 5 | (#set! injection.language "comment")) 6 | 7 | ((shell_fragment) @injection.content 8 | (#set! injection.language "bash") 9 | (#set! injection.include-children)) 10 | -------------------------------------------------------------------------------- /runtime/queries/haxe/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | [ 3 | (block) 4 | (function_declaration) 5 | ] @local.scope 6 | 7 | ; Definitions 8 | (function_arg name: (identifier) @local.definition.variable.parameter) 9 | (variable_declaration name: (identifier) @local.definition.variable) 10 | 11 | ; References 12 | (block (identifier)) @local.reference 13 | -------------------------------------------------------------------------------- /runtime/queries/purescript/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | [ 4 | (data) 5 | (type) 6 | (newtype) 7 | ] @class.around 8 | 9 | ((signature)? (function rhs:(_) @function.inside)) @function.around 10 | (exp_lambda) @function.around 11 | 12 | (data (type_variable) @parameter.inside) 13 | (patterns (_) @parameter.inside) 14 | -------------------------------------------------------------------------------- /runtime/queries/shellcheckrc/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | 5 | [ 6 | (disable_directive) 7 | (enable_directive) 8 | (extended_analysis_directive) 9 | (external_sources_directive) 10 | (source_directive) 11 | (source_path_directive) 12 | (shell_directive) 13 | ] @entry.around 14 | -------------------------------------------------------------------------------- /runtime/queries/tsq/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((predicate 5 | name: (identifier) @_name 6 | parameters: 7 | (parameters 8 | (string (string_content) @injection.content))) 9 | (#any-of? @_name "match" "not-match") 10 | (#set! injection.language "regex")) 11 | -------------------------------------------------------------------------------- /runtime/queries/capnp/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (annotation_targets) 3 | (const_list) 4 | (enum) 5 | (interface) 6 | (implicit_generics) 7 | (generics) 8 | (group) 9 | (method_parameters) 10 | (named_return_types) 11 | (struct) 12 | (struct_shorthand) 13 | (union) 14 | ] @indent 15 | 16 | [ 17 | "}" 18 | ")" 19 | ] @outdent 20 | -------------------------------------------------------------------------------- /runtime/queries/julia/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (module_definition) 3 | (struct_definition) 4 | (macro_definition) 5 | (function_definition) 6 | (if_statement) 7 | (try_statement) 8 | (for_statement) 9 | (while_statement) 10 | (let_statement) 11 | (quote_statement) 12 | (do_clause) 13 | (compound_statement) ; begin block 14 | ] @fold 15 | -------------------------------------------------------------------------------- /runtime/queries/kotlin/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (import_list) 3 | 4 | (when_expression) 5 | (control_structure_body) 6 | 7 | (lambda_literal) 8 | (function_body) 9 | (primary_constructor) 10 | (secondary_constructor) 11 | (anonymous_initializer) 12 | 13 | (class_body) 14 | (enum_class_body) 15 | 16 | (interpolated_expression) 17 | ] @fold 18 | -------------------------------------------------------------------------------- /runtime/queries/wesl/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (global_decl) 5 | (switch_body) 6 | (compound_statement) 7 | ] @local.scope 8 | 9 | ; Definitions 10 | 11 | (param 12 | (identifier) @local.definition.variable.parameter) 13 | 14 | ; References 15 | 16 | (identifier) @local.reference 17 | ; (type_specifier) @local.reference 18 | 19 | -------------------------------------------------------------------------------- /runtime/queries/crystal/injections.scm: -------------------------------------------------------------------------------- 1 | ((heredoc_body 2 | (literal_content) @injection.content 3 | (heredoc_end) @name 4 | (#set! injection.language "sql")) 5 | (#eq? @name "SQL")) 6 | 7 | ((heredoc_body 8 | (literal_content) @injection.content 9 | (heredoc_end) @name 10 | (#set! injection.language "html")) 11 | (#eq? @name "HTML")) 12 | -------------------------------------------------------------------------------- /runtime/queries/doxyfile/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.line 2 | 3 | (identifier) @variable 4 | 5 | (boolean) @constant.builtin.boolean 6 | (number) @constant.numeric.integer 7 | [ 8 | (unquoted_string) 9 | (quoted_string) 10 | ] @string 11 | 12 | [ 13 | "\\" 14 | ] @punctuation.delimiter 15 | 16 | [ 17 | "=" 18 | "+=" 19 | ] @operator 20 | -------------------------------------------------------------------------------- /runtime/queries/hare/locals.scm: -------------------------------------------------------------------------------- 1 | (sub_unit) @local.scope 2 | 3 | (function_declaration) @local.scope 4 | (compound_expression) @local.scope 5 | 6 | (function_declaration 7 | (identifier) @local.definition.function) 8 | (function_declaration 9 | (parameter (name) @local.definition.variable.parameter)) 10 | 11 | (identifier) @local.reference 12 | 13 | -------------------------------------------------------------------------------- /runtime/queries/html/textobjects.scm: -------------------------------------------------------------------------------- 1 | (script_element (start_tag) (_) @xml-element.inside (end_tag)) @xml-element.around 2 | 3 | (style_element (start_tag) (_) @xml-element.inside (end_tag)) @xml-element.around 4 | 5 | (element (start_tag) (_)* @xml-element.inside (end_tag)) 6 | 7 | (element) @xml-element.around 8 | 9 | (comment) @comment.around 10 | -------------------------------------------------------------------------------- /runtime/queries/meson/indents.scm: -------------------------------------------------------------------------------- 1 | ; Indentation queries for helix 2 | [ 3 | (function_expression) 4 | (array_literal) 5 | (dictionary_literal) 6 | (selection_statement) 7 | (iteration_statement) 8 | ] @indent 9 | 10 | ; question - what about else, elif 11 | [ 12 | ")" 13 | "]" 14 | "}" 15 | (endif) 16 | (endforeach) 17 | ] @outdent 18 | -------------------------------------------------------------------------------- /runtime/queries/pascal/textobjects.scm: -------------------------------------------------------------------------------- 1 | 2 | (declType (declClass (declSection) @class.inside)) @class.around 3 | 4 | (defProc body: (_) @function.inside) @function.around 5 | 6 | (declArgs (_) @parameter.inside) @parameter.around 7 | (exprArgs (_) @parameter.inside) @parameter.around 8 | 9 | (comment) @comment.inside 10 | (comment)+ @comment.around 11 | -------------------------------------------------------------------------------- /runtime/queries/typespec/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (model_expression) 3 | (tuple_expression) 4 | (namespace_body) 5 | (interface_body) 6 | (union_body) 7 | (enum_body) 8 | (template_arguments) 9 | (template_parameters) 10 | (operation_arguments) 11 | ] @indent.begin 12 | 13 | [ 14 | "}" 15 | ")" 16 | ">" 17 | "]" 18 | ] @indent.end 19 | -------------------------------------------------------------------------------- /runtime/queries/dart/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | ;------- 3 | 4 | [ 5 | (block) 6 | (try_statement) 7 | (catch_clause) 8 | (finally_clause) 9 | ] @local.scope 10 | 11 | ; Definitions 12 | ;------------ 13 | 14 | (class_definition 15 | body: (_) @local.definition.type) 16 | 17 | ; References 18 | ;------------ 19 | 20 | (identifier) @local.reference 21 | -------------------------------------------------------------------------------- /runtime/queries/nix/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (formals) 3 | (parenthesized_expression) 4 | (attrset_expression) 5 | (let_attrset_expression) 6 | (rec_attrset_expression) 7 | (inherit_from) 8 | (interpolation) 9 | (list_expression) 10 | ] @rainbow.scope 11 | 12 | [ 13 | "${" 14 | "{" "}" 15 | "(" ")" 16 | "[" "]" 17 | ] @rainbow.bracket 18 | -------------------------------------------------------------------------------- /runtime/queries/protobuf/tags.scm: -------------------------------------------------------------------------------- 1 | (message_name (identifier) @definition.class) 2 | 3 | (enum_name (identifier) @definition.class) 4 | 5 | (service_name (identifier) @definition.class) 6 | 7 | (rpc_name (identifier) @definition.function) 8 | 9 | (enum_variant_name (identifier) @definition.constant) 10 | 11 | (field_name (identifier) @definition.constant) 12 | -------------------------------------------------------------------------------- /runtime/queries/ripple/brackets.scm: -------------------------------------------------------------------------------- 1 | ; Bracket pairs for cursor navigation 2 | (jsx_opening_element 3 | "<" @open 4 | ">" @close) 5 | 6 | (jsx_closing_element 7 | "" @close) 9 | 10 | (jsx_self_closing_element 11 | "<" @open 12 | "/>" @close) 13 | 14 | ("(" @open ")" @close) 15 | ("[" @open "]" @close) 16 | ("{" @open "}" @close) 17 | -------------------------------------------------------------------------------- /runtime/queries/tablegen/textobjects.scm: -------------------------------------------------------------------------------- 1 | (class 2 | body: (_) @class.inside) @class.around 3 | 4 | (multiclass 5 | body: (_) @class.inside) @class.around 6 | 7 | (_ argument: _ @parameter.inside) 8 | 9 | [ 10 | (comment) 11 | (multiline_comment) 12 | ] @comment.inside 13 | 14 | (comment)+ @comment.around 15 | 16 | (multiline_comment) @comment.around 17 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | # Flake's devShell for non-flake-enabled nix instances 2 | let 3 | compat = builtins.fetchTarball { 4 | url = "https://github.com/edolstra/flake-compat/archive/b4a34015c698c7793d592d66adbab377907a2be8.tar.gz"; 5 | sha256 = "sha256:1qc703yg0babixi6wshn5wm2kgl5y1drcswgszh4xxzbrwkk9sv7"; 6 | }; 7 | in 8 | (import compat {src = ./.;}).shellNix.default 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform normalization 2 | * text=auto 3 | 4 | *.rs text diff=rust 5 | *.toml text diff=toml 6 | 7 | *.scm text diff=scheme 8 | *.md text diff=markdown 9 | 10 | book/theme/highlight.js linguist-vendored 11 | runtime/queries/**/*.scm linguist-language=Tree-sitter-Query 12 | Cargo.lock binary 13 | -------------------------------------------------------------------------------- /runtime/queries/ada/locals.scm: -------------------------------------------------------------------------------- 1 | (compilation) @local.scope 2 | (package_declaration) @local.scope 3 | (package_body) @local.scope 4 | (subprogram_declaration) @local.scope 5 | (subprogram_body) @local.scope 6 | (block_statement) @local.scope 7 | 8 | (parameter_specification . (identifier) @local.definition.variable.parameter) 9 | 10 | (identifier) @local.reference 11 | -------------------------------------------------------------------------------- /runtime/queries/kotlin/tags.scm: -------------------------------------------------------------------------------- 1 | (class_declaration 2 | (type_identifier) @definition.class) 3 | 4 | (object_declaration 5 | "object" (type_identifier) @definition.class) 6 | 7 | (function_declaration 8 | (simple_identifier) @definition.function) 9 | 10 | (property_declaration 11 | (variable_declaration 12 | (simple_identifier) @definition.constant)) 13 | -------------------------------------------------------------------------------- /runtime/queries/ruby/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (argument_list) 3 | (array) 4 | (begin) 5 | (block) 6 | (call) 7 | (class) 8 | (case) 9 | (elsif) 10 | (if) 11 | (hash) 12 | (method) 13 | (module) 14 | (singleton_class) 15 | (singleton_method) 16 | ] @indent 17 | 18 | [ 19 | ")" 20 | "}" 21 | "]" 22 | "end" 23 | "when" 24 | ] @outdent 25 | -------------------------------------------------------------------------------- /runtime/queries/wast/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: wat 2 | 3 | [ 4 | "assert_return" 5 | "assert_trap" 6 | "assert_exhaustion" 7 | "assert_malformed" 8 | "assert_invalid" 9 | "assert_unlinkable" 10 | "assert_trap" 11 | 12 | "invoke" 13 | "get" 14 | 15 | "script" 16 | "input" 17 | "output" 18 | 19 | "binary" 20 | "quote" 21 | ] @keyword 22 | -------------------------------------------------------------------------------- /runtime/queries/regex/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (lookahead_assertion) 3 | (character_class) 4 | (anonymous_capturing_group) 5 | (named_capturing_group) 6 | (non_capturing_group) 7 | (count_quantifier) 8 | (character_class_escape) 9 | ] @rainbow.scope 10 | 11 | [ 12 | "(?" "(?:" 13 | "(?<" ">" 14 | "(" ")" 15 | "[" "]" 16 | "{" "}" 17 | ] @rainbow.bracket 18 | -------------------------------------------------------------------------------- /runtime/queries/solidity/locals.scm: -------------------------------------------------------------------------------- 1 | (function_definition) @local.scope 2 | (constructor_definition) @local.scope 3 | (block_statement) @local.scope 4 | 5 | (function_definition (parameter name: (identifier) @local.definition.variable.parameter)) 6 | (constructor_definition (parameter name: (identifier) @local.definition.variable.parameter)) 7 | 8 | (identifier) @local.reference 9 | -------------------------------------------------------------------------------- /runtime/queries/sway/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (function_item) 5 | (closure_expression) 6 | (block) 7 | ] @local.scope 8 | 9 | ; Definitions 10 | 11 | (parameter 12 | (identifier) @local.definition.variable.parameter) 13 | 14 | (closure_parameters (identifier) @local.definition.variable.parameter) 15 | 16 | ; References 17 | (identifier) @local.reference 18 | -------------------------------------------------------------------------------- /runtime/queries/unison/textobjects.scm: -------------------------------------------------------------------------------- 1 | (term_declaration) @function.around 2 | 3 | (type_declaration) @class.inside 4 | (record) @class.inside 5 | 6 | (comment) @comment.inside 7 | (comment)+ @comment.around 8 | 9 | (doc_block) @comment.around 10 | 11 | (literal_list) @entry.around 12 | 13 | (parenthesized_or_tuple_pattern) @entry.around 14 | 15 | (pattern) @entry.around 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Enhancement 3 | about: Suggest an improvement 4 | title: '' 5 | labels: C-enhancement 6 | assignees: '' 7 | --- 8 | 9 | 14 | -------------------------------------------------------------------------------- /runtime/queries/cpp/tags.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | 3 | (function_declarator 4 | declarator: (qualified_identifier name: (identifier) @definition.function)) 5 | 6 | (struct_specifier 7 | name: (type_identifier) @definition.struct 8 | body: (field_declaration_list)) 9 | 10 | (class_specifier 11 | name: (type_identifier) @definition.class 12 | body: (field_declaration_list)) 13 | -------------------------------------------------------------------------------- /runtime/queries/json5/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (true) 3 | (false) 4 | ] @constant.builtin.boolean 5 | (null) @constant.builtin 6 | (number) @constant.numeric 7 | 8 | (string) @string 9 | (comment) @comment 10 | 11 | (member 12 | name: (_) @variable.other.member) 13 | 14 | "," @punctuation.delimiter 15 | [ 16 | "[" 17 | "]" 18 | "{" 19 | "}" 20 | ] @punctuation.bracket 21 | -------------------------------------------------------------------------------- /runtime/queries/php/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (array_creation_expression) 3 | (arguments) 4 | (formal_parameters) 5 | (compound_statement) 6 | (declaration_list) 7 | (binary_expression) 8 | (return_statement) 9 | (expression_statement) 10 | (switch_block) 11 | (anonymous_function_use_clause) 12 | ] @indent 13 | 14 | [ 15 | "}" 16 | ")" 17 | "]" 18 | ] @outdent 19 | -------------------------------------------------------------------------------- /runtime/queries/cylc/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (top_section) 3 | (sub_section_1) 4 | (sub_section_2) 5 | (graph_section) 6 | (runtime_section) 7 | (task_section) 8 | ] @indent 9 | 10 | [ 11 | (top_section) 12 | (sub_section_1) 13 | (sub_section_2) 14 | (graph_section) 15 | (runtime_section) 16 | (task_section) 17 | ] @extend 18 | 19 | (line_continuation) @indent.always 20 | -------------------------------------------------------------------------------- /runtime/queries/gherkin/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (feature_keyword) 3 | (rule_keyword) 4 | (background_keyword) 5 | (scenario_keyword) 6 | (given_keyword) 7 | (when_keyword) 8 | (then_keyword) 9 | (and_keyword) 10 | (but_keyword) 11 | (asterisk_keyword) 12 | ] @keyword 13 | 14 | (tag) @function 15 | (doc_string) @string 16 | (data_table) @special 17 | (comment) @comment 18 | -------------------------------------------------------------------------------- /runtime/queries/crystal/locals.scm: -------------------------------------------------------------------------------- 1 | ((method_def) @local.scope 2 | (#set! local.scope-inherits false)) 3 | ((fun_def) @local.scope 4 | (#set! local.scope-inherits false)) 5 | 6 | (block) @local.scope 7 | 8 | (param 9 | name: (identifier) @local.definition.variable.parameter) 10 | 11 | (assign 12 | lhs: (identifier) @local.definition.variable) 13 | 14 | (identifier) @local.reference 15 | -------------------------------------------------------------------------------- /runtime/queries/glsl/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (init_declarator) 3 | (compound_statement) 4 | (preproc_arg) 5 | (field_declaration_list) 6 | (case_statement) 7 | (conditional_expression) 8 | (enumerator_list) 9 | (struct_specifier) 10 | (compound_literal_expression) 11 | ] @indent 12 | 13 | [ 14 | "#define" 15 | "#ifdef" 16 | "#endif" 17 | "{" 18 | "}" 19 | ] @outdent 20 | -------------------------------------------------------------------------------- /runtime/queries/lua/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_definition) 3 | (function_declaration) 4 | (method_index_expression) 5 | (field) 6 | (if_statement) 7 | (for_statement) 8 | (repeat_statement) 9 | (while_statement) 10 | (table_constructor) 11 | (arguments) 12 | (do_statement) 13 | ] @indent 14 | 15 | [ 16 | "end" 17 | "until" 18 | "}" 19 | ")" 20 | ] @outdent 21 | -------------------------------------------------------------------------------- /runtime/queries/bash/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_definition) 3 | (compound_statement) 4 | (subshell) 5 | (test_command) 6 | (subscript) 7 | (parenthesized_expression) 8 | (array) 9 | (expansion) 10 | (command_substitution) 11 | ] @rainbow.scope 12 | 13 | [ 14 | "(" ")" 15 | "((" "))" 16 | "${" "$(" 17 | "{" "}" 18 | "[" "]" 19 | "[[" "]]" 20 | ] @rainbow.bracket 21 | -------------------------------------------------------------------------------- /runtime/queries/wgsl/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (struct_declaration) 3 | (function_declaration) 4 | (attribute) 5 | (type_declaration) 6 | (compound_statement) 7 | (argument_list_expression) 8 | (postfix_expression) 9 | (variable_qualifier) 10 | (subscript_expression) 11 | (parenthesized_expression) 12 | ] @rainbow.scope 13 | 14 | ["(" ")" "[" "]" "{" "}" "<" ">"] @rainbow.bracket 15 | -------------------------------------------------------------------------------- /runtime/queries/gleam/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function 2 | parameters: (function_parameters (function_parameter)? @parameter.inside) 3 | body: (block) @function.inside) @function.around 4 | 5 | (anonymous_function 6 | body: (block) @function.inside) @function.around 7 | 8 | ((function 9 | name: (identifier) @_name 10 | body: (block) @test.inside) @test.around 11 | (#match? @_name "_test$")) 12 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir-yaml/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | 3 | ((document (block_node (block_scalar) @injection.content)) 4 | (#set! injection.language "llvm")) 5 | 6 | ((document (block_node (block_mapping (block_mapping_pair 7 | key: (flow_node (plain_scalar (string_scalar))) ; "body" 8 | value: (block_node (block_scalar) @injection.content))))) 9 | (#set! injection.language "mir")) 10 | -------------------------------------------------------------------------------- /runtime/queries/erlang/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | ; () 3 | (arguments "(" ")") 4 | (parenthesized_expression) 5 | (function_type) 6 | ; #{} 7 | (record) 8 | (map) 9 | ; {} 10 | (map_update) 11 | (tuple) 12 | ; <<>> 13 | (bitstring) 14 | ; [] 15 | (list) 16 | ] @rainbow.scope 17 | 18 | [ 19 | "#" 20 | "{" "}" 21 | "(" ")" 22 | "[" "]" 23 | "<<" ">>" 24 | ] @rainbow.bracket 25 | -------------------------------------------------------------------------------- /runtime/queries/json/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (true) 3 | (false) 4 | ] @constant.builtin.boolean 5 | (null) @constant.builtin 6 | (number) @constant.numeric 7 | 8 | (string) @string 9 | (escape_sequence) @constant.character.escape 10 | 11 | (pair 12 | key: (_) @variable.other.member) 13 | 14 | "," @punctuation.delimiter 15 | [ 16 | "[" 17 | "]" 18 | "{" 19 | "}" 20 | ] @punctuation.bracket 21 | -------------------------------------------------------------------------------- /runtime/queries/protobuf/textobjects.scm: -------------------------------------------------------------------------------- 1 | (message (message_body) @class.inside) @class.around 2 | (enum (enum_body) @class.inside) @class.around 3 | (service (service_body) @class.inside) @class.around 4 | 5 | (rpc (message_or_enum_type) @parameter.inside) @function.inside 6 | (rpc (message_or_enum_type) @parameter.around) @function.around 7 | 8 | (comment) @comment.inside 9 | (comment)+ @comment.around 10 | -------------------------------------------------------------------------------- /runtime/themes/flexoki_dark.toml: -------------------------------------------------------------------------------- 1 | inherits = "flexoki_light" 2 | 3 | [palette] 4 | tx = "#CECDC3" 5 | tx-2 = "#878580" 6 | tx-3 = "#575653" 7 | ui-3 = "#403E3C" 8 | ui-2 = "#343331" 9 | ui = "#282726" 10 | bg-2 = "#1C1B1A" 11 | bg = "#100F0F" 12 | 13 | re = "#D14D41" 14 | or = "#DA702C" 15 | ye = "#D0A215" 16 | gr = "#879A39" 17 | cy = "#3AA99F" 18 | bl = "#4385BE" 19 | pu = "#8B7EC8" 20 | ma = "#CE5D97" 21 | -------------------------------------------------------------------------------- /runtime/queries/eex/injections.scm: -------------------------------------------------------------------------------- 1 | ; https://github.com/connorlay/tree-sitter-eex/blob/f742f2fe327463335e8671a87c0b9b396905d1d1/queries/injections.scm 2 | 3 | ((directive (expression) @injection.content) 4 | (#set! injection.language "elixir")) 5 | 6 | ((partial_expression) @injection.content 7 | (#set! injection.language "elixir") 8 | (#set! injection.include-children) 9 | (#set! injection.combined)) 10 | -------------------------------------------------------------------------------- /runtime/queries/php/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (declaration_list) 3 | (compound_statement) 4 | (array_creation_expression) 5 | (subscript_expression) 6 | (parenthesized_expression) 7 | (formal_parameters) 8 | (arguments) 9 | (catch_clause) 10 | (foreach_statement) 11 | (switch_block) 12 | (anonymous_function_use_clause) 13 | ] @rainbow.scope 14 | 15 | ["(" ")" "[" "]" "{" "}"] @rainbow.bracket 16 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_material_dark_hard.toml: -------------------------------------------------------------------------------- 1 | # Gruvbox Material Dark Hard for Helix 2 | # Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material) 3 | # Base theme ported by: @satoqz 4 | # Palette ported by: @ivan-shymkiv 5 | # License: MIT 6 | 7 | inherits = "gruvbox_material_dark_medium" 8 | 9 | [palette] 10 | bg0 = "#1d2021" 11 | bg1 = "#282828" 12 | bg2 = "#3c3836" 13 | bg3 = "#504945" 14 | -------------------------------------------------------------------------------- /runtime/queries/scala/locals.scm: -------------------------------------------------------------------------------- 1 | (template_body) @local.scope 2 | (lambda_expression) @local.scope 3 | 4 | 5 | (function_declaration 6 | name: (identifier) @local.definition.function) @local.scope 7 | 8 | (function_definition 9 | name: (identifier) @local.definition.function) 10 | 11 | (parameter 12 | name: (identifier) @local.definition.variable.parameter) 13 | 14 | (identifier) @local.reference 15 | -------------------------------------------------------------------------------- /runtime/queries/typescript/rainbows.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ecma 2 | 3 | [ 4 | (import_require_clause) 5 | (enum_body) 6 | (lookup_type) 7 | (parenthesized_type) 8 | (object_type) 9 | (type_parameters) 10 | (index_signature) 11 | (array_type) 12 | (tuple_type) 13 | ] @rainbow.scope 14 | 15 | (type_arguments ["<" ">"] @rainbow.bracket) @rainbow.scope 16 | 17 | [ 18 | "{|" "|}" 19 | ] @rainbow.bracket 20 | -------------------------------------------------------------------------------- /runtime/themes/material_palenight.toml: -------------------------------------------------------------------------------- 1 | # Material Theme for Helix Editor 2 | 3 | inherits = "material_deep_ocean" 4 | 5 | [palette] 6 | bg = "#292d3e" 7 | text = "#a6accd" 8 | 9 | disabled = "#515772" 10 | 11 | accent = "#ab47bc" 12 | 13 | active = "#414863" 14 | highlight = "#444267" 15 | 16 | comment = "#676e95" 17 | 18 | selection = "#444267" 19 | 20 | line-number = "#3a3f58" 21 | -------------------------------------------------------------------------------- /helix-parsec/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "helix-parsec" 3 | description = "Parser combinators for Helix" 4 | include = ["src/**/*", "README.md"] 5 | version.workspace = true 6 | authors.workspace = true 7 | edition.workspace = true 8 | license.workspace = true 9 | rust-version.workspace = true 10 | categories.workspace = true 11 | repository.workspace = true 12 | homepage.workspace = true 13 | 14 | [dependencies] 15 | -------------------------------------------------------------------------------- /runtime/queries/eiffel/textobjects.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (comment)+ 3 | (header_comment)+ 4 | ] @comment.around 5 | [ 6 | (comment) 7 | (header_comment) 8 | ] @comment.inside 9 | (formal_arguments) @parameter.around 10 | (entity_declaration_group) @parameter.inside 11 | (attribute_or_routine) @function.around 12 | (feature_body) @function.inside 13 | (class_declaration) @class.around 14 | (feature_clause) @class.inside 15 | 16 | -------------------------------------------------------------------------------- /runtime/queries/kconfig/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (symbol) 3 | (string) 4 | ] @local.reference 5 | 6 | [ 7 | (config) 8 | (menuconfig) 9 | (choice) 10 | (comment_entry) 11 | (menu) 12 | (if) 13 | ] @local.scope 14 | 15 | (type_definition (string) @local.definition.type) 16 | (type_definition (input_prompt (string) @local.definition.type)) 17 | (type_definition_default (expression (string) @local.definition.type)) 18 | -------------------------------------------------------------------------------- /runtime/queries/perl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (subroutine_declaration_statement 2 | body: (_) @function.inside) @function.around 3 | (anonymous_subroutine_expression 4 | body: (_) @function.inside) @function.around 5 | 6 | (package_statement) @class.around 7 | (package_statement 8 | (block) @class.inside) 9 | 10 | (list_expression 11 | (_) @parameter.inside) 12 | 13 | (comment) @comment.around 14 | (pod) @comment.around 15 | -------------------------------------------------------------------------------- /runtime/queries/swift/injections.scm: -------------------------------------------------------------------------------- 1 | ; Upstream: https://github.com/alex-pinkus/tree-sitter-swift/blob/57c1c6d6ffa1c44b330182d41717e6fe37430704/queries/injections.scm 2 | 3 | ; Parse regex syntax within regex literals 4 | 5 | ((regex_literal) @injection.content 6 | (#set! injection.language "regex")) 7 | 8 | ((comment) @injection.content 9 | (#set! injection.language "comment") 10 | (#set! injection.include-children)) 11 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_material_dark_soft.toml: -------------------------------------------------------------------------------- 1 | # Gruvbox Material Dark Soft for Helix 2 | # Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material) 3 | # Base theme ported by: @satoqz 4 | # Palette ported by: @ivan-shymkiv 5 | # License: MIT 6 | 7 | inherits = "gruvbox_material_dark_medium" 8 | 9 | [palette] 10 | bg0 = "#32302f" 11 | bg1 = "#3c3836" 12 | bg2 = "#504945" 13 | bg3 = "#665c54" 14 | bg4 = "#5b534d" 15 | -------------------------------------------------------------------------------- /runtime/themes/material_darker.toml: -------------------------------------------------------------------------------- 1 | # Material Theme for Helix Editor 2 | 3 | inherits = "material_deep_ocean" 4 | 5 | [palette] 6 | bg = "#212121" 7 | text = "#b0bec5" 8 | 9 | gray = "#616161" 10 | error = "#ff5370" 11 | 12 | disabled = "#474747" 13 | 14 | accent = "#ff9800" 15 | 16 | active = "#323232" 17 | highlight = "#3f3f3f" 18 | 19 | comment = "#616161" 20 | 21 | selection = "#404040" 22 | -------------------------------------------------------------------------------- /runtime/queries/cython/tags.scm: -------------------------------------------------------------------------------- 1 | (module (expression_statement (assignment left: (identifier) @name) @definition.constant)) 2 | 3 | (class_definition 4 | name: (identifier) @name) @definition.class 5 | 6 | (function_definition 7 | name: (identifier) @name) @definition.function 8 | 9 | (call 10 | function: [ 11 | (identifier) @name 12 | (attribute 13 | attribute: (identifier) @name) 14 | ]) @reference.call 15 | -------------------------------------------------------------------------------- /runtime/queries/python/tags.scm: -------------------------------------------------------------------------------- 1 | (module (expression_statement (assignment left: (identifier) @name) @definition.constant)) 2 | 3 | (class_definition 4 | name: (identifier) @name) @definition.class 5 | 6 | (function_definition 7 | name: (identifier) @name) @definition.function 8 | 9 | (call 10 | function: [ 11 | (identifier) @name 12 | (attribute 13 | attribute: (identifier) @name) 14 | ]) @reference.call 15 | -------------------------------------------------------------------------------- /runtime/queries/uxntal/highlights.scm: -------------------------------------------------------------------------------- 1 | ; highlights.scm 2 | 3 | (identifier) @keyword 4 | (number) @constant.numeric 5 | (comment) @comment 6 | (raw_character) @constant.character 7 | (literal_hex) @constant.numeric.integer 8 | (macro_definition) @function 9 | (label_definition) @label 10 | (sub_label_definition) @label 11 | (relative_pad) @constant 12 | (label) @label 13 | (sub_label) @label 14 | ["[" "]" "{" "}"] @punctuation.bracket 15 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_material_light_hard.toml: -------------------------------------------------------------------------------- 1 | # Gruvbox Material Light Hard for Helix 2 | # Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material) 3 | # Base theme ported by: @satoqz 4 | # Palette ported by: @ivan-shymkiv 5 | # License: MIT 6 | 7 | inherits = "gruvbox_material_light_medium" 8 | 9 | [palette] 10 | bg0 = "#f9f5d7" 11 | bg1 = "#f5edca" 12 | bg2 = "#f2e5bc" 13 | bg3 = "#ebdbb2" 14 | bg4 = "#eee0b7" 15 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_material_light_soft.toml: -------------------------------------------------------------------------------- 1 | # Gruvbox Material Light Soft for Helix 2 | # Original Author: @sainnhe (https://github.com/sainnhe/gruvbox-material) 3 | # Base theme ported by: @satoqz 4 | # Palette ported by: @ivan-shymkiv 5 | # License: MIT 6 | 7 | inherits = "gruvbox_material_light_medium" 8 | 9 | [palette] 10 | bg0 = "#f2e5bc" 11 | bg1 = "#eddeb5" 12 | bg2 = "#e6d5ae" 13 | bg3 = "#d5c4a1" 14 | bg4 = "#dac9a5" 15 | -------------------------------------------------------------------------------- /runtime/queries/crystal/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (param_list) 3 | (array) 4 | (block) 5 | (call) 6 | (class_def) 7 | (struct_def) 8 | (module_def) 9 | (enum_def) 10 | (lib_def) 11 | (fun_def) 12 | (method_def) 13 | (case) 14 | (select) 15 | (elsif) 16 | (if) 17 | (unless) 18 | (hash) 19 | (tuple) 20 | ] @indent 21 | 22 | [ 23 | ")" 24 | "}" 25 | "]" 26 | "end" 27 | "when" 28 | "in" 29 | ] @outdent 30 | -------------------------------------------------------------------------------- /runtime/queries/haskell/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | (quasiquote 5 | (quoter) @_quoter 6 | ((quasiquote_body) @injection.content 7 | (#match? @_quoter "(persistWith|persistLowerCase|persistUpperCase)") 8 | (#set! injection.language "haskell-persistent") 9 | ) 10 | ) 11 | 12 | (quasiquote 13 | (quoter) @injection.language 14 | (quasiquote_body) @injection.content) 15 | -------------------------------------------------------------------------------- /helix-core/src/snippets.rs: -------------------------------------------------------------------------------- 1 | mod active; 2 | mod elaborate; 3 | mod parser; 4 | mod render; 5 | 6 | #[derive(PartialEq, Eq, Hash, Debug, PartialOrd, Ord, Clone, Copy)] 7 | pub struct TabstopIdx(usize); 8 | pub const LAST_TABSTOP_IDX: TabstopIdx = TabstopIdx(usize::MAX); 9 | 10 | pub use active::ActiveSnippet; 11 | pub use elaborate::{Snippet, SnippetElement, Transform}; 12 | pub use render::RenderedSnippet; 13 | pub use render::SnippetRenderCtx; 14 | -------------------------------------------------------------------------------- /runtime/queries/elixir/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (interpolation) 4 | (list) 5 | (tuple) 6 | (bitstring) 7 | (map) 8 | ; short-hand function captures like &(&1 + &2) 9 | (unary_operator 10 | operator: "&") 11 | (arguments "(" ")") 12 | (access_call) 13 | (sigil) 14 | ] @rainbow.scope 15 | 16 | [ 17 | "(" ")" 18 | "%" 19 | "{" "}" 20 | "[" "]" 21 | "<<" ">>" 22 | "#{" 23 | "|" 24 | ] @rainbow.bracket 25 | -------------------------------------------------------------------------------- /runtime/queries/rshtml/injections.scm: -------------------------------------------------------------------------------- 1 | ((html_text) @injection.content 2 | (#set! injection.language "html") 3 | (#set! injection.include-children) 4 | (#set! injection.combined)) 5 | 6 | ((rust_text) @injection.content 7 | (#set! injection.language "rust") 8 | (#set! injection.include-children) 9 | (#not-match? @injection.content "^else")) 10 | 11 | ((comment_block) @injection.content 12 | (#set! injection.language "comment")) 13 | -------------------------------------------------------------------------------- /runtime/queries/scala/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (arguments) 4 | (parameter) 5 | (class_definition) 6 | (trait_definition) 7 | (object_definition) 8 | (function_definition) 9 | (val_definition) 10 | (import_declaration) 11 | (while_expression) 12 | (do_while_expression) 13 | (for_expression) 14 | (try_expression) 15 | (match_expression) 16 | ] @indent 17 | 18 | [ 19 | "}" 20 | "]" 21 | ")" 22 | ] @outdent 23 | -------------------------------------------------------------------------------- /runtime/queries/wren/textobjects.scm: -------------------------------------------------------------------------------- 1 | (class_definition 2 | (class_body) @class.inside) @class.around 3 | 4 | (call_expression 5 | (call_body 6 | (_) @function.inside) @function.around) 7 | 8 | (method_definition 9 | body: (_) @function.inside) @function.around 10 | 11 | (parameter_list 12 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 13 | 14 | (comment) @comment.inside 15 | 16 | (comment)+ @comment.around 17 | -------------------------------------------------------------------------------- /runtime/themes/material_oceanic.toml: -------------------------------------------------------------------------------- 1 | # Material Theme for Helix Editor 2 | 3 | inherits = "material_deep_ocean" 4 | 5 | [palette] 6 | bg = "#25363b" 7 | text = "#b0bec5" 8 | 9 | gray = "#546e7a" 10 | 11 | disabled = "#415967" 12 | 13 | accent = "#009688" 14 | 15 | active = "#314549" 16 | highlight = "#425b67" 17 | 18 | comment = "#546e7a" 19 | 20 | selection = "#395b65" 21 | 22 | line-number = "#355058" 23 | -------------------------------------------------------------------------------- /runtime/queries/ada/folds.scm: -------------------------------------------------------------------------------- 1 | ; Support for folding in Ada 2 | ;; za toggles folding a package, subprogram, if statement or loop 3 | 4 | [ 5 | (package_declaration) 6 | (generic_package_declaration) 7 | (package_body) 8 | (subprogram_declaration) 9 | (subprogram_body) 10 | (block_statement) 11 | (if_statement) 12 | (loop_statement) 13 | (gnatprep_declarative_if_statement) 14 | (gnatprep_if_statement) 15 | ] @fold 16 | -------------------------------------------------------------------------------- /runtime/queries/matlab/textobjects.scm: -------------------------------------------------------------------------------- 1 | (arguments ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 2 | (function_arguments ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 3 | 4 | (lambda expression: (_) @function.inside) @function.around 5 | (function_definition (block) @function.inside) @function.around 6 | 7 | (class_definition) @class.inside @class.around 8 | 9 | (comment) @comment.inside @comment.around 10 | -------------------------------------------------------------------------------- /runtime/queries/ldif/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | 3 | (attributeType) @type.parameter 4 | 5 | ((distinguishedName 6 | (name 7 | (name_componet 8 | (attributeTypeAndValue 9 | (attributeType) @comment 10 | (string) @type.parameter 11 | )))) @comment) 12 | 13 | 14 | (dn_spec) @constant 15 | (changerecord) @constant 16 | (mod_spec) @constant 17 | 18 | (change_modify) @string 19 | 20 | (value_spec) @keyword 21 | -------------------------------------------------------------------------------- /runtime/queries/caddyfile/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | (directive 5 | name: (directive_name) @parameter.inside) @parameter.around 6 | 7 | (global_options 8 | "{" (_)* @class.inside "}") @class.around 9 | 10 | (snippet_definition 11 | (block) @class.inside) @class.around 12 | 13 | (named_route 14 | (block) @class.inside) @class.around 15 | 16 | (site_definition (block) @class.inside) @class.around 17 | -------------------------------------------------------------------------------- /book/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | authors = ["Blaž Hrastnik"] 3 | language = "en" 4 | src = "src" 5 | 6 | [output.html] 7 | cname = "docs.helix-editor.com" 8 | default-theme = "colibri" 9 | preferred-dark-theme = "colibri" 10 | git-repository-url = "https://github.com/helix-editor/helix" 11 | edit-url-template = "https://github.com/helix-editor/helix/edit/master/book/{path}" 12 | additional-css = ["custom.css"] 13 | 14 | [output.html.search] 15 | use-boolean-and = true 16 | -------------------------------------------------------------------------------- /runtime/queries/svelte/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (element) 3 | (start_tag) 4 | (if_statement) 5 | (else_if_block) 6 | (else_block) 7 | (then_block) 8 | (each_statement) 9 | (key_statement) 10 | (snippet_statement) 11 | (await_statement) 12 | (style_element) 13 | (script_element) 14 | (expression) 15 | ] @indent 16 | 17 | [ 18 | (end_tag) 19 | (if_end) 20 | (each_end) 21 | (await_end) 22 | (key_end) 23 | (snippet_end) 24 | ] @outdent 25 | -------------------------------------------------------------------------------- /runtime/queries/nix/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (indented_string_expression) 3 | (string_expression) 4 | 5 | ; these are all direct parents of (binding_set) 6 | (attrset_expression) 7 | (let_attrset_expression) 8 | (rec_attrset_expression) 9 | (let_expression) 10 | 11 | (list_expression) 12 | (parenthesized_expression) 13 | ] @indent 14 | 15 | 16 | (if_expression [ "if" "then" "else" ] @align) 17 | 18 | [ 19 | "}" 20 | "]" 21 | ")" 22 | ] @outdent 23 | -------------------------------------------------------------------------------- /runtime/queries/godot-resource/textobjects.scm: -------------------------------------------------------------------------------- 1 | (section 2 | (identifier) 3 | (_) 4 | (property) @class.inside 5 | ) @class.around 6 | 7 | (attribute 8 | (identifier) 9 | (_) @parameter.inside) @parameter.around 10 | 11 | (property 12 | (path) 13 | (_) @entry.inside) @entry.around 14 | 15 | (pair 16 | (_) @entry.inside) @entry.around 17 | 18 | (array 19 | (_) @entry.around) 20 | 21 | (comment) @comment.inside 22 | 23 | (comment)+ @comment.around 24 | -------------------------------------------------------------------------------- /runtime/queries/hurl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((json_value) @injection.content 5 | (#set! injection.language "json")) 6 | 7 | ((xml) @injection.content 8 | (#set! injection.language "xml")) 9 | 10 | ((multiline_string 11 | (multiline_string_type) @injection.language 12 | (multiline_string_content) @injection.content) 13 | (#set! injection.include-children) 14 | (#set! injection.combined)) 15 | -------------------------------------------------------------------------------- /runtime/queries/just/tags.scm: -------------------------------------------------------------------------------- 1 | ; Symbols that can be considered definitions in a Just file. 2 | 3 | (alias 4 | alias_name: (identifier) @definition.function) 5 | 6 | (assignment 7 | name: (identifier) @definition.constant) 8 | 9 | (import 10 | (path) @definition.module) 11 | 12 | (mod 13 | name: (identifier) @definition.module) 14 | 15 | (recipe 16 | name: (identifier) @definition.function) 17 | 18 | (unexport 19 | name: (identifier) @definition.constant) 20 | -------------------------------------------------------------------------------- /runtime/queries/prisma/textobjects.scm: -------------------------------------------------------------------------------- 1 | (model_declaration 2 | ((statement_block) @class.inside)) @class.around 3 | 4 | (call_expression 5 | (arguments (_) @parameter.inside . ","? @parameter.around) @parameter.around) 6 | 7 | (column_declaration) @entry.around 8 | 9 | (array (_) @entry.around) 10 | 11 | (assignment_expression 12 | (_) @entry.inside) @entry.around 13 | 14 | (developer_comment) @comment.inside 15 | 16 | (developer_comment)+ @comment.around 17 | 18 | -------------------------------------------------------------------------------- /runtime/queries/cpon/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (true) 3 | (false) 4 | ] @constant.builtin.boolean 5 | (null) @constant.builtin 6 | (number) @constant.numeric 7 | (pair 8 | key: (_) @keyword) 9 | (ipair 10 | key: (_) @keyword) 11 | (mpair 12 | key: (_) @keyword) 13 | 14 | (string) @string 15 | (escape_sequence) @constant.character.escape 16 | 17 | "," @punctuation.delimiter 18 | [ 19 | "[" 20 | "]" 21 | "{" 22 | "}" 23 | "<" 24 | ">" 25 | ] @punctuation.bracket 26 | -------------------------------------------------------------------------------- /runtime/queries/go-format-string/highlights.scm: -------------------------------------------------------------------------------- 1 | (escaped_percent_sign) @constant.character.escape 2 | 3 | "." @punctuation.delimiter 4 | "%" @punctuation.special 5 | 6 | [ 7 | "[" 8 | "]" 9 | ] @punctuation.bracket 10 | 11 | (explicit_argument_index) @constant.numeric 12 | 13 | (flag) @constant.builtin 14 | 15 | (width) @constant.numeric.integer 16 | (precision) @constant.numeric.float 17 | (asterisk) @string.special.symbol 18 | 19 | (verb) @type 20 | 21 | (text) @string 22 | -------------------------------------------------------------------------------- /runtime/queries/luau/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (fn_stmt) 4 | (local_fn_stmt) 5 | (anon_fn) 6 | (for_range_stmt) 7 | (for_in_stmt) 8 | ] @local.scope 9 | 10 | (_ 11 | parameter_name: (name) @local.definition.variable.parameter 12 | ) 13 | 14 | (binding 15 | variable_name: (name) @local.definition.variable 16 | ) 17 | 18 | (var 19 | variable_name: (name) @local.reference 20 | ) 21 | 22 | ; (call_stmt 23 | ; . 24 | ; method_table: (name) @local.reference 25 | ; ) 26 | -------------------------------------------------------------------------------- /runtime/queries/spade/indents.scm: -------------------------------------------------------------------------------- 1 | 2 | [ 3 | (unit_definition) 4 | (struct_definition) 5 | (enum_definition) 6 | (enum_member) 7 | (impl) 8 | (mod) 9 | (argument_list) 10 | (let_binding) 11 | (block) 12 | (tuple_literal) 13 | (array_literal) 14 | (paren_expression) 15 | (turbofish) 16 | (generic_parameters) 17 | (named_unpack) 18 | (positional_unpack) 19 | (tuple_pattern) 20 | ] @indent 21 | 22 | [ 23 | "}" 24 | "]" 25 | ")" 26 | ] @outdent 27 | 28 | -------------------------------------------------------------------------------- /runtime/queries/xtc/highlights.scm: -------------------------------------------------------------------------------- 1 | (parameter) @keyword 2 | 3 | (change_port) @function.special 4 | 5 | (template) @variable 6 | 7 | [ 8 | (hex_argument) 9 | (ipv4_argument) 10 | ] @attribute 11 | 12 | (numeric_argument) @constant.numeric 13 | 14 | (index) @tag 15 | 16 | (string_literal_argument) @string 17 | 18 | (string_argument) @constant.character 19 | 20 | (comment) @comment 21 | 22 | (port_comment) @label 23 | 24 | [ 25 | ("[") 26 | ("]") 27 | ] @punctuation.bracket 28 | -------------------------------------------------------------------------------- /runtime/queries/_javascript/locals.scm: -------------------------------------------------------------------------------- 1 | ; Definitions 2 | ;------------ 3 | ; Javascript and Typescript Treesitter grammars deviate when defining the 4 | ; tree structure for parameters, so we need to address them in each specific 5 | ; language instead of ecma. 6 | 7 | ; (i) 8 | (formal_parameters 9 | (identifier) @local.definition.variable.parameter) 10 | 11 | ; (i = 1) 12 | (formal_parameters 13 | (assignment_pattern 14 | left: (identifier) @local.definition.variable.parameter)) 15 | -------------------------------------------------------------------------------- /runtime/queries/ecma/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (array) 3 | (object) 4 | (arguments) 5 | (formal_parameters) 6 | 7 | (statement_block) 8 | (switch_statement) 9 | (object_pattern) 10 | (class_body) 11 | (named_imports) 12 | 13 | (binary_expression) 14 | (return_statement) 15 | (template_substitution) 16 | (export_clause) 17 | ] @indent 18 | 19 | [ 20 | (switch_case) 21 | (switch_default) 22 | ] @indent @extend 23 | 24 | [ 25 | "}" 26 | "]" 27 | ")" 28 | ] @outdent 29 | -------------------------------------------------------------------------------- /runtime/queries/matlab/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (arguments_statement) 3 | (if_statement) 4 | (for_statement) 5 | (while_statement) 6 | (switch_statement) 7 | (try_statement) 8 | (function_definition) 9 | (class_definition) 10 | (enumeration) 11 | (events) 12 | (methods) 13 | (properties) 14 | ] @indent 15 | 16 | [ 17 | (elseif_clause) 18 | (else_clause) 19 | (case_clause) 20 | (otherwise_clause) 21 | (catch_clause) 22 | ] @indent @extend 23 | 24 | [ "end" ] @outdent 25 | -------------------------------------------------------------------------------- /runtime/queries/ocaml/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | ;------- 3 | 4 | [ 5 | (let_binding) 6 | (class_binding) 7 | (class_function) 8 | (method_definition) 9 | (fun_expression) 10 | (object_expression) 11 | (for_expression) 12 | (match_case) 13 | (attribute_payload) 14 | ] @local.scope 15 | 16 | ; Definitions 17 | ;------------ 18 | 19 | (value_pattern) @local.definition.variable.parameter 20 | 21 | ; References 22 | ;----------- 23 | 24 | (value_path . (value_name) @local.reference) 25 | -------------------------------------------------------------------------------- /runtime/queries/qml/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ([ 5 | (empty_statement) 6 | (expression_statement) 7 | (function_declaration) 8 | (generator_function_declaration) 9 | (statement_block) 10 | (switch_statement) 11 | (try_statement) 12 | (variable_declaration) 13 | (with_statement) 14 | ] @injection.content 15 | (#set! injection.include-children) 16 | (#set! injection.language "javascript")) 17 | -------------------------------------------------------------------------------- /runtime/queries/snakemake/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | 3 | 4 | [ 5 | (rule_definition) 6 | (checkpoint_definition) 7 | (rule_inheritance) 8 | (module_definition) 9 | ] @indent 10 | 11 | [ 12 | (rule_definition) 13 | (checkpoint_definition) 14 | (rule_inheritance) 15 | (module_definition) 16 | ] @extend 17 | 18 | 19 | (directive) @indent 20 | (directive) @extend 21 | 22 | (rule_import 23 | "with" 24 | ":") @indent 25 | (rule_import 26 | "with" 27 | ":") @extend 28 | -------------------------------------------------------------------------------- /runtime/queries/luau/textobjects.scm: -------------------------------------------------------------------------------- 1 | (fn_stmt 2 | body: (_)? @function.inside) @function.around 3 | 4 | (local_fn_stmt 5 | body: (_)? @function.inside) @function.around 6 | 7 | (anon_fn 8 | body: (_)? @function.inside) @function.around 9 | 10 | (param 11 | ((name) @parameter.inside . ","? @parameter.around) @parameter.around) 12 | 13 | (arglist 14 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 15 | 16 | (comment) @comment.inside 17 | 18 | (comment)+ @comment.around 19 | -------------------------------------------------------------------------------- /helix-dap-types/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "helix-dap-types" 3 | description = "Types for interaction with a debug adapaters, using Debug Adapter Protocol" 4 | version.workspace = true 5 | authors.workspace = true 6 | edition.workspace = true 7 | license.workspace = true 8 | rust-version.workspace = true 9 | categories.workspace = true 10 | repository.workspace = true 11 | homepage.workspace = true 12 | 13 | [dependencies] 14 | serde = { version = "1.0", features = ["derive"] } 15 | serde_json = "1.0" 16 | -------------------------------------------------------------------------------- /runtime/themes/gruvbox_dark_hard.toml: -------------------------------------------------------------------------------- 1 | # Author : Sven-Hendrik Haase 2 | # Author : Jakub Bartodziej 3 | # The theme uses the gruvbox dark palette with hard contrast: github.com/morhetz/gruvbox 4 | 5 | inherits = "gruvbox" 6 | 7 | "ui.cursor.primary" = { modifiers = ["reversed"] } 8 | "ui.cursor.match" = { bg = "bg2" } 9 | 10 | "diagnostic.error" = { underline = { color = "red0", style = "curl"} } 11 | 12 | [palette] 13 | bg0 = "#1d2021" # main background 14 | -------------------------------------------------------------------------------- /runtime/queries/haskell-literate/highlights.scm: -------------------------------------------------------------------------------- 1 | ; Bird track marker 2 | (bird_line ">" @punctuation.special) 3 | 4 | ; LaTeX delimiters 5 | (latex_begin) @keyword.directive 6 | (latex_end) @keyword.directive 7 | 8 | ; Highlight LaTeX comments like comments 9 | (latex_comment) @comment 10 | 11 | ; Markdown delimiters 12 | (markdown_begin) @keyword.directive 13 | (markdown_end) @keyword.directive 14 | 15 | ; Normal prose is not highlighted. Haskell code will be 16 | ; highlighted by the injected Haskell grammar 17 | -------------------------------------------------------------------------------- /runtime/queries/llvm/textobjects.scm: -------------------------------------------------------------------------------- 1 | (define 2 | body: (_) @function.inside) @function.around 3 | 4 | (struct_type 5 | (struct_body) @class.inside) @class.around 6 | 7 | (packed_struct_type 8 | (struct_body) @class.inside) @class.around 9 | 10 | (array_type 11 | (array_vector_body) @class.inside) @class.around 12 | 13 | (vector_type 14 | (array_vector_body) @class.inside) @class.around 15 | 16 | (argument) @parameter.inside 17 | 18 | (comment) @comment.inside 19 | 20 | (comment)+ @comment.around 21 | -------------------------------------------------------------------------------- /runtime/queries/cython/injections.scm: -------------------------------------------------------------------------------- 1 | (call 2 | function: (attribute 3 | object: (identifier) @_re) 4 | arguments: (argument_list 5 | . 6 | (string 7 | (string_content) @injection.content)) 8 | (#eq? @_re "re") 9 | (#set! injection.language "regex")) 10 | 11 | ((binary_operator 12 | left: (string 13 | (string_content) @injection.content) 14 | operator: "%") 15 | (#set! injection.language "printf")) 16 | 17 | ((comment) @injection.content 18 | (#set! injection.language "comment")) 19 | -------------------------------------------------------------------------------- /runtime/queries/nasm/textobjects.scm: -------------------------------------------------------------------------------- 1 | (preproc_multiline_macro 2 | body: (body) @function.inside) @function.around 3 | (struc_declaration 4 | body: (struc_declaration_body) @class.inside) @class.around 5 | (struc_instance 6 | body: (struc_instance_body) @class.inside) @class.around 7 | 8 | (preproc_function_def_parameters 9 | (word) @parameter.inside) 10 | (call_syntax_arguments 11 | (_) @parameter.inside) 12 | (operand) @parameter.inside 13 | 14 | (comment) @comment.inside 15 | (comment)+ @comment.around 16 | -------------------------------------------------------------------------------- /runtime/queries/woodpecker-ci/tags.scm: -------------------------------------------------------------------------------- 1 | ; select steps 2 | ; e.g. 3 | ; ``` 4 | ; steps: 5 | ; - name: build-image 6 | ; image: docker 7 | ; commands: 8 | ; - docker build --rm -t local/project-image . 9 | ; volumes: 10 | ; - /var/run/docker.sock:/var/run/docker.sock 11 | ; ``` 12 | (block_mapping_pair 13 | key: (_) @_key (#eq? @_key "steps") 14 | value: (block_node 15 | (block_sequence 16 | (block_sequence_item 17 | (block_node) @definition.struct)))) 18 | -------------------------------------------------------------------------------- /helix-core/src/wrap.rs: -------------------------------------------------------------------------------- 1 | use smartstring::{LazyCompact, SmartString}; 2 | use textwrap::{Options, WordSplitter::NoHyphenation}; 3 | 4 | /// Given a slice of text, return the text re-wrapped to fit it 5 | /// within the given width. 6 | pub fn reflow_hard_wrap(text: &str, text_width: usize) -> SmartString { 7 | let options = Options::new(text_width) 8 | .word_splitter(NoHyphenation) 9 | .word_separator(textwrap::WordSeparator::AsciiSpace); 10 | textwrap::refill(text, options).into() 11 | } 12 | -------------------------------------------------------------------------------- /runtime/queries/d/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_declaration (function_body) @function.inside) @function.around 2 | (comment) @comment.inside 3 | (comment)+ @comment.around 4 | (class_declaration (aggregate_body) @class.inside) @class.around 5 | (interface_declaration (aggregate_body) @class.inside) @class.around 6 | (struct_declaration (aggregate_body) @class.inside) @class.around 7 | (unittest_declaration (block_statement) @test.inside) @test.around 8 | (parameter) @parameter.inside 9 | (template_parameter) @parameter.inside 10 | -------------------------------------------------------------------------------- /runtime/queries/dhall/textobjects.scm: -------------------------------------------------------------------------------- 1 | (lambda_expression 2 | (label) @parameter.inside 3 | (expression) @function.inside 4 | ) @function.around 5 | 6 | (forall_expression 7 | (label) @parameter.inside 8 | (expression) @function.inside 9 | ) @function.around 10 | 11 | (assert_expression 12 | (expression) @test.inside 13 | ) @test.around 14 | 15 | [ 16 | (block_comment_content) 17 | (line_comment_content) 18 | ] @comment.inside 19 | 20 | [ 21 | (block_comment) 22 | (line_comment) 23 | ] @comment.around 24 | -------------------------------------------------------------------------------- /runtime/queries/haskell-literate/injections.scm: -------------------------------------------------------------------------------- 1 | ; Inject Haskell parser into bird-style code lines 2 | ((bird_line 3 | (haskell_code) @injection.content) 4 | (#set! injection.language "haskell")) 5 | 6 | ; Inject Haskell parser into LaTeX code blocks 7 | ((latex_code_line 8 | (haskell_code) @injection.content) 9 | (#set! injection.language "haskell")) 10 | 11 | ; Inject Haskell parser into Markdown code blocks 12 | ((markdown_code_line 13 | (haskell_code) @injection.content) 14 | (#set! injection.language "haskell")) 15 | -------------------------------------------------------------------------------- /runtime/queries/lua/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_definition 2 | body: (_) @function.inside) @function.around 3 | 4 | (function_declaration 5 | body: (_) @function.inside) @function.around 6 | 7 | (parameters 8 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 9 | 10 | (arguments 11 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 12 | 13 | (comment) @comment.inside 14 | 15 | (comment)+ @comment.around 16 | 17 | (table_constructor 18 | (field (_) @entry.inside) @entry.around) 19 | -------------------------------------------------------------------------------- /runtime/queries/ripple/folds.scm: -------------------------------------------------------------------------------- 1 | ; Folds for code blocks 2 | [ 3 | (statement_block) 4 | (component_body) 5 | (class_body) 6 | (object) 7 | (object_pattern) 8 | (array) 9 | (array_pattern) 10 | (switch_body) 11 | ] @fold 12 | 13 | ; Fold multi-line JSX elements 14 | (jsx_element) @fold 15 | 16 | ; Fold style elements 17 | (style_element) @fold 18 | 19 | ; Fold server blocks 20 | (server_block) @fold 21 | 22 | ; Fold comments 23 | (comment) @fold 24 | 25 | ; Fold template strings 26 | (template_string) @fold 27 | -------------------------------------------------------------------------------- /runtime/queries/textproto/highlights.scm: -------------------------------------------------------------------------------- 1 | (string) @string 2 | 3 | (field_name) @variable.other.member 4 | 5 | (comment) @comment 6 | 7 | (number) @constant.numeric 8 | ; covers e.g. booleans and "inf" 9 | (scalar_value (identifier)) @constant 10 | ; Covers "-inf" 11 | (scalar_value (signed_identifier)) @constant.numeric 12 | 13 | [ 14 | (open_squiggly) 15 | (close_squiggly) 16 | (open_square) 17 | (close_square) 18 | (open_arrow) 19 | (close_arrow) 20 | ] @punctuation.bracket 21 | 22 | "," @punctuation.delimiter 23 | -------------------------------------------------------------------------------- /runtime/themes/darcula-solid.toml: -------------------------------------------------------------------------------- 1 | # Original source and more info: https://github.com/jesusmgg/darcula-solid-helix 2 | 3 | inherits = "darcula" 4 | 5 | "ui.background.separator" = { bg = "grey01" } 6 | "ui.menu.scroll" = { fg = "grey02", bg = "grey00" } 7 | "ui.popup" = { fg = "grey05", bg = "grey00" } 8 | "ui.window" = { bg = "grey00" } 9 | "ui.cursorline.secondary" = { bg = "grey03" } 10 | 11 | [palette] 12 | grey00 = "#101010" 13 | grey01 = "#1f1f1f" 14 | grey02 = "#323232" 15 | grey03 = "#555555" 16 | grey04 = "#a8a8a8" 17 | -------------------------------------------------------------------------------- /runtime/queries/perl/fold.scm: -------------------------------------------------------------------------------- 1 | (comment) @fold 2 | (pod) @fold 3 | 4 | ; fold the block-typed package statements only 5 | (package_statement (block)) @fold 6 | 7 | [(subroutine_declaration_statement) 8 | (conditional_statement) 9 | (loop_statement) 10 | (for_statement) 11 | (cstyle_for_statement) 12 | (block_statement) 13 | (phaser_statement)] @fold 14 | 15 | (anonymous_subroutine_expression) @fold 16 | 17 | ; perhaps folks want to fold these too? 18 | [(anonymous_array_expression) 19 | (anonymous_hash_expression)] @fold 20 | -------------------------------------------------------------------------------- /runtime/queries/ripple/injections.scm: -------------------------------------------------------------------------------- 1 | ; Inject CSS into style elements 2 | (style_element 3 | (raw_text) @injection.content 4 | (#set! injection.language "css")) 5 | 6 | ; Inject JavaScript/TypeScript into server blocks 7 | ; Note: statement is inlined, so we need to match specific statement types 8 | ; Commenting out for now as it requires matching all concrete statement types 9 | 10 | ; Template string interpolations 11 | (template_substitution 12 | (expression) @injection.content 13 | (#set! injection.language "typescript")) 14 | -------------------------------------------------------------------------------- /runtime/themes/neonotte84.toml: -------------------------------------------------------------------------------- 1 | # NeoNotte84 Theme 2 | # 3 | # Author: b52es (https://github.com/b52es) 4 | # Inspired by Catppuccin Mocha and Tokyo Night. 5 | 6 | # Inherits from neonotte.toml and applies a few modifications. 7 | inherits = "neonotte" 8 | 9 | # Syntax highlighting overrides 10 | # --------------------------- 11 | "comment" = { fg = "comment_alt", modifiers = ["italic"] } 12 | 13 | # Palette overrides 14 | # ----------------- 15 | [palette] 16 | magenta = "#f578de" 17 | yellow = "#ffd866" 18 | comment_alt = "#647a8c" 19 | -------------------------------------------------------------------------------- /runtime/queries/amber/injections.scm: -------------------------------------------------------------------------------- 1 | ; Inject bash into command content 2 | ((command_content) @injection.content 3 | (#set! injection.language "bash")) 4 | 5 | ; Inject markdown into documentation comments (///) 6 | ((comment) @injection.content 7 | (#match? @injection.content "^///") 8 | (#set! injection.language "markdown") 9 | (#set! injection.combined)) 10 | 11 | ; Regular comments (excluding doc comments) 12 | ((comment) @injection.content 13 | (#not-match? @injection.content "^///") 14 | (#set! injection.language "comment")) 15 | -------------------------------------------------------------------------------- /runtime/queries/cylc/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | (_ 6 | brackets_open: _ 7 | name: _? 8 | brackets_close: _ 9 | _* @class.inside) @class.around 10 | 11 | (setting 12 | value: _? @function.inside) @function.around 13 | 14 | (graph_setting 15 | value: _? @function.inside) @function.around 16 | 17 | (graph_string_content 18 | (graph_task) @entry.inside) 19 | 20 | (task_parameter 21 | ((_) @parameter.inside 22 | . 23 | ","? @parameter.around) @parameter.around) 24 | -------------------------------------------------------------------------------- /runtime/queries/ecma/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | ;------- 3 | 4 | [ 5 | (statement_block) 6 | (arrow_function) 7 | (function_expression) 8 | (function_declaration) 9 | (method_definition) 10 | (for_statement) 11 | (for_in_statement) 12 | (catch_clause) 13 | (finally_clause) 14 | ] @local.scope 15 | 16 | ; Definitions 17 | ;------------ 18 | 19 | ; i => ... 20 | (arrow_function 21 | parameter: (identifier) @local.definition.variable.parameter) 22 | 23 | ; References 24 | ;------------ 25 | 26 | (identifier) @local.reference 27 | -------------------------------------------------------------------------------- /runtime/themes/seoul256-dark-soft.toml: -------------------------------------------------------------------------------- 1 | # Seoul256 Dark Soft 2 | # Author : EricHenry 3 | # Original Creator: https://github.com/junegunn/seoul256.vim 4 | 5 | inherits = "seoul256-dark" 6 | 7 | "ui.background" = { bg = "gray8" } 8 | "ui.gutter" = { bg = "gray6" } 9 | "ui.cursorline.primary" = { bg = "gray5" } 10 | "ui.gutter.selected" = { bg = "gray5" } 11 | "ui.linenr.selected" = { bg = "gray5", fg = "magenta", modifiers = ["bold"] } 12 | 13 | "ui.help" = { bg = "gray5" } 14 | "ui.popup" = { bg = "gray5" } 15 | "ui.menu" = { bg = "gray5" } 16 | -------------------------------------------------------------------------------- /runtime/queries/rust/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (function_item) 5 | (struct_item) 6 | (enum_item) 7 | (union_item) 8 | (type_item) 9 | (trait_item) 10 | (impl_item) 11 | (closure_expression) 12 | (block) 13 | ] @local.scope 14 | 15 | ; Definitions 16 | 17 | (function_item 18 | (parameters 19 | (parameter 20 | pattern: (identifier) @local.definition.variable.parameter))) 21 | 22 | (closure_parameters (identifier) @local.definition.variable.parameter) 23 | 24 | ; References 25 | (identifier) @local.reference 26 | -------------------------------------------------------------------------------- /runtime/queries/wat/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | "module" "func" "param" "result" "type" "memory" "elem" "data" "table" "global" 3 | "if" "then" "else" "block" "loop" "end" "mut" 4 | ] @keyword 5 | 6 | ["import" "export"] @keyword.control.import 7 | 8 | ["local"] @keyword.storage.type 9 | 10 | [(name) (string)] @string 11 | 12 | (identifier) @function 13 | 14 | [(comment_block) (comment_line)] @comment 15 | 16 | [(nat) (float) (align_offset_value)] @constant.numeric.integer 17 | 18 | (value_type) @type 19 | 20 | ["(" ")"] @punctuation.bracket 21 | -------------------------------------------------------------------------------- /helix-lsp-types/README.md: -------------------------------------------------------------------------------- 1 | # Helix's `lsp-types` 2 | 3 | This is a fork of the [`lsp-types`](https://crates.io/crates/lsp-types) crate ([`gluon-lang/lsp-types`](https://github.com/gluon-lang/lsp-types)) taken at version v0.95.1 (commit [3e6daee](https://github.com/gluon-lang/lsp-types/commit/3e6daee771d14db4094a554b8d03e29c310dfcbe)). This fork focuses usability improvements that make the types easier to work with for the Helix codebase. For example the URL type - the `uri` crate at this version of `lsp-types` - will be replaced with a wrapper around a string. 4 | -------------------------------------------------------------------------------- /runtime/queries/jjrevset/highlights.scm: -------------------------------------------------------------------------------- 1 | (at_op) @variable.builtin 2 | 3 | [ 4 | "::" ".." 5 | (negate_op) 6 | (union_op) (intersection_op) (difference_op) 7 | ] @operator 8 | 9 | ["(" ")"] @punctuation.bracket 10 | "," @punctuation.delimiter 11 | [(raw_string_literal) (string_literal)] @string 12 | 13 | (function ((strict_identifier) @function)) 14 | (function (function_arguments (keyword_argument (strict_identifier) @variable.parameter))) 15 | 16 | (primary ((identifier) @variable)) 17 | 18 | (string_pattern (strict_identifier) @keyword) 19 | -------------------------------------------------------------------------------- /runtime/queries/ruby/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (begin_block) 3 | (end_block) 4 | (singleton_method) 5 | (block_parameters) 6 | (parenthesized_statements) 7 | (element_reference) 8 | (argument_list "(" ")") 9 | (block) 10 | (destructured_left_assignment) 11 | (interpolation) 12 | (string_array) 13 | (symbol_array) 14 | (regex) 15 | (array) 16 | (hash) 17 | (method_parameters) 18 | ] @rainbow.scope 19 | 20 | [ 21 | "#{" 22 | "{" "}" 23 | "(" ")" 24 | "%w(" "%i(" 25 | "[" "]" 26 | "|" 27 | "/" 28 | ] @rainbow.bracket 29 | -------------------------------------------------------------------------------- /runtime/queries/fish/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | (command 5 | name: (word) @_command (#any-of? @_command "jq" "jaq") 6 | argument: [(double_quote_string) (single_quote_string)] @injection.content 7 | (#set! injection.language "jq")) 8 | 9 | (command 10 | name: (word) @_command (#eq? @_command "nu") 11 | argument: (word) @_flag (#match? @_flag "^-.*c$") 12 | argument: [(single_quote_string) (double_quote_string)] @injection.content 13 | (#set! injection.language "nu") 14 | ) 15 | -------------------------------------------------------------------------------- /runtime/queries/htmldjango/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (unpaired_comment) 3 | (paired_comment) 4 | ] @comment 5 | 6 | [ 7 | "{{" 8 | "}}" 9 | "{%" 10 | "%}" 11 | (end_paired_statement) 12 | ] @punctuation.bracket 13 | 14 | [ 15 | (tag_name) 16 | ] @function 17 | 18 | (variable_name) @variable 19 | (filter_name) @function 20 | (filter_argument) @variable.parameter 21 | (keyword) @keyword 22 | (operator) @operator 23 | (keyword_operator) @keyword.operator 24 | (number) @constant.numeric 25 | (boolean) @constant.builtin.boolean 26 | (string) @string 27 | -------------------------------------------------------------------------------- /runtime/queries/xml/rainbows.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (processing_instructions) 3 | (cdata_sect) 4 | (xml_decl) 5 | (doctype_decl) 6 | (element_decl) 7 | (element_choice) 8 | (element_seq) 9 | (mixed) 10 | (attlist_decl) 11 | (notation_type) 12 | (enumeration) 13 | (ge_decl) 14 | (pe_decl) 15 | (notation_decl) 16 | ] @rainbow.scope 17 | 18 | ((element) @rainbow.scope 19 | (#set! rainbow.include-children)) 20 | 21 | [ 22 | "" 23 | "<" ">" 24 | "" 25 | " 2 | # Ported from: https://github.com/drcmda/poimandres-theme 3 | 4 | inherits = "poimandres" 5 | 6 | "ui.cursorline" = { bg = "#303747" } 7 | "ui.popup" = { bg = "#2a303c" } 8 | "ui.virtual.indent-guide" = "#3a4151" 9 | 10 | [palette] 11 | "gray.c0" = "#98a2c4" 12 | darkerGray = "#868cad" 13 | "darkerGray.50" = "#4f576d" 14 | "darkerGray.b0" = "#818cae" 15 | bluishGray = "#607487" 16 | focus = "#404350" 17 | bg = "#252b37" 18 | selection = "#3d455c" 19 | black = "#101010" 20 | -------------------------------------------------------------------------------- /helix-term/tests/test/auto_indent.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | #[tokio::test(flavor = "multi_thread")] 4 | async fn auto_indent_c() -> anyhow::Result<()> { 5 | test_with_config( 6 | AppBuilder::new().with_file("foo.c", None), 7 | // switches to append mode? 8 | ( 9 | "void foo() {#[|}]#", 10 | "i", 11 | indoc! {"\ 12 | void foo() { 13 | #[|\n]#\ 14 | } 15 | "}, 16 | ), 17 | ) 18 | .await?; 19 | 20 | Ok(()) 21 | } 22 | -------------------------------------------------------------------------------- /runtime/queries/smali/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (class_directive) 3 | (expression) 4 | (annotation_directive) 5 | (array_data_directive) 6 | (method_definition) 7 | (packed_switch_directive) 8 | (sparse_switch_directive) 9 | (subannotation_directive) 10 | ] @local.scope 11 | 12 | [ 13 | (identifier) 14 | (class_identifier) 15 | (label) 16 | (jmp_label) 17 | ] @local.reference 18 | 19 | (method_definition 20 | (method_signature (method_identifier) @local.definition.function.method)) 21 | 22 | (param_identifier) @local.definition.variable.parameter 23 | -------------------------------------------------------------------------------- /runtime/queries/swift/textobjects.scm: -------------------------------------------------------------------------------- 1 | (class_declaration 2 | body: (_) @class.inside) @class.around 3 | 4 | (protocol_declaration 5 | body: (_) @class.inside) @class.around 6 | 7 | (function_declaration 8 | body: (_) @function.inside) @function.around 9 | 10 | (parameter 11 | (_) @parameter.inside) @parameter.around 12 | 13 | (lambda_parameter 14 | (_) @parameter.inside) @parameter.around 15 | 16 | [ 17 | (comment) 18 | (multiline_comment) 19 | ] @comment.inside 20 | 21 | (comment)+ @comment.around 22 | 23 | (multiline_comment) @comment.around 24 | --------------------------------------------------------------------------------