Skip to content

Commit

Permalink
doc: Updated requirements
Browse files Browse the repository at this point in the history
fix: Fixed logic for detecting neovim version

Ref: #164
  • Loading branch information
OXY2DEV committed Oct 6, 2024
1 parent 9b84884 commit 42b57e8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Extras,

## 📦 Requirements

- Neovim version `>=0.10.0`.
- Neovim version `>=0.10.1`.
- Tree-sitter parsers: `markdown`, `markdown_inline`, `html`.
- Nerd font.

Expand Down
4 changes: 3 additions & 1 deletion lua/markview/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ health.check = function ()

vim.health.start("Checking essentials:")

if vim.fn.has("nvim-0.10.0") == 1 then
if vim.fn.has("nvim-0.10.1") == 1 then
vim.health.ok("Neovim version: " .. string.format("`%d.%d.%d`", ver.major, ver.minor, ver.patch));
elseif ver.major == 0 and ver.minor == 10 and ver.patch == 0 then
vim.health.warn("Neovim version(may experience errors): " .. string.format("`%d.%d.%d`", ver.major, ver.minor, ver.patch));
else
vim.health.error("Unsupported neovim version. Minimum requirement `0.10.1`, found: " .. string.format("`%d.%d.%d`", ver.major, ver.minor, ver.patch));
end
Expand Down
2 changes: 1 addition & 1 deletion markview.nvim.wiki
4 changes: 2 additions & 2 deletions plugin/markview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ local utils = require("markview.utils");
local hls = require("markview.highlights");
local ts = require("markview.treesitter");

if vim.fn.has("nvim-0.10.1") == 0 then
vim.notify("[ markview.nvim ]: Neovim version 0.10+ required!", vim.diagnostic.severity.ERROR)
if vim.fn.has("nvim-0.10.0") == 0 then
vim.notify("[ markview.nvim ]: Neovim version >=0.10 required!", vim.diagnostic.severity.ERROR)
return;
end

Expand Down

0 comments on commit 42b57e8

Please sign in to comment.