diff options
| author | jdhao <jdhao@hotmail.com> | 2022-09-07 23:35:18 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2022-09-07 23:35:18 +0800 |
| commit | 67a322c26cd82534c8f9536fd788f579559a91c8 (patch) | |
| tree | 9dfbb180681296f8b6366bdd916db7ad46a4377e /init.lua | |
| parent | 91c9dbe40d51a8a04c2aaf455c70d4f9e17267ec (diff) | |
refactor: use nvim_err_writeln for error msg
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -8,15 +8,16 @@ -- Email: jdhao@hotmail.com -- Blog: https://jdhao.github.io/ +local api = vim.api +local utils = require "utils" + -- check if we have the latest stable version of nvim local expected_ver = "0.7.2" - -local utils = require "utils" local nvim_ver = utils.get_nvim_version() if nvim_ver ~= expected_ver then local msg = string.format("Unsupported nvim version: expect %s, but got %s instead!", expected_ver, nvim_ver) - vim.api.nvim_echo({ { msg, "ErrorMsg" } }, false, {}) + api.nvim_err_writeln(msg) return end |
