lsprotocol
is a Crystal implementation of object types used in the Language Server Protocol (LSP). This repository contains the code generator and the generated types for LSP.
Generated using lsprotocol.
LSP is used by editors to communicate with various tools to enables services like code completion, documentation on hover, formatting, code analysis, etc. The intent of this library is to allow you to build on top of the types used by LSP. This repository will be kept up to date with the latest version of LSP as it is updated.
dependencies:
lsprotocol:
github: nobodywasishere/lsprotocol-crystal
require "lsprotocol"
position = LSP::Position.new(line: 10, character: 3)
- Create a python virtual environment:
python -m venv .venv
(use latest python) - Activate the environment:
- Windows:
.venv\Script\activate
- Linux\mac:
source .venv/bin/activate
- Windows:
- Install the generator:
python -m pip install git+https://github.com/microsoft/lsprotocol
ormake install_deps
- Run generator with crystal plugin:
python -m generator --plugin crystalgen --output-dir . --test-dir ./tests
ormake generate_code
- Generate test data:
python -m generator --plugin testdata --output-dir ./data
ormake generate_testdata
- Run tests:
crystal spec