mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
feat: add support for gjs and gts (#9940)
This commit is contained in:
parent
a959c0ef9b
commit
295a9a95ce
@ -62,6 +62,7 @@
|
|||||||
| git-config | ✓ | | | |
|
| git-config | ✓ | | | |
|
||||||
| git-ignore | ✓ | | | |
|
| git-ignore | ✓ | | | |
|
||||||
| git-rebase | ✓ | | | |
|
| git-rebase | ✓ | | | |
|
||||||
|
| gjs | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
||||||
| gleam | ✓ | ✓ | | `gleam` |
|
| gleam | ✓ | ✓ | | `gleam` |
|
||||||
| glimmer | ✓ | | | `ember-language-server` |
|
| glimmer | ✓ | | | `ember-language-server` |
|
||||||
| glsl | ✓ | ✓ | ✓ | |
|
| glsl | ✓ | ✓ | ✓ | |
|
||||||
@ -73,6 +74,7 @@
|
|||||||
| gowork | ✓ | | | `gopls` |
|
| gowork | ✓ | | | `gopls` |
|
||||||
| graphql | ✓ | ✓ | | `graphql-lsp` |
|
| graphql | ✓ | ✓ | | `graphql-lsp` |
|
||||||
| groovy | ✓ | | | |
|
| groovy | ✓ | | | |
|
||||||
|
| gts | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
||||||
| hare | ✓ | | | |
|
| hare | ✓ | | | |
|
||||||
| haskell | ✓ | ✓ | | `haskell-language-server-wrapper` |
|
| haskell | ✓ | ✓ | | `haskell-language-server-wrapper` |
|
||||||
| haskell-persistent | ✓ | | | |
|
| haskell-persistent | ✓ | | | |
|
||||||
|
@ -197,6 +197,28 @@ inlayHints.functionLikeReturnTypes.enabled = true
|
|||||||
inlayHints.enumMemberValues.enabled = true
|
inlayHints.enumMemberValues.enabled = true
|
||||||
inlayHints.parameterNames.enabled = "all"
|
inlayHints.parameterNames.enabled = "all"
|
||||||
|
|
||||||
|
[language-server.vscode-eslint-language-server]
|
||||||
|
command = "vscode-eslint-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language-server.vscode-eslint-language-server.config]
|
||||||
|
validate = "on"
|
||||||
|
experimental = { useFlatConfig = false }
|
||||||
|
rulesCustomizations = []
|
||||||
|
run = "onType"
|
||||||
|
problems = { shortenToSingleLine = false }
|
||||||
|
nodePath = ""
|
||||||
|
|
||||||
|
[language-server.vscode-eslint-language-server.config.codeAction.disableRuleComment]
|
||||||
|
enable = true
|
||||||
|
location = "separateLine"
|
||||||
|
|
||||||
|
[language-server.vscode-eslint-language-server.config.codeAction.showDocumentation]
|
||||||
|
enable = true
|
||||||
|
|
||||||
|
[language-server.vscode-eslint-language-server.config.workingDirectory]
|
||||||
|
mode = "location"
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "rust"
|
name = "rust"
|
||||||
scope = "source.rust"
|
scope = "source.rust"
|
||||||
@ -3586,3 +3608,51 @@ language-servers = ["pest-language-server"]
|
|||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "pest"
|
name = "pest"
|
||||||
source = { git = "https://github.com/pest-parser/tree-sitter-pest", rev = "a8a98a824452b1ec4da7f508386a187a2f234b85" }
|
source = { git = "https://github.com/pest-parser/tree-sitter-pest", rev = "a8a98a824452b1ec4da7f508386a187a2f234b85" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "gjs"
|
||||||
|
scope = "source.gjs"
|
||||||
|
file-types = ["gjs"]
|
||||||
|
roots = ["package.json", "ember-cli-build.js"]
|
||||||
|
comment-token = "//"
|
||||||
|
block-comment-tokens = { start = "/*", end = "*/" }
|
||||||
|
language-servers = [
|
||||||
|
{ except-features = [
|
||||||
|
"format", "diagnostics",
|
||||||
|
], name = "typescript-language-server" },
|
||||||
|
"vscode-eslint-language-server",
|
||||||
|
"ember-language-server",
|
||||||
|
]
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
grammar = "javascript"
|
||||||
|
|
||||||
|
[language.auto-pairs]
|
||||||
|
'<' = '>'
|
||||||
|
"'" = "'"
|
||||||
|
"{" = "}"
|
||||||
|
"(" = ")"
|
||||||
|
'"' = '"'
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "gts"
|
||||||
|
scope = "source.gts"
|
||||||
|
file-types = ["gts"]
|
||||||
|
roots = ["package.json", "ember-cli-build.js"]
|
||||||
|
comment-token = "//"
|
||||||
|
block-comment-tokens = { start = "/*", end = "*/" }
|
||||||
|
language-servers = [
|
||||||
|
{ except-features = [
|
||||||
|
"format", "diagnostics",
|
||||||
|
], name = "typescript-language-server" },
|
||||||
|
"vscode-eslint-language-server",
|
||||||
|
"ember-language-server",
|
||||||
|
]
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
grammar = "typescript"
|
||||||
|
|
||||||
|
[language.auto-pairs]
|
||||||
|
'<' = '>'
|
||||||
|
"'" = "'"
|
||||||
|
"{" = "}"
|
||||||
|
"(" = ")"
|
||||||
|
'"' = '"'
|
||||||
|
5
runtime/queries/_gjs/highlights.scm
Normal file
5
runtime/queries/_gjs/highlights.scm
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[
|
||||||
|
(glimmer_opening_tag)
|
||||||
|
(glimmer_closing_tag)
|
||||||
|
] @constant.builtin
|
||||||
|
|
20
runtime/queries/_gjs/injections.scm
Normal file
20
runtime/queries/_gjs/injections.scm
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
; PARSE GLIMMER TEMPLATES
|
||||||
|
(call_expression
|
||||||
|
function: [
|
||||||
|
(identifier) @injection.language
|
||||||
|
(member_expression
|
||||||
|
property: (property_identifier) @injection.language)
|
||||||
|
]
|
||||||
|
arguments: (template_string) @injection.content)
|
||||||
|
|
||||||
|
; e.g.: <template><SomeComponent @arg={{double @value}} /></template>
|
||||||
|
((glimmer_template) @injection.content
|
||||||
|
(#set! injection.language "hbs"))
|
||||||
|
|
||||||
|
; Parse Ember/Glimmer/Handlebars/HTMLBars/etc. template literals
|
||||||
|
; e.g.: await render(hbs`<SomeComponent />`)
|
||||||
|
(call_expression
|
||||||
|
function: ((identifier) @_name
|
||||||
|
(#eq? @_name "hbs"))
|
||||||
|
arguments: ((template_string) @glimmer
|
||||||
|
(#offset! @glimmer 0 1 0 -1)))
|
1
runtime/queries/gjs/highlights.scm
Normal file
1
runtime/queries/gjs/highlights.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_javascript,ecma
|
1
runtime/queries/gjs/indents.scm
Normal file
1
runtime/queries/gjs/indents.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_javascript,ecma
|
1
runtime/queries/gjs/injections.scm
Normal file
1
runtime/queries/gjs/injections.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_javascript,ecma
|
1
runtime/queries/gjs/locals.scm
Normal file
1
runtime/queries/gjs/locals.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_javascript,ecma
|
1
runtime/queries/gjs/tags.scm
Normal file
1
runtime/queries/gjs/tags.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_javascript,ecma
|
1
runtime/queries/gjs/textobjects.scm
Normal file
1
runtime/queries/gjs/textobjects.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_javascript,ecma
|
1
runtime/queries/gts/highlights.scm
Normal file
1
runtime/queries/gts/highlights.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_typescript,ecma
|
1
runtime/queries/gts/indents.scm
Normal file
1
runtime/queries/gts/indents.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_typescript,ecma
|
1
runtime/queries/gts/injections.scm
Normal file
1
runtime/queries/gts/injections.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_typescript,ecma
|
1
runtime/queries/gts/locals.scm
Normal file
1
runtime/queries/gts/locals.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_typescript,ecma
|
1
runtime/queries/gts/tags.scm
Normal file
1
runtime/queries/gts/tags.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_typescript,ecma
|
1
runtime/queries/gts/textobjects.scm
Normal file
1
runtime/queries/gts/textobjects.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
; inherits: _gjs,_typescript,ecma
|
Loading…
Reference in New Issue
Block a user