vim: prevent errors on startup when plugins are not installed

This commit is contained in:
Fernando Schauenburg 2022-12-13 12:53:37 +01:00
parent 5dc25d5687
commit b824717c68
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
local ok, lualine = pcall(require, 'lualine')
if not ok or not lualine then
return
end
local MODE_MAP = {
['n'] = 'Normal ',
['no'] = 'O-Pend ',
@ -151,7 +156,7 @@ local inactive_sections = {
lualine_z = { 'location' },
}
require('lualine').setup {
lualine.setup {
options = {
icons_enabled = true,
component_separators = { left = '', right = '' },

View file

@ -1,4 +1,4 @@
if not vim.fn.exists('g:tabular_loaded') then return end
if vim.fn.exists('g:tabular_loaded') ~= 1 then return end
vim.cmd [[ AddTabularPattern! first_comma /^[^,]*\zs,/ ]]
vim.cmd [[ AddTabularPattern! first_colon /^[^:]*\zs:/ ]]