Skip to content

Commit fc07882

Browse files
committed
Update docs and minor style tweak around config.diagnostics
1 parent 8e06dd9 commit fc07882

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ lsp_status.config {
129129
indicator_ok = 'Ok',
130130
})
131131
```
132+
- `diagnostics`: Boolean, `true` by default. If `false`, the default statusline component does not
133+
display LSP diagnostics.
132134

133135

134136
## Example Use

doc/lsp-status.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ config({config}) *lsp-status.config()*
119119
},•
120120
`status_symbol` : Symbol to start the statusline segment in
121121
`status` . Default: ' 🇻',•
122+
`diagnostics` : Boolean, `true` by default. If `false`, the
123+
default statusline component does not include LSP diagnostic
124+
counts.
122125

123126
Parameters: ~
124127
{config}(required, table) Table of values; keys are as

lua/lsp-status/statusline.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ end
3838
local function get_lsp_statusline(bufnr)
3939
bufnr = bufnr or 0
4040
if #vim.lsp.buf_get_clients(bufnr) == 0 then return '' end
41-
local buf_diagnostics = (config.diagnostics) and diagnostics(bufnr) or nil
41+
local buf_diagnostics = config.diagnostics and diagnostics(bufnr) or nil
4242
local buf_messages = messages()
4343
local only_hint = true
4444
local some_diagnostics = false

0 commit comments

Comments
 (0)