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

Feature Request: Lua Support #3

Closed
tjcouch1 opened this issue Nov 10, 2018 · 2 comments
Closed

Feature Request: Lua Support #3

tjcouch1 opened this issue Nov 10, 2018 · 2 comments

Comments

@tjcouch1
Copy link

I would love to have a way to do Lua comment regions! I tried to add it myself, but I couldn't get the source code to run while I was debugging in VSCode... I don't have any experience with VSCode extensions or TypeScript, and there were errors that I suppose I needed to fix for the extension to work.

Lua comment regions would work as follows:

--#region Things

function Hello()
  print("Hello")
end

--#endregion

--#region Stuff

function World()
  print("World")
end

--#endregion

I have some things written in extension.ts that might be helpful (they weren't hard, but I might as well include them):

Line 99:
    "markdown",
    "lua"];
Line 133:
private static getLuaStyleRegions() {
        var retval = new RegionText();
        retval.start = "--#region ";
        retval.end = "--#endregion";
        retval.nameInsertionIndex = ImNotQuiteSureWhatThisDoesSoIllLetYouSetIt;
        return retval;

    }
Line 157:
            case "lua":
                return LanguageIdRegionLookup.getLuaStyleRegions();

I imagine there's other stuff you would need to do, but I'll let you figure that out since you actually know what you're doing.

Thanks! This is a great extension, and it would be fantastic with Lua support!

@maptz
Copy link
Owner

maptz commented Jan 21, 2019

Yes. This should be straightforward. I'll try this out.

@maptz
Copy link
Owner

maptz commented Jan 21, 2019

I'm implementing this today. It should be available in the next release

@maptz maptz closed this as completed Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants