LSP-rome
Rome LSP server for Sublime LSP
Details
Installs
- Total 108
- Win 37
- Mac 37
- Linux 34
Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
LSP-rome
Rome unifies your development stack by combining the functionality of separate tools. It uses a single configuration file, has fantastic performance, and works with any stack. This package enables Sublime Text integration so that you can:
- Format files on save or when issuing the LSP: Format Document
command
- See linting hints while you type and apply code fixes
- Perform refactors
The package supports JavaScript and TypeScript files.
Installation
- Install LSP and LSP-rome via Package Control.
- (Optional but recommended) Install LSP-file-watcher-chokidar via Package Control to enable functionality to notify the server about changes to the
rome.json
configuration file. - Restart Sublime.
Configuration
Open the configuration file using the Command Palette Preferences: LSP-rome Settings
command or from the Sublime menu.
Note By default Rome requires a configuration file (
rome.json
) in the root of the project to enable syntax errors, formatting and linting. This can be changed through therome.requireConfiguration
option inPreferences: LSP-rome Settings
.
Rome Resolution
The package tries to use Rome from your project's local dependencies (node_modules/rome
). We recommend adding Rome as a project dependency to ensure that NPM scripts and the extension use the same Rome version.
You can also explicitly specify the rome
binary the extension should use by configuring the rome.lspBin
setting in LSP-rome
Settings.
If the project has no dependency on Rome and no explicit path is configured, the extension uses the Rome version managed by this package.
Usage
Format document
To format an entire document, open the Command Palette (Ctrl/⌘+⇧+P) and select LSP: Format Document
.
To format a text range, select the text you want to format, open the Command Palette (Ctrl/⌘+⇧+P), and select LSP: Format Selection
.
Fix on save
To enable fix on save, open Preferences: LSP Settings
from the Command Palette and set:
{
"lsp_code_actions_on_save": {
"quickfix.rome": true
}
}
Imports Sorting [Experimental]
Rome has experimental support for imports sorting through the “Organize Imports” code action. This action is accessible through the Command Palette (Ctrl/⌘+⇧+P) by selecting LSP-rome: Organize Imports
.
Currently, this functionality needs to be explicitly enabled in the rome.json
configuration file:
{
"organizeImports": {
"enabled": true
}
}
You can add the following to Preferences: LSP Settings
if you want the action to run automatically on save instead of calling it manually:
{
"lsp_code_actions_on_save":{
"source.organizeImports.rome": true
}
}