Comments (11)
This is certainly something we need to implement. Right now both Ren'Py and Python syntax highlighting are defined in the syntaxes/renpy.tmLanguage.json
file. The first thing will be to collect the syntax changes and write examples to validate the changes.
So far my experience editing that file hasn't been very good, so I'll have to study it from start to finish.
from vscode-language-renpy.
Yeah it's a bit of a tricky one to edit given it's all regex strings unescaped. It's kinda difficult to follow.
That said I'm wondering if it's possible to leverage semantic highlighting for it via a parser. It may potentially be easier especially if we actually want to make type annotations functional like the standard python extension where hovering over a variable will also note its type.
from vscode-language-renpy.
A good approach may be to handle Python syntax as an embedded language, especially now that Ren'Py is going to support Python 3. This way we would only have to worry about maintaining the Ren'Py syntax.
from vscode-language-renpy.
I think this would make the most sense. Makes it a lot easier on our part then. My main concern is also the hover provider in this plugin to respect the type annotations as well
from vscode-language-renpy.
It'd also massively clean up the syntaxes json since right now it seems to cover a mix of both renpy and python syntaxes, and as well it may just wind up fixing #6 if we split python handling to be separate?
from vscode-language-renpy.
It'd also massively clean up the syntaxes json since right now it seems to cover a mix of both renpy and python syntaxes, and as well it may just wind up fixing #6 if we split python handling to be separate?
I think it would solve it because it would apply only the Python syntax to that scope.
from vscode-language-renpy.
In my spare time, I've started to rewrite the grammar. At the moment I've reimplemented the Python statements, using source.renpy
(the grammar of the Python extension of VSCode). This way we will only have to implement and maintain Ren'Py specific syntax.
There is still a long way to go, but if you want to try it, you can do it with PR #76. Contributions, feedback, and bug reports are welcome!
from vscode-language-renpy.
Amazing, I'll definitely pull this!
from vscode-language-renpy.
some issues with function typing
i know you've been working on it for a while but i'll still post this
from vscode-language-renpy.
@Elckarow Thank you. It's already fixed in new-syntax
branch. But support for type hint has yet to be added to other features.
from vscode-language-renpy.
Fixed as of v2.1.0-pre-release
from vscode-language-renpy.
Related Issues (20)
- Still some formating issues in 2.3.1 HOT 17
- To all Ren'Py users! We need your help! - Full Ren'Py grammar definition for 'intellisense' HOT 15
- [BUG] - Extension enters a lockup state and blocks all other extensions from loading HOT 9
- [Bug] - Extension alters workspace.settings.json with incorrect settings HOT 7
- [Feature] Support for new _ren.py format used in Renpy 8 HOT 6
- [Bug] - Extension alters workspace.settings.json with incorrect settings (with example) HOT 1
- [Feature] - Use standard denotation for deprecated functions + offer alternatives HOT 2
- Error: Illegal argument: character must be non-negative HOT 2
- Diagnostics mistakes on not-defaulted variables
- Slow Performance (Intellisense primarily) HOT 14
- Wrong float highlight when having digits both before and after the dot HOT 1
- Color picker breaks when rpy file becomes invalid syntax and doesn't recover HOT 3
- Ar
- (Diagnostics) consider label parameters as global variables
- H
- "Go to Definition" doesn't work on Python functions in ren'py
- Run: Renpy: Run project command doesn't support space in project path HOT 2
- Bug, The extension doesn't work at all, stuck on Loading Ren'py static data HOT 4
- Windows: Renpy executable location doesn't work when Running unless the backslashes are escaped HOT 1
- About project state HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-language-renpy.