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

6
lua/doom/utils/init.lua

@ -11,11 +11,7 @@ local system = require("doom.core.system")
-------------------- HELPERS -------------------- -------------------- HELPERS --------------------
--- Doom Nvim version --- Doom Nvim version
utils.doom_version = "3.3.0-alpha1" utils.doom_version = "3.3.0"
-- 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
--- For autocommands, extracted from --- For autocommands, extracted from
--- https://github.com/norcalli/nvim_utils --- https://github.com/norcalli/nvim_utils

Loading…
Cancel
Save