mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Add/improve textobject queries (#11513)
* Add textobject queries for YAML * Add textobject queries for SQL * Add textobject queries for HOCON * Add textobject queries for git-config * Add textobject queries for env * Add textobject queries for Dockerfile * Add textobject queries for docker-compose * Add textobject queries for prisma * Add entry textobject queries for hcl * Add entry textobject queries for Nix * Update docs
This commit is contained in:
parent
ff33b07756
commit
b90ec5c779
@ -34,8 +34,8 @@
|
||||
| devicetree | ✓ | | | |
|
||||
| dhall | ✓ | ✓ | | `dhall-lsp-server` |
|
||||
| diff | ✓ | | | |
|
||||
| docker-compose | ✓ | | ✓ | `docker-compose-langserver`, `yaml-language-server` |
|
||||
| dockerfile | ✓ | | | `docker-langserver` |
|
||||
| docker-compose | ✓ | ✓ | ✓ | `docker-compose-langserver`, `yaml-language-server` |
|
||||
| dockerfile | ✓ | ✓ | | `docker-langserver` |
|
||||
| dot | ✓ | | | `dot-language-server` |
|
||||
| dtd | ✓ | | | |
|
||||
| earthfile | ✓ | ✓ | ✓ | `earthlyls` |
|
||||
@ -46,7 +46,7 @@
|
||||
| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
|
||||
| elm | ✓ | ✓ | | `elm-language-server` |
|
||||
| elvish | ✓ | | | `elvish` |
|
||||
| env | ✓ | | | |
|
||||
| env | ✓ | ✓ | | |
|
||||
| erb | ✓ | | | |
|
||||
| erlang | ✓ | ✓ | | `erlang_ls` |
|
||||
| esdl | ✓ | | | |
|
||||
@ -61,7 +61,7 @@
|
||||
| gherkin | ✓ | | | |
|
||||
| git-attributes | ✓ | | | |
|
||||
| git-commit | ✓ | ✓ | | |
|
||||
| git-config | ✓ | | | |
|
||||
| git-config | ✓ | ✓ | | |
|
||||
| git-ignore | ✓ | | | |
|
||||
| git-rebase | ✓ | | | |
|
||||
| gjs | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
||||
@ -83,7 +83,7 @@
|
||||
| hcl | ✓ | ✓ | ✓ | `terraform-ls` |
|
||||
| heex | ✓ | ✓ | | `elixir-ls` |
|
||||
| helm | ✓ | | | `helm_ls` |
|
||||
| hocon | ✓ | | ✓ | |
|
||||
| hocon | ✓ | ✓ | ✓ | |
|
||||
| hoon | ✓ | | | |
|
||||
| hosts | ✓ | | | |
|
||||
| html | ✓ | | | `vscode-html-language-server` |
|
||||
@ -158,7 +158,7 @@
|
||||
| pod | ✓ | | | |
|
||||
| ponylang | ✓ | ✓ | ✓ | |
|
||||
| powershell | ✓ | | | |
|
||||
| prisma | ✓ | | | `prisma-language-server` |
|
||||
| prisma | ✓ | ✓ | | `prisma-language-server` |
|
||||
| prolog | | | | `swipl` |
|
||||
| protobuf | ✓ | ✓ | ✓ | `bufls`, `pb` |
|
||||
| prql | ✓ | | | |
|
||||
@ -186,7 +186,7 @@
|
||||
| sml | ✓ | | | |
|
||||
| solidity | ✓ | ✓ | | `solc` |
|
||||
| spicedb | ✓ | | | |
|
||||
| sql | ✓ | | | |
|
||||
| sql | ✓ | ✓ | | |
|
||||
| sshclientconfig | ✓ | | | |
|
||||
| starlark | ✓ | ✓ | | |
|
||||
| strace | ✓ | | | |
|
||||
@ -228,6 +228,6 @@
|
||||
| xit | ✓ | | | |
|
||||
| xml | ✓ | | ✓ | |
|
||||
| xtc | ✓ | | | |
|
||||
| yaml | ✓ | | ✓ | `yaml-language-server`, `ansible-language-server` |
|
||||
| yaml | ✓ | ✓ | ✓ | `yaml-language-server`, `ansible-language-server` |
|
||||
| yuck | ✓ | | | |
|
||||
| zig | ✓ | ✓ | ✓ | `zls` |
|
||||
|
1
runtime/queries/docker-compose/textobjects.scm
Normal file
1
runtime/queries/docker-compose/textobjects.scm
Normal file
@ -0,0 +1 @@
|
||||
; inherits: yaml
|
4
runtime/queries/dockerfile/textobjects.scm
Normal file
4
runtime/queries/dockerfile/textobjects.scm
Normal file
@ -0,0 +1,4 @@
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
6
runtime/queries/env/textobjects.scm
vendored
Normal file
6
runtime/queries/env/textobjects.scm
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
||||
(variable_assignment
|
||||
(_) @entry.inside) @entry.around
|
6
runtime/queries/git-config/textobjects.scm
Normal file
6
runtime/queries/git-config/textobjects.scm
Normal file
@ -0,0 +1,6 @@
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
||||
(variable
|
||||
(_) @entry.inside) @entry.around
|
@ -4,3 +4,8 @@
|
||||
(function_arguments
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(attribute
|
||||
(_) @entry.inside) @entry.around
|
||||
|
||||
(tuple
|
||||
(_) @entry.around)
|
||||
|
10
runtime/queries/hocon/textobjects.scm
Normal file
10
runtime/queries/hocon/textobjects.scm
Normal file
@ -0,0 +1,10 @@
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
||||
(pair
|
||||
(_) @entry.inside) @entry.around
|
||||
|
||||
(array
|
||||
(_) @entry.around)
|
||||
|
@ -7,3 +7,6 @@
|
||||
(function_expression
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(binding
|
||||
(_) @entry.inside) @entry.around
|
||||
|
||||
|
17
runtime/queries/prisma/textobjects.scm
Normal file
17
runtime/queries/prisma/textobjects.scm
Normal file
@ -0,0 +1,17 @@
|
||||
(model_declaration
|
||||
((statement_block) @class.inside)) @class.around
|
||||
|
||||
(call_expression
|
||||
(arguments (_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(column_declaration) @entry.around
|
||||
|
||||
(array (_) @entry.around)
|
||||
|
||||
(assignment_expression
|
||||
(_) @entry.inside) @entry.around
|
||||
|
||||
(developer_comment) @comment.inside
|
||||
|
||||
(developer_comment)+ @comment.around
|
||||
|
4
runtime/queries/sql/textobjects.scm
Normal file
4
runtime/queries/sql/textobjects.scm
Normal file
@ -0,0 +1,4 @@
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
7
runtime/queries/yaml/textobjects.scm
Normal file
7
runtime/queries/yaml/textobjects.scm
Normal file
@ -0,0 +1,7 @@
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
||||
(block_mapping_pair
|
||||
(_) @entry.inside) @entry.around
|
||||
|
Loading…
Reference in New Issue
Block a user