mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-24 09:48:51 +02:00
add: update config colorscheme
This commit is contained in:
parent
4bbbf4bc75
commit
07c6b8ce49
19 changed files with 911 additions and 766 deletions
27
lua/plugins/themes/_globalvar.lua
Normal file
27
lua/plugins/themes/_globalvar.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
_G.switch = function(param, case_table)
|
||||
local case = case_table[param]
|
||||
if case then
|
||||
return case()
|
||||
end
|
||||
local def = case_table["default"]
|
||||
return def and def() or nil
|
||||
end
|
||||
|
||||
_G.substring = function(text, key)
|
||||
local index, _ = string.find(text, key)
|
||||
if index then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
_G.extract = function(text)
|
||||
local result = {}
|
||||
for substring in string.gmatch(text, "[^_]+") do
|
||||
table.insert(result, substring)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
return {}
|
Loading…
Add table
Add a link
Reference in a new issue