{"id":20309869,"url":"https://github.com/lcompilers/lpython-vscode-extension","last_synced_at":"2025-07-07T01:38:49.685Z","repository":{"id":51445457,"uuid":"520419276","full_name":"lcompilers/lpython-vscode-extension","owner":"lcompilers","description":"LPython extension to VSCode","archived":false,"fork":false,"pushed_at":"2022-08-18T19:24:59.000Z","size":948,"stargazers_count":9,"open_issues_count":3,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-11T15:56:26.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/lcompilers.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":"2022-08-02T08:44:44.000Z","updated_at":"2025-03-18T23:51:50.000Z","dependencies_parsed_at":"2022-08-22T09:00:48.252Z","dependency_job_id":null,"html_url":"https://github.com/lcompilers/lpython-vscode-extension","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lcompilers/lpython-vscode-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcompilers%2Flpython-vscode-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcompilers%2Flpython-vscode-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcompilers%2Flpython-vscode-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcompilers%2Flpython-vscode-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lcompilers","download_url":"https://codeload.github.com/lcompilers/lpython-vscode-extension/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lcompilers%2Flpython-vscode-extension/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263999349,"owners_count":23542022,"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":"2024-11-14T17:29:00.078Z","updated_at":"2025-07-07T01:38:49.669Z","avatar_url":"https://github.com/lcompilers.png","language":"TypeScript","readme":"# lpython-vscode-extension\nLPython extension for VSCode\n\n\u003cimg src=\"https://user-images.githubusercontent.com/68434944/183258400-5bd2bc4e-594d-4339-aaa9-0d033215ca58.gif\" height=400/\u003e\n\nThere are no pre-packaged versions of this extension, but will be packaging the extension to VS Code market place very soon. \n\n## Key Features\n\n1. Linting: highlights errors and warnings in your LPython code which helps you to identify and correct programming errors.\n2. Document Symbol Lookup: You can navigate symbols inside a file with `Ctrl + Shift + O`. By typing `:` the symbols are grouped by category. Press Up or Down and navigate to the place you want.\n3. Syntax Highlight: Coloring and styling of source code displayed in vscode editor using [TextMate grammars](https://macromates.com/manual/en/language_grammars).\n\n## Language Server\n\n- The Language Server is written in TypeScript, which uses [Microsoft’s official language server module](https://github.com/microsoft/vscode-languageserver-node). \n- Communication between the language server and LPython Compiler is done with \n    ```bash\n        const stdout = await runCompiler(text, \"\u003cflags\u003e\", settings); \n    ```\n\n## Usage\n\n1. Install LPython: Refer to [lpython documentation](https://github.com/lcompilers/lpython#installation) (build as usual, but ensure `-DWITH_LSP=yes` in cmake).\n\n2. Install npm, for example via Conda:\n```\nconda create -n npm nodejs\nconda activate npm\n```\n\n3. Clone the repository:\n```bash\ngit clone https://github.com/lcompilers/lpython-vscode-extension\n```\n\n4. Build the extension:\n```bash\ncd lpython-vscode-extension \u0026\u0026 npm install \u0026\u0026 npm run compile\n```\n\n5. Create the package locally:\n```bash\nnpm install vsce -g\nvsce package\n```\nSay \"Y\" to the question \"Using `*` activation is usually a bad idea as it impacts performance. Do you want to continue?\".\n\nThis will generate a `lpython-1.0.0.vsix` file in your current directory, which\ncan then be imported as an extension in VSCode:\n* Go to extensions (on the left)\n* Click on the `...` on the top right\n* Click on \"Install from VSIX\" and select the `lpython-1.0.0.vsix`\n\nIf you have the `lpython` binary in your `$PATH` then everything should just\nwork. If you do not, then you have to tell the extension where to find it:\n\n* Select the `lpython` extension in your installed extensions\n* Click on the Settings button -\u003e Extension Settings\n* Search for \"lpython\"\n* Change \"LPython Language Server › Compiler: Executable Path\" to the correct\n  path to the `lpython` binary on your system\n\n\u003cimg src=\"https://user-images.githubusercontent.com/68434944/183254852-0a68e08c-6094-4c9a-b63b-c2aec83bce3e.png\" height=300/\u003e\n\nThe extension should now work. Create a new file `a.py` and put `x = 5` in\nthere. The `x` should get highlighted with an error message that `x` is not\ndeclared (you have to change it to `x: i32 = 5` to work).\n\n\n\n## Contributing\n\nWe welcome contributions from anyone, even if you are new to open source. \n\n1. To contribute, submit a PR against your repository at: https://github.com/lcompilers/lpython-vscode-extension\n2. Please report any bugs you may find at our issue tracker: https://github.com/lcompilers/lpython-vscode-extension/issues\n\nWe welcome all changes, big or small! \n\nHere is how to develop this extension:\n```\nconda create -n npm nodejs\nconda activate npm\ngit clone https://github.com/lcompilers/lpython-vscode-extension\ncd lpython-vscode-extension \u0026\u0026 npm install \u0026\u0026 npm run compile\n```\n\nThe go to VSCode and:\n\n* Ctrl-Shift-D (Command-Shift-D on macOS)\n* Click on \"Run and Debug\"\n* Select \"VSCode Extension Development\"; a new VSCode window will pop up with\n  the extension already running in it.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcompilers%2Flpython-vscode-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flcompilers%2Flpython-vscode-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flcompilers%2Flpython-vscode-extension/lists"}