vim: more robust setting of colorscheme
This commit is contained in:
parent
a8cae3438e
commit
48ecd25d7c
2 changed files with 9 additions and 1 deletions
|
@ -10,5 +10,5 @@ require 'fschauen.filetypes'
|
||||||
require 'fschauen.diagnostics'
|
require 'fschauen.diagnostics'
|
||||||
require 'fschauen.lazy'
|
require 'fschauen.lazy'
|
||||||
|
|
||||||
vim.cmd [[colorscheme gruvbox]]
|
require('fschauen.util').set_colorscheme('gruvbox')
|
||||||
|
|
||||||
|
|
|
@ -185,5 +185,13 @@ M.toggle_quickfix = function() toggle_qf_list('c') end
|
||||||
--- Toggle location list.
|
--- Toggle location list.
|
||||||
M.toggle_loclist = function() toggle_qf_list('l') end
|
M.toggle_loclist = function() toggle_qf_list('l') end
|
||||||
|
|
||||||
|
|
||||||
|
M.set_colorscheme = function(name)
|
||||||
|
vim.cmd('silent! colorscheme ' .. name)
|
||||||
|
if vim.v.errmsg ~= '' then
|
||||||
|
vim.notify(string.format('Colorscheme %s not found!', name), vim.log.levels.WARN)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue