Skip to content

Commit

Permalink
Add docker-compose language (#9661)
Browse files Browse the repository at this point in the history
* languages: add docker-compose language

it uses docker-compose-langserver as lsp
And yaml for syntax highlighting, indents and injections

* languages: add luajit as a shebang of lua

This helps to provide syntax highlighting and
other lua goodies when writing luajit

* book(update): run cargo xtask docgen

* since #8006 full filenames uses glob
  • Loading branch information
Ultra-Code authored Feb 18, 2024
1 parent b950dea commit c72426c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
| devicetree || | | |
| dhall ||| | `dhall-lsp-server` |
| diff || | | |
| docker-compose || || `docker-compose-langserver` |
| dockerfile || | | `docker-langserver` |
| dot || | | `dot-language-server` |
| dtd || | | |
Expand Down
13 changes: 12 additions & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cuelsp = { command = "cuelsp" }
dart = { command = "dart", args = ["language-server", "--client-id=helix"] }
dhall-lsp-server = { command = "dhall-lsp-server" }
docker-langserver = { command = "docker-langserver", args = ["--stdio"] }
docker-compose-langserver = { command = "docker-compose-langserver", args = ["--stdio"]}
dot-language-server = { command = "dot-language-server", args = ["--stdio"] }
elixir-ls = { command = "elixir-ls", config = { elixirLS.dialyzerEnabled = false } }
elm-language-server = { command = "elm-language-server" }
Expand Down Expand Up @@ -1092,7 +1093,7 @@ name = "lua"
injection-regex = "lua"
scope = "source.lua"
file-types = ["lua"]
shebangs = ["lua"]
shebangs = ["lua", "luajit"]
roots = [".luarc.json", ".luacheckrc", ".stylua.toml", "selene.toml", ".git"]
comment-token = "--"
indent = { tab-width = 2, unit = " " }
Expand Down Expand Up @@ -1460,6 +1461,16 @@ language-servers = [ "docker-langserver" ]
name = "dockerfile"
source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev = "8ee3a0f7587b2bd8c45c8cb7d28bd414604aec62" }

[[language]]
name = "docker-compose"
scope = "source.yaml.docker-compose"
roots = ["docker-compose.yaml", "docker-compose.yml"]
language-servers = [ "docker-compose-langserver" ]
file-types = [{ glob = "docker-compose.yaml" }, { glob = "docker-compose.yml" }]
comment-token = "#"
indent = { tab-width = 2, unit = " " }
grammar = "yaml"

[[language]]
name = "git-commit"
scope = "git.commitmsg"
Expand Down
1 change: 1 addition & 0 deletions runtime/queries/docker-compose/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
; inherits: yaml
1 change: 1 addition & 0 deletions runtime/queries/docker-compose/indents.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
; inherits: yaml
1 change: 1 addition & 0 deletions runtime/queries/docker-compose/injections.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
; inherits: yaml

0 comments on commit c72426c

Please sign in to comment.