Comments Toolkit provides comments auto-completions (snippets) for various programming languages. It supports both single-line and multi-line comments and allows users to insert predefined comment patterns using completion items.
- Supports multiple programming languages with their respective comment styles.
- Provides predefined comment patterns such as sections, subsections, simple comments, blocks, and TODOs.
- Automatically adjusts the length of comment lines to maintain a consistent format.
- Registers completion item providers for active editors to offer comment pattern suggestions.
- Caches generated comment patterns to avoid redundant computations.
- Logs messages with different log levels (info, warning, error) for better debugging and monitoring.
- new in 1.2.0 Detects the active language at the cursor position and provides relevant comment completions.
To customize the behavior of the Comments Toolkit extension, you can modify the following settings in your Visual Studio Code settings:
- Base Length: Defines the base length for comments. The default value is 40.
- Separator: Specifies the character used as a separator in comments. The default value is '='.
To change these settings, follow these steps:
- Open the Command Palette (
Ctrl+Shift+P
on Windows). - Type
Preferences: Open Settings
and select it. - In the Settings UI, search for
commentToolkit
. - Modify the settings such as
Base Length
andSeparator
as needed.
Start typing "comm:", and the auto-complete list will appear with available comment patterns.
The completions are currently available for the following languages and file types:
- ABAP
- Batch
- BibTeX
- Clojure
- CoffeeScript
- C
- C++
- C#
- CUDA C++
- CSS
- Dart
- Diff
- Dockerfile
- F#
- Git Commit
- Git Rebase
- Go
- Groovy
- Handlebars
- HTML
- HLSL
- Ignore
- INI
- Java
- JavaScript
- JavaScript React
- JSON
- JSON with Comments (JSONC)
- Julia
- Julia Markdown
- LaTeX
- Less
- Log
- Lua
- Makefile
- Markdown
- Objective-C
- Objective-C++
- Perl
- Perl 6
- PHP
- Plain Text
- PowerShell
- Pug (Jade)
- Python
- R
- Raku
- Razor
- Ruby
- Rust
- SCSS
- Sass
- ShaderLab
- Shell Script
- SQL
- Swift
- TypeScript
- TypeScript React
- TeX
- Twig
- Visual Basic
- XML
- XSL
- YAML
If you want to add other languages or file types, please open an issue.
- PHP CRUD Generator - Create outstanding PHP CRUD Admin Dashboard
- PHP Form Builder - The very best PHP Form Generator