Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,19 @@ class CachedConfig:

class Plugin(PluginInstance, GeneratorQueryHandler):
# Location of the database with recent entries
_stateDBPath = os.path.join(
# VSCode 1.118+ moved this to a shared storage location
_sharedStateDBPath = os.path.join(
os.environ["HOME"],
".vscode-shared/sharedStorage/state.vscdb"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at vscode sources, there seem to be a bunch of storage locations that should be considered?
I'm not running 118 yet, but I can check after upgrading. I assume that the user db is going to be at .vscode/... and we may actually want to query both databases.
There are also profile databases, but that should probably be ignored, at least for now.

)

_legacyStateDBPath = os.path.join(
os.environ["HOME"],
".config/Code/User/globalStorage/state.vscdb"
)
Comment thread
Sharsie marked this conversation as resolved.

_stateDBPath = _sharedStateDBPath if os.path.exists(_sharedStateDBPath) else _legacyStateDBPath

# Location of the project manager configuration file
_projectsPath = os.path.join(
os.environ["HOME"],
Expand Down