Skip to content

ChampionBuffalo1/pioneer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAML Language Server - Pioneer

A Rust-based Language Server for the yaml file, providing hover documentation and code completion support for the file.

Demo

Demo GIF showing YAML Language Server in action

Building the LSP Server

# Get the Rust toolchain: https://www.rust-lang.org/tools/install
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ cargo build --release
$ file target/release/pioneer
 target/release/pioneer: Mach-O 64-bit executable arm64

IDE Client Extension

The pioneer server provides integration with various IDEs. Below are instructions for integrating the LSP into VSCode and IntelliJ Based IDEs.

To integrate the LSP server into an IDE, you need to create an IDE extension and bundle the language server with it

Note

You don't have to bundle the LSP server within the plugin itself. Instead, you can place the server binary in a separate location (e.g., in your $PATH) and configure the extension to use it from there. This approach can be more convenient during development.

VSCode

Note

The extension has been set to support all VSCode versions after 1.75.0. You can change the engines field in package.json to support earlier versions.

Requirements

  • Language Server Binary
  • Node.js 20+ (LTS)

Steps

  1. Copy the pioneer binary into the client/vscode folder.
  2. Navigate to the client/vscode directory and install the dependencies by running npm install.
  3. Run the command npx @vscode/vsce package to package the extension.
  4. This will generate the extension as a .vsix file.
# Copy the language server in extesion folder
$ cp target/release/pioneer client/vscode
$ cd client/vscode
# Installing the dependencies
$ npm install
# Create the extension
$ npx @vscode/vsce package
# The extension will generated in the same directory
$ ls
extension.js package-lock.json package.json pioneer-x.x.x.vsix 

Installing the extension

To install the VSIX file as an extension

  1. Go to the Extensions view (Cmd ⌘ + Shift + X on macOS, Ctrl + Alt + S on Windows/Linux)
  2. Click Views and More Actions...
  3. Select Install from VSIX...

OR

In your terminal, run the following command:

# If you use VS Code
code --install-extension pioneer-x.x.x.vsix

# If you use VS Code Insiders
code-insiders --install-extension pioneer-x.x.x.vsix

IntelliJ / GoLand

Note

The plugin is compatible with all IntelliJ-based IDEs starting from version 2023.3.2 and later

Requirements

  • Language Server Binary
  • Java 17 or higher

Steps

  1. Copy the pioneer binary into the client/IntelliJ folder.
  2. Navigate to the client/IntelliJ directory.
  3. Run ./gradlew buildPlugin to generate the plugin jar.
  4. A .jar file will be generated in the build/libs folder.
# Get the Language Server in the plugin directory
$ cp target/release/pioneer client/IntelliJ
# Navigate to the plugin directory
$ cd client/IntelliJ
# Build the plugin jar
$ ./gradlew buildPlugin
# Output jar present in build/libs folder 
$ ls build/libs
instrumented-Pioneer-x.x.x.jar Pioneer-x.x.x.jar

Installing the plugin

To install the generated .jar plugin file in IntelliJ/GoLand

  1. Open IntelliJ and navigate to Settings (cmd ⌘ + , on macOS, Ctrl+Alt+S on Windows/Linux) and go to Plugins.
  2. Click the gear icon (⚙️) and select Install Plugin from Disk.
  3. Select the .jar file generated and click OK.

About

Rust Based YAML Language Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors