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

[feature] global config / way to add languages globally #658

Open
pbsds opened this issue Oct 5, 2023 · 0 comments
Open

[feature] global config / way to add languages globally #658

pbsds opened this issue Oct 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@pbsds
Copy link

pbsds commented Oct 5, 2023

⭐ Suggestion

I want to be able to register additional tree-sitter languages, to be used in ad-hoc invocations of sg. This can be realized in multiple ways, number 2 or 5 of which i think is best.

  1. Add support for global a $HOME/.config/ast-grep/sgconfig.yaml
  2. Add support for reduced scope $HOME/.config/ast-grep/extra-languages.yaml
  3. Add an environ, e.g. AST_GREP_LANGUAGES="lang:/path/to/grammar-lang.so;"
  4. Make all sg subcommands, not just sg scan, accept a --config, allowing me to shadow sg with a shell alias
  5. Allow one to link against additional languages at compile time

related: #30 (comment)

💻 Use Cases

  • Ad-hoc/non-project uses, or where checking a sgconfig.yaml into the repo is undesirable
@pbsds pbsds added the enhancement New feature or request label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant