@ripple-ts/language-server
v0.2.208
Published
Language Server Protocol implementation for Ripple
Readme
@ripple-ts/language-server
Language Server Protocol (LSP) implementation for Ripple. This package provides language intelligence features for Ripple files and can be integrated into any editor that supports LSP.
Features
- TypeScript integration via Volar
- Ripple syntax diagnostics
- IntelliSense and autocomplete
- Go to definition
- Find references
- Hover information
Installation
npm install @ripple-ts/language-server -gEditor Integration
This language server can be integrated into any editor that supports LSP. There are also specialized plugins for popular editors.
VS Code
Use the [official extension](https://marketplace.visualstudio.com/items?itemName=Ripple-TS.ripple-ts-vscode-plugin It uses this language server internally.
WebStorm/IntelliJ
- Install the language server:
npm install @ripple-ts/language-server -g - Install the LSP4IJ plugin.
- Add a new language server in it
- Specify
ripple-language-server --stdioas the command in it. - Go to
Mappings—>File name patternsand add a new value withFile name patternsset to*.rippleandLanguage Idset to `ripple.
Neovim (v0.11+)
Use the official plugin.
Install
nvim-treesitter.Install the plugin.
{ "Ripple-TS/ripple", config = function(plugin) vim.opt.rtp:append(plugin.dir .. "/packages/nvim-plugin") require("ripple").setup(plugin) end }If you're using another plugin manager and wish to share installation instructions, please consider opening a PR.
Sublime Text
Until the plugin lands on Package Control you need to install it from the packaged release:
- Make sure Package Control is installed, then install the LSP package (
Tools → Command Palette… → Package Control: Install Package → LSP). - Clone this repository.
- Go into
packages/sublime-text-plugin/directory and run:
This will create anpm run buildRipple.sublime-packagefile in the same directory. - In Sublime Text, open
Preferences → Browse Packages…, go up one level, and open theInstalled Packages/directory. - Copy the
Ripple.sublime-packagefile intoInstalled Packages/and restart Sublime Text.
Diagnostics, completions, and other features should work in .ripple files now.
Standalone Usage
You can use the language server in any other editor that supports LSP. You can install it globally:
npm install -g @ripple-ts/language-serverThen run the server with:
ripple-language-server --stdioOr you can run it via npx without installing:
npx @ripple-ts/language-server --stdio