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

Proposal: LSP Support #6447

Open
1 task done
Eveeifyeve opened this issue Feb 20, 2024 · 18 comments
Open
1 task done

Proposal: LSP Support #6447

Eveeifyeve opened this issue Feb 20, 2024 · 18 comments
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@Eveeifyeve
Copy link

Suggestion

To add support for LSP for script languages for editors. This will have the ability to tell you hey there is an error in the Skript code before in Realtime not in runtime. Not only that have intellisense for different editors and ide.

Why?

This will be really good for VsCode, IntelliJ and others to add support for the language.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
@sovdeeth
Copy link
Member

LSP? Liskov Substitutability Principle?

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Feb 20, 2024

LSP Is Language Server Protocol It's what all languages use like C++, Python and even Java Uses a LSP.

https://microsoft.github.io/language-server-protocol/

@sovdeeth
Copy link
Member

Sure, though I doubt it will be much of a priority. Feel free to make a PR if you're interested in it!

@sovdeeth sovdeeth added priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). feature Pull request adding a new feature. labels Feb 20, 2024
@Eveeifyeve
Copy link
Author

It is, cause how are people going to use your language when there is no support in their editors? They have to see your documentation to find out the issue.

@sovdeeth
Copy link
Member

I'm not saying it's not valuable, it's just that none of the team members have expressed much interest in similar topics in the past. In addition, the documentation is pretty comprehensive, so there's no urgent gap to fill there, either.
If someone is willing to tackle it, great! I am just not under the impression that anyone's eager to take this on.

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Feb 20, 2024

But if I was you using your language you assume you want intellisence for your language right. But oh that right it's not implemented because you need to implement an LSP server. And so you don't know and you need a browser to look at your documentation. So what do you do then? That why it's really useful in instances where you don't want to have a look at the documentation and you know the code but you forgot the last things about it. It makes your language much easier to master Not Harder.

@Eveeifyeve
Copy link
Author

To be quite honest you letting hundreds even thousands of people down with no LSP support or intellisence built in. So my take is if there's no intellisence why make a language?

@Eveeifyeve
Copy link
Author

So yeah I will say good luck at getting VSCode Support ore any Editor Support built in Without LSP Support, Because they all use LSP.

@bluelhf
Copy link
Contributor

bluelhf commented Feb 20, 2024

Because Skript is still intimately tied with Bukkit APIs, a language server would need to either spin up a Bukkit server or work independently of the Skript plugin, neither of which is particularly appealing as a solution. A Bukkit server is clumsy, and projects for parsing independent of a server like skript-parser are a monumental task to make, suffer from feature parity issues, and generally don't seem to receive much interest from developers.

Honestly, Skript is a very simple language, and things like auto-completions can, in limited capacity, already be provided by extensions. The effort required to make a language server seems to outweigh the benefit. Skript is an open source project, you're more than welcome to start development work on a language server if you'd like :)

@AyhamAl-Ali
Copy link
Member

To be quite honest you letting hundreds even thousands of people down with no LSP support or intellisence built in. So my take is if there's no intellisence why make a language?

Don't take things personally mate. This is an open source project that aims to help many users from very different roles to achieve their needs using simple English-like programming. It's meant to be simple using plain English sentences, so LSP wasn't a big concern and still isn't that much especially since none of the team have expressed their will to implement such thing, that doesn't mean we are not interested in adding that.

We as a team who are working on this project in our free time as much as we can can't always implement all users wishes. We have skript-grammar project which adds syntax highlighting on different editors like VSCode, Atom, and ST3 and still WIP. If you have the capability to contribute and add LSP to the project feel free to.

@Eveeifyeve
Copy link
Author

To be quite honest you letting hundreds even thousands of people down with no LSP support or intellisence built in. So my take is if there's no intellisence why make a language?

Don't take things personally mate. This is an open source project that aims to help many users from very different roles to achieve their needs using simple English-like programming. It's meant to be simple using plain English sentences, so LSP wasn't a big concern and still isn't that much especially since none of the team have expressed their will to implement such thing, that doesn't mean we are not interested in adding that.

