{"id":24066337,"url":"https://github.com/rainlanguage/rainlang-vscode","last_synced_at":"2025-02-26T19:24:39.175Z","repository":{"id":152462732,"uuid":"595202790","full_name":"rainlanguage/rainlang-vscode","owner":"rainlanguage","description":"Rain language implementation for vscode","archived":false,"fork":false,"pushed_at":"2025-02-14T22:18:21.000Z","size":1766,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-14T23:19:12.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rainlanguage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-30T15:58:34.000Z","updated_at":"2025-02-14T22:18:23.000Z","dependencies_parsed_at":"2023-10-05T05:23:55.452Z","dependency_job_id":"d1f314d6-2588-4eda-afbd-76ef0b90ecab","html_url":"https://github.com/rainlanguage/rainlang-vscode","commit_stats":null,"previous_names":["rainlanguage/rainlang-vscode"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frainlang-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frainlang-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frainlang-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frainlang-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rainlanguage","download_url":"https://codeload.github.com/rainlanguage/rainlang-vscode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240919225,"owners_count":19878551,"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":[],"created_at":"2025-01-09T11:40:27.738Z","updated_at":"2025-02-26T19:24:39.150Z","avatar_url":"https://github.com/rainlanguage.png","language":"TypeScript","readme":"# Rain Language Implementation for Visual Studio Code\n\nRain language implementation for vscode. Uses Rain Language Services from [dorain](https://github.com/rainlanguage/dotrain) repo under the hood.\nThis extension provides the following language features:\n- Completions\n- Diagnostics\n- Hovers\n- Syntax Highlighting\n- Semantic Syntax Highlighting\n- rainconfig tips (schema)\n- .rain files watch\n- .rain Composition to rainlang text\n- eaily import local .rain files from completion suggestions applied as hash\n- control extension from statusbar\n\nIt also includes an End-to-End test.\n\u003cbr\u003e\n\n## Introduction\n \nRain Language server works for rain files with `.rain` extentions (utf8 encoded), example:\n```rainlang\n---\n/* import a .rain meta to root */\n@ 0xc509e3a2bd58cb0062fb80c6d9f2e40cb815694f5733c3041c2c620a46f6ad94\n  elided 12 /* rebind the elided binding in the import */\n  'elided twelve /* and then rename to avoid shadowing the elided binding below */\n  'value const /* rename the value so it wont shadow the constant binding below */\n\n#value\n  1e13\n\n#elided\n  ! this is elided, rebind before using\n\n#main\n  _: twelve,\n  _: .my-address,\n  _: int-add(int-max(twelve .value) .const);\n```\n\nas well as syntax highlighting for javascript/typescript [Tagged Template Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) with using `rainlang()` as a tagged template literal function, example:\n```typescript\n// rainlang function is part of dotrain library API, see: https://github.com/rainlanguage/dotrain\nconst myExp = rainlang`\n---\n_: add(1 2)\n`\n```\n\u003cbr\u003e\n\n## rainconfig\nrainconfig specifies the configuration details for .rain composer and language server and should be placed in the root directory of working workspace named `rainconfig.json`, an schema is applied to the rainconfig if this extension is active. \nbellow is the list of rainconfig fields (all fields are optional):\n- `include`: Specifies a list of directories (files/folders) to be included in watch. 'src' files are included by default and folders will be watched recursively for .rain files.\n- `subgraphs`: Specifies additional subgraph endpoints to search for a meta for a given hash, [default rain subgraphs](https://github.com/rainlanguage/rain.metadata/blob/15cee2bcbdd178a0fb8c4bbdf210edd717a6ac98/crates/cli/src/subgraph/mod.rs#L30) are always included.\n\nexample:\n```json\n{\n  \"include\": [\"./path/to/folder\", \"./path/to/another-folder\"],\n  \"subgraphs\": [\n    \"https://subgraph1-url\",\n    \"https://subgraph2-url\",\n    \"https://subgraph3-url\"\n  ]\n}\n```\n\u003cbr\u003e\n\n## Extension Commands\n- `Rainlang Compose` accessible from Command Palette or from editor's context menu (right-click) to compose the selected .rain and get the rainlang text.\n- `Start Rain Language Server` starts the Rain Language Server if it is not running. accessible from Command Palette or statusbar.\n- `Stop Rain Language Server` stops the Rain Language Server if it is running. accessible from Command Palette or statusbar.\n- `Restart Rain Language Server` restarts the Rain Language Server if it is running. accessible from Command Palette or statusbar.\n\u003cbr\u003e\n\n## Developers Guide\n\n- Clone the repo and open VS Code on this folder.\n- Run `npm install` in this folder or `nix devlop -c npm install` if you have nix installed on your machine. This installs all necessary npm modules in both the client and server folder\n- Switch to the Run and Debug View in the Sidebar (Ctrl+Shift+D).\n- Select `Launch Client Desktop` for desktop mode or `Launch Client Web` for browser mode from the drop down (if it is not already).\n- Press ▷ to run the launch config (F5) which will open a new instance of vscode called [Extension Development Host](https://code.visualstudio.com/api/get-started/your-first-extension#:~:text=Then%2C%20inside%20the%20editor%2C%20press%20F5.%20This%20will%20compile%20and%20run%20the%20extension%20in%20a%20new%20Extension%20Development%20Host%20window.).\n- The [Extension Development Host](https://code.visualstudio.com/api/get-started/your-first-extension#:~:text=Then%2C%20inside%20the%20editor%2C%20press%20F5.%20This%20will%20compile%20and%20run%20the%20extension%20in%20a%20new%20Extension%20Development%20Host%20window.) instance of VSCode, will open a pre configured workspace (the `./test/workspace` folder from root of this repo).\n- Start editing the `test.rain` file.\n- Alternatively create a document that ends with `.rain` to start the language mode for that.\n  - Start typing your expression and get the completion for opcodes.\n  - Hover over some of the opcodes or values to get hover items.\n  - The diagnostics will be generated automatically.\n\n## Structure\n```\n.\n├──── client                                    // Rain Language Client\n│     ├──── src\n│     │     ├──── nodeClient.ts                 // Desktop extension client entry point\n│     │     └──── browserClient.ts              // Web extention client entry point\n├──── server                                    // Rain Language Server\n│     ├──── src\n│     │     ├──── nodeServer.ts                 // Desktop extension server entry point\n│     │     └──── browserServer.ts              // Web extension server entry point\n├──── syntaxes                                  // Rain language syntaxes\n│     ├──── rainlang-syntax.json                // Rainlang syntaxes\n│     ├──── rainlang-injection.json             // Rainlang injection syntaxes for inline typescript and javascript\n├──── test                                      // End to End tests for Language Client / Server\n│     ├──── web\n│     │     ├──── index.ts                      // Web extension test entry point\n│     │     └──── runTest.ts                    // Web extention e2e test runner\n│     ├──── desktop\n│     │     ├──── index.ts                      // Desktop extention test entry point\n│     │     └──── runTest.ts                    // Desktop extention e2e test runner\n│     ├──── workspace                           // Extension Development Host sample workspace\n├──── docs                                      // Documents (images, icons, ...)\n├──── package.json                              // The extension manifest\n├──── rain-language-configuration.json          // Rain language configurations\n├──── rainconfig.schema.json                    // rainconfig schema\n└──── flake.nix                                 // Nix flake configuration\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainlanguage%2Frainlang-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainlanguage%2Frainlang-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainlanguage%2Frainlang-vscode/lists"}