Coder Social home page Coder Social logo

Comments (11)

LuqueDaniel avatar LuqueDaniel commented on May 16, 2024

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.

multimokia avatar multimokia commented on May 16, 2024

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.

LuqueDaniel avatar LuqueDaniel commented on May 16, 2024

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.

multimokia avatar multimokia commented on May 16, 2024

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.

multimokia avatar multimokia commented on May 16, 2024

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.

LuqueDaniel avatar LuqueDaniel commented on May 16, 2024

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.

LuqueDaniel avatar LuqueDaniel commented on May 16, 2024

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.

imagen
imagen
imagen

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.

multimokia avatar multimokia commented on May 16, 2024

Amazing, I'll definitely pull this!

from vscode-language-renpy.

Elckarow avatar Elckarow commented on May 16, 2024

Capture
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.

LuqueDaniel avatar LuqueDaniel commented on May 16, 2024

@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.

duckdoom4 avatar duckdoom4 commented on May 16, 2024

Fixed as of v2.1.0-pre-release

from vscode-language-renpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.