We as a team who are working on this project in our free time as much as we can can't always implement all users wishes. We have skript-grammar project which adds syntax highlighting on different editors like VSCode, Atom, and ST3 and still WIP. If you have the capability to contribute and add LSP to the project feel free to.

True but evern starting skript-grammar did you evern thought of building a lsp which does all that for plus intellisence in the future?

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Feb 22, 2024

Because Skript is still intimately tied with Bukkit APIs, a language server would need to either spin up a Bukkit server or work independently of the Skript plugin, neither of which is particularly appealing as a solution. A Bukkit server is clumsy, and projects for parsing independent of a server like skript-parser are a monumental task to make, suffer from feature parity issues, and generally don't seem to receive much interest from developers.

Honestly, Skript is a very simple language, and things like auto-completions can, in limited capacity, already be provided by extensions. The effort required to make a language server seems to outweigh the benefit. Skript is an open source project, you're more than welcome to start development work on a language server if you'd like :)

But if your language is here to stay it should have the support for it but only when they get the extension or when you deside to fully add it to deafult langs to any editor because it can be handy becacuse it will help you in the proccess of adding it in the future.

@BaeFell
Copy link
Member

BaeFell commented Feb 22, 2024

Skript has been around for 13 years. Skript is run by a team of volunteers. If you want LSP, you can either make it yourself or wait until more important and worthwhile tasks are done. You're one of the very very very few to have ever asked for this.

@Moderocky
Copy link
Member

Because of the nature of Skript as a language it would be almost impossible to create a useful LSP.
Instead of a strict grammar and a regular structure, Skript has hundreds of thousands of potential loose, conditional phrases that would take the place of keywords in another language.
To make matters worse, the language itself could be completely different depending on the third-party addons in use as well as what's on the server itself (e.g. the server software, the Minecraft version) so there is practically no way to create a centralised protocol that will provide correct results for all users.
Useful auto-complete is unfeasible, accurate error-detection is unfeasible, it's difficult to see what this LSP is going to actually provide at the end of the day, other than syntax highlighting that already has package support in most code editors.

Fortunately, smart editors like Atom (and probably Microsoft's VS Code) can already provide some semblance of smart autocompletion using the grammar packages that are already available by referencing the code in your script file. Aside from the error parsing (which you can use your own server for, or one of the online parsing tools) there's nothing you don't already have.

@Eveeifyeve
Copy link
Author

Eveeifyeve commented Feb 22, 2024

Because of the nature of Skript as a language it would be almost impossible to create a useful LSP. Instead of a strict grammar and a regular structure, Skript has hundreds of thousands of potential loose, conditional phrases that would take the place of keywords in another language. To make matters worse, the language itself could be completely different depending on the third-party addons in use as well as what's on the server itself (e.g. the server software, the Minecraft version) so there is practically no way to create a centralised protocol that will provide correct results for all users. Useful auto-complete is unfeasible, accurate error-detection is unfeasible, it's difficult to see what this LSP is going to actually provide at the end of the day, other than syntax highlighting that already has package support in most code editors.

Fortunately, smart editors like Atom (and probably Microsoft's VS Code) can already provide some semblance of smart autocompletion using the grammar packages that are already available by referencing the code in your script file. Aside from the error parsing (which you can use your own server for, or one of the online parsing tools) there's nothing you don't already have.

True but there is no offical support for any intellisence or anything for .sk files under skriptlang or anything and so your are using third parties to download an extension potentially eaither stealing your data/installing malware or actually has the support for it.

@Moderocky
Copy link
Member

As everybody else has said already, if you want this then you're free to produce it yourself, but it's not something that we are able to (or see the need to) dedicate our time and effort to currently.

@Eveeifyeve
Copy link
Author

As everybody else has said already, if you want this then you're free to produce it yourself, but it's not something that we are able to (or see the need to) dedicate our time and effort to currently.

This should have been implemented when I get the time I will implement it.

@Eveeifyeve
Copy link
Author

I have created a fork here but when i get the time I will develop it.

@AyhamAl-Ali AyhamAl-Ali added enhancement Feature request, an issue about something that could be improved, or a PR improving something. and removed feature Pull request adding a new feature. labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

6 participants