Verse Language Server, IntelliSense

Hi,

I’ve just found about Verse from a friend, and wanted to give it a shot.
One of the first things that I noticed upon getting started is that the VSCode integration is very handy - in fact, I wish I had half as much luck getting VSCode to work right off the bat with Unity.
Besides that, I did notice that the extension that is installed on VSCode is fairly barren in options, and mentions only a language server.
When testing around, the language server did not appear to be working, or at least not working well. And I noted there was no IntelliSense or Verse snippets.
As with all things that are new, I don’t expect anything anytime soon, but I was wondering if this was a feature that someone else is planning to take on, or if this a known issue that Epic Games is tackling?

2 Likes

Hi @Justin:

There is indeed a language server bundled with the Verse VS Code extension, which should be working to provide you some basic code completion capabilities, though this is admittedly one of our (known) problematic areas at the moment.

You should definitely be seeing completion suggestions, though. Could you give an example or a recording of what you’re seeing?

Some additional troubleshooting steps:

  • Could you navigate to %userprofile%\.vscode\extensions and see if you can find the epicgames.verse-1.0.xxxxx extension folder present?

  • When you have a .verse file open in VS Code, could you open Task Manager and check if you have verse-lsp<number>.exe running?

1 Like

In case anyone else encounters this problem where the language server crashes every time you open a verse file. You can look at the message above by sonictke to see where the extension folder is. If you go into that and the bin folder you can find verse-lsp.exe. If you try to run that and it gives you an error about a missing dll such as “The program cannot start because MSVCP140.dll is missing…” then you need to install the latest Visual CPP Redistributable (free) from microsoft. Google that and install it for your platform.

Epic games should be packaging this DLL with their executables along with VCRUNTIME140.dll

1 Like

@sonictke, I apologize for the much too late response.
After coming back to UEFN, I was able to fix the extension by re-installing the .vsix available within Fortnite/VSCode/Verse.vsix - I imagine a newer version had released and as a result this potentially got fixed?
I can now confirm that the language server is running as a process under Visual Studio code - uLangServer (verse-lsp-11584), and it appears to be giving some completions.
One thing I have noticed is that the completions don’t appear to work for the digests found within Verse.digest.verse, UnrealEngine.digest.verse, or Fortnite.digest.verse, while it does appear to find references to classes inside the project itself. Would this still be considered undefined behavior, or is this one of the problematic areas mentioned?

Yeah, completion suggestions are kinda buggy still. If you want a quick suggestion for something in the digest files, type (). before typing something from the digest. It will show proper suggestions, however typing that before everything and deleting it afterwards admittedly isn’t a great workaround.

I would love to see this being tackled or fixed as a New Year’s gift.
I believe IntelliSense features are a key component to making a platform adoptable and easily widespread, Verse is a bit abstract, but due to it’s lower level implementation I think it would be an amazing learning tool for a newer generation of game developers, and a little code snippets / autocompletions go a long way :smile:

Hey all, apologies for the long delay in responses here. I know I sound like a broken record here but please be assured that the usability of the LSP remains important to us; we’re currently in the middle of a big project that will help overhaul how we approach Verse auto-completion works, but it’s going to take longer than originally expected. In the meantime, as you’ve noticed updates to the LSP are mostly bugfixes right now rather than drastic re-writes (since we already have one planned!).

One thing I have noticed is that the completions don’t appear to work for the digests found within Verse.digest.verse, UnrealEngine.digest.verse, or Fortnite.digest.verse, while it does appear to find references to classes inside the project itself. Would this still be considered undefined behavior, or is this one of the problematic areas mentioned?

This is a bug for sure. If you can provide more detail about what exactly the code in question is and where it fails that would help. But yes, we are very aware that things are not great at the moment.

Haha! I like the hints, I’m very excited to see what you guys have planned!

Don’t worry about any delay - 10 days is nothing compared to how long I’ve left you hanging here :sweat_smile:

I have noticed that snippets do appear to show up from digests, but only very intermittently, and sometimes not at all. It’s only that I can guarantee the ones within the project itself to show up. I have noticed that the language server has crashed a couple of times during these periods, where I’ve had to restart VS Code, and I’m not sure if this is related, but wouldn’t hurt to mention. If you can direct me to where I can find the error logs for the language server, then I’d be happy to provide them - though I’d prefer to do so in direct messages.

For the entire file system, I have the following setup:
image

And in Verse Explorer of UEFN:
image

The test file is what I’m using as an example - for this, it’s a simple class, which is a subclass of creative_device.
To show a reference to an external class, I used a teleporter device to try and get an auto completion for that. I’ve included the imports that I’ve used, in case that helps as well. As shown below, the only references that I get as auto completions are for classes within my project itself.

Then, when I try and reference a class from within my project all under flood_{class name}, the type names show up, along with what I assume to be a constructor snippet, since it shows attributes of the classes:

Though if you guys are planning on doing a rehaul, I imagine this information might be redundant or irrelevant within the next implementation. If this is a simple bug fix though, then that’s all the better!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.