🐽 Bacon Language Server 🐽
LSP Server wrapper for the exceptional Bacon exposing textDocument/diagnostic and workspace/diagnostic capabilities.
See bacon-ls 🐽 blog post: https://lmno.lol/crisidev/bacon-language-server

bacon-ls 🐽 is meant to be easy to include in your IDE configuration.
Features - ✅ done 🕖 in progress 🌍 future
- 🔥
bacon-ls🐽 does not startbaconfor you, it requires it running in another terminal - ✅ Implement LSP server interface for
textDocument/diagnosticandworkspace/diagnostic - ✅ Manual Neovim configuration
- ✅ Manual LazyVim configuration
- 🕖 Automatic NeoVim configuration
- ✅ Add
bacon-lsto nvim-lspconfig - https://github.com/neovim/nvim-lspconfig/pull/3160 - 🕖 Add
baconandbacon-lsto mason.nvim - https://github.com/mason-org/mason-registry/pull/5774 - 🕖 Add
bacon-lsto LazyVim Rust extras - https://github.com/LazyVim/LazyVim/pull/3212
- ✅ Add
- ✅ Add compiler hints to Bacon export locations - https://github.com/Canop/bacon/pull/187 https://github.com/Canop/bacon/pull/188
- 🌍 VsCode extension and configuration
- 🌍 Emacs configuration

Installation
First, install Bacon and bacon-ls 🐽
Configure Bacon export-locations settings with bacon-ls 🐽 export format:
[]
= true
= ".bacon-locations"
= "{kind}:{path}:{line}:{column}:{message}"
Configuration
The language server can be configured using the appropriate LSP protocol and supports the following values:
locationsFileBacon export filename, default.bacon-locations.waitTimeSecondsMaximum time in seconds the LSP server waits for Bacon to update the export file before loading the new diagnostics, default10.
Neovim - LazyVim
return
Neovim - Manual
NeoVim requires nvim-lspconfig to be configured and rust-analyzer diagnostics must be turned off for Bacon-Ls 🐽 to properly function.
bacon-ls is part of nvim-lspconfig from commit
6d2ae9f
and it can be configured like any other LSP server works best when
vim.diagnostics.Opts.update_in_insert
is set to true.
require..
For rust-analyzer, these 2 options must be turned off:
rust-analyzer.. = false
rust-analyzer.. = false
How does it work?
bacon-ls 🐽 reads the diagnostics location list generated
by Bacon's export-locations
and exposes them on STDIO over the LSP protocol to be consumed
by the client diagnostics.
It requires Bacon to be running alongside to ensure regular updates of the export locations.
The LSP client reads them as response to textDocument/diagnostic and workspace/diagnostic.
Thanks
bacon-ls 🐽 has been inspired by typos-lsp.