Vuex HelperIf you want Vuex firepower in VS Code, this extension is built to bring the full toolkit to one place: discover, complete, navigate, inspect, and validate your store workflow with confidence. VS Code extension supporting Vue 2's Vuex and Vue 3's Pinia. It provides Go to Definition, Code Completion, Hover Information, Diagnostics, Find References, and manual reindex support for Vuex (supporting State, Getters, Mutations, and Actions). It also supports Pinia store import navigation and definition-side reverse references. ⭐ If you find this extension helpful, please give it a star on GitHub! Your support is greatly appreciated. Features1. Go to DefinitionJump directly to the definition of Vuex store properties from your components. Demo: Jump to Definition |
| Feature | Status | Notes |
|---|---|---|
mapState — array syntax |
✅ | ...mapState(['count']) |
mapState — object string alias |
✅ | ...mapState({ alias: 'count' }) |
mapState — arrow function |
✅ | ...mapState({ c: state => state.count }) |
mapState — regular function |
✅ | ...mapState({ c(state) { return state.count } }) |
mapState — namespaced |
✅ | ...mapState('user', [...]) |
mapGetters — array / object |
✅ | |
mapMutations — array / object |
✅ | |
mapActions — array / object |
✅ | |
this.$store.state/getters/commit/dispatch |
✅ | Dot and bracket notation |
| Imported store instance access | ✅ | import store from '@/store' |
| Store access optional chaining | ✅ | this.$store?.getters?.['a/b'] |
| Static Vuex string paths | ✅ | Supports 'a/b', "a/b", and `a/b`; dynamic template interpolation and string concatenation are ignored |
createNamespacedHelpers |
✅ | Helper aliases stay scoped across larger components |
| Vuex helper import / require aliases | ✅ | Uses real bindings and excludes locally shadowed helper names |
| Vuex handler parameter aliases | ✅ | Mutation/getter positional aliases and action-context destructuring aliases |
| Object-style commit | ✅ | commit({ type: 'inc' }), including definition, hover, diagnostics, and references |
state as function |
✅ | state: () => ({}) |
| Nested state | ✅ | Recursive parsing |
| Computed property keys | ✅ | [SOME_MUTATION] (state) {} |
| Dynamic module import/require | ✅ | ES Module & CommonJS |
| Namespaced modules | ✅ | Including nested |
this alias completion |
✅ | const _t = this; _t. |
{ root: true } namespace switch |
✅ | commit/dispatch with root option |
| State chain intermediate jump | ✅ | Click user in state.user.name |
Hover Defined in navigation |
✅ | Click the hover definition path to open the target |
| Find references from Vuex definitions | ✅ | Definition hover shows Used by and Show all; reports explicit Vuex API references, not mapped component member usages |
| Pinia store import definition navigation | ✅ | Imported Pinia store factories jump to the defineStore implementation; single-store files do not require useXxxStore naming |
| Pinia definition-side references | ✅ | Option/setup stores, internal this/state, map helpers, $patch, direct/storeToRefs destructuring, templates, composables, composed stores, alias paths, CommonJS bindings, and .jsx/.mjs/.cjs/.tsx/.mts/.cts; hover Used by, indexed Show all, and native references from definitions |
| Vuex reverse-reference file coverage | ✅ | .vue/.js/.jsx/.mjs/.cjs/.ts/.tsx/.mts/.cts |
| Vue / state library compatibility detection | ✅ | Activates only for deterministic Vue 2 + Vuex or Vue 3 + Pinia dependency combinations, including semver prereleases; ambiguous ranges and dependency tags are ignored |
rootState / rootGetters |
✅ | Completion, definition, hover, diagnostics, and references |
context.state / context.getters |
✅ | Store-file completion, definition, hover, and diagnostics |
| Object-style action handlers | ✅ | actions: { save: { handler(ctx) {}, root: true } } |
| Inherited nested module namespace assets | ✅ | Child getter / mutation / action inherit parent namespace when applicable |
| Duplicate global getter conflict diagnostics | ✅ | Warns on root and non-namespaced getter name collisions |
| Diagnostics for invalid store references | ✅ | Warning on non-existent state/getter/mutation/action, including store-file state.xxx |
| Manual reindex command | ✅ | vuexHelper.reindex waits for indexing and diagnostics refresh |
Release Notes
2.0.0
Feature release focused on navigation, references, and packaging hardening:
- Added: Vuex definition hovers now show indexed
Used byreference summaries and a compact Show all QuickPick for statically resolvable Vuex API references. - Added: VS Code native reference requests now use the same reverse index, avoiding repeated full-workspace scans for definition-side references.
- Added: Pinia definition-side reverse references for standard
defineStoreoption/setup stores, includingstore.foo,store.foo(),storeToRefs(store), default-imported single-store files, and direct action destructuring usages. - Added: Pinia store import definition navigation opens the corresponding
defineStoreimplementation, including single-store files whose local import name is notuseXxxStore. - Added: Pinia reverse references now cover Option Store
this/stateaccess,mapState/mapWritableState/mapActions, both$patchforms, direct state/getter destructuring, Vue template expressions, setup composable members, and composed Stores. - Added: Pinia Store and reference indexing now cover
.mjs/.cjsfiles and destructured CommonJSrequirebindings fordefineStore, Store factories,storeToRefs, and map helpers. - Added: Hover
Defined inpaths are clickable links, so you can jump to the definition directly from the hover popup. - Fixed: Mapped Vuex fields no longer shadow local variables with the same name, avoiding false Vuex hover/definition results in component methods and computed functions.
- Fixed: Dynamic
commit/dispatchpaths such as`${moduleName}/SET_NAME`andmoduleName + '/SET_NAME'are no longer guessed as static Vuex references, while static template literals like`user/SET_NAME`still resolve normally. - Fixed:
createNamespacedHelpersaliases remain available across larger component windows, so namespaced callback completions stay scoped even when the helper declaration is far from usage. - Fixed: Pinia helper imports, Store factories,
storeToRefs, anddefineStoreare matched by their real bindings, preventing local parameters or functions with the same name from producing false references. - Fixed: Pinia template indexing excludes
v-for,v-slot, and expression-local shadowed variables, and explicit@/*path mappings no longer fall back incorrectly tosrc/when resolution fails. - Fixed: Vuex map helpers, imported Store instances, and Store handler parameters now follow their actual bindings and handler positions, preventing local shadowing and non-standard parameter names from breaking completion, definition, hover, diagnostics, or references.
- Improved:
thisalias detection now supports aliases bound tothisin local scope, not only hard-coded names. - Improved: Object-style
commit/dispatch({ type })references participate in definition, hover, diagnostics, and indexed reference lookup. - Improved: Activation now requires a compatible dependency pair in the workspace
package.json: Vue 2 + Vuex or Vue 3 + Pinia. If both state libraries are declared, the Vue major selects the matching one. - Improved: Vue version detection accepts deterministic semver ranges and prerelease versions without guessing
latest/nexttags. - Improved: Pinia reference indexing keeps document and per-file caches bounded, prefilters template expressions, and removes stale references in batches for faster incremental updates.
- Improved: Vuex and Pinia definition lookups reuse indexes built during Store indexing, avoiding repeated all-item scans in hover and reference requests.
- Improved: Vuex reverse references scan modern JavaScript and TypeScript extensions and apply per-file limits after successful resolution, so unresolved candidates do not consume valid-reference capacity.
- Improved: Manual reindex requests are awaitable, and Host verification reuses one ready workspace index instead of adding fixed one-second waits before every Vuex scenario.
- Improved: Store entry auto-detection no longer depends on the runtime
globpackage; it checks the supportedsrc/main|index.{js,ts}entry candidates directly. - Improved: VSIX packaging excludes generated tests, temporary files, internal docs, historical packages, and local GIF assets. Marketplace demo images are served through the configured GitHub raw base URL instead of being bundled.
- Security: Removed the runtime
globdependency and added aserialize-javascriptoverride to keepnpm auditclean.
1.2.2
Patch release focused on configuration refresh reliability and release verification stability:
- Fixed: Store entry configuration refresh flow is now more reliable after
vuexHelper.storeEntrychanges, reducing stale entry state and missed reindex behavior. - Improved: Parser regression coverage was tightened around computed mutation key expectations to keep store-index behavior aligned with real fixtures.
- Improved: VS Code host test runs are now pinned to a fixed test host version, making release verification more reproducible across environments.
1.2.1
Patch release focused on diagnostics and completion correctness:
- Fixed: Diagnostics now only warn on first-level store references, avoiding false positives on deep member access such as
state.items.push(...),state.name.toUpperCase(), and optional-chain deep access. - Fixed: Store parsing now resolves exported-const computed keys more reliably, so aliases like
export const KEY = 'name'can be indexed correctly in real Vuex modules. - Fixed: Object-syntax helper completion no longer duplicates the left-side key when completing after
alias:, so choosing a suggestion inserts only the value string. - Improved: Added unit and host regression coverage for deep-access diagnostics, computed-key indexing, and object-value completion behavior.
1.2.0
Feature-focused release centered on deeper store-internal Vuex awareness:
- Added: Store-internal
context.state,context.getters,context.rootState, andcontext.rootGetterssupport across completion, definition, hover, and diagnostics. - Added: Nested module namespace inheritance so child module getters / mutations / actions follow a namespaced parent even when the child omits
namespaced: true. - Added: Duplicate global getter conflict diagnostics for root and non-namespaced modules.
- Added: Vuex object-style action handler support, including
root: true, omittedroot, reorderedroot/handler, and store-internal provider support insidehandler(...). - Improved: Host regression coverage now exercises the new nested-module and object-style action handler paths with real fixtures.
1.1.1
Bug-fix release focused on definition accuracy and Vuex internal scope handling:
- Fixed: Vuex definition navigation now resolves more reliably for module/root context switches and mapped access paths.
- Fixed: Store-internal completion, definition, hover, and diagnostics now scope getters access to real Vuex callback parameters, reducing false positives and incorrect suggestions inside local functions.
- Improved: Host test stability and fixture alignment were tightened to keep release verification consistent.
1.1.0
Diagnostics and reindex command release:
- Added: Diagnostics provider that highlights invalid Vuex store references (state/getter/mutation/action) as warnings.
- Added: Manual reindex command (
vuexHelper.reindex) accessible from the Command Palette. - Added: Store-file diagnostic coverage for
state,rootState, androotGettersreferences. - Improved: Diagnostics now refresh after initial indexing, manual reindex, file saves, and document open/close events.
- Fixed: Reduced diagnostics false positives for helper callback string literals, non-Vuex local
dispatch/commitfunctions, and shadowed localstatevariables in store files. - Fixed: Store parsing now ignores nested-scope shadowing for
state/getters/mutations/actions/modules, preventing local declarations from polluting module indexes. - Improved: Activation is skipped when the workspace has no
package.json, unlessvuexHelper.storeEntryis configured, avoiding false activation while preserving manual setup.
1.0.0
Feature-focused 1.0 release:
- Added: Direct imported store instance support (
import store from '@/store') for completion, definition, and hover. - Added: Optional-chain access coverage (
?.) across$storeand imported store access patterns. - Added: Vue host smoke workflow supports Vue extension fallback priority (Volar first, fallback to Vetur).
- Improved: Alias-based store import detection now respects
tsconfig/jsconfigpathsresolution. - Improved: Provider/context hot paths are further cached to keep latency stable under real-world fixtures.
0.1.0
Stability, performance, and Vuex edge-case hardening release:
- Versioning: Bumped extension version to
0.1.0(including lockfile metadata). - Added:
thisalias completion support (e.g.const _t = this; _t./_t?.) for mapped properties and$storeaccess. - Fixed: Namespaced completion/definition/hover behavior in complex module and helper scenarios.
- Fixed: Nested state leaf resolution now prefers exact leaf nodes and avoids unnecessary parent fallback.
- Improved: Reindex strategy now skips unrelated file saves and uses shared mapper/cache instances to reduce redundant parsing.
- Improved: Path alias resolution tightened to avoid loose-prefix matching risk (e.g.
@/*vs@foo/*). - Improved: Restored lint quality gate and expanded regression tests for optional chaining, alias access, and module-scoped completion.
0.0.2
Enhanced completion features and bug fixes:
- Added:
this.xxxmapped property completion formapState,mapGetters,mapMutations,mapActions - Added:
this['xxx']bracket notation completion support - Fixed: ComponentMapper preprocessing for incomplete code (e.g.,
this.at end of line) - Fixed: Range calculation for bracket notation completion
- Improved: Removed auto-added parentheses for mutation/action completions
0.0.1
Initial release with features:
- Scoped Logic: Commit and State completions are context-aware inside modules.
- Hover Support: Local state hover tooltips in mutations/getters.
- Improved: Namespace filtering and JSDoc support.






