Rome Formatter
SublimeText 3/4 plugin for Rome formatter
Details
Installs
- Total 157
- Win 67
- Mac 57
- Linux 33
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 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 | 1 | 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
Rome formatter integration for SublimeText 3 and 4
This repository contains SublimeText ¾ plugin for 🏛️ Rome code formatter.
Why you would want to use it? Because Prettier integration in Sublime is slooow and this one is Blazing fast ™️ 🏎️.
It will honor settings inside rome.conf
file, if it finds it.
How it works
There are 3 ways you can use it:
Newbie way
Open Edit
menu and select Format with Rome
. This will format current selection, or whole file if nothing is selected.
Pro way
Open command palette, type Rome
and select Rome: Format file or selection
. This will also format current selection, or whole file if nothing is selected.
Master way
Just enable format_on_save
option and let Rome format every file it can.
Configuration
Check out Settings...
-> Package Settings
-> Rome Formatter
:
{
// Should we format supported files on save
"format_on_save": false,
// Format on save only if rome.conf file was detected
"detect_config": true
}
detect_config will traverse up from current file or folder and try to find rome.json
file. If it finds it, it will allow format_on_save to do it's job. If not, meh, nothing will happen.
Keyboard shortcut
You can add a keyboard shortcut in your keymap, ex:
[
{"keys": ["ctrl+alt+f"], "command": "rome_format"}
]
Installation via Package Control
Open Sublime menu and navigate to :
Tools
-> Command Palette...
-> Package Control: Install Package
,
type Rome Formatter
and select it to complete the installation.
Requirements
Plugin itself has no dependencies, but you need to have Rome installed:
- Install Rome globally via:
npm i -g rome
- or locally in your project (recommended):
npm i -D rome
plugin will auto-detect if there's a local binary and use that and fallback to global install if nothing was found. So you can have different Rome versions for each project.
Windows
It looks like on Windows you need to have Visual C++ Redistributable installed, otherwise you will get an error like this:
Failed to exec Rome formatter 3221225781 b''
You can download it here.