fix: cleanup all Neovim < 0.9.0 code

This commit is contained in:
Folke Lemaitre 2023-10-01 14:17:54 +02:00
parent b8ffa5261a
commit 9935dc3944
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 6 additions and 13 deletions

View file

@ -125,9 +125,7 @@ map("n", "<leader>gG", function() Util.float_term({ "lazygit" }, {esc_esc = fals
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" }) map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
-- highlights under cursor -- highlights under cursor
if vim.fn.has("nvim-0.9.0") == 1 then
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" }) map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
end
-- LazyVim Changelog -- LazyVim Changelog
map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"}) map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"})

View file

@ -27,7 +27,7 @@ opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an 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.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time 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.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" } opt.spelllang = { "en" }
opt.splitbelow = true -- Put new windows below current opt.splitbelow = true -- Put new windows below current
opt.splitkeep = "screen"
opt.splitright = true -- Put new windows right of current opt.splitright = true -- Put new windows right of current
opt.tabstop = 2 -- Number of spaces tabs count for opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support 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.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap 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 -- Fix markdown indentation settings
vim.g.markdown_recommended_style = 0 vim.g.markdown_recommended_style = 0

View file

@ -8,10 +8,10 @@ local error = vim.health.error or vim.health.report_error
function M.check() function M.check()
start("LazyVim") start("LazyVim")
if vim.fn.has("nvim-0.8.0") == 1 then if vim.fn.has("nvim-0.9.0") == 1 then
ok("Using Neovim >= 0.8.0") ok("Using Neovim >= 0.9.0")
else else
error("Neovim >= 0.8.0 is required") error("Neovim >= 0.9.0 is required")
end end
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do

View file

@ -109,7 +109,6 @@ return {
-- directory is a git repo. -- directory is a git repo.
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
commit = vim.fn.has("nvim-0.9.0") == 0 and "057ee0f8783" or nil,
cmd = "Telescope", cmd = "Telescope",
version = false, -- telescope did only one release, so use HEAD for now version = false, -- telescope did only one release, so use HEAD for now
keys = { keys = {