BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
82 stars 9 forks source link
c code-generation cpp developer-tools refactoring-tools typescript vscode vscode-extension


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

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