Ignored Workspaces displaying
To reacreate this you just need to make a file inside a ignored folder without saving it to the working directory. This is also the case if opening a external file in current working directory. I think this is because it checks the current directory of a file and not the vscode workspace directory maybe. (I have not looked at the code just assuming this).
When doing this it will show In (workspace Name) Working on untitled-1. When it should not say the workspace name.
Doing more testing this is related to ignored workspaces when user is remote ssh into a vscode instance
#36 This prob be fixed apart of this issue
~~cd4fabbd920077229269b6b37806e11ad6f06c93 might hopefully fix this, i will push the update out soon~~
nevermind, can you please give me your settings so i can test it
Hey @xhayper, Here are my settings. There also looks to be a regression. Now it only shows idle and not the ignoreWorkspacesText. When going to a new file it then shows the repo. This only happens when you are ssh'ed inot a separate machine coding also
{
"rpc.buttonInactiveLabel": "Check Out My Github",
"rpc.buttonInactiveUrl": "https://github.com/nick22985",
"rpc.appName": "Visual Studio Code",
"rpc.ignoreOrganizations": ["IgnoredOrg"],
"rpc.ignoreWorkspaces": ["Repo1", "Repo2", "Repo3", "Repo4", "Repo5", "Repo6"],
"rpc.ignoreWorkspacesText": "[Redacted]",
"rpc.buttonEnabled": true,
"rpc.enabled": true,
"rpc.checkIdle": true,
"rpc.resetElapsedTimeAfterIdle": true
}
ah shoot, i dont know how ssh coding work, this might be s trouble for me to debug
@xhayper I did some digging into this. What it appears to be is that dataClass.workspaceFolder returns undefined
https://github.com/leonardssh/vscord/blob/b3c4ae021e1c3622be12488c9b179480d9efafda/src/activity.ts#L105
which checks the const uri = window?.activeTextEditor?.document.uri; which is undefined
https://github.com/leonardssh/vscord/blob/b3c4ae021e1c3622be12488c9b179480d9efafda/src/data.ts#L91
Causing the check for the isExcluded to fall over and not run https://github.com/leonardssh/vscord/blob/b3c4ae021e1c3622be12488c9b179480d9efafda/src/activity.ts#L112
this is really REALLY a problem, because that's the only way we know how to find what folder we are on
currently trying to think of a way we can work around this
@xhayper Maybe this is actually an issue with the vscode npm plugin
My one thought which would be kinda quick and dirty would be to regex whatever value is the string for the workspace folder. But I assume this will cause more issues for other things so prob better finding a better soloution to this.
My next idea would be trying to use workspace.workspaceFolders as this gets back the folders. The issue here being it contanins a array of worspace folders. Unsure how you can have multiple workspace folders in vscode so I cant rlly play around with this and see if the array is in some sort of order
https://gyazo.com/77aabefb8508751f752bbfb609912dc8/draw
the problem with this is we need to use the current folder, so we have to figure out how the index affect the array before we use .workspaceFolders
Yea that why I was saying idk how to get multiple workspaces to see if there is some sort of index or order to it
i will figure it out soon
So been thinking about this and poking around the vscode API docs. We can figure out if something is a remote by looking at the remoteName in the env. If it is not a remote it returns undefined. Thinking that we could encoperate a check around this to get the current file and folders a different way. Unsure atm just writing this here for now. When I get some time will see if I can figure out a good way of doing this
that sounds like a great idea, unfortunately, i am working on a rewrite of config system and it's might for me right now
i will work on it tomorrow after the config system, you can help me by writing the description of each config :P
Happy to help in anyway, not sure what u want me to do wtih the docs if you wanna talk about it more. Explain it here or u can add me on discord if u would like nick22985#1228
should be fixed in dd7e1b6397cd147020df6dcd9b033e5e02ae5c89