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

Is there any way to configure custom language support when using the Python API? #1143

Closed
vergenzt opened this issue May 15, 2024 · 2 comments · Fixed by #1385
Closed

Is there any way to configure custom language support when using the Python API? #1143

vergenzt opened this issue May 15, 2024 · 2 comments · Fixed by #1385
Labels
enhancement New feature or request 👑Sponsor👑 Request from Sponsors!

Comments

@vergenzt
Copy link
Contributor

I'm not seeing anywhere in the API where an sgconfig.yaml can be defined. 😕 I've been exploring both the docs and the source code and am not seeing how to do it. Any suggestions?

docs I've looked at:

@vergenzt vergenzt added the bug Something isn't working label May 15, 2024
@HerringtonDarkholme
Copy link
Member

It is not supported yet. Custom language will be supported after fix API.

@HerringtonDarkholme HerringtonDarkholme added the 👑Sponsor👑 Request from Sponsors! label Aug 1, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 9, 2024
@HerringtonDarkholme HerringtonDarkholme added enhancement New feature or request and removed bug Something isn't working labels Aug 9, 2024
@HerringtonDarkholme
Copy link
Member

Added as an experimental API.

Example usage:

https://github.com/ast-grep/ast-grep/blob/main/crates/pyo3/tests/test_register_lang.py

tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Aug 10, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ast-grep/ast-grep](https://github.com/ast-grep/ast-grep) | patch | `0.26.0` -> `0.26.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>ast-grep/ast-grep (ast-grep/ast-grep)</summary>

### [`v0.26.1`](https://github.com/ast-grep/ast-grep/blob/HEAD/CHANGELOG.md#0261)

[Compare Source](ast-grep/ast-grep@0.26.0...0.26.1)

-   feat: support dynamic language in pyo3 [`#1143`](ast-grep/ast-grep#1143)
-   test: add test for load dynamic lang in python [`236f4ab`](ast-grep/ast-grep@236f4ab)
-   feat: add py_lang registration function [`43e74e7`](ast-grep/ast-grep@43e74e7)
-   feat: add pytype for register language [`8b660cf`](ast-grep/ast-grep@8b660cf)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 👑Sponsor👑 Request from Sponsors!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants