From 9935dc3944c4724d7ee7f70b6bc450f8c3b34a08 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 1 Oct 2023 14:17:54 +0200 Subject: [PATCH] fix: cleanup all Neovim < 0.9.0 code --- lua/lazyvim/config/keymaps.lua | 4 +--- lua/lazyvim/config/options.lua | 8 ++------ lua/lazyvim/health.lua | 6 +++--- lua/lazyvim/plugins/editor.lua | 1 - 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 54107199..1186281e 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -125,9 +125,7 @@ map("n", "gG", function() Util.float_term({ "lazygit" }, {esc_esc = fals map("n", "qq", "qa", { desc = "Quit all" }) -- highlights under cursor -if vim.fn.has("nvim-0.9.0") == 1 then - map("n", "ui", vim.show_pos, { desc = "Inspect Pos" }) -end +map("n", "ui", vim.show_pos, { desc = "Inspect Pos" }) -- LazyVim Changelog map("n", "L", Util.changelog, {desc = "LazyVim Changelog"}) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index f3d94484..874aed05 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -27,7 +27,7 @@ opt.scrolloff = 4 -- Lines of context opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } opt.shiftround = true -- Round indent opt.shiftwidth = 2 -- Size of an indent -opt.shortmess:append({ W = true, I = true, c = true }) +opt.shortmess:append({ W = true, I = true, c = true, C = true }) opt.showmode = false -- Dont show mode since we have a statusline opt.sidescrolloff = 8 -- Columns of context opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time @@ -35,6 +35,7 @@ opt.smartcase = true -- Don't ignore case with capitals opt.smartindent = true -- Insert indents automatically opt.spelllang = { "en" } opt.splitbelow = true -- Put new windows below current +opt.splitkeep = "screen" opt.splitright = true -- Put new windows right of current opt.tabstop = 2 -- Number of spaces tabs count for opt.termguicolors = true -- True color support @@ -46,10 +47,5 @@ opt.wildmode = "longest:full,full" -- Command-line completion mode opt.winminwidth = 5 -- Minimum window width opt.wrap = false -- Disable line wrap -if vim.fn.has("nvim-0.9.0") == 1 then - opt.splitkeep = "screen" - opt.shortmess:append({ C = true }) -end - -- Fix markdown indentation settings vim.g.markdown_recommended_style = 0 diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 810022e5..a23c90f5 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -8,10 +8,10 @@ local error = vim.health.error or vim.health.report_error function M.check() start("LazyVim") - if vim.fn.has("nvim-0.8.0") == 1 then - ok("Using Neovim >= 0.8.0") + if vim.fn.has("nvim-0.9.0") == 1 then + ok("Using Neovim >= 0.9.0") else - error("Neovim >= 0.8.0 is required") + error("Neovim >= 0.9.0 is required") end for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 8465ca89..a23393de 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -109,7 +109,6 @@ return { -- directory is a git repo. { "nvim-telescope/telescope.nvim", - commit = vim.fn.has("nvim-0.9.0") == 0 and "057ee0f8783" or nil, cmd = "Telescope", version = false, -- telescope did only one release, so use HEAD for now keys = {