Repository navigation
CppAssistant 2.3.2
v2.3.2 - completion crash fixed, cleaner popup, one language switch
The real cause of "completion is gone and typing feels slow"
Every completion raised:
AttributeError: module 'sublime' has no attribute 'KIND_ID_CONSTANT'
at CppAssistant.py, in _make_item -> _KIND_MAP["c"]
KIND_ID_CONSTANT has never existed in the Sublime API. Because it was
referenced directly, _make_item() failed for every candidate: the popup
never appeared and the console filled with the same traceback on every
keystroke - which is exactly what made typing feel slow.
All kind ids now go through a guarded lookup with an AMBIGUOUS fallback, and
_make_item() has its own safety net, so one bad icon can never kill a batch.
Cleaner, shorter completion list
| Before | After |
|---|---|
vector<${1:int}> |
vector |
std::vector<${1:int}> in details |
vector<int> |
push_back(${1:x}) in details |
push_back(x) |
typing vec also offered views::common, views::counted |
only real prefix matches; substring matches still work |
Template placeholders no longer become triggers, which is also why the same
type could look like several duplicate entries. Details are cleaned by
_clean_signature() (placeholders resolved, std:: stripped).
Complete bilingual annotations
English annotations are backfilled from en_detail() for every STL/PBDS entry,
so each language is readable on its own:
scanf-> 格式化输入 / Formatted inputpush_back-> 尾部追加元素 O(1) / Append elementsort-> 排序(升序) O(n log n) / Sort range ascendingvector-> 动态数组 / Dynamic array
One language switch
CppAssistant > Language (简体中文 / English / English + Chinese) sets the
menu bar, the completion popup and diagnostics at once. The same three entries
are in the command palette. The old separate "Diagnostic language" and
"Toggle Menu Language" menu entries are replaced by this single switch.
Verification
- 234 unit tests (+10), including a test that reproduces the missing
KIND_ID_CONSTANT; flake8, mypy, Python 3.9/3.10/3.12/3.14 and libclang
jobs all green. - Package verified to contain
.python-version(3.8),messages/2.3.2.txt
and the fixedCppAssistant.py.
Upgrade
Restart Sublime Text after upgrading; the module is only reloaded on start.
Full changelog: https://github.com/chenmoulaile/Sublime-CppAssistant/blob/main/CHANGELOG.md
Compare: v2.3.1...v2.3.2