diff --git a/desktop/.config/flavours/templates/nvim/templates/default.mustache b/desktop/.config/flavours/templates/nvim/templates/default.mustache index c2cd8de..2453834 100644 --- a/desktop/.config/flavours/templates/nvim/templates/default.mustache +++ b/desktop/.config/flavours/templates/nvim/templates/default.mustache @@ -7,26 +7,36 @@ -- by RRethy (https://github.com/RRethy/nvim-base16) -- {{scheme-name}} scheme by {{scheme-author}} -require('mini.base16').setup({ - palette = { - base00 = '#{{base00-hex}}', - base01 = '#{{base01-hex}}', - base02 = '#{{base02-hex}}', - base03 = '#{{base03-hex}}', - base04 = '#{{base04-hex}}', - base05 = '#{{base05-hex}}', - base06 = '#{{base06-hex}}', - base07 = '#{{base07-hex}}', - base08 = '#{{base08-hex}}', - base09 = '#{{base09-hex}}', - base0A = '#{{base0A-hex}}', - base0B = '#{{base0B-hex}}', - base0C = '#{{base0C-hex}}', - base0D = '#{{base0D-hex}}', - base0E = '#{{base0E-hex}}', - base0F = '#{{base0F-hex}}' - }, -}) -require('lualine').setup() +local function exists(plugin) + local status, lib = pcall(require, plugin) + if(status) then return true end + return false +end + +if exists("mini.base16") then + require('mini.base16').setup({ + palette = { + base00 = '#{{base00-hex}}', + base01 = '#{{base01-hex}}', + base02 = '#{{base02-hex}}', + base03 = '#{{base03-hex}}', + base04 = '#{{base04-hex}}', + base05 = '#{{base05-hex}}', + base06 = '#{{base06-hex}}', + base07 = '#{{base07-hex}}', + base08 = '#{{base08-hex}}', + base09 = '#{{base09-hex}}', + base0A = '#{{base0A-hex}}', + base0B = '#{{base0B-hex}}', + base0C = '#{{base0C-hex}}', + base0D = '#{{base0D-hex}}', + base0E = '#{{base0E-hex}}', + base0F = '#{{base0F-hex}}' + }, + }) +end +if exists("lualine") then + require("lualine").setup() +end -- vim: filetype=lua