Language Server Protocol implementation for Ripple
npm install @ripple-ts/language-serverLanguage 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.
- TypeScript integration via Volar
- Ripple syntax diagnostics
- IntelliSense and autocomplete
- Go to definition
- Find references
- Hover information
``bash`
npm install @ripple-ts/language-server -g
This language server can be integrated into any editor that supports LSP. There are also specialized plugins for popular editors.
#### VS Code
Use the #### WebStorm/IntelliJ
1. Install the language server:
`bash`
npm install @ripple-ts/language-server -g
ripple-language-server --stdio
2. Install the [LSP4IJ plugin](https://plugins.jetbrains.com/plugin/23257-lsp4ij" class="text-primary hover:underline" target="_blank" rel="noopener noreferrer">official extension.
3. Add a new language server in it
4. Specify as the command in it.Mappings
5. Go to —> File name patterns and add a new value with File name patterns set to *.ripple and Language Id set to ripple.
#### Neovim (v0.11+)
Use the official plugin.
1. Install nvim-treesitter.
2. Install the plugin.
with lazy.nvim
``lua`
{
"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:
1. Make sure Package Control is installed, then install the LSP package (Tools → Command Palette… → Package Control: Install Package → LSP).packages/sublime-text-plugin/
2. Clone this repository.
3. Go into directory and run:`
bash`
npm run build
Ripple.sublime-package
This will create a file in the same directory.Preferences → Browse Packages…
4. In Sublime Text, open , go up one level, and open the Installed Packages/ directory.Ripple.sublime-package
5. Copy the file into Installed Packages/ and restart Sublime Text.
Diagnostics, completions, and other features should work in .ripple files now.
You can use the language server in any other editor that supports LSP. You can install it globally:
`bash`
npm install -g @ripple-ts/language-server
Then run the server with:
`bash`
ripple-language-server --stdio
Or you can run it via npx without installing:
`bash``
npx @ripple-ts/language-server --stdio