-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Include an LSP client to the script editor #2215
Comments
Arguably, users pick other languages because they want to use them with familiar tooling. So I'm not sure I see much use in this for us. As for GDNative, they can already be integrated into the built-in editor. Godot-Python does it. |
Related to #712. |
As a C++ dev myself, I'd rather code the small C++ part of my game inside the editor rather than firing up an external tool just for that. Might be a matter of preference.
Oh I didn't know that. Does the plugin provides full support in the editor (syntax highlighting, autocompleting, etc) ? It's not clear from the project description. But even in that case, having an integrated LSP client would probably make the writing of such plugins much simpler since there's an LSP server for almost any language now. EDIT: regarding #712 it would also help because a plugin could provide the interface between the LSP client and omnisharp |
To my understanding, yes. I've not used it personally to confirm this though. Also important to note that, as far as I know, this is only possible for PluginScript and not NativeScript (those are two ways a language binding can be implemented). I'm completely against the idea of the LSP support, but we must first evaluate the idea further to understand how much it effort it would take. I am still no convinced it's very useful, but this cannot be offloaded to the pluginland, so there is no easy way out 🙂
I think an instance of VS Code is always useful to have open on a side. I use it to edit resource metadata directly in the text files and do mass changes to the project, while coding exclusively inside of the Godot editor. They pretty much compliment each other. |
@pycbouh You have to realize vs code does not work most of the time and the microsoft c++ and c# plugins are garbage. Also if you have a single screen like me there isn't enough room to open both a ide and the godot editor so you have to manually switch between the windows that are overlapping. Also loading up the ide's take time and memory |
@Shadowblitz16 That's only your opinion. There are plenty of people using VS Code for C++ development, myself included. And once again, people who prefer to use Godot with C# or one of the GDNative languages are usually not only familiar, but proficient with their developer tools and want to use them. The situation where they would want to code from within Godot is very much artificial. |
@pycbouh thats not just a opinion but also my experience. |
Having LSP support for something like C# in the editor would be nice, yes, no disagreement there. Neikeq has already stated that they are open to having it included as well. But no one has stepped up to do it and Neikeq is still pretty much the only person maintaining the C# support for Godot. Because .Net already has a rich ecosystem of tools available to the developers, I (and Neikeq) would prefer that he works on the far more important things. A huge lure of using C# is that it is a statically typed language, the maturity of the language, the experience the developer has with the language, and the mature tooling that developers are familiar with. Pyc is correct in their assertion on why people stick with C#. As for the evidence you provided, it is hardly a case that proves it is "very popular". It has 236 reviews, so we can only guarantee that 236 people purchased it. Sure, we can multiply that by 10 or 20 to be on the safe side with a generous ratio, so roughly 5,000 people. Hardly something I'd say is "very popular" for something that has the community size of Unity. And where did you get the 50% ratio? What was your process for determining that? There are plenty of active users of C# in Godot's Discord that I interact with or observe. And the consensus is pretty much the same. It would be nice, but we don't really care for it because we're comfortable with our current tooling (yes, I do use C# in Godot as well). |
I thought the 100,000+ was for the asset it wasn't though for example... The 50% was just a guess based on the 100,000+ number, |
Yes - If you reread what I said, you'll see that I brought up that there is most likely more than 236 people who purchased it. But we can only guarantee 236, anything else is speculative. Even 200,000 is a small percentage of Unity's userbase. It crossed 2 million back in 2013. Making guesses on guarantees of percentages only diminishes your argument ("I guarantee that at least 50% more people") <--- that is a complete guess with a number pulled from the sky. |
@Duroxxigar 200,000 is a lot of people and what it looks like is 100,000 the number of people supporting the unity asset store. 236 is again the reviews, it says 2090 favorites it so that guarantees at its either between 2090 and 236 or above 2090 if you consider not everyone that would use it or has come across it has favorited it but let me ask your this question..
vs code from what your implying is a better editor otherwise and should be used. |
So - the part that you were looking at, at the top of the page, is a legend. It doesn't mean anything other than guiding what those symbols would mean if you saw them. Even if all 2090 people purchased the asset, it is still an incredibly small percentage of the total user base. Which is the more important statistic to look at to determine where ONE developers time should be spent. I have stated it before, neikeq is open to having it integrated to the editor, but they have way more important things to be doing. As for your question - yes, VSCode is a better code editor than Godot's built-in one. But GDScript is better integrated with the built-in editor. And I know you're next response to this, "then we should have this!". Which again - neikeq is open to someone doing it. But no one has. It is really that simple. Remember - Godot was designed with GDScript and an internal editor in mind. neikeq has far more important things to solve with C#'s integration than tooling for the built-in editor. Most people who are vocal with C# are experienced C# devs who prefer their own tooling. |
@Duroxxigar I'm not saying that it should be done right now, I'm just saying it should be done sometime in the future. |
And it is on neikeq's radar, but very low priority. |
Describe the project you are working on
3D game, but not relevant
Describe the problem or limitation you are having in your project
Currently, the script editor only fully supports GDScript so in order to work with other languages (C# or GDNative based ones) users have to rely on an external editor.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Implementing a client for the LSP protocol would open up easy editing of a wide variety of programming languages, which would be a huge plus, especially for beginners.
Of course the goal would not be to replace full-fledged IDEs but it would bring a level of comfort that should be sufficient for most usages. Together with a better integration of GDNative in the editor (#119) it would bring Godot to a whole new level in terms of language support.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I'm not familiar with the details of the LSP but from what I understood, the editor provides the base functionalities that are shared for all languages and then language support is just a thin layer on top of that. These layers could be included for the officially supported languages and provided by plugins for the other ones.
Also, since Godot provides an LSP server for GDScript, it could be reused internally, which would probably remove some GDScript specific code from the script editor and makes sure that the experience is the same when editing GDScript files from within or outside the engine.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can't since it touches core functionalities of the script editor.
Is there a reason why this should be core and not an add-on in the asset library?
I don't think the script editor is customizable in that way using an add-on.
The text was updated successfully, but these errors were encountered: