You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Unable to open URI" dialog appears when hovering a function and clicking "definition". It happen when triggering the action from a ST window that doesn't have a folder open.
To Reproduce
Open two ST windows
On window 1 open folder "test-project"
on window 1 have file open "test-project/fn.js" with content export function test(){}
on window 2 open file "test-project/some.js" with content import {test} from './fn.js'; test()
hover test() and click "definition"
dialog "Unable to open URI" appears
Environment (please complete the following information):
OS: windows 10
Sublime Text version: 4175
LSP version: na
Language servers used: na
Additional context
Im using a fork, but haven't touch this portion of the code. My guess is that this happens on a regular LSP install. It seems to me that the problem happens when LSP cannot find the view for whatever reason. The dialog appears but the functionality seems to work.
The problematic code seems to be
The function definition is in a different window from where "definition" was invoked, so maybe this check fails for this reason. Maybe the message could be changed to be a status bar message.
The text was updated successfully, but these errors were encountered:
From the next release, the error message will be printed to the status bar instead of error dialog.
But I am not able to reproduce this error with the given steps. For me the fn.js file opens in the second window too when I click "Definition". I tested with LSP-typescript.
That plugin will prevent opening the same file more than once, and instead will focus the already opened file. This is to prevent having the same file opened more than once on which you may inadvertently make changes to both overwriting each other on each save. This is helpful when working with multiple windows, as you may lose track of what you have open and where.
As fn.js is already opened in window 1, the package prevents opening a copy of fn.js in window 2 when "definition" is click, and focuses the file in window 1. This is all expected to me.
I appreciate moving the message to the status bar.
I am not sure if that code could be improved in some way, maybe instead of opening a copy, it first can check if the file exists in some other window and focus that View instead? I mean, to prevent having copies opened. (which to me could be a problem)
Describe the bug
"Unable to open URI" dialog appears when hovering a function and clicking "definition". It happen when triggering the action from a ST window that doesn't have a folder open.
To Reproduce
export function test(){}
import {test} from './fn.js'; test()
test()
and click "definition"Environment (please complete the following information):
Additional context
Im using a fork, but haven't touch this portion of the code. My guess is that this happens on a regular LSP install. It seems to me that the problem happens when LSP cannot find the view for whatever reason. The dialog appears but the functionality seems to work.
The problematic code seems to be
LSP/plugin/locationpicker.py
Lines 31 to 35 in 7554363
The function definition is in a different window from where "definition" was invoked, so maybe this check fails for this reason. Maybe the message could be changed to be a status bar message.
The text was updated successfully, but these errors were encountered: