GithubHelp home page GithubHelp logo

Auto-indentation rules about twee3-language-tools HOT 4 OPEN

 avatar commented on August 10, 2024
Auto-indentation rules

from twee3-language-tools.

Comments (4)

Tranberry avatar Tranberry commented on August 10, 2024

the AI wants to add (?!\\w) to link like so: cycle.*|link(?!\\w).*|linkappend.*.

I wonder if it's dizzy or actually on to something. I mean would VS Code really add multiple indentations due to matching with link and linkappend and linkprepeand? I figure it is dizzy but still worth a thought.

It's also saying that elseif and else should be covered by the <<\\/.*>> pattern but I figured you had to add it while testing.

from twee3-language-tools.

 avatar commented on August 10, 2024

the AI wants to add (?!\\w) to link like so: cycle.*|link(?!\\w).*|linkappend.*.

I wonder if it's dizzy or actually on to something. I mean would VS Code really add multiple indentations due to matching with link and linkappend and linkprepeand? I figure it is dizzy but still worth a thought.

It's also saying that elseif and else should be covered by the <<\\/.*>> pattern but I figured you had to add it while testing.

<<\\/.*>> Shouldn't be matching elseif and else. It should just match any macro that closes with / like <</if>>. Know that in the language-configuration file you have to escape a lot of the \ characters for it to be parsed by VSCode. So not sure if the AI is reading the extra \ characters that normal regex usually doesn't need.

Also my regex doesn't account for 1 liners and oops, wrong button when replying.

from twee3-language-tools.

cyrusfirheir avatar cyrusfirheir commented on August 10, 2024

Indentation rules require more investigation. Single regular expressions don't handle all edge cases properly.

Meanwhile, v0.22.0 adds OnEnterRules for SC-2. It will use custom definitions from config files alongside the built-in macro list to indent inside container macros. Hopefully, that is helpful.

Besides, #118 has always been on the todo-list.

from twee3-language-tools.

 avatar commented on August 10, 2024

Oh I missed that issue but I'll give the 0.22.0 version a go and if some of them work then I'm good.
Thanks.

from twee3-language-tools.

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.