Skip to content

Update bacon_ls.lua to reflect new configuration #3632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions lua/lspconfig/configs/bacon_ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return {
filetypes = { 'rust' },
root_dir = util.root_pattern('.bacon-locations', 'Cargo.toml'),
single_file_support = true,
settings = {},
init_options = {},
},
docs = {
description = [[
Expand All @@ -17,21 +17,34 @@ It offers textDocument/diagnostic and workspace/diagnostic capabilities for Rust
workspaces using the Bacon export locations file.

It requires `bacon` and `bacon-ls` to be installed on the system using
[mason.nvim](https://github.com/williamboman/mason.nvim) or manually:util
[mason.nvim](https://github.com/williamboman/mason.nvim) or manually

```sh
$ cargo install --locked bacon bacon-ls
```

Settings can be changed using the `settings` dictionary:util
Settings can be changed using the `init_options` dictionary:util

```lua
settings = {
-- Bacon export filename, default .bacon-locations
init_options = {
-- Bacon export filename (default: .bacon-locations).
locationsFile = ".bacon-locations",
-- Maximum time in seconds the LSP server waits for Bacon to update the
-- export file before loading the new diagnostics
waitTimeSeconds = 10
-- Try to update diagnostics every time the file is saved (default: true).
updateOnSave = true,
-- How many milliseconds to wait before updating diagnostics after a save (default: 1000).
updateOnSaveWaitMillis = 1000,
-- Try to update diagnostics every time the file changes (default: true).
updateOnChange = true,
-- Try to validate that bacon preferences are setup correctly to work with bacon-ls (default: true).
validateBaconPreferences = true,
-- f no bacon preferences file is found, create a new preferences file with the bacon-ls job definition (default: true).
createBaconPreferencesFile = true,
-- Run bacon in background for the bacon-ls job (default: true)
runBaconInBackground = true,
-- Command line arguments to pass to bacon running in background (default "--headless -j bacon-ls")
runBaconInBackgroundCommandArguments = "--headless -j bacon-ls",
-- How many milliseconds to wait between background diagnostics check to synchronize all open files (default: 2000).
synchronizeAllOpenFilesWaitMillis = 2000,
}
```
]],
Expand Down
Loading