Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Support for 10 Languages (see description): #309

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Better Comments

The Better Comments extension will help you create more human-friendly comments in your code.
With this extension, you will be able to categorise your annotations into:
With this extension, you will be able to categorize your annotations into:
* Alerts
* Queries
* TODOs
Expand Down Expand Up @@ -80,7 +80,9 @@ The default 5 can be modified to change the colors, and more can be added.
## Supported Languages

* Ada
* Auto Hot Key
* AL
* Alloy
* Apex
* AsciiDoc
* BrightScript
Expand All @@ -91,16 +93,21 @@ The default 5 can be modified to change the colors, and more can be added.
* Clojure
* COBOL
* CoffeeScript
* CSON
* CSS
* Dafny
* Dart
* Dockerfile
* Elixir
* Elm
* Erlang
* F#
* Fortran
* GAS x86/x86_64/AMD64 assembly _(at&t/GNU syntax)_
* gdscript
* GenStat
* git config
* gitignore
* Go
* GraphQL
* Groovy
Expand All @@ -114,14 +121,15 @@ The default 5 can be modified to change the colors, and more can be added.
* JSON with comments
* Julia
* Kotlin
* LaTex (inlc. Bibtex/Biblatex)
* LaTeX (inlc. BibTeX/BibLaTeX & plain TeX)
* Less
* Lisp
* Lua
* Makefile
* Markdown
* Nim
* MATLAB
* NASM/YASM x86/x86_64/AMD64 assembly _(intel syntax) [asm]_
* Nim
* Objective-C
* Objective-C++
* Pascal
Expand All @@ -132,10 +140,12 @@ The default 5 can be modified to change the colors, and more can be added.
* PlantUML
* PL/SQL
* PowerShell
* Promela
* Puppet
* Python
* R
* Racket
* Rainmeter _(win10 desktop widget config file [modified ini])_
* Ruby
* Rust
* SAS
Expand All @@ -150,6 +160,7 @@ The default 5 can be modified to change the colors, and more can be added.
* Swift
* Tcl
* Terraform
* TOML
* Twig
* TypeScript
* TypeScript React
Expand Down
183 changes: 98 additions & 85 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,91 +25,102 @@
"ui"
],
"activationEvents": [
"onLanguage:ada",
"onLanguage:al",
"onLanguage:apex",
"onLanguage:asciidoc",
"onLanguage:bibtex",
"onLanguage:brightscript",
"onLanguage:c",
"onLanguage:clojure",
"onLanguage:cfml",
"onLanguage:COBOL",
"onLanguage:coffeescript",
"onLanguage:cpp",
"onLanguage:csharp",
"onLanguage:css",
"onLanguage:d",
"onLanguage:dart",
"onLanguage:diagram",
"onLanguage:dockerfile",
"onLanguage:elixir",
"onLanguage:elm",
"onLanguage:erlang",
"onLanguage:flax",
"onLanguage:fsharp",
"onLanguage:fortran-modern",
"onLanguage:gdscript",
"onLanguage:genstat",
"onLanguage:go",
"onLanguage:graphql",
"onLanguage:groovy",
"onLanguage:haskell",
"onLanguage:html",
"onLanguage:haxe",
"onLanguage:hive-sql",
"onLanguage:kotlin",
"onLanguage:java",
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:jsonc",
"onLanguage:julia",
"onLanguage:latex",
"onLanguage:less",
"onLanguage:lisp",
"onLanguage:lua",
"onLanguage:makefile",
"onLanguage:markdown",
"onLanguage:matlab",
"onLanguage:nim",
"onLanguage:objective-c",
"onLanguage:objective-cpp",
"onLanguage:objectpascal",
"onLanguage:pascal",
"onLanguage:perl",
"onLanguage:perl6",
"onLanguage:pig",
"onLanguage:plaintext",
"onLanguage:plsql",
"onLanguage:php",
"onLanguage:powershell",
"onLanguage:puppet",
"onLanguage:python",
"onLanguage:r",
"onLanguage:racket",
"onLanguage:ruby",
"onLanguage:rust",
"onLanguage:scala",
"onLanguage:sas",
"onLanguage:sass",
"onLanguage:scss",
"onLanguage:shaderlab",
"onLanguage:shellscript",
"onLanguage:sql",
"onLanguage:stata",
"onLanguage:stylus",
"onLanguage:swift",
"onLanguage:tcl",
"onLanguage:terraform",
"onLanguage:twig",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onLanguage:vb",
"onLanguage:verilog",
"onLanguage:vue",
"onLanguage:xml",
"onLanguage:yaml"
],
"onLanguage:ada",
"onLanguage:ahk",
"onLanguage:al",
"onlanguage:alloy",
"onLanguage:apex",
"onLanguage:asciidoc",
"onLanguage:bibtex",
"onLanguage:brightscript",
"onLanguage:c",
"onLanguage:clojure",
"onLanguage:cfml",
"onLanguage:COBOL",
"onLanguage:coffeescript",
"onLanguage:cpp",
"onLanguage:csharp",
"onLanguage:cson",
"onLanguage:css",
"onLanguage:d",
"onlanguage:dafny",
"onLanguage:dart",
"onLanguage:diagram",
"onLanguage:dockerfile",
"onLanguage:elixir",
"onLanguage:elm",
"onLanguage:erlang",
"onLanguage:flax",
"onLanguage:fsharp",
"onLanguage:fortran-modern",
"onLanguage:gas",
"onLanguage:gdscript",
"onLanguage:genstat",
"onlanguage:gitconfig",
"onLanguage:gitignore",
"onLanguage:go",
"onLanguage:graphql",
"onLanguage:groovy",
"onLanguage:haskell",
"onLanguage:html",
"onLanguage:haxe",
"onLanguage:hive-sql",
"onLanguage:kotlin",
"onLanguage:java",
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:jsonc",
"onLanguage:julia",
"onLanguage:latex",
"onLanguage:less",
"onLanguage:lisp",
"onLanguage:lua",
"onLanguage:makefile",
"onLanguage:markdown",
"onLanguage:matlab",
"onLanguage:nim",
"onLanguage:objective-c",
"onLanguage:objective-cpp",
"onLanguage:objectpascal",
"onLanguage:pascal",
"onLanguage:perl",
"onLanguage:perl6",
"onLanguage:pig",
"onLanguage:plaintext",
"onLanguage:plsql",
"onLanguage:php",
"onLanguage:powershell",
"onLanguage:promela",
"onLanguage:puppet",
"onLanguage:python",
"onLanguage:r",
"onLanguage:racket",
"onLanguage:rainmeter",
"onLanguage:ruby",
"onLanguage:rust",
"onLanguage:scala",
"onLanguage:sas",
"onLanguage:sass",
"onLanguage:scss",
"onLanguage:shaderlab",
"onLanguage:shellscript",
"onLanguage:sql",
"onLanguage:stata",
"onLanguage:stylus",
"onLanguage:swift",
"onLanguage:tcl",
"onLanguage:terraform",
"onLanguage:tex",
"onLanguage:toml",
"onLanguage:twig",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onLanguage:vb",
"onLanguage:verilog",
"onLanguage:vue",
"onLanguage:xml",
"onLanguage:yaml"
],
"galleryBanner": {
"color": "#e3f4ff",
"theme": "light"
Expand All @@ -128,6 +139,7 @@
"better-comments.multilineComments": {
"type": "boolean",
"description": "Whether the multiline comment highlighter should be active",
"scope": "language-overridable",
"default": true
},
"better-comments.highlightPlainText": {
Expand All @@ -137,6 +149,7 @@
},
"better-comments.tags": {
"type": "array",
"scope": "language-overridable",
"description": "Tags which are used to color the comments. Changes require a restart of VS Code to take effect",
"default": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function activate(context: vscode.ExtensionContext) {
// * if no active window is open, return
if (!activeEditor) return;

// * if lanugage isn't supported, return
// * if language isn't supported, return
if (!parser.supportedLanguage) return;

// Finds the single line comments using the language comment delimiter
Expand All @@ -28,7 +28,7 @@ export function activate(context: vscode.ExtensionContext) {
parser.ApplyDecorations(activeEditor);
};

// Get the active editor for the first time and initialise the regex
// Get the active editor for the first time and initialize the regex
if (vscode.window.activeTextEditor) {
activeEditor = vscode.window.activeTextEditor;

Expand Down
Loading