mirror of https://github.com/sgoudham/nvim.git
dev: renamed most dirst and base files to katppuccino
parent
67a8198b49
commit
ba0c6fe04a
@ -1,3 +0,0 @@
|
||||
lua << EOF
|
||||
require('catppuccino').load()
|
||||
EOF
|
@ -0,0 +1,3 @@
|
||||
lua << EOF
|
||||
require('katppuccino').load()
|
||||
EOF
|
@ -1,16 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
function M.load()
|
||||
require("catppuccino.main").main("load")
|
||||
end
|
||||
|
||||
function M.remap(hi_groups)
|
||||
hi_groups = hi_groups or {}
|
||||
require("catppuccino.core.remaps").set_hig_remaps(hi_groups)
|
||||
end
|
||||
|
||||
function M.setup(custom_opts)
|
||||
require("catppuccino.config").set_options(custom_opts)
|
||||
end
|
||||
|
||||
return M
|
@ -1,37 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
local utils = require("catppuccino.utils.util")
|
||||
|
||||
local function load()
|
||||
local catppuccino = require("catppuccino")
|
||||
|
||||
if catppuccino.before_loading ~= nil then
|
||||
catppuccino.before_loading()
|
||||
end
|
||||
|
||||
-- colorscheme gets evaluated from mapper.lua
|
||||
local theme = require("catppuccino.core.mapper").apply()
|
||||
utils.load(theme)
|
||||
|
||||
if catppuccino.after_loading ~= nil then
|
||||
catppuccino.after_loading()
|
||||
end
|
||||
end
|
||||
|
||||
local function clear()
|
||||
vim.cmd("hi clear")
|
||||
end
|
||||
|
||||
function M.main(option)
|
||||
option = option or "load"
|
||||
|
||||
if option == "load" then
|
||||
load()
|
||||
elseif option == "clear" then
|
||||
clear()
|
||||
else
|
||||
print("Catppuccino: option was not recognized")
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,16 @@
|
||||
local M = {}
|
||||
|
||||
function M.load()
|
||||
require("katppuccino.main").main("load")
|
||||
end
|
||||
|
||||
function M.remap(hi_groups)
|
||||
hi_groups = hi_groups or {}
|
||||
require("katppuccino.core.remaps").set_hig_remaps(hi_groups)
|
||||
end
|
||||
|
||||
function M.setup(custom_opts)
|
||||
require("katppuccino.config").set_options(custom_opts)
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,37 @@
|
||||
local M = {}
|
||||
|
||||
local utils = require("katppuccino.utils.util")
|
||||
|
||||
local function load()
|
||||
local katppuccino = require("katppuccino")
|
||||
|
||||
if katppuccino.before_loading ~= nil then
|
||||
katppuccino.before_loading()
|
||||
end
|
||||
|
||||
-- colorscheme gets evaluated from mapper.lua
|
||||
local theme = require("katppuccino.core.mapper").apply()
|
||||
utils.load(theme)
|
||||
|
||||
if katppuccino.after_loading ~= nil then
|
||||
katppuccino.after_loading()
|
||||
end
|
||||
end
|
||||
|
||||
local function clear()
|
||||
vim.cmd("hi clear")
|
||||
end
|
||||
|
||||
function M.main(option)
|
||||
option = option or "load"
|
||||
|
||||
if option == "load" then
|
||||
load()
|
||||
elseif option == "clear" then
|
||||
clear()
|
||||
else
|
||||
print("katppuccino: option was not recognized")
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
@ -1,17 +1,17 @@
|
||||
" GPL-3.0 License
|
||||
|
||||
" prevent the plugin's interface from loading twice
|
||||
if exists('g:loaded_catppuccino') | finish | endif
|
||||
if exists('g:loaded_katppuccino') | finish | endif
|
||||
|
||||
let s:save_cpo = &cpo " save user coptions
|
||||
set cpo&vim " reset them to defaults
|
||||
|
||||
" Interface {{{
|
||||
command! -nargs=0 CPClear call v:lua.require'catppuccino.main'.main('clear')
|
||||
command! -nargs=0 CPClear call v:lua.require'katppuccino.main'.main('clear')
|
||||
" }}}
|
||||
|
||||
let &cpo = s:save_cpo " restore after
|
||||
unlet s:save_cpo
|
||||
|
||||
" set to true the var that controls the plugin's loading
|
||||
let g:loaded_catppuccino = 1
|
||||
let g:loaded_katppuccino = 1
|
Loading…
Reference in New Issue