Skip to content

Commit

Permalink
feat: notify if using an unsupported Nvim version
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jan 27, 2025
1 parent 0621e0c commit d8f35c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ftplugin/rust.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
if vim.fn.has('nvim-0.10') ~= 1 then
vim.notify_once('rustaceanvim requires Neovim 0.10 or above', vim.log.levels.ERROR)
return
end

---@type rustaceanvim.Config
local config = require('rustaceanvim.config.internal')
local compat = require('rustaceanvim.compat')
Expand Down
5 changes: 5 additions & 0 deletions ftplugin/toml.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
if vim.fn.has('nvim-0.10') ~= 1 then
vim.notify_once('rustaceanvim requires Neovim 0.10 or above', vim.log.levels.ERROR)
return
end

local fname = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':t')
if fname ~= 'Cargo.toml' then
return
Expand Down

0 comments on commit d8f35c6

Please sign in to comment.