Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve VSCode extension #31

Closed
HerringtonDarkholme opened this issue Jun 6, 2023 · 8 comments
Closed

Improve VSCode extension #31

HerringtonDarkholme opened this issue Jun 6, 2023 · 8 comments

Comments

@HerringtonDarkholme
Copy link
Member

State of Art

Feature List

  • Single File Search
  • Project Files Search
  • Replace preview
  • Replace All
  • Include/Exclude files
  • Toggle Context Line
  • YAML mode
  • Debug on Playground
@HerringtonDarkholme
Copy link
Member Author

HerringtonDarkholme commented Jun 7, 2023

microsoft/vscode#98098
microsoft/vscode#97190
microsoft/vscode#73524
microsoft/vscode#59921

@pd4d10
Copy link

pd4d10 commented Jul 24, 2023

VSCode seems only support JSON schema validation.

For YAML, we probably need third-party extensions, such as https://github.com/redhat-developer/vscode-yaml

@pd4d10
Copy link

pd4d10 commented Jul 24, 2023

Figured out a way to get YAML intelliSense:

  1. Install VSCode YAML extension
  2. 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.

image

@HerringtonDarkholme
Copy link
Member Author

@pd4d10 looks like yaml language server is a better choice. https://github.com/redhat-developer/yaml-language-server

HerringtonDarkholme added a commit to ast-grep/ast-grep that referenced this issue Oct 6, 2023
@HerringtonDarkholme
Copy link
Member Author

Hi @pd4d10, I also added rule schema in https://github.com/ast-grep/ast-grep/blob/main/schemas/rule.json

@HerringtonDarkholme
Copy link
Member Author

image
image

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants