iamcco / diagnostic-languageserver

diagnostic language server integrate with linters
MIT License
418 stars 28 forks source link

lslint #7

Closed Jomik closed 5 years ago

Jomik commented 5 years ago

I am trying to get this to work for https://github.com/Makopo/lslint

Example output is

ERROR:: (  4, 20): Passing integer as argument 1 of `llOwnerSay' which is declared as `string msg'.
TOTAL:: Errors: 1  Warnings: 0

My coc-settings.json

{
  "coc.preferences.formatOnSaveFiletypes": ["tsx", "typescript"],
  "codeLens.enable": true,
  "prettier.requireConfig": true,
  "languageserver": {
    "dls": {
      "args": ["--stdio"],
      "command": "diagnostic-languageserver",
      "filetypes": ["lsl"],
      "initializationOptions": {
        "filetypes": { "lsl": "lslint" },
        "linters": {
          "lslint": {
            "command": "lslint",
            "debounce": 100,
            "formatPattern": [
              "^(.+):: \\( *(\\d+), *(\\d+)\\): (.+)$",
              { "column": 3, "line": 2, "message": [4], "security": 1 }
            ],
            "securities": { "ERROR": "error", "WARN": "warning" },
            "sourceName": "lslint"
          }
        }
      },
      "trace.server": "verbose"
    }
  }
}
iamcco commented 5 years ago

add to linter field:

    "isStdout": false,                                // use stdout output, default true
    "isStderr": true,                               // use stderr output, default false
Jomik commented 5 years ago

Awesome. I didn't realize it was using stderr. Thank you :)