intersystems / language-server

Repository for the VS Code Language Server
https://marketplace.visualstudio.com/items?itemName=intersystems.language-server
Other
16 stars 6 forks source link

Go to definition doesn't open git file #294

Closed zvondic closed 11 months ago

zvondic commented 1 year ago

We are using ISC Ensemble Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2018.1.7 (Build 721U) Fri Mar 18 2022 22:01:43 EDT and VS Code on windows remote desktop. Git repository is located on Ensemble server and VS Code is connected by Remote SSH plugin to this repository. Problem is that go to definition (F12) doesn't open file from git repository but opens file from cache database which is disabled for editing. Is there any chance how fix this behavior? When i want to edit any file i have to open it from explore and it is very non-productive. gotodefinition

isc-bsaviano commented 1 year ago

@zvondic I need to know a little bit more about your workspace folder to detemrine the cause. The Langauge Server uses the vscode-objectscript extension to resolve a URI for a file name. That extension uses your objectscript.export settings to determine what the URI would be if you had exported the file using the extension and checks if that exists. If it doesn't then the server copy is used. It;s possible that your export settings don't reflect the structure of your workspace. If you have a .code-workspace file, can you post its contents here? If not, can you post the contents of your .vscode/settings.json file instead please?

zvondic commented 1 year ago

Hi Brett, i found setting.json in c:\Users\xzvonicek\AppData\Roaming\Code\User\ and workspace.json c:\Users\xzvonicek\AppData\Roaming\Code\User\workspaceStorage\ae5ee1a17d6a13d0c6ed13af94240448\ Thanks. Josef

st 25. 10. 2023 v 13:48 odesílatel Brett Saviano @.***> napsal:

@zvondic https://github.com/zvondic I need to know a little bit more about your workspace folder to detemrine the cause. The Langauge Server uses the vscode-objectscript extension to resolve a URI for a file name. That extension uses your objectscript.export settings to determine what the URI would be if you had exported the file using the extension and checks if that exists. If it doesn't then the server copy is used. It;s possible that your export settings don't reflect the structure of your workspace. If you have a .code-workspace file, can you post its contents here? If not, can you post the contents of your .vscode/settings.json file instead please?

— Reply to this email directly, view it on GitHub https://github.com/intersystems/language-server/issues/294#issuecomment-1779091703, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHC6TNT5XL44QAEC7SR37LYBD4A5AVCNFSM6AAAAAA6OKRF2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZGA4TCNZQGM . You are receiving this because you were mentioned.Message ID: @.***>

zvondic commented 1 year ago

I am sending VS code profile.

st 25. 10. 2023 v 18:06 odesílatel Josef Zvonicek @.***> napsal:

Hi Brett, i found setting.json in c:\Users\xzvonicek\AppData\Roaming\Code\User\ and workspace.json

c:\Users\xzvonicek\AppData\Roaming\Code\User\workspaceStorage\ae5ee1a17d6a13d0c6ed13af94240448\ Thanks. Josef

st 25. 10. 2023 v 13:48 odesílatel Brett Saviano @.***> napsal:

@zvondic https://github.com/zvondic I need to know a little bit more about your workspace folder to detemrine the cause. The Langauge Server uses the vscode-objectscript extension to resolve a URI for a file name. That extension uses your objectscript.export settings to determine what the URI would be if you had exported the file using the extension and checks if that exists. If it doesn't then the server copy is used. It;s possible that your export settings don't reflect the structure of your workspace. If you have a .code-workspace file, can you post its contents here? If not, can you post the contents of your .vscode/settings.json file instead please?

— Reply to this email directly, view it on GitHub https://github.com/intersystems/language-server/issues/294#issuecomment-1779091703, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHC6TNT5XL44QAEC7SR37LYBD4A5AVCNFSM6AAAAAA6OKRF2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZGA4TCNZQGM . You are receiving this because you were mentioned.Message ID: @.***>

gjsjohnmurray commented 1 year ago

@zvondic attachments to emails sent to GitHub don't survive the journey. Please use the web interface to attach them to the issue.

zvondic commented 1 year ago

workspace.json settings.json zvoj.code-profile.json

isc-bsaviano commented 1 year ago

@zvondic I think the problem may be your objectscript.export.folder setting. If you want to represent the workspace root, use "", not ".".

zvondic commented 1 year ago

I changed but no success. :-( image

isc-bsaviano commented 1 year ago

@zvondic How did you get that workspace.json file? VS Code workspaces are .code-workspace files. I see that workspace.json file has a folder with the vscode-remote URI scheme. If your workspace is remote (that is, the URI scheme is not file for your local file system) then the main extension's code that tries to find the local file probably won't work.

zvondic commented 1 year ago

Yes, as i wrote in my first post. I don't have any workspace.json file. Workspase is placed on remote server, and files are served by ssh-remote plugin in VS code. The worspace.json which i sent is self-created by VS code. Goto-reference isn't work properly, that's why I asked for help.

isc-bsaviano commented 1 year ago

@zvondic I'm pretty sure that I correctly identified the issue in my previous comment. The main extension has a bunch of checks where it considers workspace folder with the scheme file to be local. This excludes your workspace folder, so it doesn't try to find a local copy of the file. We could make this check "NOT isfs or isfs-readonly" (our file system schemes) but I'm not sure if it would Just Work, of if there would be unintended consequences. I think this requires more discussion amongst the group that manages these extensions. Even though this is an issue with the main extension, I'll leave it open here since anyone can easily view the comment history. Thank you for reporting this.

isc-bsaviano commented 11 months ago

@zvondic Please follow the linked issue for updates