https://github.com/xaxys/bubbler-vscode
A bubbler language server for VSCode.
https://github.com/xaxys/bubbler-vscode
Last synced: about 1 month ago
JSON representation
A bubbler language server for VSCode.
- Host: GitHub
- URL: https://github.com/xaxys/bubbler-vscode
- Owner: xaxys
- License: mit
- Created: 2023-11-22T12:34:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-27T17:55:20.000Z (6 months ago)
- Last Synced: 2025-03-27T06:51:19.698Z (about 2 months ago)
- Language: C#
- Size: 111 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bubbler-vscode
[](https://github.com/xaxys/bubbler-vscode/LICENSE)
[](https://github.com/xaxys/bubbler-vscode/pulls)
[](https://github.com/xaxys/bubbler-vscode/releases)
[](https://marketplace.visualstudio.com/items?itemName=xaxys.Bubbler)
[](https://marketplace.visualstudio.com/items?itemName=xaxys.Bubbler&ssr=false#version-history)A bubbler language server for VSCode.
Powered by [uni-vscode](https://github.com/kaby76/uni-vscode).
Quick install for VSCode: [bubbler-vscode](https://marketplace.visualstudio.com/items?itemName=xaxys.Bubbler)
This is a "bubbler language" vscode extension based on Antlr and Language Server Protocol. It is useful for quick parsing checks using VSCode. Semantic highlighting is the only major component implemented because static semantics computations (aka attributes) are not implemented for grammars.
The code is divided into two parts:
Server and Client:* The server (with Logger, LspHelpers, and Workspaces) is C# code that
implements an LSP server.
* The client is Typescript code that implemements the client VSCode
extension.## How to build this extension
### 1. You will need prerequisites
* [.NET SDK](https://dotnet.microsoft.com/) (7.0 or higher)
* [Trash](https://github.com/kaby76/Domemtech.Trash#install) (0.14.3)### 2. Clone the repo. Run dotnet to build the language server
The server is a C# program that reads stdin and writes to stdout. VSCode will redirect the input and output in order to communicate with the server.
```sh
git clone https://github.com/xaxys/bubbler-vscode.git
cd bubbler-vscode
dotnet build
```### 3. Create (or copy) an Antlr4 Bubbler grammar
The grammar must be processed by the [trgen](https://github.com/kaby76/Domemtech.Trash/tree/main/trgen) (0.14.3) application of Trash. `trgen` creates a standardized parser application from templates.
Recommand to use .Net5.0
```sh
cd Trgen
mkdir Generated
trgen -s proto
``````sh
cd Generated
dotnet build
```### 4. Copy the language server and the generated parser, then run the "install.sh" script to create the extesion for VSCode
The client is a thin layer of code in Typescript. The "install.sh" script builds the .vsix file which you can install.
```sh
cd VsCode
bash clean.sh && bash install.sh
```### 5. Run VSCode, and install the .vsix
```sh
code .
```In VSCode, open a file (e.g., a Bubbler source file). In the lower right corner, there is a type. Change the type of the file to "Bubbler". It takes a little while, but it should colorize the source file.
## Implementation
* LSP server in C#.
* VSCode client code in Typescript.
* Grammars are implemented in Antlr4. The parser driver is implemented using [trgen](https://github.com/kaby76/Domemtech.Trash/tree/main/trgen).