From ec17813cd89eaf9c4dd4e09f1c006b59c57ff455 Mon Sep 17 00:00:00 2001 From: connorgmeean Date: Fri, 12 Aug 2022 14:49:22 +1000 Subject: [PATCH] fix(core): Updated minimum neovim version to 0.7.0 + added updating neovim docs. --- docs/updating-neovim.md | 17 +++++++++++++++++ init.lua | 15 +++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 docs/updating-neovim.md diff --git a/docs/updating-neovim.md b/docs/updating-neovim.md new file mode 100644 index 000000000..37f1ecf63 --- /dev/null +++ b/docs/updating-neovim.md @@ -0,0 +1,17 @@ +## Updating Neovim + +Doom-nvim currently requires neovim `^v0.7.x`, check your neovim version by running `nvim -v` in the command line. + +## MacOS / Brew + +1. Ensure you have [https://brew.sh/](https://brew.sh/) installed. +2. Run `brew install neovim` to install the latest version. + +## Ubuntu / apt-get + +Ubuntu doesn't always have the latest neovim in its own internal PPA. You will have to add the neovim ppa to get the latest versions. + +1. Ensue you have software-properties-common (allows you to add extra ppa sources): `sudo apt install software-properties-common -y`. +2. Import the stable nim ppa. `sudo add-apt-repository ppa:neovim-ppa/stable -y`. +3. Run update to sync changes `sudo apt-get update`. +4. Install the latest stable neovim: `sudo apt install neovim -y` diff --git a/init.lua b/init.lua index 6c939ac9b..8d61041e4 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,13 @@ -- Check if user is running Doom in a supported Neovim version before trying to load anything -if vim.fn.has("nvim-0.6.0") ~= 1 then - vim.notify( - "You are using an unsupported Neovim version, doom-nvim requires at least Neovim 0.6.0 to work as expected.\nPlease consider upgrading Neovim before using doom-nvim", - vim.log.levels.ERROR - ) - return +if vim.fn.has("nvim-0.7.0") ~= 0 then + local message = table.concat({ + "You are using an unsupported version of Neovim.", + "", + "Doom nvim and many of its plugins require at least version 0.7.0 to work as expected.", + "Consider updating if you run into issues.", + "https://github.com/NTBBloodbath/doom-nvim/blob/main/docs/updating-nvim.md" + }, "\n") + vim.notify(message, vim.log.levels.ERROR) end -- Makes sure ~/.local/share/nvim exists, to prevent problems with logging