-
Notifications
You must be signed in to change notification settings - Fork 16
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
[FEATURE] Comment Indentation Configurability #111
Comments
I'm actually making good progress on this suggestion. I hope to have it implemented today. 😀 |
I've implemented this feature as new user setting The setting uses the values suggested by @dthiot , but I changed "none" to "ignore". Possible values for the setting are:
The default setting is |
@kevin Powick<mailto:[email protected]> is my hero!!
From: Kevin Powick <[email protected]>
Reply-To: mvextensions/mvbasic <[email protected]>
Date: Friday, June 12, 2020 at 3:21 PM
To: mvextensions/mvbasic <[email protected]>
Cc: Dick Thiot <[email protected]>, Mention <[email protected]>
Subject: Re: [mvextensions/mvbasic] [FEATURE] Comment Indentation Configurability (#111)
I've implemented this feature as new user setting MVBasic.indentComment. I thought the name followed well with the already existing MVBasic.indent.
The setting uses the values suggested by @dthiot<https://github.com/dthiot> , but I changed "none" to "ignore".
Possible values for the setting are:
left - indent comment line to margin position 0.
margin - Indent comment line to the position defined by MVBasic.margin .
code - Indent comment line to the same position as code indentation.
ignore - Do not change the indentation of the comment line.
The default setting is ignore because this is how 2.0.8 currently treats comment lines. I didn't want any surprises with the next release of the extension.
[Screen Shot 2020-06-12 at 15 54 07]<https://user-images.githubusercontent.com/1646753/84543067-a3d05e80-acc8-11ea-9d08-8a1e3eba7eab.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#111 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACOODLYXKZQLZ5VA7MFFWTTRWKE2XANCNFSM4N4NHD5Q>.
|
* RegEx fix for labels with leading spaces. * 98-Issue linting with multiple levels of quoting * RegEx improvement for quoted strings * Replace parenthesis and quoted strings with empty ones. - Removed repetitive Trim()s - Removed unnecessary RegEx tests - Simplified line split on semicolon due to above changes. - Results: Faster execution. Better coverage for split on semicolon * - Cleanup lines[] array at start so repeated test/replace not needed - Removed unnecessary trim()s - Removed boolean equality tests. if(x.test == true) vs if(x.test) - Fixed GOTO/GOSUB when followed by more than one space GOTO <s><s> 100 * RegEx fix-ups to support recent changes * Corrected comment * Linter RegEx cleanup * FOR/NEXT tracking improvements and updated error messages - Nested For/Next statements now validated - NEXT with no variable is now allowed - One line per error: Removed extraneous, repeated diagnostic messages - Reworded / Clarified some error messages for consistency * Minor code clean-up * Replace char-at-a-time split on ; with split(";") * Maintain original character spacing for Intellisense error markers - RegEx improvements and consistency between client and server - Improved getWord() function * Corrected indentation for ELSE END with trailing comment (issue #45) * Corrects Label error with GOTO/GOSUB. Issue #99 - Also now allows dotted numeric labels such as GOTO 100.5 * Revert "Corrects Label error with GOTO/GOSUB. Issue #99" This reverts commit 68b0166. * Inspect TM Scopes->Inspect Editor Token and Scopes * Fix error processing customWordPath when last line is blank. May relate to #24. * Changed GOTO/GOSUB scope jumping message from Error to Warning * Numerous updates related to For/Next and Label tracking - Issue #45: Alignment of If/Else - Issue #96: Allow periods in labels - Issue #99: Corrected Label error with GOTO/GOSUB. - Issue #104: Corrected For/Next with leading label - Issue #105: Changed GOTO scope jumping message from Error to Warning - RegEx: Label comments to include "REM, *, and !" - NEXT can be used without FOR variable. * Shipping 2.0.7 * Re-introduce accidentally deleted /doc files * Fixes issue 107: FOR/NEXT error when no whitespace after FOR variable. * Shipping 2.0.8 * Issue #110: Do not change indentation of comment lines * Issue #111: Added user setting to control indentation of comment lines. * Bump elliptic from 6.5.2 to 6.5.3 (#119) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Extension Guide.md Updated AccuTerm connector and host program links. * Feature request 113 (#121) * Update package.json Added MVBasic.customFunctionPath * Update server.ts added functionality to Load CustomFunction definition * Add files via upload * Update Extension Guide.md added documentation for Custom functions and subroutines 6.8 * Update server.ts Removed `data: functions[i].index,` for now since Microsoft has not responded yet. It works without it, and it's no longer in the Microsoft API documentation. * - Fix issue with startLoop/endLoop in server code parser - Clean up unused variable in server - Expand docs on new customFunctions feature * Shipping 2.0.9 Co-authored-by: Kevin Powick <[email protected]> Co-authored-by: Ian McGowan <[email protected]> Co-authored-by: Peter Schellenbach <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brent Blair <[email protected]>
2.0.9 released! Closing issue. |
* RegEx fix for labels with leading spaces. * 98-Issue linting with multiple levels of quoting * RegEx improvement for quoted strings * Replace parenthesis and quoted strings with empty ones. - Removed repetitive Trim()s - Removed unnecessary RegEx tests - Simplified line split on semicolon due to above changes. - Results: Faster execution. Better coverage for split on semicolon * - Cleanup lines[] array at start so repeated test/replace not needed - Removed unnecessary trim()s - Removed boolean equality tests. if(x.test == true) vs if(x.test) - Fixed GOTO/GOSUB when followed by more than one space GOTO <s><s> 100 * RegEx fix-ups to support recent changes * Corrected comment * Linter RegEx cleanup * FOR/NEXT tracking improvements and updated error messages - Nested For/Next statements now validated - NEXT with no variable is now allowed - One line per error: Removed extraneous, repeated diagnostic messages - Reworded / Clarified some error messages for consistency * Minor code clean-up * Replace char-at-a-time split on ; with split(";") * Maintain original character spacing for Intellisense error markers - RegEx improvements and consistency between client and server - Improved getWord() function * Corrected indentation for ELSE END with trailing comment (issue #45) * Corrects Label error with GOTO/GOSUB. Issue #99 - Also now allows dotted numeric labels such as GOTO 100.5 * Revert "Corrects Label error with GOTO/GOSUB. Issue #99" This reverts commit 68b0166. * Inspect TM Scopes->Inspect Editor Token and Scopes * Fix error processing customWordPath when last line is blank. May relate to #24. * Changed GOTO/GOSUB scope jumping message from Error to Warning * Numerous updates related to For/Next and Label tracking - Issue #45: Alignment of If/Else - Issue #96: Allow periods in labels - Issue #99: Corrected Label error with GOTO/GOSUB. - Issue #104: Corrected For/Next with leading label - Issue #105: Changed GOTO scope jumping message from Error to Warning - RegEx: Label comments to include "REM, *, and !" - NEXT can be used without FOR variable. * Shipping 2.0.7 * Re-introduce accidentally deleted /doc files * Fixes issue 107: FOR/NEXT error when no whitespace after FOR variable. * Shipping 2.0.8 * Issue #110: Do not change indentation of comment lines * Issue #111: Added user setting to control indentation of comment lines. * Bump elliptic from 6.5.2 to 6.5.3 (#119) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Extension Guide.md Updated AccuTerm connector and host program links. * Feature request 113 (#121) * Update package.json Added MVBasic.customFunctionPath * Update server.ts added functionality to Load CustomFunction definition * Add files via upload * Update Extension Guide.md added documentation for Custom functions and subroutines 6.8 * Update server.ts Removed `data: functions[i].index,` for now since Microsoft has not responded yet. It works without it, and it's no longer in the Microsoft API documentation. * - Fix issue with startLoop/endLoop in server code parser - Clean up unused variable in server - Expand docs on new customFunctions feature * Shipping 2.0.9 * Update server.ts It looks like I left the line `customFunctionPath = settings.MVBasic.customFunctionPath;` out of the merge. * Shipping v2.0.10 Co-authored-by: Kevin Powick <[email protected]> Co-authored-by: Ian McGowan <[email protected]> Co-authored-by: Peter Schellenbach <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brent Blair <[email protected]>
Add a workspace parameter "Comment Indentation" that would have options for none, left, margin, or code. None means that comments are not indented and left where they are. Left means that comments are moved all the way to the left (zero margin). Margin means that code is indented based on the margin setting. Code means that the comments are indented to the same level as the next line of code is indented. That means after a line of code that causes a new indentation, the comment is indented to the new level.
The text was updated successfully, but these errors were encountered: