StatLens:Commands and Settings
The ids of the command, the view and the settings still start with projectStats, the name the extension had before version 4.0.0.
Commands
| Command | Id | What it does |
|---|---|---|
| Stat Lens: Rescan | projectStats.refresh |
Scans the workspace again. If a scan is already running, it waits for that scan instead of starting a second one. |
You can run it from the Command Palette (Ctrl+Shift+P), with the refresh icon in the title bar of the Stat Lens view, or with the Scan now link in the empty view.
If no folder is open, the command only shows the message Stat Lens: Please open a folder first.
Keybindings
Stat Lens adds no keybindings. You can assign one to projectStats.refresh under File > Preferences > Keyboard Shortcuts.
Menus
| Place | Entry |
|---|---|
| Title bar of the Stat Lens view | Refresh icon, runs Stat Lens: Rescan |
View
| View | Id | Where |
|---|---|---|
| Stat Lens | projectStats.view |
Explorer side bar |
You can drag the view to another side bar or hide it like any other view. See Sidebar View.
Settings
Open the settings with File > Preferences > Settings and search for Stat Lens. Both settings can be set for the user or for a single workspace. A change starts a new scan at once.
| Setting | Type | Default | What it does |
|---|---|---|---|
projectStats.ignoreComments |
boolean | false |
Leaves out lines that start like a comment when counting lines of code. See Ignoring comment lines. |
projectStats.excludeFolders |
array of strings | node_modules, bin, obj, .git, dist, out, .vs, .vscode |
Folder names that are always skipped, on any level, in addition to the .gitignore in the root folder. The names must match exactly. Paths and wildcards are not supported.
|
Setting projectStats.excludeFolders replaces the whole list. To add a folder, repeat the defaults:
"projectStats.excludeFolders": [
"node_modules", "bin", "obj", ".git", "dist", "out", ".vs", ".vscode",
"coverage"
]
Supported workspaces
| Workspace | Supported |
|---|---|
| Local folder | Yes |
| Multi-root workspace | Only the first folder is scanned |
| Untrusted workspace (Restricted Mode) | No, the extension is disabled |
| Virtual workspace (for example a GitHub repository opened in the browser) | No |
Stat Lens adds no languages, file types or custom editors. It only reads files.
| Stat Lens | |
|---|---|
| Start | Installation |
| Features | Sidebar View · Scanning · Dependencies |
| Reference | Commands and Settings · FAQ · Version History |
| Links | Project page on mutigeraffe.com · Download on the VS Code Marketplace |