VSCodeHelper
A Rust library for interacting with Visual Studio Code's configuration and state files.
Overview
VSCodeHelper provides a convenient way to access and manipulate various VS Code configuration files, including:
storage.json- Contains information about open windows, workspaces, themes, and morestate.vscdb- SQLite database containing recently opened paths and other state information- Workspace configuration files
Features
- Load and parse VS Code's
storage.jsonfile - Access recently opened folders and workspaces
- Query the
state.vscdbSQLite database - Retrieve workspace configurations
- Strong typing for VS Code's configuration structures
Examples
List Recently Opened Paths
use HistoryRecentlyOpenedPathsListKey;
use StateVscdb;
Get Currently Opened Windows
use VSCodeStorageJson;
use Window;
Get Current Theme
use VSCodeStorageJson;
Project Structure
src/storage_json/- Types and functions for working with VS Code's storage.jsonsrc/state_vscdb/- Types and functions for working with VS Code's state.vscdbsrc/workspace_json/- Types for working with VS Code workspace filesvscodehelper-macros/- Procedural macros for generating common trait implementations
Installation
cargo add vscodehelper
Requirements
- Rust 2024 Edition
- VS Code installed on your system
- Probably only works on Windows lol