-
-
Notifications
You must be signed in to change notification settings - Fork 170
[vscode_projects:1.11] Updates recents search to use latest vscode configuration, performance improvements #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[vscode_projects:1.11] Updates recents search to use latest vscode configuration, performance improvements #225
Conversation
… refactoring Improve documentation Use a single path to state and configuration files and optimize lookup Search recents even with empty query Performance optimizations
@Silureth I would appreciate if you could take a peek since it seems noone else would review the plugin. Python is not my strong suit, but I've been using this code locally for months now. Though I made some improvements so it's presentable. |
@Sharsie checked it out. It did return some recents but i couldn't figure out, how it did it.Here is a screenshot from VS code and the recents list when i type in the trigger: |
Thanks for the feedback, yes that is likely, I do not use workspaces at all, so it may have different data structure. I intentionally skip single files, but that was more of a personal preference and I think workspace comes a single file .code-workspace as it seems. There was another option I exposed as a configuration value - custom command that can be used inside the project's workdir, which pretty much changes dir to the workdir of the project and then runs whatever command you set (e.g. I think it goes against the concept of workspaces, where there is no such thing as a single working directory, since it can contain multiple different system paths. Definitely makes sense to support it, but I have to think about handling both of these use-cases - likely disabling custom commands for single-file recents, but that introduces a conditional behavior I don't like very much. I'll ponder what to do with that. |
Ah, now I get it. I almost exclusively use workspaces :D Since I can make a complex group of folder structures its own entity, it's two similar problems that each have their use cases and are mutually exclusive. Now I also, understand the use case of custom commands. It seems the only way to support it is to basically make two different, separate behaviors of the plugin. That said, I'm fine without recents, so I think an extra line in the options that "workspaces are not supported" is fine at this point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recents works as intended for folder based projects.
1817a99
to
27e3547
Compare
I had a go at implementing this, but pushed it too soon seeing the comments popping up... still have to do some testing, but I feel like with a little bit of documentation about the custom command, it's fine. Better than documenting that workspaces and single files do not work |
dc96d2c expands support for workspaces and single file recent entries |
This PR replaces searching through legacy
json
vscode configuration files by querying sqlite database. Recents are only stored and updated in the db in the latest versions.It also improves documentation and introduces some performance optimizations and error handling.
Removes support for multiple paths per configuration and only uses a single path to read configuration from. Previously, this was implemented to support older versions of vscode, but sqlite has completely replaced this a while ago so I've cleaned up the code that deals with the multi-config feature.
It also enables searching through recents when only query trigger is supplied with empty query. Previously typing a query trigger yielded no results. I believe this improves UX by offering the latest entries immediately.
Comes bundled with #224 - I honestly did not know how to version these properly without having to update one PR after the other gets merged. So ideally #224 should be merged first.