bacon-ls: bacon_ls do nothing

Hello, bacon works fine and it is running, but bacon_ls does nothing, no error log and it is attached: Client: bacon_ls (id: 1, bufnr: [3]) .bacon-locations, bacon-ls.log and bacon.toml files are present, please help me, I do not want to return to rust-analizer.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (16 by maintainers)

Most upvoted comments

I am working on a new version that will allow better troubleshooting of issues.

https://github.com/crisidev/bacon-ls/issues/4

#15

image

bacon -j bacon-ls working now. image

image

I know what is missing! You need to follow the configuration README for bacon-ls and configure the bacon preferences to produce diagnostics in the right format: https://github.com/crisidev/bacon-ls?tab=readme-ov-file#configuration.

Add this snippet to the bacon preferences file:

[jobs.bacon-ls]
command = [ "cargo", "clippy", "--tests", "--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}:{span.suggested_replacement}"
path = ".bacon-locations"

And remember to start bacon -j bacon-ls in another shell so the locations file will be populated every time you save in Neovim.

I have already done this, but it still doesn’t work.