Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
fix!: Remove 0.5 backwards compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
connorgmeean committed Feb 10, 2022
1 parent 4c5b800 commit b5e3022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
8 changes: 2 additions & 6 deletions lua/doom/extras/autocmds/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions lua/doom/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5e3022

Please sign in to comment.