aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorArvid Gerstmann <ag@arvid.io>2025-02-28 13:22:47 +0100
committerGitHub <noreply@github.com>2025-02-28 04:22:47 -0800
commitd99a4c4fcf05c14f6b30520707cf51db7c87f48c (patch)
treeac51fcdb57d37c120b8db182f03787692eaf361e /lua
parentci: bump leafo/gh-actions-lua from 10 to 11 (diff)
downloadnvim-lspconfig-d99a4c4fcf05c14f6b30520707cf51db7c87f48c.tar
nvim-lspconfig-d99a4c4fcf05c14f6b30520707cf51db7c87f48c.tar.gz
nvim-lspconfig-d99a4c4fcf05c14f6b30520707cf51db7c87f48c.tar.bz2
nvim-lspconfig-d99a4c4fcf05c14f6b30520707cf51db7c87f48c.tar.lz
nvim-lspconfig-d99a4c4fcf05c14f6b30520707cf51db7c87f48c.tar.xz
nvim-lspconfig-d99a4c4fcf05c14f6b30520707cf51db7c87f48c.tar.zst
nvim-lspconfig-d99a4c4fcf05c14f6b30520707cf51db7c87f48c.zip
fix(bacon_ls): new configuration #3632
Changed `settings` to `init_options`, as per `bacon-ls` readme.
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs/bacon_ls.lua29
1 files changed, 21 insertions, 8 deletions
diff --git a/lua/lspconfig/configs/bacon_ls.lua b/lua/lspconfig/configs/bacon_ls.lua
index 8acf12fa..4f332f7c 100644
--- a/lua/lspconfig/configs/bacon_ls.lua
+++ b/lua/lspconfig/configs/bacon_ls.lua
@@ -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 = [[
@@ -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,
}
```
]],