ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Rome Formatter

by marekpiechut ST3

SublimeText 3/4 plugin for Rome formatter

Details

Installs

  • Total 139
  • Win 54
  • Mac 54
  • Linux 31
Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12
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 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 1 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 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 1 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:

Error: language “jsonc” is not supported
{
    // 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:

Error: language “jsonc” is not supported
[
    {"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.