Skip to content
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

v2 #9

Merged
merged 6 commits into from
Jun 9, 2024
Merged

v2 #9

merged 6 commits into from
Jun 9, 2024

Conversation

MrMarble
Copy link
Owner

@MrMarble MrMarble commented Jun 8, 2024

This pull request introduces a series of changes to enhance the functionality and user experience of the application. The most significant changes include the addition of new settings in .vscode/settings.json and metadata.json, modification of scripts in package.json, the introduction of a new schema file, and several changes in TypeScript files to accommodate new features and improve code structure.

Configuration Updates:

  • .vscode/settings.json: Added a new files.exclude setting to hide certain files and directories in the Visual Studio Code editor, such as .git, .svn, .hg, CVS, .DS_Store, Thumbs.db, and node_modules.
  • metadata.json: Added a new settings-schema field with the value org.gnome.shell.extensions.vscode-search-provider.

Build Process Updates:

  • package.json: Modified the pack and setup scripts to include a clean build process, copy schemas to the dist directory, and compile schemas using glib-compile-schemas.

New Schema and Settings:

  • schemas/org.gnome.shell.extensions.vscode-search-provider.gschema.xml: Introduced a new schema file with a suffix key, which is a boolean determining whether to show a suffix next to the workspace name.
  • src/extension.ts and src/prefs.ts: Imported Gio and created a _settings object to get settings from the new schema. In src/prefs.ts, a new preferences window is filled with a switch row bound to the suffix key in the settings. [1] [2]

Code Structure and Functionality Enhancements:

  • src/provider.ts: The VSCodeSearchProvider class now takes a generic parameter T that extends Extension and includes _settings. The activateResult method now decodes the workspace path and checks if it starts with vscode-vfs:// in addition to vscode-remote://. A new _customSuffix method was added to generate a custom suffix based on the workspace path if the suffix setting is true. The getResultMetas method now adds this custom suffix to the workspace name. [1] [2] [3] [4]

@MrMarble MrMarble self-assigned this Jun 8, 2024
@MrMarble
Copy link
Owner Author

MrMarble commented Jun 8, 2024

Submitted for revision, will merge once published

@MrMarble MrMarble merged commit d49fb26 into main Jun 9, 2024
2 checks passed
@MrMarble MrMarble deleted the next branch June 9, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant