Cosmos DB SQL Language Service for the Monaco editor (Mirror of https://github.com/Azure/cosmos-sql-language-service)
This repository has been archived on 2024-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2019-01-08 20:32:00 +08:00
dist Bug Fix. 2019-01-08 20:13:06 +08:00
src Merge pull request #3 from luomoyuyi/BugFixForLanguageService 2019-01-08 20:32:00 +08:00
test Initial code commit 2018-11-26 10:46:04 -05:00
.gitignore Initial commit 2018-11-01 11:27:49 -07:00
.npmignore Add npmignore 2018-12-12 21:36:10 -05:00
index.d.ts Add return type for provideCompletionItems method. 2018-12-13 15:48:18 +08:00
index.js Initial code commit 2018-11-26 10:46:04 -05:00
LICENSE Initial commit 2018-11-01 11:27:54 -07:00
package-lock.json 0.0.2 2018-12-12 21:36:21 -05:00
package.json 0.0.2 2018-12-12 21:36:21 -05:00
README.md Initial code commit 2018-11-26 10:46:04 -05:00
tsconfig.json Initial code commit 2018-11-26 10:46:04 -05:00

Cosmos DB Language Service

Azure Cosmos DB Language Service for the Monaco editor

npm install @azure/cosmos-language-service

Supported Cosmos DB languages

Supported Features

  • Autocomplete
  • Error marks

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Set up

  1. Install antlr4 and set up environment based on the doc
  2. If you are using vscode, hightly recommend the antlr4 vscode plugin
  3. Install node(>=v8.9.0) and npm(>=v5.8.0)
  4. Clone the source code.(Source code repo link is https://github.com/Azure/cosmos-sql-language-service)
  5. Install the dependencies:
npm install

Build and Run

  1. Compile Antlr Grammar
cd $(grammar_folder)
doskey antlr4=java org.antlr.v4.Tool $*
doskey grun =java org.antlr.v4.gui.TestRig $*
antlr4 -no-listener -no-visitor -Dlanguage=JavaScript *.g4 -o ../generated

You can keep the lexer.js file and the parser.js file and delete others.

  1. Build the package
cd $(language_service_folder)
webpack
cd $(root_folder)
npm run dev