Skip to content

bazeltools/bsp4bazel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4ae09c1 · Nov 30, 2023
Nov 28, 2023
Oct 4, 2023
Nov 28, 2023
Nov 30, 2023
Nov 23, 2023
Nov 30, 2023
Oct 26, 2023
Jan 10, 2023
Nov 28, 2023
Nov 20, 2022
Nov 28, 2023
Nov 28, 2023

Repository files navigation

BSP 4 Bazel

Current Version: 0.0.29

NOTE: This is still an alpha version. And fairly new. See TODO below for what's still msising

This is a Bazel BSP Server, optimized to work with Metals from the ground up.

Installation

Download one of the pre-built binaries, and stick it in your path. Within your Bazel project, run

bsp4bazel --setup

This will create the nessarily /.bsp/ config files for Metals to pick up Bazel BSP server.

Bazel setup

Setup scala_rules to enable diagnostic files to be written. Instructions for this can be found here.

Add the bsp4bazel rules to your workspace

bsp4bazel_version = "0.0.29"
http_archive(
    name = "bsp4bazel-rules",
    sha256 = "4fec71f2d26a651e8aa7130cf6c21064cb3fd28b7b03d53d620e55f591c95269",
    strip_prefix = "bazel_rules",
    type = "tar.gz",
    url = "https://github.com/bazeltools/bsp4bazel/releases/download/%s/bazel_rules.tar.gz" % bsp4bazel_version,
)

load("@bsp4bazel-rules//:bsp4bazel_setup.bzl", "bsp4bazel_setup")
bsp4bazel_setup()

TODO

  • Compile provider
  • Make Bazel setup more straight forward
  • Generate SemanticDB files (related)
  • Test provider
  • Run provider
  • Debug provider