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

LSP-biome

by sublimelsp ST4

Biome LSP server for Sublime Text

Details

Installs

  • Total 18
  • Win 7
  • Mac 8
  • Linux 3
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 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15
Windows 1 0 0 0 0 1 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0
Mac 3 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 1 0 0 0 0 0 0 0 1 0 0 2 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

LSP-biome

Biome - One toolchain for your web project. Format, lint, and more in a fraction of a second.

  • Fast: Built with Rust and an innovative architecture inspired by rust-analyzer.
  • Scalable: Designed to handle codebases of any size. Focus on growing product instead of your tools.
  • Actionable & Informative: Avoid obscure error messages, when we tell you something is wrong, we tell you exactly where the problem is and how to fix it.
  • Simple: Zero configuration needed to get started. Extensive options available for when you need them.
  • Optimized: With tight internal integration we are able to reuse previous work and any improvement to one tool improves them all.
  • Batteries Included: Out of the box support for all the language features you use today. First class support for TypeScript and JSX.

Installation

  1. Install LSP and LSP-biome via Package Control.
  2. (Optional but recommended) Install LSP-file-watcher-chokidar via Package Control to enable functionality to notify the server about changes to the biome.json configuration file.
  3. Restart Sublime.

Configuration

Open the configuration file using the Command Palette Preferences: LSP-biome Settings command or from the Sublime menu.

Note By default Biome requires a configuration file (biome.json) in the root of the project to enable syntax errors, formatting and linting. This can be changed through the biome.requireConfiguration option in Preferences: LSP-biome Settings.

Biome Resolution

The package tries to use Biome from your project's local dependencies (node_modules/.bin/biome). We recommend adding Biome as a project dependency to ensure that NPM scripts and the extension use the same Biome version.

You can also explicitly specify the biome binary the extension should use by configuring the biome.lspBin setting in LSP-biome Settings.

If the project has no dependency on Biome and no explicit path is configured, the extension uses the Biome 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.biome": true
    }
}

Imports Sorting [Experimental]

Biome 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-biome: Organize Imports.

Currently, this functionality needs to be explicitly enabled in the biome.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.biome": true
    }
}