-
Notifications
You must be signed in to change notification settings - Fork 48
StringIndexOutOfBounds when using auto-complete #68
Comments
Possibly related, another exception being thrown from the same function in DocumentUtils
As a side note, this looks to be the same exception seen in #67 |
Both should be fixed in #72. |
The problem happening in the first trace is happening here still.
val lineTextForPosition = if (lineText.nonEmpty) lineText.substring(0, min(lineText.length, pos.getCharacter)) else "" I would expect that the author of psalm-language-server is using I've checked the LSP spec briefly and I have been unable to determine if negative values are permitted for positions. |
Ok, I looked a bit into psalm and it seems to use phan on the backend for diagnostics, and like you said phan probably uses -1 for this purpose, but I'm not familiar at all with php. |
It’s difficult to say what the correct handling is. I’ve opened an issue requesting clarification on the handling of negative positions. |
Great thanks ! |
Hey! I created Psalm, let me know if I can help. Psalm doesn't use anything but PHP Parser on the backend. Psalm shouldn't be sending any |
In
I’m away from my computer but I can provide some more info later if necessary. |
This appears to have been resolved. |
I'm getting this exception when PHPStorm tries to use auto-completion with psalm-language-server. Let me know if there's anything I can add to help determine why this isn't working as intended.
The text was updated successfully, but these errors were encountered: