Skip to content

Commit 61191dd

Browse files
authored
feat: remove logic for unsupported older Neovim (#4921)
See #4872 Now we no longer support Neovim 0.6 or older, we can remove logic in Lua code for supporting it.
1 parent e4a2bff commit 61191dd

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lua/ale/diagnostics.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,7 @@ module.sendAleResultsToDiagnostics = function(buffer, loclist)
6868
if set_signs == 1 and sign_priority then
6969
-- If signs are enabled, set the priority for them.
7070
local local_cfg = { priority = sign_priority }
71-
-- NOTE: vim.diagnostic.config() -- retrieving the current config values
72-
-- fails in Neovim older than v0.7.0.
73-
local ok, diag_cfg = pcall(vim.diagnostic.config)
74-
if not ok or not diag_cfg then
75-
diag_cfg = { signs = {} }
76-
end
77-
local global_cfg = diag_cfg.signs
71+
local global_cfg = vim.diagnostic.config().signs
7872

7973
if type(global_cfg) == 'boolean' then
8074
signs = local_cfg

0 commit comments

Comments
 (0)