diff options
| author | Wessel Blokzijl <wesselb94@gmail.com> | 2024-03-03 07:18:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-03 14:18:01 +0800 |
| commit | d23cb955094ca4a392df5774cd9dbf6af2ba6e0c (patch) | |
| tree | f80df56da9bd4b2cc852f17b0740f3228d499c45 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-d23cb955094ca4a392df5774cd9dbf6af2ba6e0c.tar nvim-lspconfig-d23cb955094ca4a392df5774cd9dbf6af2ba6e0c.tar.gz nvim-lspconfig-d23cb955094ca4a392df5774cd9dbf6af2ba6e0c.tar.bz2 nvim-lspconfig-d23cb955094ca4a392df5774cd9dbf6af2ba6e0c.tar.lz nvim-lspconfig-d23cb955094ca4a392df5774cd9dbf6af2ba6e0c.tar.xz nvim-lspconfig-d23cb955094ca4a392df5774cd9dbf6af2ba6e0c.tar.zst nvim-lspconfig-d23cb955094ca4a392df5774cd9dbf6af2ba6e0c.zip | |
docs(terraformls): add docs on how to pass settings (#3040)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/terraformls.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/terraformls.lua b/lua/lspconfig/server_configurations/terraformls.lua index fcf6537c..8fb4172f 100644 --- a/lua/lspconfig/server_configurations/terraformls.lua +++ b/lua/lspconfig/server_configurations/terraformls.lua @@ -5,6 +5,7 @@ return { cmd = { 'terraform-ls', 'serve' }, filetypes = { 'terraform', 'terraform-vars' }, root_dir = util.root_pattern('.terraform', '.git'), + init_options = {}, }, docs = { description = [[ @@ -34,6 +35,11 @@ choice: - compatibility with a single particular Terraform (0.12.20 at time of writing) - configs designed for other 0.12 versions may work, but interpretation may be inaccurate - less stability (due to reliance on Terraform's own internal packages) + +Note, that the `settings` configuration option uses the `workspace/didChangeConfiguration` event, +[which is not supported by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/features.md). +Instead you should use `init_options` which passes the settings as part of the LSP initialize call +[as is required by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md#how-to-pass-settings). ]], default_config = { root_dir = [[root_pattern(".terraform", ".git")]], |
