Just a heads up for anyone having issues getting t...
# adobe
m
Just a heads up for anyone having issues getting the VS Code plugin to work, our team has had a couple people have the UI not be responsive and were able to resolve it by ensuring that the VS Code
settings.json
file has no trailing commas or comments in it. Basically, needs to be syntactically valid vanilla JSON.
a
a JSON file needs to be... JSON? Whatever next?!
m
yeah, it was kinda weird that it was set to jsonc on my machine. I wonder if some plugin I have decided it should be that at some point and felt like it wanted comments. I don't remember manually setting it up that way 🤷
a
Oh right... didn't know JSONC was a thing, but I see now it's something MS cooked-up for VSCode: https://code.visualstudio.com/docs/languages/json#_json-with-comments So given "it's a thing", then CF VSCode plugin should deal with it properly then, right?
Bug.
m
deal with it properly
- agreed, even if it's providing a specific error message like "yeah, we know jsonc is supported by other things, but right now we require plain yogurt JSON for this to work" just so that people don't have to wonder why it doesn't finish initializing. (And eventually, definitely handle jsonc properly)
a
I also wonder if it's going about something wrong, reading the
settings.json
file directly? Surely VSCode has already done that, and exposes it as a Settings object? VSCode would not be so badly designed it requires plug-ins to all load the settings themselves?
m
mmmm yeah
and if the plugin needs to write to it, I'm sure there's an app api for that
a
@priyank_adobe / @sandip_halder (sorry Mark mentioned you are covering in his absence. Not sure who focuses on what. Either of you on the VSCode plug-in team?)
p
@Adam Cameron @mithlond We will check and get back to you. I am not from the VSCode plug-in but I will get this checked.
m
awesome - thank you
r
@Adam Cameron The problem with the Adobe extension is that they mess with settings outside of their extension, which they shouldn't. I've filed a bug on it and it appears they have a fix. We'll see.
m
woot
a
"I see"
m
Reading and updating settings is absolutely part of the VS Code API
p
@mithlond Could you please share the settings.json file so we can check the issue. You can send the file in DM.
m
Copy code
{
  "workbench.startupEditor": "none",
  "editor.tabSize": 2,
  "files.insertFinalNewline": true,
  "files.trimTrailingWhitespace": true,
  "workbench.enableExperiments": false,
  "workbench.quickOpen.closeOnFocusLost": false,
  "workbench.statusBar.feedback.visible": false,
  "workbench.settings.enableNaturalLanguageSearch": false,
  "editor.renderWhitespace": "boundary",
  "editor.multiCursorModifier": "ctrlCmd",
  "editor.rulers": [
    {
      "column": 80,
      "color": "#00000010"
    },
    {
      "column": 150,
      "color": "#ff000050"
    }
  ],
  "editor.scrollBeyondLastLine": false,
  "editor.minimap.renderCharacters": false,
  "breadcrumbs.enabled": true,
  "materialTheme.accent": "Remove accents",
  "workbench.colorCustomizations": {},
  "editor.suggest.maxVisibleSuggestions": 15,
  "editor.quickSuggestions": {
    "other": true,
    "comments": true,
    "strings": true
  },
  "editor.renderControlCharacters": false,
  "files.associations": {
    ".cflintrc": "json"
  },
  "cflint.jarPath": "C:\\Users\\myUser\\CFLint-1.5.0-all.jar",
  "cfml.autoCloseTags.enable": false,
  "tabnine.experimentalAutoImports": true,
  "AllAutocomplete.cycleOpenDocumentsOnLaunch": true,
  "AllAutocomplete.languageSpecialCharacters": {
    "css": "^[\\.#]",
    "scss": "^[\\.#]",
    "csv": "^[\\: ]"
  },
  "editor.minimap.showSlider": "always",
  "editor.minimap.size": "fit",
  "quickOpenFile.suffixList": ["**"],
  "highlight-matching-tag.styles": {
    "opening": {
      "name": {
        "underline": "red" // make this super apparent
      }
    }
  },
  "gitlens.statusBar.enabled": false,
  "gitlens.advanced.messages": {
    "suppressCommitHasNoPreviousCommitWarning": true
  },
  "[javascript]": {
    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
  },
  "editor.linkedEditing": true,
  "mssql.connections": [
    {
      "server": "M00421L\\SQLEXPRESS",
      "database": "ISREG",
      "authenticationType": "Integrated",
      "password": ""
    },
    {
      "server": "M00421L\\SQLEXPRESS",
      "database": "ERROR",
      "authenticationType": "Integrated",
      "profileName": "ERROR",
      "password": ""
    }
  ],
  "emmet.showSuggestionsAsSnippets": true,
  "emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "cfml": "html"
  },
  "search.seedWithNearestWord": true,
  "window.menuBarVisibility": "compact",
  "editor.minimap.enabled": false,
  "prettier.arrowParens": "avoid",
  "prettier.semi": false,
  "[html]": {
    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
  },
  "editor.guides.bracketPairs": true,
  "editor.formatOnSave": true,
  "editor.formatOnPaste": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "sync.gist": "29877cd87da18194641d5d42a5c8f31c",
  "editor.fontSize": 13,
  "prettier.requireConfig": true,
  "prettier.singleQuote": true,
  "editor.semanticHighlighting.enabled": true,
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "punctuation.definition.tag",
        "settings": {
          "foreground": "#abd90c"
        }
      },
      {
        "scope": "entity.name.tag.html",
        "settings": {
          "foreground": "#ca6675"
        }
      },
      {
        "scope": "entity.other.attribute-name",
        "settings": {
          "foreground": "#f5cd76"
        }
      },
      {
        "scope": "string.quoted.double.html",
        "settings": {
          "foreground": "#40b28f"
        }
      },
      {
        "scope": "string.quoted.single.html",
        "settings": {
          "foreground": "#40b28f"
        }
      },
      {
        "scope": "punctuation.definition.string.end.html",
        "settings": {
          "foreground": "#35b2dd"
        }
      },
      {
        "scope": "punctuation.definition.string.begin.html",
        "settings": {
          "foreground": "#35b2dd"
        }
      },
      {
        "scope": "keyword.operator",
        "settings": {
          "foreground": "#35b2dd"
        }
      },
      {
        "scope": "variable.parameter.js",
        "settings": {
          "foreground": "#b0611a"
        }
      },
      {
        "scope": "constant.language",
        "settings": {
          "foreground": "#088c54"
        }
      },
      {
        "scope": "storage.type.function.js",
        "settings": {
          "foreground": "#e36e86"
        }
      },
      {
        "scope": "entity.other.attribute-name.id.css",
        "settings": {
          "foreground": "#1eaab4"
        }
      },
      {
        "scope": "entity.other.attribute-name.class.css",
        "settings": {
          "foreground": "#1eaab4"
        }
      },
      {
        "scope": "meta.property-name.css",
        "settings": {
          "foreground": "#61d890"
        }
      },
      {
        "scope": "meta.property-value.css",
        "settings": {
          "foreground": "#42b81f"
        }
      },
      {
        "scope": "entity.name.function.js",
        "settings": {
          "foreground": "#ad6bff"
        }
      },
      {
        "scope": "entity.name.tag.cfml",
        "settings": {
          "foreground": "#569cd6"
        }
      },
      {
        "scope": "variable.other.readwrite.cfml",
        "settings": {
          "foreground": "#9cdcfe"
        }
      },
      {
        "scope": "variable.parameter.function.cfml",
        "settings": {
          "foreground": "#ffca58"
        }
      },
      {
        "scope": "entity.name.function.cfml",
        "settings": {
          "foreground": "#c5c566"
        }
      },
      {
        "scope": "storage.type.cfml",
        "settings": {
          "foreground": "#569cd6"
        }
      },
      {
        "scope": "meta.struct-literal.key.cfml",
        "settings": {
          "foreground": "#f5cd76"
        }
      }
    ]
  },
  "cfml.theme.initialized": true,
  "AdobeCFML.report.downloadPath": "C:\\Users\\myUser\\Downloads",
  "window.zoomLevel": 1,
  "workbench.iconTheme": "file-icons",
  "workbench.colorTheme": "Night Owl Light",
  "AdobeCFML.diagnostics.maxNumberOfProblems": 102
}
The issue is this line:
"underline": "red" // make this super apparent
when I remove that, the plugin loads and initializes correctly
alternatively, if I remove the comment, but add a trailing comma to anything, it likewise fails to load/initialize
for example:
Copy code
"opening": {
  "name": {
    "underline": "red"
  },
}
When I have either a line-ending comment or a trailing comma like above, even though the plugin doesn't load fully, and the plugin's UI never becomes responsive, if I (with a comment or trailing comma in the file) go to the gear icon in the lower right > settings > extensions > Adobe ColdFusion Builder > Adobe CFML › Diagnostics: Max Number Of Problems, and then change that number from 100 to, say, 105 and move focus to the next field, I see that the 100 gets updated to 105 in settings.json. So jsonc content in that file does seem to work just fine as far as VS Code itself is concerned.
Hope that helps