SigureMo / ast-grep-vscode

VSCode extension package for ast-grep language server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ast-grep-vscode

VSCode extension package for ast-grep language server

Features

  • Code search
  • Code linting(*)
  • Code actions(*)

Note, code linting and code actions requires setting up sgconfig.yml in your workspace root.

Requirements

# install via npm
npm i @ast-grep/cli -g

# install via cargo
cargo install ast-grep

# install via homebrew
brew install ast-grep
  • setting up ast-grep project.

    This is an optional step to enable code linting and code actions. It requires at least one file and one folder to work:

You can also use the command line tool to set it up.

ast-grep new

Commands

  • ast-grep.restartLanguageServer Restart ast-grep langauge server. Useful to reload rule or configuration changes.

Extension Settings

This extension contributes the following settings:

  • astGrep.serverPath: Specify the language server binary path.

About

VSCode extension package for ast-grep language server

License:MIT License


Languages

Language:TypeScript 89.8%Language:JavaScript 5.6%Language:CSS 4.4%Language:Shell 0.1%