Skip to content

Commit

Permalink
doc: add lsp configuration doc
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme committed May 18, 2024
1 parent 7c04756 commit 4270de9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions website/guide/tools/editors.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@ Telescope ast_grep

[telescope-ast-grep.nvim](https://github.com/ray-x/telescope-ast-grep.nvim) is an alternative plugin that provides ast-grep functionality enhancements.

## LSP Server

Currently ast-grep support these LSP capabilities:

### Server capability

* [publish diagnostics](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_publishDiagnostics)
* [Fix diagnostic code action](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_publishCodeAction)

### Client requirements

* textDocument/didOpen
* textDocument/didChange
* textDocument/didClose

### Configuration

ast-grep does not have LSP configuration, except that ast-grep LSP requires `sgconfig.yml` in the project root.

You can also specify the configuration file path via command line:

```bash
sg lsp -c <configPath>
```

## More Editors...

Expand Down

0 comments on commit 4270de9

Please sign in to comment.