{"_id":"@0x706b/diagnostic-languageserver","_rev":"4-ae31cf647162c476309cbfa994533bf6","name":"@0x706b/diagnostic-languageserver","dist-tags":{"latest":"1.13.1-3"},"versions":{"1.13.1-0":{"name":"@0x706b/diagnostic-languageserver","version":"1.13.1-0","description":"diagnostic language server","main":"./lib/index.js","repository":{"type":"git","url":"git@github.com:0x706b/diagnostic-languageserver.git"},"author":{"name":"iamcco","email":"ooiss@qq.com"},"license":"MIT","scripts":{"build":"tsc -p ./","watch":"tsc -w -p ./"},"bin":{"diagnostic-languageserver":"bin/index.js"},"dependencies":{"commander":"^5.1.0","find-up":"^4.1.0","lodash":"^4.17.15","rxjs":"^6.5.5","tempy":"^0.7.1","tslib":"^1.11.2","vscode-languageserver":"^6.1.1","vscode-languageserver-textdocument":"^1.0.1","vscode-uri":"^2.1.1"},"devDependencies":{"@types/lodash":"^4.14.150","@types/node":"^11.11.3","ignore":"^5.1.8","typescript":"^3.8.3"},"publishConfig":{"access":"public"},"licenseText":"MIT License\n\nCopyright (c) 2019 iamcco\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@0x706b/diagnostic-languageserver@1.13.1-0","dist":{"shasum":"1e318a2b196355f0f7a39f680df6655367b72b3c","integrity":"sha512-/iZgQsM4w2OZYiIa9+KQNb66ve083G347clv8Kadf54DeaElPx/niRrxNAETOuUUF3qKjgUNGIEClh+QxwzRIw==","tarball":"https://registry.npmjs.org/@0x706b/diagnostic-languageserver/-/diagnostic-languageserver-1.13.1-0.tgz","fileCount":30,"unpackedSize":69991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKqCPCRA9TVsSAnZWagAAQisP/RPKGUDq8aPvyNul3DDi\nH/lJpiGd1ViS+1KsHtqKtAu9QYcVFgLJdjKC3eO/OhB7oPBj7LdSxmElCG9K\nFH67f47rmc9htgGKq2iOEqk1WEGHZxcqPO3X/3HuMy2ayJbjGNXj4C6H9FkQ\nnu4Ps6SYaMNqWZeYJU8oSQC7/oaBf6dhOnRt5UsJ59HE75Wfx6oiJNR3Vikm\n6Ww8a0axSjsfPw9MEkfxNVgnLAs2BQAYDV1ObCt9a1EI+AjwCLhmMfKagwos\nZxpEzOmFNLynxy8igVc/QGuEbfAz7qxlTvffSXh+1JxfmemlV5oRuy++WWcl\nAD/pTOuDi7MQJW7Pxft7oXNih/Qmpukv0dP3ZWO5vH2aNZFr1qAPL0G2RBib\nl/0rTSxCcAe7SmHNIsBsZSWpoVJwAmPPoYSBjlibM0YvWzDURaFL+dtyc54l\nJWqzpraeX0emmnLAOqzSQa3MroHtBQ8JEJWts6mx4f9EWOTW+zwOcOYOHRHv\ngguOkkua6xxMx6SzR7CFxhmw+G1KLJb4nFKGw9FTWRZ9u5RQfcIqRkG/gIJ8\nHnyHjwoy2vNi31AFjDoYumwxoFOBRaDBM1zDc/cHROIfjzvj/+0CSjDRPfKV\n8YnNsnenBQ7UjgAoX6SYSaEnDgVNMVW4hoyKuuckxUzym7l/Vn1HPIH7Vnrt\nTzzz\r\n=Tg2t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQiUcsbh0zbhKf572L8BHIcaimU35OLXUv/IvPH2TqMQIhAI97eJC5UqyGuMoYhj5SbLL2CF1FhPx72b/YIjMk2D9q"}]},"_npmUser":{"name":"0x706b","email":"peter@peterkrol.com"},"directories":{},"maintainers":[{"name":"0x706b","email":"peter@peterkrol.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/diagnostic-languageserver_1.13.1-0_1630183567723_0.6097392112844189"},"_hasShrinkwrap":false},"1.13.1-1":{"name":"@0x706b/diagnostic-languageserver","version":"1.13.1-1","description":"diagnostic language server","main":"./lib/index.js","repository":{"type":"git","url":"git@github.com:0x706b/diagnostic-languageserver.git"},"author":{"name":"iamcco","email":"ooiss@qq.com"},"license":"MIT","scripts":{"build":"tsc -p ./","watch":"tsc -w -p ./"},"bin":{"diagnostic-languageserver":"bin/index.js"},"dependencies":{"commander":"^5.1.0","find-up":"^4.1.0","lodash":"^4.17.15","rxjs":"^6.5.5","tempy":"^0.7.1","tslib":"^1.11.2","vscode-languageserver":"^6.1.1","vscode-languageserver-textdocument":"^1.0.1","vscode-uri":"^2.1.1"},"devDependencies":{"@types/lodash":"^4.14.150","@types/node":"^11.11.3","ignore":"^5.1.8","typescript":"^3.8.3"},"publishConfig":{"access":"public"},"licenseText":"MIT License\n\nCopyright (c) 2019 iamcco\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@0x706b/diagnostic-languageserver@1.13.1-1","dist":{"shasum":"d320706e28f527b6763447272db60b8d3e96b227","integrity":"sha512-5sLj5YEPh6WTLNzABzyjRmQjL+244Pna19S7M1cB8f7KuIxJ54sG8IQxhDDAbvLQixUvXSNvJn37Uf3Na4GQ7A==","tarball":"https://registry.npmjs.org/@0x706b/diagnostic-languageserver/-/diagnostic-languageserver-1.13.1-1.tgz","fileCount":30,"unpackedSize":70042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKqgrCRA9TVsSAnZWagAA1SQQAKIkA6b3/Hgu6xFvTDPW\nCYUr8drOpW8QQ467wN2uDtgozJCYVI9qS6gY2kRdKZ4iTqz9WUprFjZOFt85\nr5TzAQKYBnVo4dCNiezWV+Y21NmlPlqn676T7kk+vG2pSun/+al+9rzdyRwW\nlkJRslH155h7TAacK/hSVrpyKhKU1DAZESxRioQkGS+a5kh/w2gf7408ZZTq\ntL/Y8a+PyL6WmnSWdrq5s6KXn/HxKLRie7gVJFgk9M7wTVES4cI6StgWS5QA\nWE39ug0+Pd3wFinVVZxxK5spv63GXV65fEqCqpwfIwN/zElm6zDLeas+VaC1\nNoxV/vaZp8s0f+wVjxoLqYqpgOVTMjbHQ6hwSZ8HphVywq9IOjqp5EVt6lBW\nfV+ABpse6nmQIVlKQDJGka1C10V6/e3JGS9ys4rdIfLcckQMA8f7ScHw/Nu1\nCqPUkkRZky5eWj1hRswoMVCGOKqpT6foykruU8pTSiGL/ECxJdhZUw7AGPwT\neFEcjV2rk5PzhQvM9XMS9r1ycMahiheZ6kvY0JKci8LJ39KHqJPFZxCKUCOc\niDaafyfC9+2HtHQic1ZMkabwav5MffXtI+Ad9+7Ig8cKzq6X1E1+/AUYw4T1\nfhyUf+wBye+1FT/Y4UGC5ovls6Vy75PtaJih403oW37pwDQ2xbYXn3X25T7s\n7WQj\r\n=FKa0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgndM2IqOrwZPrrowHRQRpKq+degw89YewqbYB1LO/5AiAtyothVq9f9lg3mscrB7GDUc/j45zU9J6fEaCQ6EOiUw=="}]},"_npmUser":{"name":"0x706b","email":"peter@peterkrol.com"},"directories":{},"maintainers":[{"name":"0x706b","email":"peter@peterkrol.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/diagnostic-languageserver_1.13.1-1_1630185514875_0.37300024726806136"},"_hasShrinkwrap":false},"1.13.1-2":{"name":"@0x706b/diagnostic-languageserver","version":"1.13.1-2","description":"diagnostic language server","main":"./lib/index.js","repository":{"type":"git","url":"git@github.com:0x706b/diagnostic-languageserver.git"},"author":{"name":"iamcco","email":"ooiss@qq.com"},"license":"MIT","scripts":{"build":"tsc -p ./","watch":"tsc -w -p ./"},"bin":{"diagnostic-languageserver":"bin/index.js"},"dependencies":{"commander":"^5.1.0","find-up":"^4.1.0","lodash":"^4.17.15","rxjs":"^6.5.5","tempy":"^0.7.1","tslib":"^1.11.2","vscode-languageserver":"^6.1.1","vscode-languageserver-textdocument":"^1.0.1","vscode-uri":"^2.1.1"},"devDependencies":{"@types/lodash":"^4.14.150","@types/node":"^11.11.3","ignore":"^5.1.8","typescript":"^3.8.3"},"publishConfig":{"access":"public"},"licenseText":"MIT License\n\nCopyright (c) 2019 iamcco\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@0x706b/diagnostic-languageserver@1.13.1-2","dist":{"shasum":"f4074ccc0c2ec5bee25d621aefde0017c9e9f10b","integrity":"sha512-KT+FsXIaHRPriAfQ1R0Qa9T0p1Z1S4fwuLBgB6pdcfAdXQ2U/jDSNGSlcRzHMyq3BX7rdoklnB3UUt8BKV9CTw==","tarball":"https://registry.npmjs.org/@0x706b/diagnostic-languageserver/-/diagnostic-languageserver-1.13.1-2.tgz","fileCount":30,"unpackedSize":70252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKrYHCRA9TVsSAnZWagAA40YP/15HTJvuzOkvVxfq7zaH\nJ571ax/ropCM+yJQ6kcqxIOCuj0j3a6V3/LenrD4JMKOhphmJwVhUefd/mpt\nupd+bd2bFrEKaBdH9dPSEI+XuYXXHPyjAYB9gt3crxsLSObZlIQnZEQHVnp4\nVTUoIqtf/Cd8Xw3L+GNXRklq0QCOCk8ZkT6nBmqCuOXGWL7qi6rwvGDWkxod\nii8LSt3NO4VUg5DlY4nKFU35M3UNa5jkkVr7zGDcfTbl+Yf77foyZ3SOrC1L\nuZqtPtrXHcp3thP25eBnSElXTn/hfyC21FuBNCLRQqR03KwFs3/MHGYN7Nml\n0zlbQ/MTepFc7cEWLlcE4SDEBSOR89LZg/k5mgvyhOYu34RqwWWApq0zDwQ7\nPJ+yAIR36Zh24pR4Zk8YbOI5k8gHR9CpZDJnKVkxKEnyVJRF+FXhqUdxuihR\nZyliCQWbEke53cM2no0SMtMv7XlF7LlqxSVJMyxlaNjxi8EPitozd+V6HhzV\nyQsUZ4OpRRK4/qU7mtFMKtGF/o3aGqgO69l4DqJv6wkjDrq872KvH9xnPKiY\nuF96epzSkJ+63fHXzpo8f4ej4dyCljXhW0q6VSv1na5gTBRQF2Twtj/PMrvp\nZPk6y3AjIQXN5b9YXaIzzWBFpkK3LCblYJNee/dDFUwahMxuOEDw+IdEvEdp\nnebq\r\n=J4+5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGf4ShKWC5jtD+GcB9smkqD2QPIXusqtRVslUWNfdrgbAiEAi8gt0uba9px0wPAYT0iIeWtYECyM9Kl9ZEUf4jtWvxU="}]},"_npmUser":{"name":"0x706b","email":"peter@peterkrol.com"},"directories":{},"maintainers":[{"name":"0x706b","email":"peter@peterkrol.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/diagnostic-languageserver_1.13.1-2_1630189063821_0.11884662775232258"},"_hasShrinkwrap":false},"1.13.1-3":{"name":"@0x706b/diagnostic-languageserver","version":"1.13.1-3","description":"diagnostic language server","main":"./lib/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/0x706b/diagnostic-languageserver.git"},"author":{"name":"iamcco","email":"ooiss@qq.com"},"license":"MIT","scripts":{"build":"tsc -p ./","watch":"tsc -w -p ./"},"bin":{"diagnostic-languageserver":"bin/index.js"},"dependencies":{"commander":"^5.1.0","find-up":"^4.1.0","lodash":"^4.17.15","rxjs":"^6.5.5","tempy":"^0.7.1","tslib":"^1.11.2","vscode-languageserver":"^6.1.1","vscode-languageserver-textdocument":"^1.0.1","vscode-uri":"^2.1.1"},"devDependencies":{"@types/lodash":"^4.14.150","@types/node":"^18","ignore":"^5.1.8","typescript":"^3.8.3"},"publishConfig":{"access":"public"},"types":"./lib/index.d.ts","gitHead":"d33d04544feffe97720aee3ce93caeab448eb7bf","bugs":{"url":"https://github.com/0x706b/diagnostic-languageserver/issues"},"homepage":"https://github.com/0x706b/diagnostic-languageserver#readme","_id":"@0x706b/diagnostic-languageserver@1.13.1-3","_nodeVersion":"18.3.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-keWViRXqis7aG/YaG+GavIvCDhrHHOGCN6wmvSOcNF1FMcbfLu+5t60TEy01y5rCNMrPCafHecvvAPexPTVMag==","shasum":"a362d1418e38d8b93da07a5ce6d6161b531381b3","tarball":"https://registry.npmjs.org/@0x706b/diagnostic-languageserver/-/diagnostic-languageserver-1.13.1-3.tgz","fileCount":23,"unpackedSize":70830,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBu+KmgarL2m0ZB9PuyEHGS5ugvwjC//NvxF/AH254AVAiEA0AHsS7MLKfrlWVTQk4BT6f8sGwREk7o2OmI1XS3xA5o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0ZL2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7GA//S/F1fD0yNoG4CHvVwurYuT8Svdkl/Dtb4QiHR9986cwFUzbL\r\n0nNennKBWjHSPN6ambjEBqEQPQtUPizG58YPpLkfTDKQ8OIIFReH2Ko9BGKO\r\nOYoMT3mKlI7/GuhR4yDr8n0aFKt0HVuXlloe0Bb79tEKdCWsoPj4lCN5qJx/\r\nwWvMAEdBcJXggoPAJzKLOEwZRzcqAD08fh4Y0cEGanRjY2Tn/ih3W8PfQ63o\r\nY4QrfjPwwC0YNphHX2lxPQ62HqtcgLUUPkbM+QXSXyftwUs+hrJxd4kW/RBd\r\nnPDk6hmZQMsZlHe+t378pjI7YM9T9At4aIwWzDf6NwjXtC8V6lMLUa0Y/jRQ\r\nTgCYWX2AWNGJ9XFIWppHnzNwETOBeIDXUbSa90cSZFW5P1F7WP5rki08vMNv\r\nCcqh37k7cLhF0rWhQeVWST5DeZTzcH+jaUgRvfbcPXaKmZfjyQOAYUQ9DpcU\r\nEePC0ahuFWwuDzuwrhcQcwYlQrcChhDkOVQnTJchwNjnTaM9G3rsVlKw3srM\r\nsEOb+k2IZjUsGtOLw8jg27rkJ8J+GXLIoZQZYvR2pP2IQNnSyVS7FutQnwNZ\r\npbx0slfnlnGDizND11L/W3auWprynSNXk71DGKanmG7GbXUuxFSE0dBV8IJi\r\ntQpuj74/wM3B5UK5DgpbKzJw/rzinGDRQQg=\r\n=8CAl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"0x706b","email":"peter@peterkrol.com"},"directories":{},"maintainers":[{"name":"0x706b","email":"peter@peterkrol.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/diagnostic-languageserver_1.13.1-3_1657901814082_0.6469560118726345"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-28T20:46:07.679Z","1.13.1-0":"2021-08-28T20:46:07.865Z","modified":"2022-07-15T16:16:54.325Z","1.13.1-1":"2021-08-28T21:18:35.017Z","1.13.1-2":"2021-08-28T22:17:43.991Z","1.13.1-3":"2022-07-15T16:16:54.259Z"},"maintainers":[{"name":"0x706b","email":"peter@peterkrol.com"}],"description":"diagnostic language server","repository":{"type":"git","url":"git+ssh://git@github.com/0x706b/diagnostic-languageserver.git"},"author":{"name":"iamcco","email":"ooiss@qq.com"},"license":"MIT","readme":"# diagnostic-languageserver\n\n> General purpose Language Server that integrate with\n> linter to support diagnostic features\n\n## Main features\n\n- diagnostic with linters\n- document format\n\n**screenshot with neovim and coc**\n![image](https://user-images.githubusercontent.com/5492542/54487533-15590b80-48d2-11e9-8cba-7e58c0edcf6f.png)\n\n## Install\n\n``` bash\nyarn global add diagnostic-languageserver\n```\n\n> make sure your yarn's global bin path is include in `PATH`\n\n> for example `export PATH=\"$(yarn global bin):$PATH\"`\n\n## Config & Document\n\nlanguageserver config:\n\n``` jsonc\n{\n  \"languageserver\": {\n    \"dls\": {\n      \"command\": \"diagnostic-languageserver\",\n      \"args\": [\"--stdio\", \"--log-level\", \"2\"],\n      \"filetypes\": [ \"sh\", \"email\" ], // filetypes that you want to enable this lsp\n      \"initializationOptions\": {\n        \"linters\": {\n          ...\n        },\n        \"filetypes\": {\n          ...\n        },\n        \"formatters\": {\n          ...\n        },\n        \"formatFiletypes\": {\n          ...\n        }\n      }\n    }\n  }\n}\n```\n\n`linters` field:\n\n```jsonc\n{\n  \"linterName\": {                                    // linter name, for example: vint\n    \"command\": \"shellcheck\",                         // linter command\n    \"rootPatterns\": [],                              // root patterns, default empty array\n    \"isStdout\": true,                                // use stdout output, default true\n    \"isStderr\": false,                               // use stderr output, default false\n    \"debounce\": 100,                                 // debounce time\n    \"args\": [ \"--format=gcc\", \"-\"],                  // args\n    \"offsetLine\": 0,                                 // offsetline\n    \"offsetColumn\": 0,                               // offsetColumn\n    \"sourceName\": \"shellcheck\",                      // source name\n    \"ignore\": [\".git\", \"dist/\"]                      // ignore pattern same as `.gitignore`\n                                                     // don't forget to add `rootPatterns` when using `ignore`\n                                                     // it need workspace to filter\n\n    // Using regular expressions:\n    \"formatLines\": 1,                                // how much lines for formatPattern[0] to match\n    \"formatPattern\": [\n      \"^([^:]+):(\\\\d+):(\\\\d+):\\\\s+([^:]+):\\\\s+(.*)$\",  // line match pattern (javascript regex)\n      {\n        \"sourceName\": 1,                             // diagnostic file use match group 1. Will default to the file being linted.\n        \"sourceNameFilter\": true,                    // Display diagnostics only for the current file.\n                                                     // Only works when sourceName is defined and when it contains either an absolute\n                                                     // or relative path to the file being linted. Defaults to false.\n        \"line\": 2,                                   // diagnostic line use match group 2\n        \"column\": 3,                                 // diagnostic column use match group 3\n        \"endLine\": 2,                                // diagnostic end line use match group 2. Will default to group from `line`\n        \"endColumn\": 3,                              // diagnostic end column use match group 3. Will default to group from `column`\n        \"message\": [5],                              // message to display use match group 5\n        \"security\": 4                                // security to use match group 4, ignore if linter do not support security\n      }\n    ],\n\n    // Using JSON:\n    \"parseJson\": {\n      \"errorsRoot\": \"[0].messages\",                  // dot separated path. Will default to whatever JSON is output\n                                                     // for more information see examples at https://lodash.com/docs/#get\n                                                     // %filepath will be replaced with full path to the file (like in `args`)\n\n      // All of these support lodash.get syntax.\n      \"sourceName\": \"file\",                          // propert that contains the `file`. Will default to the file being linted.\n      \"sourceNameFilter\": true,                      // Display diagnostics only for the current file.\n                                                     // Only works when sourceName is defined and when it contains either an absolute\n                                                     // or relative path to the file being linted. Defaults to false.\n      \"line\": \"line\",                                // property that contains the `line`\n      \"column\": \"column\",                            // property that contains the `column`\n      \"endLine\": \"endLine\",                          // property that contains the `endLine`. Will default to `line`\n      \"endColumn\": \"endColumn\",                      // property that contains the `endColumn`. Will default to `column`\n      \"security\": \"severity\",                        // property that contains the `security`\n      \"message\": \"${message} [${code}]\",             // message to display\n    },\n\n    \"securities\": {                                  // security keys, ignore if linter do not support security\n      \"error\": \"error\",                              // [key: string]?: \"error\" | \"warning\" | \"info\" | \"hint\"\n      \"warning\": \"warning\",\n      \"note\": \"info\"\n    },\n    \"requiredFiles\": [                               // only run linter if any of these files exist. option\n      \".shellcheckrc\",\n      \"shellcheckrc\"\n    ]\n  }\n}\n```\n\n`filetypes` field:\n\n```jsonc\n{\n  \"sh\": \"linterName\",                          // filetype: linterName or linterName[]\n  \"*\": \"linterName\"                            // `*` is for all filetypes\n}\n```\n\n`formatters` field:\n\n```jsonc\n  \"dartfmt\": {                                 // formatter name\n    \"command\": \"dartfmt\",                      // format command\n    \"args\": [ \"--fix\" ],                       // args\n    \"rootPatterns\": [],                        // root patterns, default empty array\n    \"isStdout\": true,                          // use stdout output, default true\n    \"isStderr\": false,                         // use stderr output, default false\n    \"doesWriteToFile\": false,                  // use if formatter doesn't support stdio. should be paired with `%file`\n    \"requiredFiles\": [                         // only run formatter if any of these files exist. optional\n      \".run_dartfmt\",\n    ],\n    \"ignoreExitCode\": false,                   // ignore exit code. default false: exit code > 0 will not change the file.\n                                               // some formatter may exit with code > 0 so you need set it to true or number[]\n                                               // exit code array that you want to ignore.\n    \"ignore\": [\".git\", \"dist/\"]                // ignore pattern same as `.gitignore`\n                                               // don't forget to add `rootPatterns` when using `ignore`\n                                               // it need workspace to filter\n  }\n```\n\n`formatFiletypes` field:\n\n```jsonc\n{\n  \"dart\": \"dartfmt\",                          // filetype: formatterName or formatterName[]\n  \"*\": \"linterName\"                           // `*` is for all filetypes\n}\n```\n\n## Args additional syntax\n\n`args: [\"%text\", \"%filename\", \"%relativepath\", \"%file\", \"%filepath\", \"%dirname\", \"%tempfile\"]`\n\n- `%filename` will replace with basename of file\n- `%text` will replace with file content\n- `%file` will replace with full path to the file and not use stdio\n- `%filepath` will replace with full path to the file\n- `%relativepath` will replace with relative path of file\n- `%dirname` will replace with dirname of file\n- `%tempfile` will replace with the full path to a temporary file written with the contents\n  of the document and not use stdio; this file will automatically be deleted when the\n  command completes\n\n## How to config a new linter\n\n[shellcheck](https://github.com/koalaman/shellcheck) for example:\n\nfile `test.sh`:\n\n``` sh\n#!/usr/bin/env bash\n\necho `ls -al`\n```\n\nthen:\n\n```bash\nshellcheck --format=gcc test.sh\n```\n\noutput:\n\n```text\nt.sh:3:6: warning: Quote this to prevent word splitting. [SC2046]\nt.sh:3:6: note: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'. [SC2005]\nt.sh:3:6: note: Use $(...) notation instead of legacy backticked `...`. [SC2006]\n```\n\nwrite pattern to match the line for `line` `column` `message` `security`:\n\n```javascript\nconst line = \"t.sh:3:6: warning: Quote this to prevent word splitting. [SC2046]\"\nconst formatPattern = \"^[^:]+:(\\\\d+):(\\\\d+):\\\\s+([^:]+):\\\\s+(.*)$\"\nconst match = line.match(new RegExp(formatPattern))\nconsole.log(match)\n```\n\noutput:\n\n``` jsonc\n{\n  0: \"t.sh:3:6: warning: Quote this to prevent word splitting. [SC2046]\"\n  1: \"3\"\n  2: \"6\"\n  3: \"warning\"\n  4: \"Quote this to prevent word splitting. [SC2046]\"\n}\n```\n\nso you got:\n\n- `line`: `match[1]`\n- `column`: `match[2]`\n- `message`: `match[4]`\n- `security`: `match[3]`\n\nand your `formatPattern` field will be:\n\n```jsonc\n\"formatPattern\": [\n  \"^[^:]+:(\\\\d+):(\\\\d+):\\\\s+([^:]+):\\\\s+(.*)$\",    // line match pattern (javascript regex)\n  {\n    \"line\": 1,                                     // diagnostic line use match group 1\n    \"column\": 2,                                   // diagnostic column use match group 2\n    \"message\": [4],                                // message to display use match group 4\n    \"security\": 3                                  // security to use match group 3, ignore if linter do not support security\n  }\n]\n```\n\n> **Notes**\n> if the linter's message for per issue more then one line, you have to set the `formatLines` to fill your pattern,\n> and you can view the languagetool pattern for example which `formatLines = 2`\n\n## Example with [coc.nvim](https://github.com/neoclide/coc.nvim)\n\n> Each LSP client should support `initializationOptions` option,\n> all you need for `diagnostic-languageserver` is put the config in `initializationOptions` option.\n\n1. [shellcheck](https://github.com/koalaman/shellcheck) for shell\n2. [languagetool](https://github.com/languagetool-org/languagetool) for grammer check\n3. more [Linters](https://github.com/iamcco/diagnostic-languageserver/wiki/Linters) config example.\n\ncoc-settings.json:\n\n> you can use this extension https://github.com/iamcco/coc-diagnostic\n\n``` jsonc\n{\n  \"languageserver\": {\n    \"dls\": {\n      \"command\": \"diagnostic-languageserver\",\n      \"args\": [\"--stdio\"],\n      \"filetypes\": [ \"sh\", \"email\", \"dart\" ],\n      \"initializationOptions\": {\n        \"linters\": {\n          \"shellcheck\": {\n            \"command\": \"shellcheck\",\n            \"debounce\": 100,\n            \"args\": [ \"--format=gcc\", \"-\"],\n            \"offsetLine\": 0,\n            \"offsetColumn\": 0,\n            \"sourceName\": \"shellcheck\",\n            \"formatLines\": 1,\n            \"formatPattern\": [\n              \"^[^:]+:(\\\\d+):(\\\\d+):\\\\s+([^:]+):\\\\s+(.*)$\",\n              {\n                \"line\": 1,\n                \"column\": 2,\n                \"message\": 4,\n                \"security\": 3\n              }\n            ],\n            \"securities\": {\n              \"error\": \"error\",\n              \"warning\": \"warning\",\n              \"note\": \"info\"\n            }\n          },\n          \"languagetool\": {\n            \"command\": \"languagetool\",\n            \"debounce\": 200,\n            \"args\": [\"-\"],\n            \"offsetLine\": 0,\n            \"offsetColumn\": 0,\n            \"sourceName\": \"languagetool\",\n            \"formatLines\": 2,\n            \"formatPattern\": [\n              \"^\\\\d+?\\\\.\\\\)\\\\s+Line\\\\s+(\\\\d+),\\\\s+column\\\\s+(\\\\d+),\\\\s+([^\\\\n]+)\\nMessage:\\\\s+(.*)$\",\n              {\n                \"line\": 1,\n                \"column\": 2,\n                \"message\": [4, 3]\n              }\n            ],\n          }\n        },\n        \"formatters\": {\n          \"dartfmt\": {\n            \"command\": \"dartfmt\",\n            \"args\": [ \"--fix\" ],\n          }\n        },\n        \"filetypes\": {\n          \"sh\": \"shellcheck\",\n          \"email\": \"languagetool\"\n        },\n        \"formatFiletypes\": {\n          \"dart\": \"dartfmt\"\n        }\n      }\n    }\n  }\n}\n```\n\n## TODO\n\n- [x] local node_modules linter support like eslint or textlint\n- [x] diagnostic severity\n- [x] root pattern\n- [x] document format\n\n## References\n\n- inspired by [efm-langserver](https://github.com/mattn/efm-langserver)\n\n### Buy Me A Coffee ☕️\n\n![btc](https://img.shields.io/keybase/btc/iamcco.svg?style=popout-square)\n\n![image](https://user-images.githubusercontent.com/5492542/42771079-962216b0-8958-11e8-81c0-520363ce1059.png)\n","readmeFilename":"README.md","homepage":"https://github.com/0x706b/diagnostic-languageserver#readme","bugs":{"url":"https://github.com/0x706b/diagnostic-languageserver/issues"}}