github.com/terraform-linters/tflint@v0.51.2-0.20240520175844-3750771571b6/docs/user-guide/editor-integration.md (about)

     1  # Editor Integration
     2  
     3  TFLint can also act as a Language Server to integrate with various editors. This server conforms to [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) v3.14.0 and can be used with an editor that implements any client. The following is an example in VS Code:
     4  
     5  ![demo](../assets/lsp_demo.gif)
     6  
     7  This server can be started with the `--langserver` option:
     8  
     9  ```console
    10  $ tflint --langserver
    11  14:21:51 cli.go:185: Starting language server...
    12  ```
    13  
    14  Currently, it only supports diagnostics and subscribes the following methods:
    15  
    16  - `initialize`
    17  - `initialized`
    18  - `shutdown`
    19  - `exit`
    20  - `textDocument/didOpen`
    21  - `textDocument/didClose`
    22  - `textDocument/didChange`
    23  - `workspace/didChangeWatchedFiles`