Browse Source

fix!: Remove 0.5 backwards compatibility.

my-config
connorgmeean 3 years ago
parent
commit
b5e3022628
  1. 8
      lua/doom/extras/autocmds/init.lua
  2. 6
      lua/doom/utils/init.lua

8
lua/doom/extras/autocmds/init.lua

@ -166,15 +166,11 @@ end
-- Show line diagnostics on hover
if not config.doom.enable_lsp_virtual_text then
local show_diagnostics_function = "vim.diagnostic.open_float(nil, { focus = false })"
if utils.nvim_is_05 then
show_diagnostics_function =
'vim.lsp.diagnostic.show_line_diagnostics({ focusable = false, border = "single" })'
end
local show_diagnostics_function = ""
table.insert(autocmds["doom_extras"], {
"CursorHold,CursorHoldI",
"<buffer>",
string.format("lua %s", show_diagnostics_function),
"lua vim.diagnostic.open_float(nil, { focus = false })",
})
end

6
lua/doom/utils/init.lua

@ -11,11 +11,7 @@ local system = require("doom.core.system")
-------------------- HELPERS --------------------
--- Doom Nvim version
utils.doom_version = "3.3.0-alpha1"
-- Check if Neovim version is 0.5, will be used to provide
-- backward compatibility for a while before nuking support for 0.5
utils.nvim_is_05 = vim.version().minor == 5
utils.doom_version = "3.3.0"
--- For autocommands, extracted from
--- https://github.com/norcalli/nvim_utils

Loading…
Cancel
Save