{"id":17472674,"url":"https://github.com/shinnn/alex-vscode","last_synced_at":"2026-03-01T19:02:53.777Z","repository":{"id":57175665,"uuid":"47135795","full_name":"shinnn/alex-vscode","owner":"shinnn","description":"alex wrapper to easily integrate with Visual Studio Code","archived":false,"fork":false,"pushed_at":"2024-07-07T07:51:03.000Z","size":41,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T11:21:28.876Z","etag":null,"topics":["alex","equality","javascript","language-server","nodejs","text-processing","visual-studio-code","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-30T17:50:26.000Z","updated_at":"2018-11-29T01:05:36.000Z","dependencies_parsed_at":"2022-09-04T11:01:45.747Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/alex-vscode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Falex-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Falex-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Falex-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Falex-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/alex-vscode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240258175,"owners_count":19772969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alex","equality","javascript","language-server","nodejs","text-processing","visual-studio-code","wrapper"],"created_at":"2024-10-18T17:32:35.824Z","updated_at":"2026-03-01T19:02:53.764Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alex-vscode\n\n[![npm version](https://img.shields.io/npm/v/alex-vscode.svg)](https://www.npmjs.com/package/alex-vscode)\n[![Build Status](https://travis-ci.com/shinnn/alex-vscode.svg?branch=master)](https://travis-ci.com/shinnn/alex-vscode)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/alex-vscode.svg)](https://coveralls.io/github/shinnn/alex-vscode)\n\n[alex](https://alexjs.com) wrapper to easily integrate with [Visual Studio Code](https://code.visualstudio.com/) language server\n\n```javascript\nconst alexVSCode = require('alex-vscode');\nconst {TextDocuments, createConnection} = require('vscode-languageserver');\n\nconst connection = createConnection(process.stdin, process.stdout);\nconst documents = new TextDocuments();\n\ndocuments.onDidChangeContent(event =\u003e {\n  event.document.getText(); //=\u003e 'He is a video game maniac.'\n  event.document.uri; //=\u003e 'file:///Users/user/foo.txt'\n\n  alexVSCode({event.document});\n  /* =\u003e\n    [\n      {\n        message: '`He` may be insensitive, use `They`, `It` instead',\n        range: {\n          start: {\n            character: 0,\n            line: 0\n          },\n          end: {\n            character: 2,\n            line: 0\n          }\n        },\n        severity: 2\n      },\n      {\n        message: '`maniac` may be insensitive, use `fanatic`, `zealot`, `enthusiast` instead',\n        range: {\n          end: {\n            character: 25,\n            line: 0\n          },\n          start: {\n            character: 19,\n            line: 0\n          }\n        },\n        severity: 1\n      }\n    ]\n  */\n});\n\ndocuments.listen(connection);\nconnection.listen();\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install alex-vscode\n```\n\n## API\n\n```javascript\nconst alexVSCode = require('alex-vscode');\n```\n\n### alexVSCode(*textDocument*)\n\n*textDocument*: [`TextDocument`](https://code.visualstudio.com/docs/extensionAPI/vscode-api#TextDocument)  \nReturn: `Array\u003cDiagnostic\u003e` ([VS Code](https://github.com/microsoft/vscode) [Diagnostic](https://github.com/Microsoft/vscode-languageserver-node/blob/release/types/3.13.0/types/src/main.ts#L452)s)\n\nIt checks a given document with [alex](https://github.com/get-alex/alex) and returns warnings as an array of [Visual Studio Code](https://code.visualstudio.com/docs/extensionAPI/vscode-api) compatible [diagnostic](https://code.visualstudio.com/docs/extensionAPI/vscode-api#Diagnostic) objects.\n\nWhen the document is a [markdown](https://daringfireball.net/projects/markdown/syntax) file, it [parses the text as markdown](https://github.com/get-alex/alex#alexmarkdownvalue-allow).\n\n```javascript\ndocument.getText(); //=\u003e '```\\nHe is a video game maniac.\\n```\\n'\ndocument.uri; //=\u003e 'file:///Users/user/foo.markdown'\n\nalexVSCode(document); //=\u003e []\n```\n\n## License\n\nCopyright (c) 2015 - 2018 [Shinnosuke Watanabe](https://github.com/shinnn)\n\nLicensed under [the MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Falex-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Falex-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Falex-vscode/lists"}