Skip to content

Commit

Permalink
feat: set backup,cmdheight for nvim 0.8 version
Browse files Browse the repository at this point in the history
  • Loading branch information
n3wborn committed Nov 2, 2023
1 parent 889e3c1 commit 18d8f39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/custom/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ vim.opt.updatetime = 50
vim.opt.inccommand = 'nosplit'
vim.opt.errorbells = false
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.cmdheight = 1
vim.opt.showbreak = ''
vim.opt.guifont = 'FiraCode Nerd Font Regular'
vim.opt.termguicolors = true
Expand All @@ -52,3 +50,9 @@ vim.filetype.add({
['.*twig'] = 'twig.html',
},
})

if vim.fn.has('nvim-0.8') == 1 then
vim.opt.backup = true
vim.opt.cmdheight = 0
vim.opt.backupdir = vim.fn.stdpath('state') .. '/backup'
end

0 comments on commit 18d8f39

Please sign in to comment.