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

add LuauSyntaxHighlighting package #8280

Closed
wants to merge 1 commit into from
Closed

add LuauSyntaxHighlighting package #8280

wants to merge 1 commit into from

Conversation

zainthemaynnn
Copy link

LuauSyntaxHighlighting package

this package intends to add syntax highlighting for the luau subset of lua which includes a bunch of extra globals and some keywords. although I'm aware that this package already provides a similar purpose it's no longer maintained and the owner is inactive; this one stays up to date with network requests. while I thought about making a fork of it I had no interest in continuing support for snippets or anything like that. although I will be glad to do that if you'd prefer.

@braver
Copy link
Collaborator

braver commented May 24, 2021

Have you tried opening a PR or otherwise coordinating with the author of that package? If that doesn’t work, we can look into replacing that package with yours, assuming you intend to maintain it and make sure the snippets continue to work (if they’re useful enough).

Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing result: SUCCESS

Repo link: LuauSyntaxHighlighting

Packages added:
  - LuauSyntaxHighlighting

Processing package "LuauSyntaxHighlighting"
  - All checks passed

@zainthemaynnn
Copy link
Author

sure, I’ll see if I can try and reach out. if not I suppose maintaining whatever is already there shouldn’t be too bad, I’ll just replace the syntax file.

@rwols
Copy link
Contributor

rwols commented May 24, 2021

Have you also considered adding this "Roblox" environment to lua-language-server and using LSP-lua instead?

@rwols
Copy link
Contributor

rwols commented May 24, 2021

See also sublimelsp/repository#2 where we almost added a special LSP-roblox language client

@zainthemaynnn
Copy link
Author

thanks, that actually sounds like the best idea because I made it with that language server in mind. although, will LSP-lua be the right place to put it? it could go there for the time being but I think that the unreleased client will be the perfect place to bundle this if it can get up and running.

@rwols
Copy link
Contributor

rwols commented May 24, 2021

I am not too familiar with Lua and how it should adapt to different environments.

But I can make a comparison to Python. With Python you write an interface file ending in .pyi and that file describes the high-level functions and classes available for a module with the same name. I imagine it works similar for Lua. The maintainer of lua-language-server is trying to make his server adapt to different environments: LuaLS/lua-language-server#409

From what I understand from the linked discussion, you set the setting Lua.workspace.library to some Lua file (?) and the server will then understand the functions/classes available in that file.

@zainthemaynnn
Copy link
Author

zainthemaynnn commented May 24, 2021

oh I see. if that works the plugin could pretty easily extend to support multiple frameworks as well, I will look into that.

@braver
Copy link
Collaborator

braver commented Jun 13, 2021

Let me know what you want to do here. If you still want to add this syntax, let's try to replace the existing one.

@braver braver added duplicate This package has already been submitted/accepted in a different pull request stale The pull request needs to be updated but has not been within the recent past (2 weeks) labels Jun 13, 2021
@rwols
Copy link
Contributor

rwols commented Jun 13, 2021

I was wondering that as well a few days ago @zainthemaynnn. Did things work out by using Lua.workspace.library? If so, maybe make a pull request to explain in the README of LSP-Lua how that would work to set up with WoW, Roblox, GMod, love2d, etc

@zainthemaynnn
Copy link
Author

I was wondering that as well a few days ago @zainthemaynnn. Did things work out by using Lua.workspace.library? If so, maybe make a pull request to explain in the README of LSP-Lua how that would work to set up with WoW, Roblox, GMod, love2d, etc

sorry about this, forgot it was still open. yeah, actually I got one of those files working a few days ago. I can use the same thing I did in this package but parse one of those workspace files instead to achieve the same syntax highlighting. I'll submit a pull request to that package soon. in the meantime, I don't think we would really need this package once that's finished so I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This package has already been submitted/accepted in a different pull request feedback provided stale The pull request needs to be updated but has not been within the recent past (2 weeks)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants