From 84a4e9c1d4faa2819cf8cb4fbfa3825aa0b12766 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Mon, 21 Mar 2022 10:40:40 +0300 Subject: [PATCH] use global statusline only on neovim 0.7 --- neovim/.config/nvim/lua/user/lualine.lua | 7 ++++++- neovim/.config/nvim/lua/user/options.lua | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/neovim/.config/nvim/lua/user/lualine.lua b/neovim/.config/nvim/lua/user/lualine.lua index e27a772..cd1e3b5 100644 --- a/neovim/.config/nvim/lua/user/lualine.lua +++ b/neovim/.config/nvim/lua/user/lualine.lua @@ -44,12 +44,17 @@ local tabstop = { end, } +local globalstatus = false +if vim.fn.has("nvim-0.7") == 1 then + globalstatus = true +end + lualine.setup({ options = { disabled_filetypes = { "NvimTree" }, component_separators = "", section_separators = "", - globalstatus = true, + globalstatus = globalstatus, }, sections = { lualine_a = { mode }, diff --git a/neovim/.config/nvim/lua/user/options.lua b/neovim/.config/nvim/lua/user/options.lua index 5777989..66f44d5 100644 --- a/neovim/.config/nvim/lua/user/options.lua +++ b/neovim/.config/nvim/lua/user/options.lua @@ -33,7 +33,10 @@ opt.showcmd = false opt.guicursor = "a:block,i:ver25" opt.fileformat = "unix" opt.fileformats = { "unix", "dos", "mac" } -opt.laststatus = 3 + +if vim.fn.has("nvim-0.7") == 1 then + opt.laststatus = 3 +end -- if vim.fn.has("win32") == 1 then -- opt.shell = "powershell.exe"