Open abmaurya opened 1 year ago
Thank you for feedback.
@abmaurya Did you try installing the extension without gitlens? For me it works well with gitlens.
Actually, it's not working either way. I just see author data but no refs or implementation data.
What's interesting is I am not seeing the author data on all functions, just a few.
@abmaurya What do you have in the tooltitude log. You could open it via the output pane. Is there anything interesting in there?
@abmaurya Also, which kind of project do you have?
Do you use one root .mod file or do you use go.work file?
Which go file do you open? Are you sure that this file is part of the project?
This is in the logs and I have go.mod in the root.
Yes, I am pretty sure the file is in the project as I can find the references/implementations via the native VS Code context menu.
@abmaurya Ok, so I see that code lenses are updated, but not displayed for some reason. Do you see other functionality of tooltitude, like code actions? To check you could enter something like this:
type Abc struct {
a int
}
If you put caret on a, there should be a Generate getter/setter code actions (press Cmd+. or Ctrl+. on windows)
It said no code actions available.
@abmaurya Ok. That helps.
I have couple more ideas:
@abmaurya I thought a bit more about the code. My hypothesis is that tooltitude thinks that the file you are working with doesn't belong to the project. To check this, could you go again to the log.
You should find two lines like these two:
Do you have such lines for the module which you have and for the package where this file belongs to?
@abmaurya Ok. That helps.
I have couple more ideas:
* Do you have one or several folders in the explorer view (at the moment we work with only one) * May I ask you to do the following * Disalbe golang extension by pressing "disable extension" in the extension tab * Open the project, and try to use Cmd/Ctrl+F12 to find references. We have some very limited lsp support. It doesn't work if vscode go extension is installed since it's not fully functionally. If it doesn't work, then, something disables lsp inputs from tooltitude. * (Don't forget to turn golang extension back)
Yes, I have a workspace containing different folders but other folders don't have go projects, just assets and text file that I read.
Tried disabling the golang extension and the find references option stopped working(No result).
@abmaurya I thought a bit more about the code. My hypothesis is that tooltitude thinks that the file you are working with doesn't belong to the project. To check this, could you go again to the log.
You should find two lines like these two:
* 2023-08-22T12:46:58.551163Z INFO update_dir_mods: mod to add: module_path * 2023-08-22T12:46:58.852284Z INFO update_ws:update_stubs: Added stub package_path
Do you have such lines for the module which you have and for the package where this file belongs to?
Yes, I have those lines in the logs
Yes, I have a workspace containing different folders but other folders don't have go projects, just assets and text file that I read.
Is it the first folder? We start language server only for the first folder.
Yes, I have those lines in the logs
That's good in the sense that backend part is working correctly, but for some reason it doesn't get to the editor :-(
I did a bit of a research for the settings. There's a setting "editor.codeLens", is there any chance that it's set to false? (https://www.softwarepronto.com/2021/01/visual-studio-code-disabling-code.html)
Do you have code lenses from other extensions, i.e. from the git lense? Do code actions from the golang extension work? You could check that they work by putting the aforementioned type Abc struct { a int }, writing a := Abc {}, vscode go has fill Abc code action in such a case.
Another place to look at, is to go to the command palette, i.e. Ctrl/Cmd+Shift+P, and choose Toggle Developer Tools. You will have chrome dev tools. Are there any errors there?
Is it the first folder? We start language server only for the first folder.
Unfortunately it is not. It is the second folder in the heirarchy. I changed the order and it started working.
How about modifying the language server to start for the folder that contains go.mod in root instead of going by the folder number ?
@abmaurya Ok. Great. I will add a warning in case of multi root folder projects so that people will understand what's going on.
P.S. May I kindly ask you to update your review, on the marketplace to accurately reflect what really was the cause of the issue.
I confirm that the plugin only works for the first folder in the workspace
@DimNS It was by design, since it's so much easier to support than multi module workspace. Btw, to understand use case better, why do you need several folders in your project?
@DimNS It was by design, since it's so much easier to support than multi module workspace. Btw, to understand use case better, why do you need several folders in your project?
I can answer that, I have golang project in one folder, data in second and schema in third.
@abmaurya Thanks a lot for your info.
@abmaurya I thought about it a bit, and now have another question. How well does the gopls work with it? Does it require to have all modules in the same workspace? Or is it possible for it to have two completely separate workspaces open in the same window?
@abmaurya I thought about it a bit, and now have another question. How well does the gopls work with it? Does it require to have all modules in the same workspace? Or is it possible for it to have two completely separate workspaces open in the same window?
Gopls is fine, like I said only 1 folder has the go project with all the modules in the same directory, rest of the folders are just data. A VS workspace can have multiple folders and no, you can not have multiple VS workspaces open in the same window.
@tooltitude-support We have a micro-monolith and there are a lot of microservices around
@abmaurya In your case, you can simply put a project with golang in the first place in workspaces
@abmaurya In your case, you can simply put a project with golang in the first place in workspaces
I know, that's how I am using it and also why I reverted my 1 star review.
As the tile says, this tool won't show anything if you have git blame plugins installed in VS Code such GitLens by GitKraken.
Tooltitude Version: v0.31.0
OS Version: Windows 10
VS Code Version: 1.81.1
Go Version: 1.21.0
What did you try to do? Use
Steps to reproduce