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:
Jaakko Paju 2024-08-17 20:27:50 +03:00 committed by GitHub
parent ff33b07756
commit b90ec5c779
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 71 additions and 8 deletions

View File

@ -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` |

View File

@ -0,0 +1 @@
; inherits: yaml

View File

@ -0,0 +1,4 @@
(comment) @comment.inside
(comment)+ @comment.around

6
runtime/queries/env/textobjects.scm vendored Normal file
View File

@ -0,0 +1,6 @@
(comment) @comment.inside
(comment)+ @comment.around
(variable_assignment
(_) @entry.inside) @entry.around

View File

@ -0,0 +1,6 @@
(comment) @comment.inside
(comment)+ @comment.around
(variable
(_) @entry.inside) @entry.around

View File

@ -4,3 +4,8 @@
(function_arguments
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
(attribute
(_) @entry.inside) @entry.around
(tuple
(_) @entry.around)

View File

@ -0,0 +1,10 @@
(comment) @comment.inside
(comment)+ @comment.around
(pair
(_) @entry.inside) @entry.around
(array
(_) @entry.around)

View File

@ -7,3 +7,6 @@
(function_expression
body: (_) @function.inside) @function.around
(binding
(_) @entry.inside) @entry.around

View 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

View File

@ -0,0 +1,4 @@
(comment) @comment.inside
(comment)+ @comment.around

View File

@ -0,0 +1,7 @@
(comment) @comment.inside
(comment)+ @comment.around
(block_mapping_pair
(_) @entry.inside) @entry.around