├── .cargo └── config.toml ├── .envrc ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── blank_issue.md │ ├── bug_report.yaml │ └── enhancement.md ├── dependabot.yml └── workflows │ ├── build.yml │ ├── cachix.yml │ ├── gh-pages.yml │ ├── languages.toml │ └── release.yml ├── .gitignore ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── base16_theme.toml ├── book ├── .gitignore ├── book.toml ├── custom.css ├── src │ ├── SUMMARY.md │ ├── building-from-source.md │ ├── command-line.md │ ├── commands.md │ ├── configuration.md │ ├── ecosystem.md │ ├── editor.md │ ├── from-vim.md │ ├── generated │ │ ├── lang-support.md │ │ ├── static-cmd.md │ │ └── typable-cmd.md │ ├── guides │ │ ├── README.md │ │ ├── adding_languages.md │ │ ├── indent.md │ │ ├── injection.md │ │ └── textobject.md │ ├── install.md │ ├── keymap.md │ ├── lang-support.md │ ├── languages.md │ ├── other-software.md │ ├── package-managers.md │ ├── pickers.md │ ├── registers.md │ ├── remapping.md │ ├── surround.md │ ├── syntax-aware-motions.md │ ├── textobjects.md │ ├── themes.md │ ├── title-page.md │ └── usage.md └── theme │ ├── favicon.png │ ├── favicon.svg │ └── index.hbs ├── contrib ├── Helix.appdata.xml ├── Helix.desktop ├── completion │ ├── hx.bash │ ├── hx.elv │ ├── hx.fish │ ├── hx.nu │ └── hx.zsh ├── helix-256p.ico ├── helix.png ├── hx_launcher.sh └── themes ├── default.nix ├── docs ├── CONTRIBUTING.md ├── architecture.md ├── releases.md └── vision.md ├── flake.lock ├── flake.nix ├── grammars.nix ├── helix-core ├── .gitignore ├── Cargo.toml ├── src │ ├── auto_pairs.rs │ ├── case_conversion.rs │ ├── chars.rs │ ├── command_line.rs │ ├── comment.rs │ ├── completion.rs │ ├── config.rs │ ├── diagnostic.rs │ ├── diff.rs │ ├── doc_formatter.rs │ ├── doc_formatter │ │ └── test.rs │ ├── editor_config.rs │ ├── fuzzy.rs │ ├── graphemes.rs │ ├── history.rs │ ├── increment │ │ ├── date_time.rs │ │ ├── integer.rs │ │ └── mod.rs │ ├── indent.rs │ ├── lib.rs │ ├── line_ending.rs │ ├── macros.rs │ ├── match_brackets.rs │ ├── movement.rs │ ├── object.rs │ ├── position.rs │ ├── rope_reader.rs │ ├── search.rs │ ├── selection.rs │ ├── snippets.rs │ ├── snippets │ │ ├── active.rs │ │ ├── elaborate.rs │ │ ├── parser.rs │ │ └── render.rs │ ├── surround.rs │ ├── syntax.rs │ ├── syntax │ │ └── config.rs │ ├── test.rs │ ├── text_annotations.rs │ ├── textobject.rs │ ├── transaction.rs │ ├── uri.rs │ └── wrap.rs └── tests │ ├── data │ └── indent │ │ ├── cpp.cpp │ │ ├── languages.toml │ │ └── rust.rs │ └── indent.rs ├── helix-dap ├── Cargo.toml └── src │ ├── client.rs │ ├── lib.rs │ ├── transport.rs │ └── types.rs ├── helix-event ├── Cargo.toml └── src │ ├── cancel.rs │ ├── debounce.rs │ ├── hook.rs │ ├── lib.rs │ ├── redraw.rs │ ├── registry.rs │ ├── runtime.rs │ ├── status.rs │ └── test.rs ├── helix-loader ├── Cargo.toml ├── build.rs └── src │ ├── config.rs │ ├── grammar.rs │ ├── lib.rs │ └── main.rs ├── helix-lsp-types ├── Cargo.toml ├── LICENSE ├── README.md └── src │ ├── call_hierarchy.rs │ ├── code_action.rs │ ├── code_lens.rs │ ├── color.rs │ ├── completion.rs │ ├── document_diagnostic.rs │ ├── document_highlight.rs │ ├── document_link.rs │ ├── document_symbols.rs │ ├── error_codes.rs │ ├── file_operations.rs │ ├── folding_range.rs │ ├── formatting.rs │ ├── hover.rs │ ├── inlay_hint.rs │ ├── inline_completion.rs │ ├── inline_value.rs │ ├── lib.rs │ ├── linked_editing.rs │ ├── lsif.rs │ ├── moniker.rs │ ├── notification.rs │ ├── progress.rs │ ├── references.rs │ ├── rename.rs │ ├── request.rs │ ├── selection_range.rs │ ├── semantic_tokens.rs │ ├── signature_help.rs │ ├── trace.rs │ ├── type_hierarchy.rs │ ├── window.rs │ ├── workspace_diagnostic.rs │ ├── workspace_folders.rs │ └── workspace_symbols.rs ├── helix-lsp ├── Cargo.toml └── src │ ├── client.rs │ ├── file_event.rs │ ├── file_operations.rs │ ├── jsonrpc.rs │ ├── lib.rs │ └── transport.rs ├── helix-parsec ├── Cargo.toml └── src │ └── lib.rs ├── helix-stdx ├── Cargo.toml ├── src │ ├── env.rs │ ├── faccess.rs │ ├── lib.rs │ ├── path.rs │ ├── range.rs │ └── rope.rs └── tests │ └── path.rs ├── helix-term ├── .gitignore ├── Cargo.toml ├── build.rs ├── src │ ├── application.rs │ ├── args.rs │ ├── commands.rs │ ├── commands │ │ ├── dap.rs │ │ ├── lsp.rs │ │ └── typed.rs │ ├── compositor.rs │ ├── config.rs │ ├── events.rs │ ├── handlers.rs │ ├── handlers │ │ ├── auto_save.rs │ │ ├── completion.rs │ │ ├── completion │ │ │ ├── item.rs │ │ │ ├── path.rs │ │ │ ├── request.rs │ │ │ └── resolve.rs │ │ ├── diagnostics.rs │ │ ├── document_colors.rs │ │ ├── signature_help.rs │ │ └── snippet.rs │ ├── health.rs │ ├── job.rs │ ├── keymap.rs │ ├── keymap │ │ ├── default.rs │ │ └── macros.rs │ ├── lib.rs │ ├── main.rs │ └── ui │ │ ├── completion.rs │ │ ├── document.rs │ │ ├── editor.rs │ │ ├── info.rs │ │ ├── lsp.rs │ │ ├── lsp │ │ ├── hover.rs │ │ └── signature_help.rs │ │ ├── markdown.rs │ │ ├── menu.rs │ │ ├── mod.rs │ │ ├── overlay.rs │ │ ├── picker.rs │ │ ├── picker │ │ ├── handlers.rs │ │ └── query.rs │ │ ├── popup.rs │ │ ├── prompt.rs │ │ ├── spinner.rs │ │ ├── statusline.rs │ │ ├── text.rs │ │ ├── text_decorations.rs │ │ └── text_decorations │ │ └── diagnostics.rs └── tests │ ├── integration.rs │ └── test │ ├── auto_indent.rs │ ├── auto_pairs.rs │ ├── command_line.rs │ ├── commands.rs │ ├── commands │ ├── insert.rs │ ├── movement.rs │ └── write.rs │ ├── helpers.rs │ ├── languages │ ├── go.rs │ ├── mod.rs │ └── yaml.rs │ ├── movement.rs │ └── splits.rs ├── helix-tui ├── .gitignore ├── Cargo.toml ├── README.md ├── src │ ├── backend │ │ ├── crossterm.rs │ │ ├── mod.rs │ │ └── test.rs │ ├── buffer.rs │ ├── layout.rs │ ├── lib.rs │ ├── symbols.rs │ ├── terminal.rs │ ├── text.rs │ └── widgets │ │ ├── block.rs │ │ ├── list.rs │ │ ├── mod.rs │ │ ├── paragraph.rs │ │ ├── reflow.rs │ │ └── table.rs └── tests │ ├── terminal.rs │ ├── widgets_block.rs │ ├── widgets_list.rs │ ├── widgets_paragraph.rs │ └── widgets_table.rs ├── helix-vcs ├── Cargo.toml └── src │ ├── diff.rs │ ├── diff │ ├── line_cache.rs │ ├── worker.rs │ └── worker │ │ └── test.rs │ ├── git.rs │ ├── git │ └── test.rs │ ├── lib.rs │ └── status.rs ├── helix-view ├── Cargo.toml ├── src │ ├── annotations.rs │ ├── annotations │ │ └── diagnostics.rs │ ├── base64.rs │ ├── clipboard.rs │ ├── document.rs │ ├── editor.rs │ ├── events.rs │ ├── expansion.rs │ ├── graphics.rs │ ├── gutter.rs │ ├── handlers.rs │ ├── handlers │ │ ├── completion.rs │ │ ├── dap.rs │ │ ├── diagnostics.rs │ │ └── lsp.rs │ ├── info.rs │ ├── input.rs │ ├── keyboard.rs │ ├── lib.rs │ ├── macros.rs │ ├── register.rs │ ├── theme.rs │ ├── tree.rs │ └── view.rs └── tests │ └── encoding │ ├── LICENSE-WHATWG │ ├── big5_in.txt │ ├── big5_in_ref.txt │ ├── big5_out.txt │ ├── big5_out_ref.txt │ ├── euc_kr_in.txt │ ├── euc_kr_in_ref.txt │ ├── euc_kr_out.txt │ ├── euc_kr_out_ref.txt │ ├── gb18030_in.txt │ ├── gb18030_in_ref.txt │ ├── gb18030_out.txt │ ├── gb18030_out_ref.txt │ ├── iso_2022_jp_in.txt │ ├── iso_2022_jp_in_ref.txt │ ├── iso_2022_jp_out.txt │ ├── iso_2022_jp_out_ref.txt │ ├── jis0208_in.txt │ ├── jis0208_in_ref.txt │ ├── jis0208_out.txt │ ├── jis0208_out_ref.txt │ ├── jis0212_in.txt │ ├── jis0212_in_ref.txt │ ├── shift_jis_in.txt │ ├── shift_jis_in_ref.txt │ ├── shift_jis_out.txt │ └── shift_jis_out_ref.txt ├── languages.toml ├── logo.svg ├── logo_dark.svg ├── logo_light.svg ├── runtime ├── grammars │ └── .gitkeep ├── queries │ ├── _gjs │ │ ├── highlights.scm │ │ └── injections.scm │ ├── _javascript │ │ ├── highlights.scm │ │ ├── locals.scm │ │ └── tags.scm │ ├── _jsx │ │ ├── highlights.scm │ │ └── indents.scm │ ├── _typescript │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── ada │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── adl │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── agda │ │ └── highlights.scm │ ├── amber │ │ └── highlights.scm │ ├── astro │ │ ├── highlights.scm │ │ └── injections.scm │ ├── awk │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── bash │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── bass │ │ └── highlights.scm │ ├── beancount │ │ ├── folds.scm │ │ └── highlights.scm │ ├── bibtex │ │ ├── highlights.scm │ │ └── tags.scm │ ├── bicep │ │ └── highlights.scm │ ├── bitbake │ │ ├── highlights.scm │ │ └── injections.scm │ ├── blade │ │ ├── folds.scm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── blueprint │ │ └── highlights.scm │ ├── c-sharp │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── c │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── cairo │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── capnp │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── cel │ │ └── highlights.scm │ ├── circom │ │ ├── highlights.scm │ │ └── locals.scm │ ├── clarity │ │ └── highlights.scm │ ├── clojure │ │ ├── highlights.scm │ │ └── injections.scm │ ├── cmake │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── codeql │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── comment │ │ └── highlights.scm │ ├── common-lisp │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── cpon │ │ ├── highlights.scm │ │ └── indents.scm │ ├── cpp │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── crystal │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── css │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── csv │ │ └── highlights.scm │ ├── cue │ │ └── highlights.scm │ ├── cylc │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── d │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── dart │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── dbml │ │ └── highlights.scm │ ├── debian │ │ └── highlights.scm │ ├── devicetree │ │ └── highlights.scm │ ├── dhall │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── diff │ │ └── highlights.scm │ ├── djot │ │ ├── highlights.scm │ │ └── injections.scm │ ├── docker-compose │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── dockerfile │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── dot │ │ ├── highlights.scm │ │ └── injections.scm │ ├── dtd │ │ ├── highlights.scm │ │ └── injections.scm │ ├── dune │ │ └── highlights.scm │ ├── dunstrc │ │ └── highlights.scm │ ├── earthfile │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── ecma │ │ ├── README.md │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── edoc │ │ ├── highlights.scm │ │ └── injections.scm │ ├── eex │ │ ├── highlights.scm │ │ └── injections.scm │ ├── ejs │ │ ├── highlights.scm │ │ └── injections.scm │ ├── elisp │ │ ├── highlights.scm │ │ └── tags.scm │ ├── elixir │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── elm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── elvish │ │ ├── highlights.scm │ │ └── injections.scm │ ├── env │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── erb │ │ ├── highlights.scm │ │ └── injections.scm │ ├── erlang │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── esdl │ │ └── highlights.scm │ ├── fennel │ │ └── highlights.scm │ ├── fga │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── fidl │ │ ├── folds.scm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── fish │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── forth │ │ └── highlights.scm │ ├── fortran │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── fsharp │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── gas │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── gdscript │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── gemini │ │ └── highlights.scm │ ├── gherkin │ │ └── highlights.scm │ ├── ghostty │ │ └── highlights.scm │ ├── git-attributes │ │ └── highlights.scm │ ├── git-commit │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── git-config │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── git-ignore │ │ └── highlights.scm │ ├── git-rebase │ │ ├── highlights.scm │ │ └── injections.scm │ ├── gjs │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── gleam │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── glimmer │ │ └── highlights.scm │ ├── glsl │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── gn │ │ ├── highlights.scm │ │ └── injections.scm │ ├── go │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── godot-resource │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── gomod │ │ ├── highlights.scm │ │ └── injections.scm │ ├── gotmpl │ │ ├── highlights.scm │ │ └── injections.scm │ ├── gowork │ │ ├── highlights.scm │ │ └── injections.scm │ ├── gpr │ │ └── highlights.scm │ ├── graphql │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── gren │ │ ├── highlights.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── groovy │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── gts │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── hare │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── haskell-persistent │ │ ├── folds.scm │ │ └── highlights.scm │ ├── haskell │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── hcl │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── heex │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── helm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── hocon │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── hoon │ │ └── highlights.scm │ ├── hosts │ │ └── highlights.scm │ ├── html │ │ ├── highlights.scm │ │ └── injections.scm │ ├── hurl │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── hyprlang │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── iex │ │ ├── highlights.scm │ │ └── injections.scm │ ├── ini │ │ └── highlights.scm │ ├── ink │ │ └── highlights.scm │ ├── inko │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── janet │ │ └── highlights.scm │ ├── java │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── javascript │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── jinja │ │ ├── highlights.scm │ │ └── injections.scm │ ├── jjdescription │ │ ├── highlights.scm │ │ └── injections.scm │ ├── jq │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── jsdoc │ │ ├── highlights.scm │ │ └── injections.scm │ ├── json │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── json5 │ │ └── highlights.scm │ ├── jsonc │ │ ├── highlights.scm │ │ └── indents.scm │ ├── jsonnet │ │ └── highlights.scm │ ├── jsx │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── julia │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── just │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── kdl │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── koka │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── kotlin │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── koto │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── latex │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── ld │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── ldif │ │ └── highlights.scm │ ├── lean │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── ledger │ │ ├── highlights.scm │ │ └── injections.scm │ ├── llvm-mir-yaml │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── llvm-mir │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── llvm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── log │ │ └── highlights.scm │ ├── lpf │ │ └── highlights.scm │ ├── lua │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── mail │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── make │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── markdoc │ │ ├── highlights.scm │ │ └── injections.scm │ ├── markdown-rustdoc │ │ ├── highlights.scm │ │ └── injections.scm │ ├── markdown.inline │ │ ├── highlights.scm │ │ └── injections.scm │ ├── markdown │ │ ├── highlights.scm │ │ └── injections.scm │ ├── matlab │ │ ├── context.scm │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── mermaid │ │ └── highlights.scm │ ├── meson │ │ ├── highlights.scm │ │ └── indents.scm │ ├── mojo │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── move │ │ └── highlights.scm │ ├── msbuild │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── nasm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── nestedtext │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── nginx │ │ ├── highlights.scm │ │ └── injections.scm │ ├── nickel │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── nim │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── nix │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── nu │ │ ├── highlights.scm │ │ └── injections.scm │ ├── nunjucks │ │ ├── highlights.scm │ │ └── injections.scm │ ├── ocaml-interface │ │ ├── highlights.scm │ │ └── injections.scm │ ├── ocaml │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── odin │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── ohm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── opencl │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── openscad │ │ └── highlights.scm │ ├── org │ │ ├── highlights.scm │ │ └── injections.scm │ ├── pascal │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── passwd │ │ └── highlights.scm │ ├── pem │ │ └── highlights.scm │ ├── perl │ │ ├── fold.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── pest │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── php-only │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── tags.scm │ ├── php │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── pkgbuild │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── pkl │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── po │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── pod │ │ └── highlights.scm │ ├── ponylang │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── powershell │ │ ├── highlights.scm │ │ └── injections.scm │ ├── prisma │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── prolog │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── protobuf │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── prql │ │ ├── highlights.scm │ │ └── injections.scm │ ├── pug │ │ ├── highlights.scm │ │ └── injections.scm │ ├── purescript │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── python │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── qml │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── quarto │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── quint │ │ ├── highlights.scm │ │ └── injections.scm │ ├── r │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── racket │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── regex │ │ └── highlights.scm │ ├── rego │ │ ├── highlights.scm │ │ └── injections.scm │ ├── rescript │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── rmarkdown │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── robot │ │ └── highlights.scm │ ├── ron │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── rst │ │ └── highlights.scm │ ├── ruby │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── rust-format-args │ │ └── highlights.scm │ ├── rust │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── sage │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── scala │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── scheme │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── scss │ │ ├── highlights.scm │ │ └── injections.scm │ ├── slang │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── slint │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── smali │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── smithy │ │ └── highlights.scm │ ├── sml │ │ └── highlights.scm │ ├── snakemake │ │ ├── LICENSE │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── solidity │ │ ├── highlights.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── sourcepawn │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── spade │ │ ├── highlights.scm │ │ └── indents.scm │ ├── spicedb │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── tags.scm │ ├── sql │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── sshclientconfig │ │ └── highlights.scm │ ├── starlark │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── strace │ │ └── highlights.scm │ ├── supercollider │ │ ├── folds.scm │ │ └── highlights.scm │ ├── svelte │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── sway │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── swift │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── t32 │ │ ├── highlights.scm │ │ └── injections.scm │ ├── tablegen │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── tact │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── task │ │ ├── highlights.scm │ │ └── injections.scm │ ├── tcl │ │ ├── folds.scm │ │ ├── highlights.scm │ │ └── indents.scm │ ├── teal │ │ ├── folds.scm │ │ ├── highlights.scm │ │ └── locals.scm │ ├── templ │ │ ├── highlights.scm │ │ └── injections.scm │ ├── tera │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── textproto │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── textobjects.scm │ ├── tfvars │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── thrift │ │ ├── folds.scm │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── tlaplus │ │ ├── highlights.scm │ │ └── locals.scm │ ├── todotxt │ │ └── highlights.scm │ ├── toml │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── tsq │ │ ├── folds.scm │ │ ├── highlights.scm │ │ └── injections.scm │ ├── tsx │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── twig │ │ ├── highlights.scm │ │ └── injections.scm │ ├── typescript │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ ├── tags.scm │ │ └── textobjects.scm │ ├── typespec │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── typst │ │ ├── highlights.scm │ │ └── injections.scm │ ├── ungrammar │ │ └── highlights.scm │ ├── unison │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── uxntal │ │ └── highlights.scm │ ├── v │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── vala │ │ ├── highlights.scm │ │ └── textobjects.scm │ ├── vento │ │ ├── highlights.scm │ │ └── injections.scm │ ├── verilog │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── vhdl │ │ └── highlights.scm │ ├── vhs │ │ └── highlights.scm │ ├── vue │ │ ├── highlights.scm │ │ └── injections.scm │ ├── wast │ │ └── highlights.scm │ ├── wat │ │ └── highlights.scm │ ├── webc │ │ ├── highlights.scm │ │ └── injections.scm │ ├── werk │ │ └── highlights.scm │ ├── wesl │ │ ├── highlights.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── wgsl │ │ ├── highlights.scm │ │ └── injections.scm │ ├── wit │ │ ├── highlights.scm │ │ └── indents.scm │ ├── wren │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ ├── locals.scm │ │ └── textobjects.scm │ ├── xit │ │ └── highlights.scm │ ├── xml │ │ ├── highlights.scm │ │ ├── indents.scm │ │ └── injections.scm │ ├── xtc │ │ └── highlights.scm │ ├── yaml │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm │ ├── yara │ │ ├── highlights.scm │ │ ├── injections.scm │ │ └── locals.scm │ ├── yuck │ │ ├── highlights.scm │ │ └── injections.scm │ └── zig │ │ ├── highlights.scm │ │ ├── indents.scm │ │ ├── injections.scm │ │ └── textobjects.scm ├── themes │ ├── README.md │ ├── acme.toml │ ├── adwaita-dark.toml │ ├── adwaita-light.toml │ ├── amberwood.toml │ ├── ao.toml │ ├── ashen.toml │ ├── ataraxia.toml │ ├── autumn.toml │ ├── autumn_night.toml │ ├── ayu_dark.toml │ ├── ayu_evolve.toml │ ├── ayu_light.toml │ ├── ayu_mirage.toml │ ├── base16_default_dark.toml │ ├── base16_default_light.toml │ ├── base16_terminal.toml │ ├── base16_transparent.toml │ ├── beans.toml │ ├── bogster.toml │ ├── bogster_light.toml │ ├── boo_berry.toml │ ├── carbon.toml │ ├── carbonfox.toml │ ├── catppuccin_frappe.toml │ ├── catppuccin_latte.toml │ ├── catppuccin_macchiato.toml │ ├── catppuccin_mocha.toml │ ├── curzon.toml │ ├── cyan_light.toml │ ├── darcula-solid.toml │ ├── darcula.toml │ ├── dark_high_contrast.toml │ ├── dark_plus.toml │ ├── doom_acario_dark.toml │ ├── dracula.toml │ ├── dracula_at_night.toml │ ├── earl_grey.toml │ ├── eiffel.toml │ ├── emacs.toml │ ├── everblush.toml │ ├── everforest_dark.toml │ ├── everforest_light.toml │ ├── ferra.toml │ ├── flatwhite.toml │ ├── fleet_dark.toml │ ├── flexoki_dark.toml │ ├── flexoki_light.toml │ ├── focus_nova.toml │ ├── github_dark.toml │ ├── github_dark_colorblind.toml │ ├── github_dark_dimmed.toml │ ├── github_dark_high_contrast.toml │ ├── github_dark_tritanopia.toml │ ├── github_light.toml │ ├── github_light_colorblind.toml │ ├── github_light_high_contrast.toml │ ├── github_light_tritanopia.toml │ ├── gruber-darker.toml │ ├── gruvbox-material.toml │ ├── gruvbox.toml │ ├── gruvbox_dark_hard.toml │ ├── gruvbox_dark_soft.toml │ ├── gruvbox_light.toml │ ├── gruvbox_light_hard.toml │ ├── gruvbox_light_soft.toml │ ├── heisenberg.toml │ ├── hex_lavender.toml │ ├── hex_poison.toml │ ├── hex_steel.toml │ ├── hex_toxic.toml │ ├── horizon-dark.toml │ ├── iceberg-dark.toml │ ├── iceberg-light.toml │ ├── ingrid.toml │ ├── iroaseta.toml │ ├── jellybeans.toml │ ├── jetbrains_dark.toml │ ├── kanagawa-dragon.toml │ ├── kanagawa.toml │ ├── kaolin-dark.toml │ ├── kaolin-light.toml │ ├── kaolin-valley-dark.toml │ ├── kinda_nvim.toml │ ├── kinda_nvim_light.toml │ ├── licenses │ │ ├── ashen.license │ │ ├── carbonfox.license │ │ ├── cyan_light.LICENSE │ │ ├── everforest.LICENSE │ │ ├── kinda_nvim.LICENSE │ │ ├── modus_vivendi.LICENSE │ │ ├── modus_vivendi_deuteranopia.LICENSE │ │ ├── modus_vivendi_tinted.LICENSE │ │ ├── modus_vivendi_tritanopia.LICENSE │ │ ├── poimandres.LICENSE │ │ ├── serika-syntax.LICENSE │ │ ├── sonokai.LICENSE │ │ ├── starlight.LICENSE │ │ └── vesper.LICENSE │ ├── material_darker.toml │ ├── material_deep_ocean.toml │ ├── material_oceanic.toml │ ├── material_palenight.toml │ ├── meliora.toml │ ├── mellow.toml │ ├── merionette.toml │ ├── modus_operandi.toml │ ├── modus_operandi_deuteranopia.toml │ ├── modus_operandi_tinted.toml │ ├── modus_operandi_tritanopia.toml │ ├── modus_vivendi.toml │ ├── modus_vivendi_deuteranopia.toml │ ├── modus_vivendi_tinted.toml │ ├── modus_vivendi_tritanopia.toml │ ├── molokai.toml │ ├── monokai.toml │ ├── monokai_aqua.toml │ ├── monokai_pro.toml │ ├── monokai_pro_machine.toml │ ├── monokai_pro_octagon.toml │ ├── monokai_pro_ristretto.toml │ ├── monokai_pro_spectrum.toml │ ├── monokai_soda.toml │ ├── naysayer.toml │ ├── new_moon.toml │ ├── night_owl.toml │ ├── nightfox.toml │ ├── noctis.toml │ ├── noctis_bordo.toml │ ├── nord-night.toml │ ├── nord.toml │ ├── nord_light.toml │ ├── nyxvamp-obsidian.toml │ ├── nyxvamp-radiance.toml │ ├── nyxvamp-veil.toml │ ├── onedark.toml │ ├── onedarker.toml │ ├── onelight.toml │ ├── papercolor-dark.toml │ ├── papercolor-light.toml │ ├── peachpuff.toml │ ├── penumbra+.toml │ ├── poimandres.toml │ ├── poimandres_storm.toml │ ├── pop-dark.toml │ ├── rasmus.toml │ ├── rose_pine.toml │ ├── rose_pine_dawn.toml │ ├── rose_pine_moon.toml │ ├── seoul256-dark-hard.toml │ ├── seoul256-dark-soft.toml │ ├── seoul256-dark.toml │ ├── seoul256-light-hard.toml │ ├── seoul256-light-soft.toml │ ├── seoul256-light.toml │ ├── serika-dark.toml │ ├── serika-light.toml │ ├── snazzy.toml │ ├── solarized_dark.toml │ ├── solarized_light.toml │ ├── sonokai.toml │ ├── spacebones_light.toml │ ├── starlight.toml │ ├── sunset.toml │ ├── term16_dark.toml │ ├── term16_light.toml │ ├── tokyonight.toml │ ├── tokyonight_day.toml │ ├── tokyonight_moon.toml │ ├── tokyonight_storm.toml │ ├── ttox.toml │ ├── varua.toml │ ├── vesper.toml │ ├── vim_dark_high_contrast.toml │ ├── vintage.toml │ ├── voxed.toml │ ├── yellowed.toml │ ├── yo.toml │ ├── yo_berry.toml │ ├── yo_light.toml │ ├── zed_onedark.toml │ ├── zed_onelight.toml │ └── zenburn.toml └── tutor ├── rust-toolchain.toml ├── rustfmt.toml ├── screenshot.png ├── shell.nix ├── theme.toml └── xtask ├── Cargo.toml └── src ├── docgen.rs ├── helpers.rs ├── main.rs └── path.rs /.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 | -------------------------------------------------------------------------------- /.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 text 13 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | open_collective: helix-editor 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/blank_issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Blank Issue 3 | about: Create a blank issue. 4 | --- 5 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: "cargo" 7 | directory: "/" 8 | schedule: 9 | interval: "weekly" 10 | groups: 11 | rust-dependencies: 12 | update-types: 13 | - "minor" 14 | - "patch" 15 | 16 | - package-ecosystem: "github-actions" 17 | directory: "/" 18 | schedule: 19 | interval: "weekly" 20 | -------------------------------------------------------------------------------- /.github/workflows/cachix.yml: -------------------------------------------------------------------------------- 1 | # Publish the Nix flake outputs to Cachix 2 | name: Cachix 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | publish: 10 | name: Publish Flake 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout sources 14 | uses: actions/checkout@v4 15 | 16 | - name: Install nix 17 | uses: cachix/install-nix-action@v31 18 | 19 | - name: Authenticate with Cachix 20 | uses: cachix/cachix-action@v16 21 | with: 22 | name: helix 23 | authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} 24 | 25 | - name: Build nix flake 26 | run: nix build -L 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .direnv 3 | helix-term/rustfmt.toml 4 | result 5 | runtime/grammars 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /book/.gitignore: -------------------------------------------------------------------------------- 1 | book 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /book/src/commands.md: -------------------------------------------------------------------------------- 1 | # Commands 2 | 3 | - [Typable commands](#typable-commands) 4 | - [Static commands](#static-commands) 5 | 6 | ## Typable commands 7 | 8 | Typable commands are used from command mode and may take arguments. Command mode can be activated by pressing `:`. The built-in typable commands are: 9 | 10 | {{#include ./generated/typable-cmd.md}} 11 | 12 | ## Static Commands 13 | 14 | Static commands take no arguments and can be bound to keys. Static commands can also be executed from the command picker (`?`). The built-in static commands are: 15 | 16 | {{#include ./generated/static-cmd.md}} 17 | -------------------------------------------------------------------------------- /book/src/ecosystem.md: -------------------------------------------------------------------------------- 1 | # Ecosystem 2 | 3 | This section has information related to the wider Helix ecosystem. 4 | -------------------------------------------------------------------------------- /book/src/guides/README.md: -------------------------------------------------------------------------------- 1 | # Guides 2 | 3 | This section contains guides for adding new language server configurations, 4 | tree-sitter grammars, textobject queries, and other similar items. 5 | -------------------------------------------------------------------------------- /book/src/lang-support.md: -------------------------------------------------------------------------------- 1 | ## Language Support 2 | 3 | The following languages and Language Servers are supported. To use 4 | Language Server features, you must first [configure][lsp-config-wiki] the 5 | appropriate Language Server. 6 | 7 | You can check the language support in your installed helix version with `hx --health`. 8 | 9 | Also see the [Language Configuration][lang-config] docs and the [Adding 10 | Languages][adding-languages] guide for more language configuration information. 11 | 12 | {{#include ./generated/lang-support.md}} 13 | 14 | [lsp-config-wiki]: https://github.com/helix-editor/helix/wiki/Language-Server-Configurations 15 | [lang-config]: ./languages.md 16 | [adding-languages]: ./guides/adding_languages.md 17 | -------------------------------------------------------------------------------- /book/src/title-page.md: -------------------------------------------------------------------------------- 1 | # Helix 2 | 3 | Docs for bleeding edge master can be found at 4 | [https://docs.helix-editor.com/master](https://docs.helix-editor.com/master). 5 | 6 | See the [usage] section for a quick overview of the editor, [keymap] 7 | section for all available keybindings and the [configuration] section 8 | for defining custom keybindings, setting themes, etc. 9 | For everything else (e.g., how to install supported language servers), see the [Helix Wiki]. 10 | 11 | Refer the [FAQ] for common questions. 12 | 13 | [FAQ]: https://github.com/helix-editor/helix/wiki/FAQ 14 | [usage]: ./usage.md 15 | [keymap]: ./keymap.md 16 | [configuration]: ./configuration.md 17 | [Helix Wiki]: https://github.com/helix-editor/helix/wiki -------------------------------------------------------------------------------- /book/theme/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/book/theme/favicon.png -------------------------------------------------------------------------------- /contrib/helix-256p.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/contrib/helix-256p.ico -------------------------------------------------------------------------------- /contrib/helix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/contrib/helix.png -------------------------------------------------------------------------------- /contrib/hx_launcher.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | HELIX_RUNTIME=/usr/lib/helix/runtime exec /usr/lib/helix/hx "$@" 4 | -------------------------------------------------------------------------------- /contrib/themes: -------------------------------------------------------------------------------- 1 | ../runtime/themes -------------------------------------------------------------------------------- /helix-core/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /helix-core/src/macros.rs: -------------------------------------------------------------------------------- 1 | #[macro_export] 2 | macro_rules! hashmap { 3 | (@single $($x:tt)*) => (()); 4 | (@count $($rest:expr),*) => (<[()]>::len(&[$(hashmap!(@single $rest)),*])); 5 | 6 | ($($key:expr => $value:expr,)+) => { hashmap!($($key => $value),+) }; 7 | ($($key:expr => $value:expr),*) => { 8 | { 9 | let _cap = hashmap!(@count $($key),*); 10 | let mut _map = ::std::collections::HashMap::with_capacity(_cap); 11 | $( 12 | let _ = _map.insert($key, $value); 13 | )* 14 | _map 15 | } 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /helix-stdx/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod env; 2 | pub mod faccess; 3 | pub mod path; 4 | pub mod range; 5 | pub mod rope; 6 | 7 | pub use range::Range; 8 | -------------------------------------------------------------------------------- /helix-term/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /helix-term/src/ui/lsp.rs: -------------------------------------------------------------------------------- 1 | pub mod hover; 2 | pub mod signature_help; 3 | -------------------------------------------------------------------------------- /helix-term/tests/integration.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "integration")] 2 | mod test { 3 | mod helpers; 4 | 5 | use helix_core::{syntax::config::AutoPairConfig, Selection}; 6 | use helix_term::config::Config; 7 | 8 | use indoc::indoc; 9 | 10 | use self::helpers::*; 11 | 12 | #[tokio::test(flavor = "multi_thread")] 13 | async fn hello_world() -> anyhow::Result<()> { 14 | test(("#[\n|]#", "ihello world", "hello world#[|\n]#")).await?; 15 | Ok(()) 16 | } 17 | 18 | mod auto_indent; 19 | mod auto_pairs; 20 | mod command_line; 21 | mod commands; 22 | mod languages; 23 | mod movement; 24 | mod splits; 25 | } 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /helix-term/tests/test/languages/mod.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | mod go; 4 | mod yaml; 5 | -------------------------------------------------------------------------------- /helix-tui/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | Cargo.lock 3 | *.log 4 | *.rs.rustfmt 5 | .gdb_history 6 | .idea/ 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /helix-view/src/annotations.rs: -------------------------------------------------------------------------------- 1 | pub mod diagnostics; 2 | -------------------------------------------------------------------------------- /helix-view/tests/encoding/big5_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/big5_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/big5_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/big5_out_ref.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/euc_kr_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/euc_kr_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/euc_kr_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/euc_kr_out_ref.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/gb18030_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/gb18030_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/gb18030_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/gb18030_out_ref.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/jis0208_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/jis0208_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/jis0208_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/jis0208_out_ref.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/jis0212_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/jis0212_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/shift_jis_in.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/shift_jis_in.txt -------------------------------------------------------------------------------- /helix-view/tests/encoding/shift_jis_out_ref.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/helix-view/tests/encoding/shift_jis_out_ref.txt -------------------------------------------------------------------------------- /runtime/grammars/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/runtime/grammars/.gitkeep -------------------------------------------------------------------------------- /runtime/queries/_gjs/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (glimmer_opening_tag) 3 | (glimmer_closing_tag) 4 | ] @constant.builtin 5 | 6 | -------------------------------------------------------------------------------- /runtime/queries/_gjs/injections.scm: -------------------------------------------------------------------------------- 1 | ; PARSE GLIMMER TEMPLATES 2 | (call_expression 3 | function: [ 4 | (identifier) @injection.language 5 | (member_expression 6 | property: (property_identifier) @injection.language) 7 | ] 8 | arguments: (template_string) @injection.content) 9 | 10 | ; e.g.: 11 | ((glimmer_template) @injection.content 12 | (#set! injection.language "hbs")) 13 | 14 | ; Parse Ember/Glimmer/Handlebars/HTMLBars/etc. template literals 15 | ; e.g.: await render(hbs``) 16 | (call_expression 17 | function: ((identifier) @_name 18 | (#eq? @_name "hbs")) 19 | arguments: (template_string) @glimmer) 20 | -------------------------------------------------------------------------------- /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/_jsx/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (jsx_element) 3 | (jsx_self_closing_element) 4 | ] @indent 5 | 6 | (parenthesized_expression) @indent 7 | -------------------------------------------------------------------------------- /runtime/queries/_typescript/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (enum_declaration) 3 | (interface_declaration) 4 | (object_type) 5 | ] @indent 6 | -------------------------------------------------------------------------------- /runtime/queries/_typescript/tags.scm: -------------------------------------------------------------------------------- 1 | (function_signature 2 | name: (identifier) @name) @definition.function 3 | 4 | (method_signature 5 | name: (property_identifier) @name) @definition.method 6 | 7 | (abstract_method_signature 8 | name: (property_identifier) @name) @definition.method 9 | 10 | (abstract_class_declaration 11 | name: (type_identifier) @name) @definition.class 12 | 13 | (module 14 | name: (identifier) @name) @definition.module 15 | 16 | (interface_declaration 17 | name: (type_identifier) @name) @definition.interface 18 | 19 | (type_annotation 20 | (type_identifier) @name) @reference.type 21 | 22 | (new_expression 23 | constructor: (identifier) @name) @reference.class 24 | -------------------------------------------------------------------------------- /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/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/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/adl/highlights.scm: -------------------------------------------------------------------------------- 1 | ; adl 2 | 3 | [ 4 | "module" 5 | "struct" 6 | "union" 7 | "type" 8 | "newtype" 9 | "annotation" 10 | ] @keyword 11 | 12 | (adl (scoped_name)) @namespace 13 | (comment) @comment 14 | (doc_comment) @comment.block.documentation 15 | (name) @type 16 | 17 | (fname) @variable.other.member 18 | 19 | (type_expr (scoped_name) @type) 20 | 21 | (type_expr_params (param (scoped_name) @type.parameter)) 22 | 23 | ; json 24 | (key) @string.special 25 | 26 | (string) @string 27 | 28 | (number) @constant.numeric 29 | 30 | [ 31 | (null) 32 | (true) 33 | (false) 34 | ] @constant.builtin 35 | 36 | (escape_sequence) @constant.character.escape 37 | 38 | -------------------------------------------------------------------------------- /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/adl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (struct (_) @function.inside) @function.around 2 | -------------------------------------------------------------------------------- /runtime/queries/astro/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html 2 | 3 | ["---"] @punctuation.delimiter 4 | -------------------------------------------------------------------------------- /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/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/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/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/bash/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | (command 5 | name: (command_name (word) @_command) 6 | argument: (raw_string) @injection.content 7 | (#match? @_command "^[gnm]?awk$") 8 | (#set! injection.language "awk")) 9 | 10 | ((regex) @injection.content 11 | (#set! injection.language "regex")) 12 | -------------------------------------------------------------------------------- /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/beancount/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (transaction) 3 | (section) 4 | ] @fold 5 | -------------------------------------------------------------------------------- /runtime/queries/bibtex/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (string_type) 3 | (preamble_type) 4 | (entry_type) 5 | ] @keyword 6 | 7 | [ 8 | (junk) 9 | (comment) 10 | ] @comment 11 | 12 | [ 13 | "=" 14 | "#" 15 | ] @operator 16 | 17 | (command) @function.builtin 18 | 19 | (number) @constant.numeric 20 | 21 | (field 22 | name: (identifier) @variable.builtin) 23 | 24 | (token 25 | (identifier) @variable.parameter) 26 | 27 | [ 28 | (brace_word) 29 | (quote_word) 30 | ] @string 31 | 32 | [ 33 | (key_brace) 34 | (key_paren) 35 | ] @attribute 36 | 37 | (string 38 | name: (identifier) @constant) 39 | 40 | [ 41 | "{" 42 | "}" 43 | "(" 44 | ")" 45 | ] @punctuation.bracket 46 | 47 | "," @punctuation.delimiter 48 | -------------------------------------------------------------------------------- /runtime/queries/bibtex/tags.scm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/runtime/queries/bibtex/tags.scm -------------------------------------------------------------------------------- /runtime/queries/bitbake/injections.scm: -------------------------------------------------------------------------------- 1 | ((python_function_definition) @injection.content 2 | (#set! injection.language "python") 3 | (#set! injection.include-children)) 4 | 5 | ((anonymous_python_function (block) @injection.content) 6 | (#set! injection.language "python") 7 | (#set! injection.include-children)) 8 | 9 | ((inline_python) @injection.content 10 | (#set! injection.language "python") 11 | (#set! injection.include-children)) 12 | 13 | ((function_definition) @injection.content 14 | (#set! injection.language "bash") 15 | (#set! injection.include-children)) 16 | 17 | ((comment) @injection.content 18 | (#set! injection.language "comment")) 19 | -------------------------------------------------------------------------------- /runtime/queries/blade/folds.scm: -------------------------------------------------------------------------------- 1 | ((directive_start) @start 2 | (directive_end) @end.after 3 | (#set! role block)) 4 | 5 | 6 | ((bracket_start) @start 7 | (bracket_end) @end 8 | (#set! role block)) -------------------------------------------------------------------------------- /runtime/queries/blade/highlights.scm: -------------------------------------------------------------------------------- 1 | (directive) @tag 2 | (directive_start) @tag 3 | (directive_end) @tag 4 | (comment) @comment 5 | [ 6 | (bracket_start) 7 | (bracket_end) 8 | ] @punctuation.bracket 9 | -------------------------------------------------------------------------------- /runtime/queries/blade/injections.scm: -------------------------------------------------------------------------------- 1 | ((text) @injection.content 2 | (#set! injection.combined) 3 | (#set! injection.language "php")) 4 | 5 | ((comment) @injection.content 6 | (#set! injection.language "comment")) 7 | 8 | ((php_only) @injection.content 9 | (#set! injection.language "php-only")) 10 | 11 | ((parameter) @injection.content 12 | (#set! injection.include-children) 13 | (#set! injection.language "php-only")) 14 | 15 | -------------------------------------------------------------------------------- /runtime/queries/c-sharp/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/c/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/c/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_definition 2 | body: (_) @function.inside) @function.around 3 | 4 | (struct_specifier 5 | body: (_) @class.inside) @class.around 6 | 7 | (enum_specifier 8 | body: (_) @class.inside) @class.around 9 | 10 | (union_specifier 11 | body: (_) @class.inside) @class.around 12 | 13 | (parameter_list 14 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 15 | 16 | (argument_list 17 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 18 | 19 | (comment) @comment.inside 20 | 21 | (comment)+ @comment.around 22 | 23 | (enumerator 24 | (_) @entry.inside) @entry.around 25 | 26 | (initializer_list 27 | (_) @entry.around) 28 | -------------------------------------------------------------------------------- /runtime/queries/cairo/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | -------------------------------------------------------------------------------- /runtime/queries/cairo/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (function_item) 5 | (struct_item) 6 | (enum_item) 7 | (type_item) 8 | (trait_item) 9 | (impl_item) 10 | (closure_expression) 11 | (block) 12 | ] @local.scope 13 | 14 | ; Definitions 15 | 16 | (parameter 17 | (identifier) @local.definition.variable.parameter) 18 | 19 | (type_parameters 20 | (type_identifier) @local.definition.type.parameter) 21 | (constrained_type_parameter 22 | left: (type_identifier) @local.definition.type.parameter) 23 | 24 | (closure_parameters (identifier) @local.definition.variable.parameter) 25 | 26 | ; References 27 | (identifier) @local.reference 28 | (type_identifier) @local.reference 29 | -------------------------------------------------------------------------------- /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/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/capnp/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/capnp/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (message) 5 | (annotation_targets) 6 | (const_list) 7 | (enum) 8 | (interface) 9 | (implicit_generics) 10 | (generics) 11 | (group) 12 | (method_parameters) 13 | (named_return_types) 14 | (struct) 15 | (struct_shorthand) 16 | (union) 17 | ] @local.scope 18 | 19 | ; References 20 | 21 | [ 22 | (extend_type) 23 | (field_type) 24 | ] @local.reference 25 | (custom_type (type_identifier) @local.reference) 26 | (custom_type 27 | (generics 28 | (generic_parameters 29 | (generic_identifier) @local.reference))) 30 | 31 | ; Definitions 32 | 33 | [ 34 | (param_identifier) 35 | (return_identifier) 36 | ] @local.definition.variable.parameter 37 | -------------------------------------------------------------------------------- /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/clojure/injections.scm: -------------------------------------------------------------------------------- 1 | ((regex_lit) @injection.content 2 | (#set! injection.language "regex")) 3 | -------------------------------------------------------------------------------- /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/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/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/codeql/textobjects.scm: -------------------------------------------------------------------------------- 1 | (qldoc) @comment.around 2 | (block_comment) @comment.around 3 | (line_comment) @comment.inside 4 | (line_comment)+ @comment.around 5 | 6 | (classlessPredicate 7 | ((varDecl) @parameter.inside . ","?) @parameter.around 8 | (body "{" (_)* @function.inside "}")) @function.around 9 | (memberPredicate 10 | ((varDecl) @parameter.inside . ","?) @parameter.around 11 | (body "{" (_)* @function.inside "}")) @function.around 12 | 13 | (dataclass 14 | ("{" (_)* @class.inside "}")?) @class.around 15 | (datatype) @class.around 16 | (datatypeBranch) @class.around 17 | -------------------------------------------------------------------------------- /runtime/queries/common-lisp/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/common-lisp/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/common-lisp/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /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/cpon/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (meta) 3 | (map) 4 | (imap) 5 | (array) 6 | ] @indent 7 | 8 | [ 9 | "]" 10 | "}" 11 | ">" 12 | ] @outdent 13 | -------------------------------------------------------------------------------- /runtime/queries/cpp/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | 3 | (access_specifier) @outdent 4 | -------------------------------------------------------------------------------- /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/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/crystal/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ruby 2 | -------------------------------------------------------------------------------- /runtime/queries/crystal/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ruby 2 | -------------------------------------------------------------------------------- /runtime/queries/crystal/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ruby 2 | -------------------------------------------------------------------------------- /runtime/queries/crystal/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ruby 2 | -------------------------------------------------------------------------------- /runtime/queries/css/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | ] @indent 4 | 5 | [ 6 | "}" 7 | ] @outdent 8 | -------------------------------------------------------------------------------- /runtime/queries/css/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/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/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/d/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/dart/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/debian/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (field_name) @tag 3 | -------------------------------------------------------------------------------- /runtime/queries/dhall/injections.scm: -------------------------------------------------------------------------------- 1 | ([(block_comment) (line_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/djot/injections.scm: -------------------------------------------------------------------------------- 1 | (comment (content) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | (math (content) @injection.content 5 | (#set! injection.language "latex") (#set! injection.include-unnamed-children)) 6 | 7 | (code_block 8 | (language) @injection.language 9 | (code) @injection.content (#set! injection.include-unnamed-children)) 10 | 11 | (raw_block 12 | (raw_block_info 13 | (language) @injection.language) 14 | (content) @injection.content (#set! injection.include-unnamed-children)) 15 | 16 | (raw_inline 17 | (content) @injection.content (#set! injection.include-unnamed-children) 18 | (raw_inline_attribute 19 | (language) @injection.language)) 20 | -------------------------------------------------------------------------------- /runtime/queries/docker-compose/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/docker-compose/indents.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/dockerfile/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ([(shell_command) (shell_fragment)] @injection.content 5 | (#set! injection.language "bash")) 6 | 7 | -------------------------------------------------------------------------------- /runtime/queries/dockerfile/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | -------------------------------------------------------------------------------- /runtime/queries/dot/highlights.scm: -------------------------------------------------------------------------------- 1 | (identifier) @variable 2 | 3 | (keyword) @keyword 4 | (string_literal) @string 5 | (number_literal) @constant.numeric 6 | 7 | [ 8 | (edgeop) 9 | (operator) 10 | ] @operator 11 | 12 | [ 13 | "," 14 | ";" 15 | ] @punctuation.delimiter 16 | 17 | [ 18 | "{" 19 | "}" 20 | "[" 21 | "]" 22 | "<" 23 | ">" 24 | ] @punctuation.bracket 25 | 26 | (subgraph 27 | id: (id 28 | (identifier) @namespace) 29 | ) 30 | 31 | (attribute 32 | name: (id 33 | (identifier) @type) 34 | value: (id 35 | (identifier) @constant) 36 | ) 37 | 38 | (comment) @comment 39 | 40 | (preproc) @keyword.directive 41 | -------------------------------------------------------------------------------- /runtime/queries/dot/injections.scm: -------------------------------------------------------------------------------- 1 | ((html_internal) @injection.content 2 | (#set! injection.language "html")) 3 | -------------------------------------------------------------------------------- /runtime/queries/dtd/highlights.scm: -------------------------------------------------------------------------------- 1 | ; highlights.scm 2 | 3 | (comment) @comment 4 | 5 | [ 6 | "ELEMENT" 7 | "ATTLIST" 8 | ] @keyword 9 | 10 | [ 11 | "#REQUIRED" 12 | "#IMPLIED" 13 | "#FIXED" 14 | "#PCDATA" 15 | ] @keyword.directive 16 | 17 | [ 18 | "EMPTY" 19 | "ANY" 20 | "SYSTEM" 21 | "PUBLIC" 22 | ] @constant 23 | 24 | (element_name) @module 25 | 26 | 27 | (attribute_name) @attribute 28 | 29 | (system_literal) @string 30 | (pubid_literal) @string 31 | (attribute_value) @string 32 | 33 | [ 34 | ">" 35 | "" 38 | " ... 16 | (arrow_function 17 | parameter: (identifier) @local.definition.variable.parameter) 18 | 19 | ; References 20 | ;------------ 21 | 22 | (identifier) @local.reference 23 | -------------------------------------------------------------------------------- /runtime/queries/edoc/injections.scm: -------------------------------------------------------------------------------- 1 | ((xhtml_tag) @injection.content 2 | (#set! injection.combined) 3 | (#set! injection.include-children) 4 | (#set! injection.language "html")) 5 | 6 | ((block_quote 7 | !language 8 | (quote_content) @injection.content) 9 | (#set! injection.language "erlang")) 10 | 11 | (block_quote 12 | language: (language_identifier) @injection.language 13 | (quote_content) @injection.content) 14 | 15 | ((macro 16 | (tag) @_tag 17 | (argument) @injection.content) 18 | (#eq? @_tag "@type") 19 | (#set! injection.language "erlang") 20 | (#set! injection.include-children)) 21 | -------------------------------------------------------------------------------- /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/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/ejs/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment_directive) @comment 2 | 3 | [ 4 | "<%#" 5 | "<%" 6 | "<%=" 7 | "<%_" 8 | "<%-" 9 | "%>" 10 | "-%>" 11 | "_%>" 12 | ] @keyword 13 | -------------------------------------------------------------------------------- /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/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/elm/injections.scm: -------------------------------------------------------------------------------- 1 | ; Parse glsl where defined 2 | 3 | ((glsl_content) @injection.content 4 | (#set! injection.language "glsl")) 5 | -------------------------------------------------------------------------------- /runtime/queries/elm/locals.scm: -------------------------------------------------------------------------------- 1 | (value_declaration) @local.scope 2 | (type_alias_declaration) @local.scope 3 | (type_declaration) @local.scope 4 | (type_annotation) @local.scope 5 | (port_annotation) @local.scope 6 | (infix_declaration) @local.scope 7 | (let_in_expr) @local.scope 8 | 9 | (function_declaration_left (lower_pattern (lower_case_identifier)) @local.definition.function) 10 | (function_declaration_left (lower_case_identifier) @local.definition.function) 11 | 12 | (value_expr(value_qid(upper_case_identifier)) @local.reference) 13 | (value_expr(value_qid(lower_case_identifier)) @local.reference) 14 | (type_ref (upper_case_qid) @local.reference) 15 | -------------------------------------------------------------------------------- /runtime/queries/elvish/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/env/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: bash -------------------------------------------------------------------------------- /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/erb/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ejs 2 | -------------------------------------------------------------------------------- /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/erlang/injections.scm: -------------------------------------------------------------------------------- 1 | ((line_comment (comment_content) @injection.content) 2 | (#set! injection.language "edoc") 3 | (#set! injection.include-children) 4 | (#set! injection.combined)) 5 | 6 | ((comment (comment_content) @injection.content) 7 | (#set! injection.language "comment")) 8 | 9 | ; EEP-59 doc attributes use markdown by default. 10 | (attribute 11 | name: (atom) @_attribute 12 | (arguments [ 13 | (string (quoted_content) @injection.content) 14 | (sigil (quoted_content) @injection.content) 15 | ]) 16 | (#set! injection.language "markdown") 17 | (#any-of? @_attribute "doc" "moduledoc")) 18 | -------------------------------------------------------------------------------- /runtime/queries/erlang/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_clause 2 | pattern: (arguments (_)? @parameter.inside) 3 | body: (_) @function.inside) @function.around 4 | 5 | (anonymous_function 6 | (stab_clause body: (_) @function.inside)) @function.around 7 | 8 | (comment (comment_content) @comment.inside) @comment.around 9 | 10 | ; EUnit test names. 11 | ; (CommonTest cases are not recognizable by syntax alone.) 12 | ((function_clause 13 | name: (atom) @_name 14 | pattern: (arguments (_)? @parameter.inside) 15 | body: (_) @test.inside) @test.around 16 | (#match? @_name "_test$")) 17 | -------------------------------------------------------------------------------- /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/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/fidl/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (layout_declaration) 3 | (protocol_declaration) 4 | (resource_declaration) 5 | (service_declaration) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /runtime/queries/fidl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/fish/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/fish/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_definition) @function.around 2 | 3 | (comment) @comment.inside 4 | 5 | (comment)+ @comment.around 6 | -------------------------------------------------------------------------------- /runtime/queries/forth/highlights.scm: -------------------------------------------------------------------------------- 1 | ([(start_definition)(end_definition)] @keyword) 2 | ((number) @constant) 3 | ((string) @string) 4 | ((word) @function) 5 | ((comment) @comment) 6 | ([(core)] @type) 7 | ([(operator)] @operator) 8 | -------------------------------------------------------------------------------- /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 | (interface) 11 | ] @fold -------------------------------------------------------------------------------- /runtime/queries/fortran/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (module) 3 | (program) 4 | (subroutine) 5 | (function) 6 | ; (interface) 7 | (if_statement) 8 | (do_loop_statement) 9 | (where_statement) 10 | (derived_type_definition) 11 | (enum) 12 | ] @indent 13 | 14 | [ 15 | (end_module_statement) 16 | (end_program_statement) 17 | (end_subroutine_statement) 18 | (end_function_statement) 19 | ; (end_interface_statement) 20 | (end_if_statement) 21 | (end_do_loop_statement) 22 | (else_clause) 23 | (elseif_clause) 24 | (end_type_statement) 25 | (end_enum_statement) 26 | (end_where_statement) 27 | ] @outdent -------------------------------------------------------------------------------- /runtime/queries/fortran/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/gas/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (number) @constant.numeric 3 | (directive_name) @keyword.directive 4 | (symbol) @variable 5 | (label) @function 6 | (label) 7 | (instruction_prefix) @keyword 8 | (instruction_name) @function.special 9 | (register) @constant.builtin 10 | (string) @string 11 | (char) @constant.character 12 | (type) @type 13 | (constant "$" @constant) 14 | (operand_modifier) @attribute 15 | 16 | (expression 17 | ["-" "+" "*" "/" "="] @operator) 18 | 19 | ["(" ")"] @punctuation.bracket 20 | 21 | ["," ":"] @punctuation.delimiter 22 | -------------------------------------------------------------------------------- /runtime/queries/gas/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/gas/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | -------------------------------------------------------------------------------- /runtime/queries/gdscript/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (if_statement) 3 | (for_statement) 4 | (while_statement) 5 | (match_statement) 6 | (pattern_section) 7 | 8 | (function_definition) 9 | (lambda) 10 | (constructor_definition) 11 | (class_definition) 12 | (enum_definition) 13 | 14 | (dictionary (_)) 15 | (array (_)) 16 | (setget) 17 | ] @indent 18 | 19 | [ 20 | (if_statement) 21 | (for_statement) 22 | (while_statement) 23 | (match_statement) 24 | (pattern_section) 25 | 26 | (function_definition) 27 | (class_definition) 28 | ] @extend 29 | 30 | [ 31 | (return_statement) 32 | (break_statement) 33 | (continue_statement) 34 | (pass_statement) 35 | ] @extend.prevent-once 36 | 37 | -------------------------------------------------------------------------------- /runtime/queries/gdscript/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/gdscript/tags.scm: -------------------------------------------------------------------------------- 1 | (class_definition (name) @name) @definition.class 2 | 3 | (function_definition (name) @name) @definition.function 4 | 5 | (call (name) @name) @reference.call -------------------------------------------------------------------------------- /runtime/queries/gdscript/textobjects.scm: -------------------------------------------------------------------------------- 1 | 2 | (class_definition 3 | (body) @class.inside) @class.around 4 | 5 | (function_definition 6 | (body) @function.inside) @function.around 7 | 8 | (lambda (body) @function.inside) @function.around 9 | 10 | (parameters 11 | [ 12 | (identifier) 13 | (typed_parameter) 14 | (default_parameter) 15 | (typed_default_parameter) 16 | ] @parameter.inside @parameter.around) 17 | 18 | (arguments (_expression) @parameter.inside @parameter.around) 19 | 20 | [ 21 | (const_statement) 22 | (variable_statement) 23 | (pair) 24 | (enumerator) 25 | ] @entry.around 26 | 27 | (comment) @comment.inside 28 | (comment)+ @comment.around 29 | -------------------------------------------------------------------------------- /runtime/queries/gemini/highlights.scm: -------------------------------------------------------------------------------- 1 | (link) @punctuation.bracket 2 | (link 3 | label: (text) @markup.link.label) 4 | (link 5 | uri: (uri) @markup.link.url) 6 | 7 | [ 8 | (start_pre) 9 | (pre) 10 | (end_pre) 11 | ] @markup.raw.block 12 | (start_pre 13 | alt: (text) @label) 14 | 15 | (heading1 16 | (text) @markup.heading.1) @markup.heading.marker 17 | (heading2 18 | (text) @markup.heading.2) @markup.heading.marker 19 | (heading3 20 | (text) @markup.heading.3) @markup.heading.marker 21 | 22 | (ulist 23 | (indicator) @markup.list.unnumbered) 24 | (quote 25 | (indicator) @markup.quote 26 | (text) @markup.italic) 27 | -------------------------------------------------------------------------------- /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/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/highlights.scm: -------------------------------------------------------------------------------- 1 | (subject) @markup.heading 2 | (path) @string.special.path 3 | (branch) @string.special.symbol 4 | (commit) @constant 5 | (item) @markup.link.url 6 | (header) @tag 7 | 8 | (change kind: "new file" @diff.plus) 9 | (change kind: "deleted" @diff.minus) 10 | (change kind: "modified" @diff.delta) 11 | (change kind: "renamed" @diff.delta.moved) 12 | 13 | (trailer 14 | key: (trailer_key) @variable.other.member 15 | value: (trailer_value) @string) 16 | 17 | [":" "=" "->" (scissors)] @punctuation.delimiter 18 | (comment) @comment 19 | -------------------------------------------------------------------------------- /runtime/queries/git-commit/injections.scm: -------------------------------------------------------------------------------- 1 | (((scissors) 2 | (message) @injection.content) 3 | (#set! injection.include-children) 4 | (#set! injection.language "diff")) 5 | 6 | ((rebase_command) @injection.content 7 | (#set! injection.include-children) 8 | (#set! injection.language "git-rebase")) 9 | -------------------------------------------------------------------------------- /runtime/queries/git-commit/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | -------------------------------------------------------------------------------- /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/git-ignore/highlights.scm: -------------------------------------------------------------------------------- 1 | (pattern_char) @string 2 | (pattern_char_escaped) @constant.character.escape 3 | 4 | (directory_separator) @string 5 | (directory_separator_escaped) @constant.character.escape 6 | 7 | (negation) @operator 8 | 9 | (wildcard_char_single) @operator 10 | (wildcard_chars) @operator 11 | (wildcard_chars_allow_slash) @operator 12 | 13 | (bracket_char) @string 14 | (bracket_char_escaped) @constant.character.escape 15 | 16 | (bracket_negation) @operator 17 | (bracket_range) @operator 18 | (bracket_char_class) @keyword 19 | 20 | [ 21 | "[" 22 | "]" 23 | ] @punctuation.bracket 24 | 25 | (comment) @comment 26 | -------------------------------------------------------------------------------- /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/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/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/tags.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gjs/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_javascript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gleam/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | -------------------------------------------------------------------------------- /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/gleam/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function 2 | parameters: (function_parameters (function_parameter)? @parameter.inside) 3 | body: (function_body) @function.inside) @function.around 4 | 5 | (anonymous_function 6 | body: (function_body) @function.inside) @function.around 7 | 8 | ((function 9 | name: (identifier) @_name 10 | body: (function_body) @test.inside) @test.around 11 | (#match? @_name "_test$")) 12 | -------------------------------------------------------------------------------- /runtime/queries/glsl/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/glsl/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | 3 | [ 4 | "in" 5 | "out" 6 | "inout" 7 | "uniform" 8 | "shared" 9 | "layout" 10 | "attribute" 11 | "varying" 12 | "buffer" 13 | "coherent" 14 | "readonly" 15 | "writeonly" 16 | "precision" 17 | "highp" 18 | "mediump" 19 | "lowp" 20 | "centroid" 21 | "sample" 22 | "patch" 23 | "smooth" 24 | "flat" 25 | "noperspective" 26 | "invariant" 27 | "precise" 28 | ] @keyword 29 | 30 | "subroutine" @keyword.function 31 | 32 | (extension_storage_class) @attribute 33 | 34 | ( 35 | (identifier) @variable.builtin 36 | (#match? @variable.builtin "^gl_") 37 | ) 38 | -------------------------------------------------------------------------------- /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/glsl/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | 3 | ((preproc_arg) @injection.content 4 | (#set! injection.language "glsl")) 5 | -------------------------------------------------------------------------------- /runtime/queries/glsl/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/glsl/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/go/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | 5 | (call_expression 6 | (selector_expression) @_function 7 | (#any-of? @_function "regexp.Match" "regexp.MatchReader" "regexp.MatchString" "regexp.Compile" "regexp.CompilePOSIX" "regexp.MustCompile" "regexp.MustCompilePOSIX") 8 | (argument_list 9 | . 10 | [ 11 | (raw_string_literal) 12 | (interpreted_string_literal) 13 | ] @injection.content 14 | (#set! injection.language "regex"))) 15 | -------------------------------------------------------------------------------- /runtime/queries/go/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | 3 | [ 4 | (function_declaration) 5 | (type_declaration) 6 | (block) 7 | ] @local.scope 8 | 9 | ; Definitions 10 | 11 | (parameter_declaration (identifier) @local.definition.variable.parameter) 12 | (variadic_parameter_declaration (identifier) @local.definition.variable.parameter) 13 | 14 | (const_declaration 15 | (const_spec 16 | name: (identifier) @local.definition.constant)) 17 | 18 | ; References 19 | 20 | (identifier) @local.reference 21 | 22 | ; Field names in struct literals are identifier rather than field_identifier, 23 | ; these cannot be locals. 24 | (keyed_element . (literal_element (identifier) @variable.other.member)) 25 | -------------------------------------------------------------------------------- /runtime/queries/godot-resource/highlights.scm: -------------------------------------------------------------------------------- 1 | (section (identifier) @type.builtin) 2 | 3 | (attribute (identifier) @attribute) 4 | (property (path) @variable.other.member) 5 | (constructor (identifier) @constructor) 6 | 7 | (string) @string 8 | (integer) @constant.numeric.integer 9 | (float) @constant.numeric.float 10 | 11 | (true) @constant.builtin.boolean 12 | (false) @constant.builtin.boolean 13 | 14 | [ 15 | "[" 16 | "]" 17 | ] @tag 18 | 19 | [ 20 | "(" 21 | ")" 22 | "{" 23 | "}" 24 | ] @punctuation.bracket 25 | 26 | "=" @operator 27 | 28 | (comment) @comment 29 | -------------------------------------------------------------------------------- /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/gomod/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | "require" 3 | "replace" 4 | "go" 5 | "exclude" 6 | "retract" 7 | "module" 8 | ] @keyword 9 | 10 | "=>" @operator 11 | 12 | (comment) @comment 13 | 14 | [ 15 | (version) 16 | (go_version) 17 | ] @string 18 | -------------------------------------------------------------------------------- /runtime/queries/gomod/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/gotmpl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/gowork/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/graphql/textobjects.scm: -------------------------------------------------------------------------------- 1 | (type_definition) @class.around 2 | 3 | (executable_definition) @function.around 4 | 5 | (arguments_definition 6 | (input_value_definition) @parameter.inside @parameter.movement) 7 | 8 | (arguments 9 | (argument) @parameter.inside @parameter.movement) 10 | 11 | (selection 12 | [(field) (fragment_spread)] @entry.around) 13 | 14 | (selection 15 | (field (selection_set) @entry.inside)) 16 | 17 | (field_definition 18 | (_) @entry.inside) @entry.around 19 | 20 | (input_fields_definition 21 | (input_value_definition ) @entry.around) 22 | 23 | (enum_value) @entry.around 24 | -------------------------------------------------------------------------------- /runtime/queries/gren/locals.scm: -------------------------------------------------------------------------------- 1 | (value_declaration) @local.scope 2 | (type_alias_declaration) @local.scope 3 | (type_declaration) @local.scope 4 | (type_annotation) @local.scope 5 | (port_annotation) @local.scope 6 | (infix_declaration) @local.scope 7 | (let_in_expr) @local.scope 8 | 9 | (function_declaration_left (lower_pattern (lower_case_identifier)) @local.definition.function) 10 | (function_declaration_left (lower_case_identifier) @local.definition.function) 11 | 12 | (value_expr(value_qid(upper_case_identifier)) @local.reference) 13 | (value_expr(value_qid(lower_case_identifier)) @local.reference) 14 | (type_ref (upper_case_qid) @local.reference) 15 | -------------------------------------------------------------------------------- /runtime/queries/groovy/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (argument_list) 3 | (closure) 4 | (list) 5 | (map) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /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/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/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/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/tags.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/gts/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: _gjs,_typescript,ecma 2 | -------------------------------------------------------------------------------- /runtime/queries/hare/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/haskell-persistent/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (entity_definition) 3 | ] @fold 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/haskell/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | (comment)+ @comment.around 3 | 4 | (newtype 5 | (newtype_constructor 6 | (_) @class.inside)) @class.around 7 | (data_type 8 | constructors: (_) @class.inside) @class.around 9 | (decl/function 10 | (match expression:(_) @function.inside)) @function.around 11 | (lambda 12 | expression:(_) @function.inside) @function.around 13 | 14 | (decl/function 15 | patterns: (patterns 16 | (_) @parameter.inside)) 17 | 18 | (expression/lambda 19 | patterns: (patterns 20 | (_) @parameter.inside)) 21 | 22 | (decl/function 23 | (infix 24 | (pattern) @parameter.inside)) 25 | -------------------------------------------------------------------------------- /runtime/queries/hcl/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (comment) 3 | (block) 4 | (heredoc_template) 5 | (object) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /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/hcl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/heex/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.around @comment.inside 2 | -------------------------------------------------------------------------------- /runtime/queries/helm/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: gotmpl 2 | -------------------------------------------------------------------------------- /runtime/queries/helm/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: gotmpl 2 | -------------------------------------------------------------------------------- /runtime/queries/hocon/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (object) 3 | (array) 4 | ] @indent 5 | 6 | [ 7 | "]" 8 | "}" 9 | ] @outdent 10 | 11 | -------------------------------------------------------------------------------- /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/hoon/highlights.scm: -------------------------------------------------------------------------------- 1 | (number) @constant.numeric 2 | 3 | (string) @string 4 | 5 | [ 6 | "(" 7 | ")" 8 | "[" 9 | "]" 10 | ] @punctuation.bracket 11 | 12 | [ 13 | (coreTerminator) 14 | (seriesTerminator) 15 | ] @punctuation.delimiter 16 | 17 | 18 | (rune) @keyword 19 | 20 | (term) @constant 21 | 22 | (aura) @constant.builtin 23 | 24 | (Gap) @comment 25 | 26 | (boolean) @constant.builtin 27 | 28 | (date) @constant.builtin 29 | (mold) @constant.builtin 30 | (specialIndex) @constant.builtin 31 | (lark) @operator 32 | (fullContext) @constant.builtin 33 | -------------------------------------------------------------------------------- /runtime/queries/hosts/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (ip) @namespace 3 | (host) @string 4 | -------------------------------------------------------------------------------- /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/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/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/hurl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | (entry (_) @function.inside) @function.around 6 | -------------------------------------------------------------------------------- /runtime/queries/hyprlang/indents.scm: -------------------------------------------------------------------------------- 1 | (section) @indent 2 | 3 | (section 4 | "}" @outdent) 5 | 6 | "}" @extend 7 | -------------------------------------------------------------------------------- /runtime/queries/hyprlang/injections.scm: -------------------------------------------------------------------------------- 1 | (exec 2 | (string) @injection.content 3 | (#set! injection.language "bash")) 4 | -------------------------------------------------------------------------------- /runtime/queries/iex/highlights.scm: -------------------------------------------------------------------------------- 1 | (prompt) @comment 2 | -------------------------------------------------------------------------------- /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/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/inko/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (arguments) 3 | (array) 4 | (assign_field) 5 | (assign_local) 6 | (assign_receiver_field) 7 | (binary) 8 | (block) 9 | (bounds) 10 | (cast) 11 | (class) 12 | (class_pattern) 13 | (compound_assign_field) 14 | (compound_assign_local) 15 | (compound_assign_receiver_field) 16 | (define_constant) 17 | (define_variable) 18 | (grouped_expression) 19 | (implement_trait) 20 | (match) 21 | (or_pattern) 22 | (reopen_class) 23 | (replace_field) 24 | (replace_local) 25 | (symbols) 26 | (trait) 27 | (tuple) 28 | (tuple_pattern) 29 | (type_arguments) 30 | ] @indent 31 | 32 | [ 33 | ")" 34 | "]" 35 | "}" 36 | ] @outdent 37 | -------------------------------------------------------------------------------- /runtime/queries/inko/injections.scm: -------------------------------------------------------------------------------- 1 | ((line_comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/indents.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _javascript,ecma 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/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/javascript/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _javascript,ecma 4 | -------------------------------------------------------------------------------- /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/jinja/injections.scm: -------------------------------------------------------------------------------- 1 | ((source_file) @injection.content 2 | (#set! injection.combined) 3 | (#set! injection.include-children) 4 | (#set! injection.language "html")) -------------------------------------------------------------------------------- /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/jjdescription/injections.scm: -------------------------------------------------------------------------------- 1 | (((scissors_inner) @injection.content) 2 | (#set! injection.include-children) 3 | (#set! injection.language "diff")) 4 | -------------------------------------------------------------------------------- /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/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/jsdoc/highlights.scm: -------------------------------------------------------------------------------- 1 | (tag_name) @keyword 2 | (type) @type 3 | -------------------------------------------------------------------------------- /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/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/json/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (object) 3 | (array) 4 | ] @indent 5 | 6 | [ 7 | "]" 8 | "}" 9 | ] @outdent 10 | -------------------------------------------------------------------------------- /runtime/queries/json/textobjects.scm: -------------------------------------------------------------------------------- 1 | (pair 2 | (_) @entry.inside) @entry.around 3 | 4 | (array 5 | (_) @entry.around) 6 | -------------------------------------------------------------------------------- /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/jsonc/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: json 2 | (comment) @comment 3 | -------------------------------------------------------------------------------- /runtime/queries/jsonc/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: json 2 | -------------------------------------------------------------------------------- /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/jsx/tags.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_javascript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/jsx/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_javascript,ecma 4 | -------------------------------------------------------------------------------- /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/just/folds.scm: -------------------------------------------------------------------------------- 1 | ; Define collapse points 2 | 3 | ([ 4 | (recipe) 5 | (string) 6 | (external_command) 7 | ] @fold 8 | (#trim! @fold)) 9 | -------------------------------------------------------------------------------- /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/just/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; Specify how to navigate around logical blocks in code 2 | 3 | (assert_parameters 4 | ((_) @parameter.inside . ","? @parameter.around)) @parameter.around 5 | 6 | (recipe 7 | (recipe_body) @function.inside) @function.around 8 | 9 | (recipe_parameters 10 | ((_) @parameter.inside . ","? @parameter.around)) @parameter.around 11 | 12 | (recipe_dependency 13 | (_) @parameter.inside) @parameter.around 14 | 15 | (function_call 16 | (function_parameters 17 | ((_) @parameter.inside . ","? @parameter.around)) @parameter.around) @function.around 18 | 19 | (comment) @comment.around 20 | -------------------------------------------------------------------------------- /runtime/queries/kdl/highlights.scm: -------------------------------------------------------------------------------- 1 | (single_line_comment) @comment 2 | (multi_line_comment) @comment 3 | 4 | (node 5 | (identifier) @variable) 6 | 7 | (prop (identifier) @attribute) 8 | 9 | (type (_) @type) @punctuation.bracket 10 | 11 | (keyword) @keyword 12 | 13 | (string) @string 14 | (number) @constant.numeric 15 | (boolean) @constant.builtin.boolean 16 | 17 | "." @punctuation.delimiter 18 | 19 | "=" @operator 20 | 21 | "{" @punctuation.bracket 22 | "}" @punctuation.bracket 23 | -------------------------------------------------------------------------------- /runtime/queries/kdl/indents.scm: -------------------------------------------------------------------------------- 1 | (node_children) @indent 2 | 3 | "}" @outdent 4 | -------------------------------------------------------------------------------- /runtime/queries/kdl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (type (_) @test.inside) @test.around 2 | 3 | (node 4 | children: (node_children)? @class.inside) @class.around 5 | 6 | (node 7 | children: (node_children)? @function.inside) @function.around 8 | 9 | (node (identifier) @function.movement) 10 | 11 | [ 12 | (single_line_comment) 13 | (multi_line_comment) 14 | ] @comment.inside 15 | 16 | [ 17 | (single_line_comment)+ 18 | (multi_line_comment)+ 19 | ] @comment.around 20 | 21 | [ 22 | (prop) 23 | (value) 24 | ] @parameter.inside 25 | 26 | (value (type) ? (_) @parameter.inside @parameter.movement . ) @parameter.around 27 | 28 | -------------------------------------------------------------------------------- /runtime/queries/koka/injections.scm: -------------------------------------------------------------------------------- 1 | ([(linecomment) (blockcomment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/koka/locals.scm: -------------------------------------------------------------------------------- 1 | (modulebody) @local.scope 2 | 3 | (block) @local.scope 4 | 5 | (pparameter 6 | (pattern 7 | (identifier 8 | (varid) @local.definition.variable.parameter))) 9 | 10 | (puredecl 11 | (funid 12 | (identifier 13 | (varid) @local.definition.function))) 14 | 15 | (puredecl 16 | (binder 17 | (identifier 18 | (varid) @local.definition.function))) 19 | 20 | (decl 21 | (binder 22 | (identifier 23 | (varid) @local.definition.function))) 24 | 25 | (identifier (varid) @local.reference) 26 | -------------------------------------------------------------------------------- /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/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/koto/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (assign) 3 | (comment) 4 | (function) 5 | (list) 6 | (map) 7 | (tuple) 8 | (string) 9 | ] @fold 10 | -------------------------------------------------------------------------------- /runtime/queries/koto/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/koto/locals.scm: -------------------------------------------------------------------------------- 1 | ; Scopes 2 | (module (_) @local.scope) 3 | 4 | (function 5 | body: (_) @local.scope) 6 | 7 | ; Definitions 8 | (arg 9 | (identifier) @local.definition.variable.parameter) 10 | 11 | (arg 12 | (variable (identifier)) @local.definition.parameter) 13 | 14 | (import_item 15 | (identifier) @local.definition.namespace) 16 | 17 | (entry_block 18 | (identifier) @local.definition.variable.other.member) 19 | 20 | (entry_inline 21 | (identifier) @local.definition.variable.other.member) 22 | 23 | ; References 24 | (identifier) @local.reference 25 | -------------------------------------------------------------------------------- /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/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/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/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/ld/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/lean/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "markdown")) 3 | -------------------------------------------------------------------------------- /runtime/queries/lean/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (module) 3 | (namespace) 4 | (section) 5 | ] @local.scope 6 | -------------------------------------------------------------------------------- /runtime/queries/ledger/highlights.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (comment) 3 | (note) 4 | ] @comment 5 | 6 | [ 7 | (date) 8 | (interval) 9 | (quantity) 10 | ] @constant.numeric.integer 11 | 12 | ((account) @variable.other.member) 13 | ((commodity) @text.literal) 14 | 15 | "include" @keyword.local.import 16 | 17 | [ 18 | "account" 19 | "alias" 20 | "assert" 21 | "check" 22 | "commodity" 23 | "def" 24 | "default" 25 | "end" 26 | "eval" 27 | "format" 28 | "nomarket" 29 | "note" 30 | "payee" 31 | "check" 32 | "A" 33 | "Y" 34 | "N" 35 | "D" 36 | "C" 37 | "P" 38 | ] @keyword 39 | -------------------------------------------------------------------------------- /runtime/queries/ledger/injections.scm: -------------------------------------------------------------------------------- 1 | ([(comment) (note)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir-yaml/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: yaml 2 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir-yaml/indents.scm: -------------------------------------------------------------------------------- 1 | (block_mapping_pair) @indent 2 | 3 | -------------------------------------------------------------------------------- /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/llvm-mir/indents.scm: -------------------------------------------------------------------------------- 1 | (basic_block) @indent 2 | 3 | (label) @outdent 4 | -------------------------------------------------------------------------------- /runtime/queries/llvm-mir/injections.scm: -------------------------------------------------------------------------------- 1 | ([ (comment) (multiline_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/llvm/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_body) 3 | (instruction) 4 | ] @indent 5 | 6 | "}" @outdent 7 | -------------------------------------------------------------------------------- /runtime/queries/llvm/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/lua/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment") 3 | (#set! injection.include-children)) 4 | -------------------------------------------------------------------------------- /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/mail/highlights.scm: -------------------------------------------------------------------------------- 1 | ; header fields 2 | [ 3 | (header_field_email) 4 | (header_field_subject) 5 | (header_field) 6 | ] @keyword 7 | 8 | ; delimited punctuation 9 | (header_separator) @punctuation.delimiter 10 | (email_delimiter) @punctuation.delimiter 11 | 12 | ; email subject contents 13 | (header_subject 14 | (subject) @markup.bold) 15 | ; extra metadata headers 16 | (header_other 17 | (header_unstructured) @comment) 18 | 19 | ; Addressee Name (Firstname, Lastname, etc.) 20 | (atom) @variable 21 | 22 | ; Email Address 23 | (email) @string 24 | 25 | ; Quoted Reply 26 | (quote_marker) @punctuation.special 27 | (quote_contents) @markup.quote 28 | 29 | -------------------------------------------------------------------------------- /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/make/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (define_directive) 3 | (rule) 4 | ] @indent 5 | 6 | [ 7 | "endef" 8 | ] @outdent 9 | -------------------------------------------------------------------------------- /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/markdoc/highlights.scm: -------------------------------------------------------------------------------- 1 | tag_name: (identifier) @tag 2 | (tag_self_closing "/" @tag) 3 | (tag_close "/" @tag) 4 | ([(tag_start) (tag_end) "="] @tag) 5 | (attribute [key : (identifier)] @attribute) 6 | (attribute [shorthand : (identifier)] @attribute) 7 | (variable [variable : (identifier) (variable_sigil)] @variable) 8 | (variable_tail property : (identifier) @variable.other.member) 9 | (function function_name : (identifier) @function) 10 | (function_parameter_named parameter : (identifier) @variable.parameter) 11 | 12 | (hash_key key: (identifier) @variable.other.member) 13 | (string) @string 14 | (number) @constant.numeric 15 | (boolean) @constant.builtin.boolean 16 | (null) @constant.builtin 17 | -------------------------------------------------------------------------------- /runtime/queries/markdoc/injections.scm: -------------------------------------------------------------------------------- 1 | ((markdown) @injection.content 2 | (#set! injection.language "markdown")) 3 | -------------------------------------------------------------------------------- /runtime/queries/markdown-rustdoc/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /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/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/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/matlab/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/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/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/mojo/textobjects.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/nasm/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/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/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/nickel/injections.scm: -------------------------------------------------------------------------------- 1 | (annot_atom doc: (static_string) 2 | @injection.content 3 | (#set! injection.language "markdown")) 4 | -------------------------------------------------------------------------------- /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/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/nu/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) -------------------------------------------------------------------------------- /runtime/queries/nunjucks/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: jinja -------------------------------------------------------------------------------- /runtime/queries/nunjucks/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: jinja -------------------------------------------------------------------------------- /runtime/queries/ocaml-interface/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: ocaml 2 | -------------------------------------------------------------------------------- /runtime/queries/ocaml-interface/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/ocaml/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/odin/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (enum_declaration) 4 | (union_declaration) 5 | (struct_declaration) 6 | (struct) 7 | (parameters) 8 | (tuple_type) 9 | (call_expression) 10 | (switch_case) 11 | ] @indent 12 | 13 | [ 14 | ")" 15 | "]" 16 | ] @outdent 17 | 18 | ; Have to do all closing brackets separately because the one for switch statements shouldn't end. 19 | (block "}" @outdent) 20 | (enum_declaration "}" @outdent) 21 | (union_declaration "}" @outdent) 22 | (struct_declaration "}" @outdent) 23 | (struct "}" @outdent) 24 | -------------------------------------------------------------------------------- /runtime/queries/odin/injections.scm: -------------------------------------------------------------------------------- 1 | ([(comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/ohm/indents.scm: -------------------------------------------------------------------------------- 1 | ; See: https://docs.helix-editor.com/guides/indent.html 2 | 3 | ; indent 4 | ; ------ 5 | 6 | [ 7 | ; <..., ...> 8 | (formals) 9 | (params) 10 | 11 | ; (...| ...) 12 | (alt) 13 | ] @indent 14 | 15 | ; outdent 16 | ; ------- 17 | 18 | [ 19 | "}" 20 | ")" 21 | ">" 22 | ] @outdent 23 | 24 | ; align 25 | ; ----- 26 | 27 | ; | ... | ... 28 | (rule_body 29 | . (top_level_term) @anchor 30 | (#set! "scope" "tail")) @align 31 | 32 | ; N/A or unused: 33 | ; -------------- 34 | ; indent.always 35 | ; outdent.always 36 | ; extend 37 | ; extend.prevent-once 38 | -------------------------------------------------------------------------------- /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/opencl/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/opencl/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/opencl/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: c 2 | -------------------------------------------------------------------------------- /runtime/queries/org/injections.scm: -------------------------------------------------------------------------------- 1 | (block parameter: (expr) @injection.language 2 | (contents) @injection.content 3 | (#set! injection.include-children)) 4 | 5 | -------------------------------------------------------------------------------- /runtime/queries/pascal/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/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/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/perl/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (block) 3 | (conditional_statement) 4 | (loop_statement) 5 | (cstyle_for_statement) 6 | (for_statement) 7 | (elsif) 8 | (array_element_expression) 9 | (hash_element_expression) 10 | (coderef_call_expression) 11 | (anonymous_slice_expression) 12 | (slice_expression) 13 | (keyval_expression) 14 | (anonymous_array_expression) 15 | (anonymous_hash_expression) 16 | (stub_expression) 17 | (func0op_call_expression) 18 | (func1op_call_expression) 19 | (map_grep_expression) 20 | (function_call_expression) 21 | (method_call_expression) 22 | (attribute) 23 | ] @indent 24 | 25 | [ 26 | "}" 27 | "]" 28 | ")" 29 | ] @outdent 30 | -------------------------------------------------------------------------------- /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/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/pest/highlights.scm: -------------------------------------------------------------------------------- 1 | (line_comment) @comment 2 | (block_comment) @comment 3 | 4 | [ 5 | "(" 6 | ")" 7 | "[" 8 | "]" 9 | "{" 10 | "}" 11 | ] @punctuation.bracket 12 | 13 | ((identifier) @variable) 14 | ((builtin) @type.builtin) 15 | ((const) @constant) 16 | 17 | [ 18 | (string) 19 | (character) 20 | ] @string 21 | 22 | [ 23 | "_" 24 | "@" 25 | "$" 26 | ]@keyword.storage.modifier 27 | 28 | [ 29 | "~" 30 | "|" 31 | "=" 32 | "+" 33 | "*" 34 | "&" 35 | "^" 36 | "!" 37 | "?" 38 | ".." 39 | ] @operator 40 | 41 | [ 42 | "PUSH" 43 | "PEEK" 44 | "POP" 45 | "SOI" 46 | "EOI" 47 | "ANY" 48 | ] @keyword 49 | 50 | -------------------------------------------------------------------------------- /runtime/queries/pest/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (expression) 3 | ] @indent 4 | 5 | [ 6 | "]" 7 | "}" 8 | ")" 9 | ] @outdent 10 | -------------------------------------------------------------------------------- /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/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/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/php/tags.scm: -------------------------------------------------------------------------------- 1 | (class_declaration 2 | name: (name) @name) @definition.class 3 | 4 | (function_definition 5 | name: (name) @name) @definition.function 6 | 7 | (method_declaration 8 | name: (name) @name) @definition.function 9 | 10 | (object_creation_expression 11 | [ 12 | (qualified_name (name) @name) 13 | (variable_name (name) @name) 14 | ]) @reference.class 15 | 16 | (function_call_expression 17 | function: [ 18 | (qualified_name (name) @name) 19 | (variable_name (name)) @name 20 | ]) @reference.call 21 | 22 | (scoped_call_expression 23 | name: (name) @name) @reference.call 24 | 25 | (member_call_expression 26 | name: (name) @name) @reference.call 27 | -------------------------------------------------------------------------------- /runtime/queries/pkgbuild/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: bash 2 | -------------------------------------------------------------------------------- /runtime/queries/pkgbuild/indents.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/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/po/textobjects.scm: -------------------------------------------------------------------------------- 1 | (msgid) @parameter.inside 2 | 3 | (comment) @comment.inside 4 | (comment)+ @comment.around 5 | 6 | 7 | -------------------------------------------------------------------------------- /runtime/queries/ponylang/indents.scm: -------------------------------------------------------------------------------- 1 | ; queries for helix to do automatic indentation upon hitting enter 2 | ; TODO: needs more work, cover more cases 3 | [ 4 | (entity) 5 | (method) 6 | (behavior) 7 | (constructor) 8 | (block) 9 | (tuple) 10 | (grouped) 11 | ] @indent 12 | (match_case body: (block) @indent) 13 | ; ffi_call and call 14 | (_ arguments: (_) @indent) 15 | (assignment right: (_) @indent 16 | (#set! "scope" "all") 17 | ) 18 | 19 | [ 20 | (params) 21 | (object) 22 | ("if") 23 | ] @extend 24 | (lambda params: (_) @extend) 25 | 26 | [ 27 | "end" 28 | "}" 29 | "]" 30 | ")" 31 | "|" 32 | ] @outdent 33 | -------------------------------------------------------------------------------- /runtime/queries/powershell/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/prolog/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (directive_term) 3 | (clause_term) 4 | (arg_list) 5 | (list_notation) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /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/prolog/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/protobuf/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/pug/injections.scm: -------------------------------------------------------------------------------- 1 | ((javascript) @injection.content 2 | (#set! injection.language "javascript") 3 | ) 4 | -------------------------------------------------------------------------------- /runtime/queries/purescript/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/python/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/python/tags.scm: -------------------------------------------------------------------------------- 1 | (class_definition 2 | name: (identifier) @name) @definition.class 3 | 4 | (function_definition 5 | name: (identifier) @name) @definition.function 6 | 7 | (call 8 | function: [ 9 | (identifier) @name 10 | (attribute 11 | attribute: (identifier) @name) 12 | ]) @reference.call 13 | -------------------------------------------------------------------------------- /runtime/queries/qml/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (enum_body) 3 | (ui_object_initializer) 4 | ] @indent 5 | 6 | "}" @outdent 7 | -------------------------------------------------------------------------------- /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/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/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/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/queries/racket/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/racket/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/racket/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: scheme 2 | -------------------------------------------------------------------------------- /runtime/queries/rego/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/rmarkdown/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/rmarkdown/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /runtime/queries/rmarkdown/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: markdown 2 | -------------------------------------------------------------------------------- /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/ron/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/rst/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | 3 | [ 4 | (title) 5 | ] @markup.heading.1 6 | 7 | [ 8 | "adornment" 9 | ] @markup.heading.marker 10 | 11 | [ 12 | (target) 13 | (reference) 14 | ] @markup.link.url 15 | 16 | [ 17 | "bullet" 18 | ] @markup.list.unnumbered 19 | 20 | (strong) @markup.bold 21 | (emphasis) @markup.italic 22 | (literal) @markup.raw.inline 23 | 24 | (list_item 25 | (term) @markup.bold 26 | (classifier)? @markup.italic) 27 | 28 | (directive 29 | [".." (type) "::"] @function 30 | ) 31 | 32 | (field 33 | [":" (field_name) ":"] @variable.other.member 34 | ) 35 | 36 | (interpreted_text) @markup.raw.inline 37 | 38 | (interpreted_text (role)) @keyword 39 | -------------------------------------------------------------------------------- /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/ruby/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | ((heredoc_body 5 | (heredoc_content) @injection.content 6 | (heredoc_end) @name 7 | (#set! injection.language "sql")) 8 | (#eq? @name "SQL")) 9 | 10 | ((heredoc_body 11 | (heredoc_content) @injection.content 12 | (heredoc_end) @name 13 | (#set! injection.language "graphql")) 14 | (#any-of? @name 15 | "GQL" 16 | "GRAPHQL")) 17 | 18 | ((heredoc_body 19 | (heredoc_content) @injection.content 20 | (heredoc_end) @name 21 | (#set! injection.language "erb")) 22 | (#eq? @name "ERB")) 23 | 24 | -------------------------------------------------------------------------------- /runtime/queries/rust-format-args/highlights.scm: -------------------------------------------------------------------------------- 1 | ; regular escapes like `\n` are detected using another grammar 2 | ; Here, we only detect `{{` and `}}` as escapes for `{` and `}` 3 | (escaped) @constant.character.escape 4 | 5 | [ 6 | "#" 7 | (type) 8 | ] @special 9 | 10 | [ 11 | (sign) 12 | (fill) 13 | (align) 14 | (width) 15 | ] @operator 16 | 17 | (number) @constant.numeric 18 | 19 | (colon) @punctuation 20 | 21 | (identifier) @variable 22 | 23 | ; SCREAMING_CASE is assumed to be constant 24 | ((identifier) @constant 25 | (#match? @constant "^[A-Z_]+$")) 26 | 27 | [ 28 | "{" 29 | "}" 30 | ] @punctuation.special 31 | -------------------------------------------------------------------------------- /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 | (parameter 18 | pattern: (identifier) @local.definition.variable.parameter) 19 | 20 | (closure_parameters (identifier) @local.definition.variable.parameter) 21 | 22 | ; References 23 | (identifier) @local.reference 24 | -------------------------------------------------------------------------------- /runtime/queries/sage/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/sage/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/sage/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /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/scala/injections.scm: -------------------------------------------------------------------------------- 1 | ([(comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | 4 | 5 | ; TODO for some reason multiline string (triple quotes) interpolation works only if it contains interpolated value 6 | ; Matches these SQL interpolators: 7 | ; - Doobie: 'sql', 'fr' 8 | ; - Quill: 'sql', 'infix' 9 | ; - Slick: 'sql', 'sqlu' 10 | (interpolated_string_expression 11 | interpolator: 12 | ((identifier) @interpolator 13 | (#any-of? @interpolator "fr" "infix" "sql" "sqlu")) 14 | (interpolated_string) @injection.content 15 | (#set! injection.language "sql")) 16 | 17 | -------------------------------------------------------------------------------- /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/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/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/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/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 | -------------------------------------------------------------------------------- /runtime/queries/slint/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/slint/locals.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (component) 3 | (component_definition) 4 | (function_definition) 5 | (imperative_block) 6 | ] @local.scope 7 | -------------------------------------------------------------------------------- /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/smali/indents.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 | "\{" 13 | ] @indent 14 | 15 | [ 16 | ".end annotation" 17 | ".end array-data" 18 | ".end field" 19 | ".end method" 20 | ".end packed-switch" 21 | ".end param" 22 | ".end parameter" 23 | ".end sparse-switch" 24 | ".end subannotation" 25 | "\}" 26 | ] @outdent 27 | 28 | [ 29 | (ERROR) 30 | (comment) 31 | ] @indent.always 32 | -------------------------------------------------------------------------------- /runtime/queries/smali/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/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/snakemake/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | 3 | (wildcard 4 | (constraint) @injection.content 5 | (#set! injection.language "regex")) 6 | -------------------------------------------------------------------------------- /runtime/queries/snakemake/locals.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /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/sourcepawn/injections.scm: -------------------------------------------------------------------------------- 1 | ; Parse JSDoc annotations in comments 2 | 3 | ((comment) @injection.content 4 | (#set! injection.language "jsdoc")) 5 | -------------------------------------------------------------------------------- /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/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/spicedb/tags.scm: -------------------------------------------------------------------------------- 1 | (object_definition 2 | name: (type_identifier) @name) @definition.type 3 | 4 | (type_identifier) @name @reference.type 5 | -------------------------------------------------------------------------------- /runtime/queries/sql/textobjects.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment.inside 2 | 3 | (comment)+ @comment.around 4 | 5 | -------------------------------------------------------------------------------- /runtime/queries/starlark/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/starlark/indents.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /runtime/queries/starlark/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/starlark/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; inherits: python 2 | -------------------------------------------------------------------------------- /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/supercollider/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (function_call) 3 | (code_block) 4 | (function_block) 5 | (control_structure) 6 | ] @fold 7 | 8 | -------------------------------------------------------------------------------- /runtime/queries/svelte/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (element) 3 | (if_statement) 4 | (each_statement) 5 | (await_statement) 6 | (script_element) 7 | (style_element) 8 | ] @indent 9 | 10 | [ 11 | (end_tag) 12 | (else_statement) 13 | (if_end_expr) 14 | (each_end_expr) 15 | (await_end_expr) 16 | ">" 17 | "/>" 18 | ] @outdent -------------------------------------------------------------------------------- /runtime/queries/sway/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/queries/swift/locals.scm: -------------------------------------------------------------------------------- 1 | ; Upstream: https://github.com/alex-pinkus/tree-sitter-swift/blob/57c1c6d6ffa1c44b330182d41717e6fe37430704/queries/locals.scm 2 | (import_declaration (identifier) @local.definition.namespace) 3 | (function_declaration name: (simple_identifier) @local.definition.function) 4 | 5 | ; Scopes 6 | [ 7 | (for_statement) 8 | (while_statement) 9 | (repeat_while_statement) 10 | (do_statement) 11 | (if_statement) 12 | (guard_statement) 13 | (switch_statement) 14 | (property_declaration) 15 | (function_declaration) 16 | (class_declaration) 17 | (protocol_declaration) 18 | (lambda_literal) 19 | ] @local.scope 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /runtime/queries/t32/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/tablegen/indents.scm: -------------------------------------------------------------------------------- 1 | (statement) @indent 2 | 3 | "}" @outdent 4 | -------------------------------------------------------------------------------- /runtime/queries/tablegen/injections.scm: -------------------------------------------------------------------------------- 1 | ([ (comment) (multiline_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /runtime/queries/tact/indents.scm: -------------------------------------------------------------------------------- 1 | ; indent 2 | ; ------ 3 | 4 | [ 5 | ; (..., ...) 6 | (parameter_list) 7 | (argument_list) 8 | 9 | ; {..., ...} 10 | (instance_argument_list) 11 | 12 | ; {...; ...} 13 | (message_body) 14 | (struct_body) 15 | (contract_body) 16 | (trait_body) 17 | (function_body) 18 | (block_statement) 19 | 20 | ; misc. 21 | (binary_expression) 22 | (return_statement) 23 | ] @indent 24 | 25 | ; outdent 26 | ; ------- 27 | 28 | [ 29 | "}" 30 | ")" 31 | ">" 32 | ] @outdent 33 | 34 | ; indent.always 35 | ; outdent.always 36 | ; align 37 | ; extend 38 | ; extend.prevent-once -------------------------------------------------------------------------------- /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/task/highlights.scm: -------------------------------------------------------------------------------- 1 | (comment) @comment 2 | (datetime) @type 3 | (identifier) @variable 4 | (keyword) @keyword 5 | -------------------------------------------------------------------------------- /runtime/queries/task/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/tcl/folds.scm: -------------------------------------------------------------------------------- 1 | (braced_word) @fold 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/tera/injections.scm: -------------------------------------------------------------------------------- 1 | (frontmatter (content) @injection.content 2 | (#set! injection.language "yaml") 3 | (#set! injection.combined) 4 | ) 5 | -------------------------------------------------------------------------------- /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/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/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/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/tfvars/folds.scm: -------------------------------------------------------------------------------- 1 | ; inherits: hcl 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/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/thrift/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/toml/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/tsq/folds.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (named_node) 3 | (predicate) 4 | (grouping) 5 | (list) 6 | ] @fold 7 | -------------------------------------------------------------------------------- /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/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/tsx/tags.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/tsx/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _jsx,_typescript,ecma 4 | -------------------------------------------------------------------------------- /runtime/queries/twig/injections.scm: -------------------------------------------------------------------------------- 1 | ((content) @injection.content 2 | (#set! injection.language "html") 3 | (#set! injection.combined)) 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/indents.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _typescript,ecma 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/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 | -------------------------------------------------------------------------------- /runtime/queries/typescript/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; See runtime/queries/ecma/README.md for more info. 2 | 3 | ; inherits: _typescript,ecma 4 | -------------------------------------------------------------------------------- /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/typespec/injections.scm: -------------------------------------------------------------------------------- 1 | ([ 2 | (single_line_comment) 3 | (multi_line_comment) 4 | ] @injection.content 5 | (#set! injection.language "comment")) 6 | -------------------------------------------------------------------------------- /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/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/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/unison/injections.scm: -------------------------------------------------------------------------------- 1 | ((doc_block) @injection.content (#set! injection.language "markdown")) 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/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/verilog/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /runtime/queries/vue/highlights.scm: -------------------------------------------------------------------------------- 1 | (tag_name) @tag 2 | (end_tag) @tag 3 | 4 | (directive_name) @keyword 5 | (directive_argument) @constant 6 | 7 | (attribute 8 | (attribute_name) @attribute 9 | [(attribute_value) (quoted_attribute_value)]? @string) 10 | 11 | (directive_attribute 12 | (directive_name) @attribute 13 | (directive_argument)? @attribute 14 | (directive_modifiers)? @attribute 15 | [(attribute_value) (quoted_attribute_value)]? @string) 16 | 17 | (comment) @comment 18 | 19 | [ 20 | "<" 21 | ">" 22 | "" 26 | ] @punctuation.bracket 27 | "=" @punctuation.delimiter 28 | 29 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /runtime/queries/webc/highlights.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html -------------------------------------------------------------------------------- /runtime/queries/webc/injections.scm: -------------------------------------------------------------------------------- 1 | ; inherits: html -------------------------------------------------------------------------------- /runtime/queries/wesl/injections.scm: -------------------------------------------------------------------------------- 1 | ([(line_comment) (block_comment)] @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/wesl/textobjects.scm: -------------------------------------------------------------------------------- 1 | (function_decl 2 | body: (_) @function.inside) @function.around 3 | 4 | (struct_decl 5 | body: (_) @class.inside) @class.around 6 | 7 | (param_list 8 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 9 | 10 | (argument_list 11 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 12 | 13 | (template_list 14 | ((_) @parameter.inside . ","? @parameter.around) @parameter.around) 15 | 16 | [ 17 | (line_comment) 18 | (block_comment) 19 | ] @comment.inside 20 | 21 | (line_comment)+ @comment.around 22 | 23 | (block_comment) @comment.around 24 | -------------------------------------------------------------------------------- /runtime/queries/wgsl/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/queries/wren/indents.scm: -------------------------------------------------------------------------------- 1 | [ 2 | (list) 3 | (map) 4 | (call_body) 5 | (parameter_list) 6 | (call_expression) 7 | (getter_definition) 8 | (setter_definition) 9 | (prefix_operator_definition) 10 | (subscript_operator_definition) 11 | (subscript_setter_definition) 12 | (infix_operator_definition) 13 | (method_definition) 14 | (constructor) 15 | (static_method_definition) 16 | (static_getter_definition) 17 | (attribute) 18 | (conditional) 19 | (class_body) 20 | (if_statement) 21 | (for_statement) 22 | (while_statement) 23 | ] @indent 24 | 25 | [ 26 | "}" 27 | "]" 28 | ")" 29 | ] @outdent 30 | -------------------------------------------------------------------------------- /runtime/queries/wren/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment") 3 | (#set! injection.include-children)) 4 | -------------------------------------------------------------------------------- /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/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/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/xml/indents.scm: -------------------------------------------------------------------------------- 1 | (element) @indent 2 | -------------------------------------------------------------------------------- /runtime/queries/xml/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/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/yara/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/queries/yara/locals.scm: -------------------------------------------------------------------------------- 1 | (rule_definition name: (identifier) @local.definition.string.special) 2 | (string_identifier) @local.definition.string.special.symbol 3 | 4 | (for_expression 5 | (string_identifier) @local.reference) 6 | 7 | (for_of_expression 8 | (string_identifier) @local.reference) 9 | 10 | (of_expression 11 | (string_set 12 | (string_identifier) @local.reference)) 13 | 14 | (string_count 15 | (string_identifier) @local.reference) 16 | 17 | (string_offset 18 | (string_identifier) @local.reference) 19 | 20 | (string_length 21 | (string_identifier) @local.reference) 22 | -------------------------------------------------------------------------------- /runtime/queries/yuck/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /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/zig/injections.scm: -------------------------------------------------------------------------------- 1 | ((comment) @injection.content 2 | (#set! injection.language "comment")) 3 | -------------------------------------------------------------------------------- /runtime/themes/README.md: -------------------------------------------------------------------------------- 1 | # User submitted themes 2 | 3 | If you submit a theme, please include a comment at the top with your name and email address: 4 | 5 | ```toml 6 | # Author : Name 7 | ``` 8 | 9 | If you are submitting a theme that is already published somewhere, then please 10 | add the corresponding license file for it under `licenses/` with the following 11 | name `theme_name.license` and add a comment at the top of the theme file: 12 | 13 | ```toml 14 | # License: 15 | ``` 16 | 17 | We have a preview page for themes on our [wiki](https://github.com/helix-editor/helix/wiki/Themes)! 18 | -------------------------------------------------------------------------------- /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/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/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/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/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/themes/licenses/modus_vivendi.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2020-2023 Free Software Foundation, Inc. 2 | 3 | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” 4 | 5 | (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” 6 | -------------------------------------------------------------------------------- /runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2020-2023 Free Software Foundation, Inc. 2 | 3 | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” 4 | 5 | (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” 6 | -------------------------------------------------------------------------------- /runtime/themes/licenses/modus_vivendi_tinted.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2020-2023 Free Software Foundation, Inc. 2 | 3 | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” 4 | 5 | (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” 6 | -------------------------------------------------------------------------------- /runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2020-2023 Free Software Foundation, Inc. 2 | 3 | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” 4 | 5 | (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” 6 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /runtime/themes/nord-night.toml: -------------------------------------------------------------------------------- 1 | # Nord Night 2 | # 3 | # Based on the Nord theme, with minor modifications. 4 | # The Background and the Primary Text color have been slightly darkened. 5 | # The Aurora color palette has been used more generously. 6 | 7 | inherits = 'nord' 8 | 9 | 'constant' = 'nord13' 10 | 'constant.builtin.boolean' = 'nord13' 11 | 'constant.numeric' = 'nord13' 12 | 13 | 'keyword.control' = 'nord11' 14 | 'keyword.control.conditional' = 'nord11' 15 | 'keyword.control.exception' = 'nord11' 16 | 'keyword.control.repeat' = 'nord11' 17 | 'keyword.control.return' = 'nord11' 18 | 19 | 'variable.parameter' = 'nord15' 20 | 21 | [palette] 22 | nord0 = '#252933' 23 | nord4 = '#C0C5CF' 24 | -------------------------------------------------------------------------------- /runtime/themes/poimandres_storm.toml: -------------------------------------------------------------------------------- 1 | # Author: Ambuj Kumar 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 | -------------------------------------------------------------------------------- /runtime/themes/seoul256-dark-hard.toml: -------------------------------------------------------------------------------- 1 | # Seoul256 Dark Hard 2 | # Author : EricHenry 3 | # Original Creator: https://github.com/junegunn/seoul256.vim 4 | 5 | inherits = "seoul256-dark" 6 | 7 | "ui.background" = { bg = "gray1" } 8 | "ui.gutter" = { bg = "gray2" } 9 | "ui.cursorline.primary" = { bg = "gray" } 10 | "ui.gutter.selected" = { bg = "gray" } 11 | "ui.linenr.selected" = { bg = "gray", fg = "magenta", modifiers = ["bold"] } 12 | "ui.virtual.inlay-hint" = { fg = "gray4", modifiers = ["bold"] } 13 | 14 | "ui.help" = { bg = "gray" } 15 | "ui.popup" = { bg = "gray" } 16 | "ui.menu" = { bg = "gray" } 17 | -------------------------------------------------------------------------------- /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/themes/seoul256-light-hard.toml: -------------------------------------------------------------------------------- 1 | # Seoul256 Light Hard 2 | # Author : EricHenry 3 | # Original Creator: https://github.com/junegunn/seoul256.vim 4 | 5 | inherits = "seoul256-light" 6 | 7 | "ui.background" = { bg = "gray11" } 8 | "ui.cursor.match" = { bg = "gray10", modifiers = ["underlined"] } 9 | "ui.gutter" = { bg = "white1" } 10 | "ui.cursorline.primary" = { bg = "gray12" } 11 | "ui.gutter.selected" = { bg = "gray12" } 12 | "ui.linenr.selected" = { bg = "gray12", fg = "magenta", modifiers = ["bold"] } 13 | 14 | "ui.help" = { fg = "black1", bg = "gray12" } 15 | "ui.popup" = { fg = "black1", bg = "gray12" } 16 | "ui.menu" = { fg = "black1", bg = "gray12" } 17 | -------------------------------------------------------------------------------- /runtime/themes/seoul256-light-soft.toml: -------------------------------------------------------------------------------- 1 | # Seoul256 Light Soft 2 | # Author : EricHenry 3 | # Original Creator: https://github.com/junegunn/seoul256.vim 4 | 5 | inherits = "seoul256-light" 6 | 7 | "ui.background" = { bg = "white" } 8 | "ui.cursor.match" = { bg = "gray13", modifiers = ["underlined"] } 9 | "ui.gutter" = { bg = "gray13" } 10 | "ui.cursorline.primary" = { bg = "gray10" } 11 | "ui.gutter.selected" = { bg = "gray10" } 12 | "ui.linenr.selected" = { bg = "gray10", fg = "magenta", modifiers = ["bold"] } 13 | 14 | "ui.help" = { fg = "black1", bg = "gray10" } 15 | "ui.popup" = { fg = "black1", bg = "gray10" } 16 | "ui.menu" = { fg = "black1", bg = "gray10" } 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.82.0" 3 | components = ["rustfmt", "rust-src", "clippy"] 4 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/rustfmt.toml -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helix-editor/helix/2baff46b2578d78d817b9e128e8cc00345541f0b/screenshot.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /xtask/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "xtask" 3 | version.workspace = true 4 | authors.workspace = true 5 | edition.workspace = true 6 | license.workspace = true 7 | rust-version.workspace = true 8 | categories.workspace = true 9 | repository.workspace = true 10 | homepage.workspace = true 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | helix-term = { path = "../helix-term" } 16 | helix-core = { path = "../helix-core" } 17 | helix-view = { path = "../helix-view" } 18 | helix-loader = { path = "../helix-loader" } 19 | toml = "0.8" 20 | -------------------------------------------------------------------------------- /xtask/src/path.rs: -------------------------------------------------------------------------------- 1 | use std::path::{Path, PathBuf}; 2 | 3 | pub fn project_root() -> PathBuf { 4 | Path::new(env!("CARGO_MANIFEST_DIR")) 5 | .parent() 6 | .unwrap() 7 | .to_path_buf() 8 | } 9 | 10 | pub fn book_gen() -> PathBuf { 11 | project_root().join("book/src/generated/") 12 | } 13 | 14 | pub fn runtime() -> PathBuf { 15 | project_root().join("runtime") 16 | } 17 | 18 | pub fn ts_queries() -> PathBuf { 19 | runtime().join("queries") 20 | } 21 | 22 | pub fn themes() -> PathBuf { 23 | runtime().join("themes") 24 | } 25 | --------------------------------------------------------------------------------