Skip to content

Commit f571a59

Browse files
committed
feat: notify if using an unsupported Nvim version
1 parent e15c262 commit f571a59

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ftplugin/rust.lua

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
if vim.fn.has('nvim-0.10') ~= 1 then
2+
vim.notify_once('rustaceanvim requires Neovim 0.10 or above', vim.log.levels.ERROR)
3+
return
4+
end
5+
16
---@type rustaceanvim.Config
27
local config = require('rustaceanvim.config.internal')
38
local compat = require('rustaceanvim.compat')

ftplugin/toml.lua

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
if vim.fn.has('nvim-0.10') ~= 1 then
2+
vim.notify_once('rustaceanvim requires Neovim 0.10 or above', vim.log.levels.ERROR)
3+
return
4+
end
5+
16
local fname = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':t')
27
if fname ~= 'Cargo.toml' then
38
return

0 commit comments

Comments
 (0)