MCPcopy Index your code
hub / github.com/BigBahss/vscode-cmantic

github.com/BigBahss/vscode-cmantic @v0.9.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.9.0 ↗ · + Follow
540 symbols 1,463 edges 48 files 26 documented · 5% updated 2y agov0.9.0 · 2021-06-02★ 9037 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

C-mantic

C-mantic provides code generation and refactorings for C/C++. Relevant code-actions are suggested via the light-bulb menu 💡, and can be accessed directly by selecting Refactor... or Source Actions... in the editor context menu. Code-actions are also available from the command palette or by keyboard shortcut.

Full Documentation: https://bigbahss.github.io/vscode-cmantic/

Features at a glance

Requirements

Requires a C/C++ language server extension (IntelliSense) for full functionality, such as Microsoft's C/C++ extension. See Language Server below for more details.

Issues and Feedback

If you find a bug or would like to request a new feature, please open an Issue on Github. Also, consider leaving the extension a rating.

Examples

Add Definition

Add Definition

Update Function Signature

Update Function Signature

Generate Getters and Setters

Generate Getters and Setters

Language Server

C-mantic is designed to work with any C/C++ language server, and is primarily tested with C/C++ (ms-vscode.cpptools) and clangd (llvm-vs-code-extensions.vscode-clangd), but will also work on ccls (ccls-project.ccls). If you use a different language server, C-mantic may still work, but is untested. If you find a bug that you suspect might be related to your language server, please open an Issue and state what language server you are using.

Troubleshooting

If you find that features of C-mantic aren't working, first make sure that your language server (IntelliSense) is working correctly. To do this, check out the Outline View, usually found in the Explorer side-bar. The Outline View should show all source code symbols for the current file. Also, make sure Go to Definition and Go to Declaration are working. If C-mantic still isn't working correctly, open an Issue on GitHub and describe the problem along with any relevant information.

Tips

  • C-mantic relies on the language server to provide information about your source code in order to function correctly. Because of this, if the language server running slowly, C-mantic may fail to provide code-actions right away. For instance, if you type out a function declaration, C-mantic won't be able to provide the Add Definition code-actions until the language server updates. To mitigate this, you can change how often the language server updates in response to code changes:
  • For C/C++ (ms-vscode.cpptools), you can lower the C_Cpp: Intelli Sense Update Delay setting (default 2000ms).
  • For ccls (ccls-project.ccls), you can lower the Status Update Interval setting (default 2000ms).

Planned Features

The list of planned features can be found here. Requests for new features/functionalities are welcome, just open an Issue on Github. If you'd like to contribute, feel free to open a pull-request.

License

This software is released under the MIT License

Extension points exported contracts — how you extend this code

Parameter (Interface)
(no doc) [2 implementers]
src/ParameterList.ts
CodeActionDocumentation (Interface)
(no doc)
src/CodeActionProvider.ts
DeclarationDefinitionLink (Interface)
(no doc)
src/utility.ts
QuickPickOptions (Interface)
(no doc)
src/QuickPick.ts
PositionOptions (Interface)
(no doc)
src/ProposedPosition.ts
PreprocessorConditional (Interface)
(no doc)
src/SourceDocument.ts
CmanticCommand (Interface)
(no doc)
src/commands/commands.ts
ParameterList (Interface)
(no doc) [2 implementers]
src/ParameterList.ts

Core symbols most depended-on inside this repo

positionAt
called by 43
src/SourceDocument.ts
getText
called by 37
src/SourceDocument.ts
isClassType
called by 33
src/SourceSymbol.ts
lineAt
called by 31
src/SourceDocument.ts
get
called by 29
src/HeaderSourceCache.ts
disable
called by 27
src/CodeActionProvider.ts
alertError
called by 24
src/Logger.ts
offsetAt
called by 24
src/SourceDocument.ts

Shape

Method 248
Function 202
Class 60
Interface 21
Enum 9

Languages

TypeScript99%
C++1%

Modules by API surface

src/CSymbol.ts82 symbols
src/SourceDocument.ts47 symbols
src/CodeActionProvider.ts41 symbols
src/configuration.ts36 symbols
src/utility.ts34 symbols
src/Operator.ts31 symbols
src/parsing.ts26 symbols
src/ParameterList.ts24 symbols
src/commands/addDefinition.ts22 symbols
src/SourceSymbol.ts22 symbols
src/extension.ts15 symbols
src/Accessor.ts15 symbols

For agents

$ claude mcp add vscode-cmantic \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page