Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/legesher/tree-sitter-legesher-python
β¨ Legesher's Python grammar for Tree-Sitter π³
https://github.com/legesher/tree-sitter-legesher-python
developer-tools grammar hacktoberfest language legesher open-source python text-editor tree-sitter
Last synced: 3 months ago
JSON representation
β¨ Legesher's Python grammar for Tree-Sitter π³
- Host: GitHub
- URL: https://github.com/legesher/tree-sitter-legesher-python
- Owner: legesher
- License: other
- Created: 2019-09-06T21:05:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-08T03:55:40.000Z (about 1 year ago)
- Last Synced: 2024-10-01T14:26:55.286Z (4 months ago)
- Topics: developer-tools, grammar, hacktoberfest, language, legesher, open-source, python, text-editor, tree-sitter
- Language: JavaScript
- Homepage: https://www.legesher.io
- Size: 17.7 MB
- Stars: 45
- Watchers: 3
- Forks: 36
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- awesome-for-beginners - tree-sitter-legesher-python - First-Issue)_ <br> Learn and code in Python using your native language. (Python)
- fucking-awesome-for-beginners - tree-sitter-legesher-python - First-Issue)_ <br> Learn and code in Python using your native language. (Python)
README
Legesher's Tree-Sitter-Python
π» Code in Python πusing your native written βοΈlanguage.Programming with Legesher's dev tools empowers any developer to create without losing the art of innovation π‘, creativity π¨, or collaboration π€ in translation.
# Introduction
**`tree-sitter-legesher-python`** π³ is the written language interchangeable version of the tree-sitter grammar for the python language used by text editors such as **Atom**. This npm package is used by [`language-legesher-python`](https://github.com/legesher/language-legesher-python) to enable you to code in the language you natively use.
_π’ Check if your native language is available in the [Legesher translation repository](https://github.com/legesher/legesher-translations)! If not, we'd love your help to add it!!_
# Getting Started
In order to use the `tree-sitter-legesher-python` grammar to code, you will need to follow the following steps:
**1οΈβ£ Download Atom (a text editor)**
Head on over to [Atom.io](https://atom.io/) to download the latest version of the text editor.**2οΈβ£ Update Preferences**
Once installed on your local computer, open the _Atom_ application. In the options in the top menu bar, navigate to Atom's Settings _Atom > Preferences..._ . A settings window should pop up in your editor.**3οΈβ£ Disable Atom's `language-python`**
Continue by clicking the _Packages_ section. Here, you'll see a number of items: _Installed Packages_, _Community Packages_, _Core Packages_, _Development Packages_, _Git Packages_. Using the search bar, type `language-python` to find the _Core Package_ currently installed on your text editor. Click _Disable_.**4οΈβ£ Download Legesher's `language-legesher-python`**
Now, head to the _Install_ section to install a new package to your text editor (make sure that the _Packages_ button is selected instead of the _Themes_). Type `language-legesher-python` in the search bar to find Legesher's package, and click _Install_.**5οΈβ£ Enable Legesher's `language-legesher-python`**
Sometimes you'll have to enable a newly installed package by clicking the _Enable_ button in the package when it is within the _Packages_ section of the settings.**6οΈβ£ Write A "Hello World" Program In Your Language**
Now, you can start coding in Python using any written language currently available within Legesher's translation library! The syntax highlighting should match as if you were coding Python in English!```python
def main():
print "Hello World"
```# Contributing
β€οΈLegesher relies on the passionate members of its community (both developer and non-developer alike) to keep delivering impactful tools to people all over the world.
Before contributing, be sure to consult Legesher's [contribution guidelines](https://docs.legesher.io/the-official-things/contributing-guidelines) and [language translation conventions](https://docs.legesher.io/legesher-translations/translation-conventions). As a member of our community, you must abide by our [Code Of Conduct](https://docs.legesher.io/the-official-things/code-of-conduct).
## Installation
**1οΈβ£ Fork the legesher/tree-sitter-legesher-python repository**
Follow these instructions on [how to fork a repository](https://help.github.com/en/articles/fork-a-repo)**2οΈβ£ Cloning the repository**
Once you have set up your fork of the `legesher/tree-sitter-legesher-python` repository, you'll want to clone it to your local machine. This is so you can make and test all of your personal edits before adding it to the master version of `legesher/tree-sitter-legesher-python`.Navigate to the location on your computer where you want to host your code. Once in the appropriate folder, run the following command to clone the repository to your local machine.
```
git clone [email protected]:your-username/tree-sitter-legesher-python.git
```**3οΈβ£ Bootstrapping the repository**
You'll then want to navigate within the folder that was just created that contains all of the content of the forked repository. There you'll want to run the installation script to get the updated version of all the dependencies.```
cd tree-sitter-legesher-python
npm install
```## Development
We love your desire to give back, and want to make the process as welcoming to newcomers and experts as possible. We're working on developing more intuitive tutorials for individuals of all skill levels and expertise, so if you think the community would value from being walked through the steps you're going through please share! β€οΈ
### Test Changes
When you start making changes to the code on your local branch, you'll need to test those changes. Before your code can be accepted into the master branch, it will have to pass all of the tests within `/examples/*`. To check the updates made to the grammar, run the following commands:
**1οΈβ£ Save Current Changes**
When you get to a point when you want to test the functionality of the code, make sure all your changes are saved. βThey don't necessarily have to be _committed_ changes in order to test them.**2οΈβ£ Generate the updated tree-sitter parser**
You'll need to generate a new tree-sitter grammar whenever you make changes in this repository. Running this command will usually update files within the `/src/*` folder.```
tree-sitter generate
```**3οΈβ£ Configure the grammar**
This command makes sure the binding information for the grammar is properly set up and configured.```
node-gyp configure
```**4οΈβ£ Build the grammar**
Using the newly configured bindings, we can now build the new grammar with your changes.```
node-gyp build
```**5οΈβ£ Test changes**
To make sure that the grammar is properly updated, run the tests. If you add elements that do not have tests to prove whether they work correctly or not, please include them in your pull request.```
tree-sitter test
```### References
This repository is a forked extension of [tree-sitter's](http://tree-sitter.github.io) `tree-sitter-python`. This package works alongside the _language_ repository [`language-legesher-python`](https://github.com/legesher/language-legesher-python). These two repositories work closely together, so it may be useful to touch up on both repositories' documentation.
**The Python Language**
- [Python 2 Grammar](https://docs.python.org/2/reference/grammar.html)
- [Python 3 Grammar](https://docs.python.org/3/reference/grammar.html)
- [Tree Sitter](https://github.com/tree-sitter/tree-sitter)## The Community
Meet our [community](https://github.com/legesher/legesher/tree/master/community) (full of contributors, backers, sponsors, and supporters) that give a little piece of their heart to this project. Thank you so much. ([emoji key](https://allcontributors.org/docs/en/emoji-key))
Madison (Pfaff) Edgar
π» π π
Wesley Cranston
π» π
dolphincodes
π
Leonardo Furtado
π
Eshan Agarwal
π
Mythreya Kuricheti
π
Jonathan Alvaro
π
Zeeshan Ali
π
andres-posadas
π
calra123
π»
Ajai Dubey
π€
alxnull
π§
_This project follows the [all-contributors](https://allcontributors.org/) specification. Contributions of any kind are welcome and recognized. β¨_