File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
lua/lspconfig/server_configurations Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ local util = require ' lspconfig.util'
2
+
3
+ return {
4
+ default_config = {
5
+ cmd = { ' bacon-ls' },
6
+ filetypes = { ' rust' },
7
+ root_dir = util .root_pattern (' .bacon-locations' , ' Cargo.toml' ),
8
+ single_file_support = true ,
9
+ settings = {},
10
+ },
11
+ docs = {
12
+ description = [[
13
+ https://github.com/crisidev/bacon-ls
14
+
15
+ A Language Server Protocol wrapper for [bacon](https://dystroy.org/bacon/).
16
+ It offers textDocument/diagnostic and workspace/diagnostic capabilities for Rust
17
+ workspaces using the Bacon export locations file.
18
+
19
+ It requires `bacon` and `bacon-ls` to be installed on the system using
20
+ [mason.nvim](https://github.com/williamboman/mason.nvim) or manually:util
21
+
22
+ ```sh
23
+ $ cargo install --locked bacon bacon-ls
24
+ ```
25
+
26
+ Settings can be changed using the `settings` dictionary:util
27
+
28
+ ```lua
29
+ settings = {
30
+ -- Bacon export filename, default .bacon-locations
31
+ locationsFile = ".bacon-locations",
32
+ -- Maximum time in seconds the LSP server waits for Bacon to update the
33
+ -- export file before loading the new diagnostics
34
+ waitTimeSeconds = 10
35
+ }
36
+ ```
37
+ ]] ,
38
+ },
39
+ }
You can’t perform that action at this time.
0 commit comments