mvbasic icon indicating copy to clipboard operation
mvbasic copied to clipboard

[BUG] The "Use Camel Case" feature is semantically incorrect.

Open stuboydl opened this issue 1 year ago • 0 comments

The operation of the "Use Camel Case" flag is semantically incorrect as multi-word keywords in the syntax files used are typically not in camel case.

(nb the descriptive text for the flag, "Use Camelcase for Intellisense keywords.", is heterological, as it uses Title case for the word whereas camelCase or CamelCase would be normatively autological).

To Reproduce Enable the MVBasic: Use Camel Case flag in settings, type a keyword into the editing screen.

Keywords are displayed per entries in the syntax language files. Typically the multi-word entries have an initial capital letter followed by lower case regardless of any word boundary. Therefore, they are not in camel case.

eg UniverseLanguage.json

      {
        "key": "Deactivatekey",
        "icon": 14,
        "documentation": "Deactivate one or mor encryption keys.", [sic] 
        "detail": "DEACTIVATEKEY <key.id>, <password> [ON <hostname>]"
      },

image

Expected behavior If the flag was enabled I would expect that keywords were displayed in camel case. For the above example, this would be "DeactivateKey" for upper camel case or "deactivateKey" for ordinary camel case.

Additional context It might be more correct to reverse the use of the flag to a "Use Upper Case" flag (which is on by default). This would describe the operation of the server.ts code and makes no assumptions about the case specificity of the entries in the syntax/language files.

stuboydl avatar Dec 24 '24 06:12 stuboydl