Skip to content

[REQUEST]: A clear step-by-step guide on how to install bacon-ls from scratch in VSCode/Cursor #83

@nastynaz

Description

@nastynaz

Problem

I spent over an hour and still can't figure it out. I have bacon running and the bacon-ls extension in VSCode.

There are mixed messages in the bacon-ls docs and the default bacon preferences.

I'm running these versions both installed by cargo:

  • bacon v3.19.0
  • bacon-ls 0.23.0`

Questions

The questions I have are:

  1. Does this section need to be set/changed in the default bacon prefs?
# Exporting "locations" (by setting its 'auto' to true) lets you use
# them in an external tool, for example as a list of jump locations
# in an IDE or in a language server.
# (See https://dystroy.org/bacon/config/#export-locations),
# Possible line_format parts:
#  - kind: warning|error|test
#  - path: complete absolute path to the file
#  - line: 1-based line number
#  - column: 1-based column
#  - message: description of the item
#  - context: unstyled lines of output, separated with escaped newlines (`\\n`)
[exports.locations]
auto = false
exporter = "locations"
path = ".bacon-locations"
line_format = "{kind} {path}:{line}:{column} {message}"
  1. Do I start bacon with no extra args or do I need to add the following config and start it with bacon -j bacon-ls? If so where do I save the items below (taken from docs):
[jobs.bacon-ls]
command = [
  "cargo", "clippy",
  "--workspace", "--all-targets", "--all-features",
  "--message-format", "json-diagnostic-rendered-ansi",
]
analyzer = "cargo_json"
need_stdout = true

[exports.cargo-json-spans]
auto = true
exporter = "analyzer"
line_format = """\
  {diagnostic.level}|:|{span.file_name}|:|{span.line_start}|:|{span.line_end}|:|\
  {span.column_start}|:|{span.column_end}|:|{diagnostic.message}|:|{diagnostic.rendered}|:|\
  {span.suggested_replacement}\
"""
path = ".bacon-locations"
  1. What are all the steps I need to do in order?

Solution request

It would be greatly appreciated if someone could create a guide that shows how to set up everything end-to-end and also make it foolproof so even people like me can understand it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions