Skip to content

Commit

Permalink
feat(docker-compse-lsp): add more filetype into docker compse server(#…
Browse files Browse the repository at this point in the history
…3008)

Update the root patterns according to the compose spec.

Source: https://github.com/compose-spec/compose-spec/blob/master/03-compose-file.md
  • Loading branch information
cizordj authored Feb 13, 2024
1 parent 76251e8 commit 56e40a7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return {
default_config = {
cmd = { 'docker-compose-langserver', '--stdio' },
filetypes = { 'yaml.docker-compose' },
root_dir = util.root_pattern 'docker-compose.yaml',
root_dir = util.root_pattern('docker-compose.yaml', 'docker-compose.yml', 'compose.yaml', 'compose.yml'),
single_file_support = true,
},
docs = {
Expand All @@ -21,7 +21,7 @@ npm install @microsoft/compose-language-service
Note: If the docker-compose-langserver doesn't startup when entering a `docker-compose.yaml` file, make sure that the filetype is `yaml.docker-compose`. You can set with: `:set filetype=yaml.docker-compose`.
]],
default_config = {
root_dir = [[root_pattern("docker-compose.yaml")]],
root_dir = [[root_pattern("docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml")]],
},
},
}

0 comments on commit 56e40a7

Please sign in to comment.