Improve VSCode extension
HerringtonDarkholme opened this issue · comments
State of Art
- VsCode search
- https://codeque.co/get-started#vscode
- https://github.com/quasilyte/vscode-gogrep
- https://github.com/cshuaimin/ssr.nvim
Feature List
- Single File Search
- Project Files Search
- Replace preview
- Replace All
- Include/Exclude files
- Toggle Context Line
- YAML mode
- Debug on Playground
VSCode seems only support JSON schema validation.
For YAML, we probably need third-party extensions, such as https://github.com/redhat-developer/vscode-yaml
Figured out a way to get YAML intelliSense:
- Install VSCode YAML extension
- Add config below to
.vscode/settings.json
{ // ... "yaml.schemas": { "https://raw.githubusercontent.com/ast-grep/ast-grep/main/schema/project.json": "sgconfig.yml" } }
The schema needs to be accessible via URL, another PR here: ast-grep/ast-grep#543
It's a little verbose, but would work.
@pd4d10 looks like yaml language server is a better choice. https://github.com/redhat-developer/yaml-language-server
Hi @pd4d10, I also added rule schema in https://github.com/ast-grep/ast-grep/blob/main/schemas/rule.json