Skip to content

Commit

Permalink
refactor!: renamed use_lsp_diagnostic_signs to use_diagnostic_signs
Browse files Browse the repository at this point in the history
BREAKING:
renamed use_lsp_diagnostic_signs to use_diagnostic_signs
  • Loading branch information
folke committed Dec 10, 2021
1 parent 735dcd5 commit 9db77e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Trouble comes with the following defaults:
hint = "hint",
information = "info"
},
use_lsp_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
}
```

Expand Down
2 changes: 1 addition & 1 deletion lua/trouble/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ local defaults = {
information = "",
other = "",
},
use_lsp_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
}

---@type TroubleOptions
Expand Down
2 changes: 1 addition & 1 deletion lua/trouble/renderer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end

local function update_signs()
signs = config.options.signs
if config.options.use_lsp_diagnostic_signs then
if config.options.use_diagnostic_signs then
local lsp_signs = require("trouble.providers.diagnostic").get_signs()
signs = vim.tbl_deep_extend("force", {}, signs, lsp_signs)
end
Expand Down
4 changes: 4 additions & 0 deletions lua/trouble/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ function M.jump_to_item(win, precmd, item)
end

function M.fix_mode(opts)
if opts.use_lsp_diagnostic_signs then
opts.use_diagnostic_signs = opts.use_lsp_diagnostic_signs
M.warn("The Trouble option use_lsp_diagnostic_signs has been renamed to use_diagnostic_signs")
end
local replace = {
lsp_workspace_diagnostics = "workspace_diagnostics",
lsp_document_diagnostics = "document_diagnostics",
Expand Down

0 comments on commit 9db77e1

Please sign in to comment.