2022-03-20 10:22:32 +08:00
|
|
|
local util = require 'lspconfig.util'
|
2021-10-05 15:13:10 +08:00
|
|
|
|
2022-03-20 10:22:32 +08:00
|
|
|
return {
|
2021-10-05 15:13:10 +08:00
|
|
|
default_config = {
|
|
|
|
cmd = { 'tflint', '--langserver' },
|
|
|
|
filetypes = { 'terraform' },
|
|
|
|
root_dir = util.root_pattern('.terraform', '.git', '.tflint.hcl'),
|
|
|
|
},
|
|
|
|
docs = {
|
|
|
|
description = [[
|
|
|
|
https://github.com/terraform-linters/tflint
|
|
|
|
|
|
|
|
A pluggable Terraform linter that can act as lsp server.
|
|
|
|
Installation instructions can be found in https://github.com/terraform-linters/tflint#installation.
|
|
|
|
]],
|
|
|
|
default_config = {
|
|
|
|
root_dir = [[root_pattern(".terraform", ".git", ".tflint.hcl")]],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|