refactor: applied lua-format to all files
This commit is contained in:
parent
aec3bb9195
commit
b31b66fa79
|
@ -2,18 +2,14 @@ local M = {}
|
||||||
|
|
||||||
function M:new(args)
|
function M:new(args)
|
||||||
args = args or {}
|
args = args or {}
|
||||||
for index, arg in pairs(args) do
|
for index, arg in pairs(args) do self[index] = arg end
|
||||||
self[index] = arg
|
|
||||||
end
|
|
||||||
setmetatable(args, self)
|
setmetatable(args, self)
|
||||||
self.__index = self
|
self.__index = self
|
||||||
return args
|
return args
|
||||||
end
|
end
|
||||||
|
|
||||||
local function close_pipe(pipe)
|
local function close_pipe(pipe)
|
||||||
if pipe ~= nil and not pipe:is_closing() then
|
if pipe ~= nil and not pipe:is_closing() then pipe:close() end
|
||||||
pipe:close()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.close_all()
|
function M.close_all()
|
||||||
|
@ -31,44 +27,24 @@ function M.init_options()
|
||||||
M.stderr = vim.loop.new_pipe(false)
|
M.stderr = vim.loop.new_pipe(false)
|
||||||
options.command = table.remove(args, 1)
|
options.command = table.remove(args, 1)
|
||||||
options.args = args
|
options.args = args
|
||||||
options.stdio = {
|
options.stdio = {M.stdin, M.stdout, M.stderr}
|
||||||
M.stdin,
|
if M.cwd then options.cwd = M.cwd end
|
||||||
M.stdout,
|
if M.env then options.env = M.env end
|
||||||
M.stderr
|
if M.detach then options.detach = M.detach end
|
||||||
}
|
|
||||||
if M.cwd then
|
|
||||||
options.cwd = M.cwd
|
|
||||||
end
|
|
||||||
if M.env then
|
|
||||||
options.env = M.env
|
|
||||||
end
|
|
||||||
if M.detach then
|
|
||||||
options.detach = M.detach
|
|
||||||
end
|
|
||||||
return options
|
return options
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.start()
|
function M.start()
|
||||||
local options = M.init_options()
|
local options = M.init_options()
|
||||||
M.handle = vim.loop.spawn(options.command, options, vim.schedule_wrap(M.stop))
|
M.handle = vim.loop.spawn(options.command, options, vim.schedule_wrap(M.stop))
|
||||||
if M.on_stdout then
|
if M.on_stdout then M.stdout:read_start(vim.schedule_wrap(M.on_stdout)) end
|
||||||
M.stdout:read_start(vim.schedule_wrap(M.on_stdout))
|
if M.on_stderr then M.stderr:read_start(vim.schedule_wrap(M.on_stderr)) end
|
||||||
end
|
|
||||||
if M.on_stderr then
|
|
||||||
M.stderr:read_start(vim.schedule_wrap(M.on_stderr))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.stop(code, signal)
|
function M.stop(code, signal)
|
||||||
if M.on_exit then
|
if M.on_exit then M.on_exit(code, signal) end
|
||||||
M.on_exit(code, signal)
|
if M.on_stdout and M.stdout then M.stdout:read_stop() end
|
||||||
end
|
if M.on_stderr and M.stderr then M.stderr:read_stop() end
|
||||||
if M.on_stdout and M.stdout then
|
|
||||||
M.stdout:read_stop()
|
|
||||||
end
|
|
||||||
if M.on_stderr and M.stderr then
|
|
||||||
M.stderr:read_stop()
|
|
||||||
end
|
|
||||||
M.close_all()
|
M.close_all()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local git_branch
|
local git_branch
|
||||||
|
|
||||||
-- os specific path separator
|
-- os specific path separator
|
||||||
|
@ -21,7 +20,7 @@ local function find_git_dir()
|
||||||
-- separate git-dir or submodule is used
|
-- separate git-dir or submodule is used
|
||||||
local file = io.open(git_file)
|
local file = io.open(git_file)
|
||||||
git_dir = file:read()
|
git_dir = file:read()
|
||||||
git_dir = git_dir:match("gitdir: (.+)$")
|
git_dir = git_dir:match('gitdir: (.+)$')
|
||||||
file:close()
|
file:close()
|
||||||
-- submodule / relative file path
|
-- submodule / relative file path
|
||||||
if git_dir:sub(1, 1) ~= sep and not git_dir:match('^%a:.*$') then
|
if git_dir:sub(1, 1) ~= sep and not git_dir:match('^%a:.*$') then
|
||||||
|
@ -38,8 +37,11 @@ local function get_git_head(head_file)
|
||||||
local HEAD = f_head:read()
|
local HEAD = f_head:read()
|
||||||
f_head:close()
|
f_head:close()
|
||||||
local branch = HEAD:match('ref: refs/heads/(.+)$')
|
local branch = HEAD:match('ref: refs/heads/(.+)$')
|
||||||
if branch then git_branch = branch
|
if branch then
|
||||||
else git_branch = HEAD:sub(1,6) end
|
git_branch = branch
|
||||||
|
else
|
||||||
|
git_branch = HEAD:sub(1, 6)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
@ -52,7 +54,8 @@ local function watch_head()
|
||||||
if #git_dir > 0 then
|
if #git_dir > 0 then
|
||||||
local head_file = git_dir .. sep .. 'HEAD'
|
local head_file = git_dir .. sep .. 'HEAD'
|
||||||
get_git_head(head_file)
|
get_git_head(head_file)
|
||||||
file_changed:start(head_file, {}, vim.schedule_wrap(function()
|
file_changed:start(head_file, {}, vim.schedule_wrap(
|
||||||
|
function()
|
||||||
-- reset file-watch
|
-- reset file-watch
|
||||||
watch_head()
|
watch_head()
|
||||||
end))
|
end))
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
local highlight = require('lualine.highlight')
|
local highlight = require('lualine.highlight')
|
||||||
local utils = require('lualine.utils.utils')
|
local utils = require('lualine.utils.utils')
|
||||||
|
|
||||||
|
-- LuaFormatter off
|
||||||
local default_color_error = '#e32636'
|
local default_color_error = '#e32636'
|
||||||
local default_color_warn = '#ffdf00'
|
local default_color_warn = '#ffdf00'
|
||||||
local default_color_info = '#ffffff'
|
local default_color_info = '#ffffff'
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local diagnostic_sources = {
|
local diagnostic_sources = {
|
||||||
nvim_lsp = function()
|
nvim_lsp = function()
|
||||||
|
@ -30,14 +32,18 @@ local diagnostic_sources = {
|
||||||
else
|
else
|
||||||
return 0, 0, 0
|
return 0, 0, 0
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
local function get_diagnostics(sources)
|
local function get_diagnostics(sources)
|
||||||
local result = {}
|
local result = {}
|
||||||
for index, source in ipairs(sources) do
|
for index, source in ipairs(sources) do
|
||||||
local error_count, warning_count, info_count = diagnostic_sources[source]()
|
local error_count, warning_count, info_count = diagnostic_sources[source]()
|
||||||
result[index] = {error = error_count, warn = warning_count, info = info_count}
|
result[index] = {
|
||||||
|
error = error_count,
|
||||||
|
warn = warning_count,
|
||||||
|
info = info_count
|
||||||
|
}
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
@ -46,13 +52,10 @@ local function diagnostics(options)
|
||||||
local default_symbols = options.icons_enabled and {
|
local default_symbols = options.icons_enabled and {
|
||||||
error = ' ', -- xf659
|
error = ' ', -- xf659
|
||||||
warn = ' ', -- xf529
|
warn = ' ', -- xf529
|
||||||
info = ' ', -- xf7fc
|
info = ' ' -- xf7fc
|
||||||
} or {
|
} or {error = 'E:', warn = 'W:', info = 'I:'}
|
||||||
error = 'E:',
|
options.symbols = vim.tbl_extend('force', default_symbols,
|
||||||
warn = 'W:',
|
options.symbols or {})
|
||||||
info = 'I:'
|
|
||||||
}
|
|
||||||
options.symbols = vim.tbl_extend('force', default_symbols, options.symbols or {})
|
|
||||||
if options.sources == nil then
|
if options.sources == nil then
|
||||||
print('no sources for diagnostics configured')
|
print('no sources for diagnostics configured')
|
||||||
return ''
|
return ''
|
||||||
|
@ -61,21 +64,30 @@ local function diagnostics(options)
|
||||||
if options.colored == nil then options.colored = true end
|
if options.colored == nil then options.colored = true end
|
||||||
-- apply colors
|
-- apply colors
|
||||||
if not options.color_error then
|
if not options.color_error then
|
||||||
options.color_error = utils.extract_highlight_colors('DiffDelete', 'foreground') or default_color_error
|
options.color_error = utils.extract_highlight_colors('DiffDelete',
|
||||||
|
'foreground') or
|
||||||
|
default_color_error
|
||||||
end
|
end
|
||||||
if not options.color_warn then
|
if not options.color_warn then
|
||||||
options.color_warn = utils.extract_highlight_colors('DiffText', 'foreground') or default_color_warn
|
options.color_warn =
|
||||||
|
utils.extract_highlight_colors('DiffText', 'foreground') or
|
||||||
|
default_color_warn
|
||||||
end
|
end
|
||||||
if not options.color_info then
|
if not options.color_info then
|
||||||
options.color_info = utils.extract_highlight_colors('Normal', 'foreground') or default_color_info
|
options.color_info =
|
||||||
|
utils.extract_highlight_colors('Normal', 'foreground') or
|
||||||
|
default_color_info
|
||||||
end
|
end
|
||||||
|
|
||||||
local highlight_groups = {}
|
local highlight_groups = {}
|
||||||
local function add_highlights()
|
local function add_highlights()
|
||||||
highlight_groups = {
|
highlight_groups = {
|
||||||
error = highlight.create_component_highlight_group({ fg = options.color_error }, 'diagnostics_error', options),
|
error = highlight.create_component_highlight_group(
|
||||||
warn = highlight.create_component_highlight_group({ fg = options.color_warn }, 'diagnostics_warn', options),
|
{fg = options.color_error}, 'diagnostics_error', options),
|
||||||
info = highlight.create_component_highlight_group({ fg = options.color_info }, 'diagnostics_info', options),
|
warn = highlight.create_component_highlight_group(
|
||||||
|
{fg = options.color_warn}, 'diagnostics_warn', options),
|
||||||
|
info = highlight.create_component_highlight_group(
|
||||||
|
{fg = options.color_info}, 'diagnostics_info', options)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -93,11 +105,7 @@ local function diagnostics(options)
|
||||||
info_count = info_count + data.info
|
info_count = info_count + data.info
|
||||||
end
|
end
|
||||||
local result = {}
|
local result = {}
|
||||||
local data = {
|
local data = {error = error_count, warn = warning_count, info = info_count}
|
||||||
error = error_count,
|
|
||||||
warn = warning_count,
|
|
||||||
info = info_count,
|
|
||||||
}
|
|
||||||
if options.colored then
|
if options.colored then
|
||||||
local colors = {}
|
local colors = {}
|
||||||
for name, hl in pairs(highlight_groups) do
|
for name, hl in pairs(highlight_groups) do
|
||||||
|
@ -105,7 +113,8 @@ local function diagnostics(options)
|
||||||
end
|
end
|
||||||
for _, section in ipairs(options.sections) do
|
for _, section in ipairs(options.sections) do
|
||||||
if data[section] ~= nil and data[section] > 0 then
|
if data[section] ~= nil and data[section] > 0 then
|
||||||
table.insert(result, colors[section]..options.symbols[section]..data[section])
|
table.insert(result, colors[section] .. options.symbols[section] ..
|
||||||
|
data[section])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -125,5 +134,5 @@ end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
init = function(options) return diagnostics(options) end,
|
init = function(options) return diagnostics(options) end,
|
||||||
get_diagnostics = get_diagnostics,
|
get_diagnostics = get_diagnostics
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local async = require 'lualine.async'
|
local async = require 'lualine.async'
|
||||||
local utils = require 'lualine.utils.utils'
|
local utils = require 'lualine.utils.utils'
|
||||||
local highlight = require"lualine.highlight"
|
local highlight = require 'lualine.highlight'
|
||||||
|
|
||||||
-- variable to store git diff stats
|
-- variable to store git diff stats
|
||||||
local git_diff = nil
|
local git_diff = nil
|
||||||
|
@ -16,7 +15,8 @@ local function process_diff(data)
|
||||||
local added, removed, modified = 0, 0, 0
|
local added, removed, modified = 0, 0, 0
|
||||||
for line in vim.gsplit(data, '\n') do
|
for line in vim.gsplit(data, '\n') do
|
||||||
if string.find(line, [[^@@ ]]) then
|
if string.find(line, [[^@@ ]]) then
|
||||||
local tokens = vim.fn.matchlist(line, [[^@@ -\v(\d+),?(\d*) \+(\d+),?(\d*)]])
|
local tokens = vim.fn.matchlist(line,
|
||||||
|
[[^@@ -\v(\d+),?(\d*) \+(\d+),?(\d*)]])
|
||||||
local line_stats = {
|
local line_stats = {
|
||||||
mod_count = tokens[3] == '' and 1 or tonumber(tokens[3]),
|
mod_count = tokens[3] == '' and 1 or tonumber(tokens[3]),
|
||||||
new_count = tokens[5] == '' and 1 or tonumber(tokens[5])
|
new_count = tokens[5] == '' and 1 or tonumber(tokens[5])
|
||||||
|
@ -45,14 +45,17 @@ local function update_git_diff_getter()
|
||||||
-- stop older function properly before overwritting it
|
-- stop older function properly before overwritting it
|
||||||
if get_git_diff then get_git_diff:stop() end
|
if get_git_diff then get_git_diff:stop() end
|
||||||
-- Donn't show git diff when current buffer doesn't have a filename
|
-- Donn't show git diff when current buffer doesn't have a filename
|
||||||
if #vim.fn.expand('%') == 0 then get_git_diff = nil; git_diff=nil; return end
|
if #vim.fn.expand('%') == 0 then
|
||||||
get_git_diff = async:new({
|
get_git_diff = nil;
|
||||||
cmd = string.format([[git -C %s --no-pager diff --no-color --no-ext-diff -U0 -- %s]]
|
git_diff = nil;
|
||||||
,vim.fn.expand('%:h'), vim.fn.expand('%:t')),
|
return
|
||||||
on_stdout = function(_, data)
|
|
||||||
if data then
|
|
||||||
diff_data = diff_data .. data
|
|
||||||
end
|
end
|
||||||
|
get_git_diff = async:new({
|
||||||
|
cmd = string.format(
|
||||||
|
[[git -C %s --no-pager diff --no-color --no-ext-diff -U0 -- %s]],
|
||||||
|
vim.fn.expand('%:h'), vim.fn.expand('%:t')),
|
||||||
|
on_stdout = function(_, data)
|
||||||
|
if data then diff_data = diff_data .. data end
|
||||||
end,
|
end,
|
||||||
on_stderr = function(_, data)
|
on_stderr = function(_, data)
|
||||||
if data then
|
if data then
|
||||||
|
@ -80,21 +83,26 @@ local function update_git_diff()
|
||||||
end)()
|
end)()
|
||||||
end
|
end
|
||||||
|
|
||||||
local default_color_added = "#f0e130"
|
local default_color_added = '#f0e130'
|
||||||
local default_color_removed = "#90ee90"
|
local default_color_removed = '#90ee90'
|
||||||
local default_color_modified = "#ff0038"
|
local default_color_modified = '#ff0038'
|
||||||
|
|
||||||
local function diff(options)
|
local function diff(options)
|
||||||
if options.colored == nil then options.colored = true end
|
if options.colored == nil then options.colored = true end
|
||||||
-- apply colors
|
-- apply colors
|
||||||
if not options.color_added then
|
if not options.color_added then
|
||||||
options.color_added = utils.extract_highlight_colors('DiffAdd', 'guifg') or default_color_added
|
options.color_added = utils.extract_highlight_colors('DiffAdd', 'guifg') or
|
||||||
|
default_color_added
|
||||||
end
|
end
|
||||||
if not options.color_modified then
|
if not options.color_modified then
|
||||||
options.color_modified = utils.extract_highlight_colors('DiffChange', 'guifg') or default_color_modified
|
options.color_modified = utils.extract_highlight_colors('DiffChange',
|
||||||
|
'guifg') or
|
||||||
|
default_color_modified
|
||||||
end
|
end
|
||||||
if not options.color_removed then
|
if not options.color_removed then
|
||||||
options.color_removed = utils.extract_highlight_colors('DiffDelete', 'guifg') or default_color_removed
|
options.color_removed =
|
||||||
|
utils.extract_highlight_colors('DiffDelete', 'guifg') or
|
||||||
|
default_color_removed
|
||||||
end
|
end
|
||||||
|
|
||||||
local highlights = {}
|
local highlights = {}
|
||||||
|
@ -102,9 +110,12 @@ local function diff(options)
|
||||||
-- create highlights and save highlight_name in highlights table
|
-- create highlights and save highlight_name in highlights table
|
||||||
local function create_highlights()
|
local function create_highlights()
|
||||||
highlights = {
|
highlights = {
|
||||||
added = highlight.create_component_highlight_group({fg = options.color_added}, 'diff_added', options),
|
added = highlight.create_component_highlight_group(
|
||||||
modified = highlight.create_component_highlight_group({fg = options.color_modified}, 'diff_modified', options),
|
{fg = options.color_added}, 'diff_added', options),
|
||||||
removed = highlight.create_component_highlight_group({fg = options.color_removed}, 'diff_removed', options),
|
modified = highlight.create_component_highlight_group(
|
||||||
|
{fg = options.color_modified}, 'diff_modified', options),
|
||||||
|
removed = highlight.create_component_highlight_group(
|
||||||
|
{fg = options.color_removed}, 'diff_removed', options)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -124,12 +135,9 @@ local function diff(options)
|
||||||
return function()
|
return function()
|
||||||
if git_diff == nil then return '' end
|
if git_diff == nil then return '' end
|
||||||
|
|
||||||
local default_symbols = {
|
local default_symbols = {added = '+', modified = '~', removed = '-'}
|
||||||
added = '+',
|
options.symbols = vim.tbl_extend('force', default_symbols,
|
||||||
modified = '~',
|
options.symbols or {})
|
||||||
removed = '-',
|
|
||||||
}
|
|
||||||
options.symbols = vim.tbl_extend('force', default_symbols, options.symbols or {})
|
|
||||||
local colors = {}
|
local colors = {}
|
||||||
if options.colored then
|
if options.colored then
|
||||||
-- load the highlights and store them in colors table
|
-- load the highlights and store them in colors table
|
||||||
|
@ -143,7 +151,8 @@ local function diff(options)
|
||||||
for _, name in ipairs {'added', 'modified', 'removed'} do
|
for _, name in ipairs {'added', 'modified', 'removed'} do
|
||||||
if git_diff[name] and git_diff[name] > 0 then
|
if git_diff[name] and git_diff[name] > 0 then
|
||||||
if options.colored then
|
if options.colored then
|
||||||
table.insert(result,colors[name]..options.symbols[name]..git_diff[name])
|
table.insert(result,
|
||||||
|
colors[name] .. options.symbols[name] .. git_diff[name])
|
||||||
else
|
else
|
||||||
table.insert(result, options.symbols[name] .. git_diff[name])
|
table.insert(result, options.symbols[name] .. git_diff[name])
|
||||||
end
|
end
|
||||||
|
@ -175,5 +184,5 @@ return {
|
||||||
init = function(options) return diff(options) end,
|
init = function(options) return diff(options) end,
|
||||||
update_git_diff = update_git_diff,
|
update_git_diff = update_git_diff,
|
||||||
update_git_diff_getter = update_git_diff_getter,
|
update_git_diff_getter = update_git_diff_getter,
|
||||||
get_sign_count = get_sign_count,
|
get_sign_count = get_sign_count
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local function encoding()
|
local function encoding()
|
||||||
local data = [[%{strlen(&fenc)?&fenc:&enc}]]
|
local data = [[%{strlen(&fenc)?&fenc:&enc}]]
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local function fileformat(options)
|
local function fileformat(options)
|
||||||
local icon_linux = "" -- e712
|
local icon_linux = '' -- e712
|
||||||
local icon_windos = "" -- e70f
|
local icon_windos = '' -- e70f
|
||||||
local icon_mac = "" -- e711
|
local icon_mac = '' -- e711
|
||||||
return function()
|
return function()
|
||||||
if options.icons_enabled and not options.icon then
|
if options.icons_enabled and not options.icon then
|
||||||
local format = vim.bo.fileformat
|
local format = vim.bo.fileformat
|
||||||
if format == 'unix' then return icon_linux
|
if format == 'unix' then
|
||||||
elseif format == 'dos' then return icon_windos
|
return icon_linux
|
||||||
elseif format == 'mac' then return icon_mac end
|
elseif format == 'dos' then
|
||||||
|
return icon_windos
|
||||||
|
elseif format == 'mac' then
|
||||||
|
return icon_mac
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return vim.bo.fileformat
|
return vim.bo.fileformat
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local function filename(options)
|
local function filename(options)
|
||||||
-- setting defaults
|
-- setting defaults
|
||||||
if options.file_status == nil then options.file_status = true end
|
if options.file_status == nil then options.file_status = true end
|
||||||
|
@ -23,8 +22,11 @@ local function filename(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
if options.file_status then
|
if options.file_status then
|
||||||
if vim.bo.modified then data = data .. "[+]"
|
if vim.bo.modified then
|
||||||
elseif vim.bo.modifiable == false then data = data .. "[-]" end
|
data = data .. '[+]'
|
||||||
|
elseif vim.bo.modifiable == false then
|
||||||
|
data = data .. '[-]'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local function filetype(options)
|
local function filetype(options)
|
||||||
return function()
|
return function()
|
||||||
local data = vim.bo.filetype
|
local data = vim.bo.filetype
|
||||||
|
@ -10,7 +9,7 @@ local function filetype(options)
|
||||||
local f_name, f_extension = vim.fn.expand('%:t'), vim.fn.expand('%:e')
|
local f_name, f_extension = vim.fn.expand('%:t'), vim.fn.expand('%:e')
|
||||||
options.icon = devicons.get_icon(f_name, f_extension)
|
options.icon = devicons.get_icon(f_name, f_extension)
|
||||||
else
|
else
|
||||||
ok = vim.fn.exists("*WebDevIconsGetFileTypeSymbol")
|
ok = vim.fn.exists('*WebDevIconsGetFileTypeSymbol')
|
||||||
if ok ~= 0 then
|
if ok ~= 0 then
|
||||||
options.icon = vim.fn.WebDevIconsGetFileTypeSymbol()
|
options.icon = vim.fn.WebDevIconsGetFileTypeSymbol()
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local function location()
|
local function location()
|
||||||
local data = [[%3l:%-2c]]
|
local data = [[%3l:%-2c]]
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
-- LuaFormatter off
|
||||||
local mode_map = {
|
local mode_map = {
|
||||||
['n'] = 'NORMAL',
|
['n'] = 'NORMAL',
|
||||||
['no'] = 'O-PENDING',
|
['no'] = 'O-PENDING',
|
||||||
|
@ -32,6 +32,7 @@ local mode_map = {
|
||||||
['!'] = 'SHELL',
|
['!'] = 'SHELL',
|
||||||
['t'] = 'TERMINAL',
|
['t'] = 'TERMINAL',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
local function mode()
|
local function mode()
|
||||||
local mode_code = vim.api.nvim_get_mode().mode
|
local mode_code = vim.api.nvim_get_mode().mode
|
||||||
if mode_map[mode_code] == nil then return mode_code end
|
if mode_map[mode_code] == nil then return mode_code end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local function progress()
|
local function progress()
|
||||||
local data = [[%3P]]
|
local data = [[%3P]]
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.sections = {
|
M.sections = {lualine_a = {'FugitiveHead'}, lualine_z = {'location'}}
|
||||||
lualine_a = { 'FugitiveHead' },
|
|
||||||
lualine_z = { 'location' },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive_sections = M.sections
|
M.inactive_sections = M.sections
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
local function fzf_statusline() return 'FZF' end
|
||||||
local function fzf_statusline()
|
|
||||||
return 'FZF'
|
|
||||||
end
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.sections = {
|
M.sections = {lualine_a = {fzf_statusline}}
|
||||||
lualine_a = { fzf_statusline },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive_sections = M.sections
|
M.inactive_sections = M.sections
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.sections = {
|
M.sections = {lualine_a = {vim.fn.getcwd}}
|
||||||
lualine_a = { vim.fn.getcwd },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive_sections = M.sections
|
M.inactive_sections = M.sections
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
local utils_colors = require "lualine.utils.cterm_colors"
|
local utils_colors = require 'lualine.utils.cterm_colors'
|
||||||
local utils = require 'lualine.utils.utils'
|
local utils = require 'lualine.utils.utils'
|
||||||
local section_highlight_map = {x = 'c', y = 'b', z = 'a'}
|
local section_highlight_map = {x = 'c', y = 'b', z = 'a'}
|
||||||
|
|
||||||
local function highlight(name, foreground, background, gui)
|
local function highlight(name, foreground, background, gui)
|
||||||
local command = { 'highlight', name, }
|
local command = {'highlight', name}
|
||||||
if foreground and foreground ~= 'none' then
|
if foreground and foreground ~= 'none' then
|
||||||
table.insert(command, 'ctermfg=' .. utils_colors.get_cterm_color(foreground))
|
table.insert(command, 'ctermfg=' .. utils_colors.get_cterm_color(foreground))
|
||||||
table.insert(command, 'guifg=' .. foreground)
|
table.insert(command, 'guifg=' .. foreground)
|
||||||
|
@ -28,7 +27,8 @@ function M.create_highlight_groups(theme)
|
||||||
for mode, sections in pairs(theme) do
|
for mode, sections in pairs(theme) do
|
||||||
for section, colorscheme in pairs(sections) do
|
for section, colorscheme in pairs(sections) do
|
||||||
local highlight_group_name = {'lualine', section, mode}
|
local highlight_group_name = {'lualine', section, mode}
|
||||||
highlight(table.concat(highlight_group_name, '_'), colorscheme.fg, colorscheme.bg, colorscheme.gui)
|
highlight(table.concat(highlight_group_name, '_'), colorscheme.fg,
|
||||||
|
colorscheme.bg, colorscheme.gui)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -38,14 +38,15 @@ end
|
||||||
-- @return: (string) highlight group name with mode
|
-- @return: (string) highlight group name with mode
|
||||||
local function append_mode(highlight_group)
|
local function append_mode(highlight_group)
|
||||||
local mode = require('lualine.components.mode')()
|
local mode = require('lualine.components.mode')()
|
||||||
if mode == 'VISUAL' or mode == 'V-BLOCK' or mode == 'V-LINE'
|
if mode == 'VISUAL' or mode == 'V-BLOCK' or mode == 'V-LINE' or mode ==
|
||||||
or mode == 'SELECT' or mode == 'S-LINE' or mode == 'S-BLOCK'then
|
'SELECT' or mode == 'S-LINE' or mode == 'S-BLOCK' then
|
||||||
highlight_group = highlight_group .. '_visual'
|
highlight_group = highlight_group .. '_visual'
|
||||||
elseif mode == 'REPLACE' or mode == 'V-REPLACE' then
|
elseif mode == 'REPLACE' or mode == 'V-REPLACE' then
|
||||||
highlight_group = highlight_group .. '_replace'
|
highlight_group = highlight_group .. '_replace'
|
||||||
elseif mode == 'INSERT' then
|
elseif mode == 'INSERT' then
|
||||||
highlight_group = highlight_group .. '_insert'
|
highlight_group = highlight_group .. '_insert'
|
||||||
elseif mode == 'COMMAND' or mode == 'EX' or mode == 'MORE' or mode == 'CONFIRM'then
|
elseif mode == 'COMMAND' or mode == 'EX' or mode == 'MORE' or mode ==
|
||||||
|
'CONFIRM' then
|
||||||
highlight_group = highlight_group .. '_command'
|
highlight_group = highlight_group .. '_command'
|
||||||
elseif mode == 'TERMINAL' then
|
elseif mode == 'TERMINAL' then
|
||||||
highlight_group = highlight_group .. '_terminal'
|
highlight_group = highlight_group .. '_terminal'
|
||||||
|
@ -69,22 +70,24 @@ function M.create_component_highlight_group(color , highlight_tag, options)
|
||||||
if color.bg and color.fg then
|
if color.bg and color.fg then
|
||||||
-- When bg and fg are both present we donn't need to set highlighs for
|
-- When bg and fg are both present we donn't need to set highlighs for
|
||||||
-- each mode as they will surely look the same. So we can work without options
|
-- each mode as they will surely look the same. So we can work without options
|
||||||
local highlight_group_name = table.concat({ 'lualine', highlight_tag, 'no_mode'}, '_')
|
local highlight_group_name = table.concat(
|
||||||
|
{'lualine', highlight_tag, 'no_mode'}, '_')
|
||||||
highlight(highlight_group_name, color.fg, color.bg, color.gui)
|
highlight(highlight_group_name, color.fg, color.bg, color.gui)
|
||||||
return highlight_group_name
|
return highlight_group_name
|
||||||
end
|
end
|
||||||
|
|
||||||
local modes = {'normal', 'insert', 'visual', 'replace', 'command', 'terminal', 'inactive'}
|
local modes = {
|
||||||
|
'normal', 'insert', 'visual', 'replace', 'command', 'terminal', 'inactive'
|
||||||
|
}
|
||||||
local normal_hl
|
local normal_hl
|
||||||
-- convert lualine_a -> a before setting section
|
-- convert lualine_a -> a before setting section
|
||||||
local section = options.self.section:match('lualine_(.*)')
|
local section = options.self.section:match('lualine_(.*)')
|
||||||
if section > 'c' then
|
if section > 'c' then section = section_highlight_map[section] end
|
||||||
section = section_highlight_map[section]
|
|
||||||
end
|
|
||||||
for _, mode in ipairs(modes) do
|
for _, mode in ipairs(modes) do
|
||||||
local highlight_group_name = {options.self.section, highlight_tag, mode}
|
local highlight_group_name = {options.self.section, highlight_tag, mode}
|
||||||
local default_color_table = options.theme[mode] and
|
local default_color_table = options.theme[mode] and
|
||||||
options.theme[mode][section] or options.theme.normal[section]
|
options.theme[mode][section] or
|
||||||
|
options.theme.normal[section]
|
||||||
local bg = (color.bg or default_color_table.bg)
|
local bg = (color.bg or default_color_table.bg)
|
||||||
local fg = (color.fg or default_color_table.fg)
|
local fg = (color.fg or default_color_table.fg)
|
||||||
-- Check if it's same as normal mode if it is no need to create aditional highlight
|
-- Check if it's same as normal mode if it is no need to create aditional highlight
|
||||||
|
@ -124,7 +127,9 @@ end
|
||||||
|
|
||||||
function M.format_highlight(is_focused, highlight_group)
|
function M.format_highlight(is_focused, highlight_group)
|
||||||
if highlight_group > 'lualine_c' then
|
if highlight_group > 'lualine_c' then
|
||||||
highlight_group = 'lualine_' .. section_highlight_map[highlight_group:match('lualine_(.)')]
|
highlight_group = 'lualine_' ..
|
||||||
|
section_highlight_map[highlight_group:match(
|
||||||
|
'lualine_(.)')]
|
||||||
end
|
end
|
||||||
local highlight_name = highlight_group
|
local highlight_name = highlight_group
|
||||||
if not is_focused then
|
if not is_focused then
|
||||||
|
@ -144,7 +149,8 @@ end
|
||||||
-- @param reverse :(string) Whether it's a left separator or right separator
|
-- @param reverse :(string) Whether it's a left separator or right separator
|
||||||
-- '▶️' and '◀️' needs reverse colors so this parameter needs to be set true.
|
-- '▶️' and '◀️' needs reverse colors so this parameter needs to be set true.
|
||||||
-- @return: (string) formated highlight group name
|
-- @return: (string) formated highlight group name
|
||||||
function M.get_transitional_highlights(left_section_data, right_section_data, reverse )
|
function M.get_transitional_highlights(left_section_data, right_section_data,
|
||||||
|
reverse)
|
||||||
local left_highlight_name, right_highlight_name
|
local left_highlight_name, right_highlight_name
|
||||||
-- Grab the last highlighter of left section
|
-- Grab the last highlighter of left section
|
||||||
if left_section_data then
|
if left_section_data then
|
||||||
|
@ -160,7 +166,8 @@ function M.get_transitional_highlights(left_section_data, right_section_data, re
|
||||||
if right_section_data then
|
if right_section_data then
|
||||||
-- using vim-regex cause lua-paterns don't have non-greedy matching
|
-- using vim-regex cause lua-paterns don't have non-greedy matching
|
||||||
-- extract highlight_name from %#highlight_name#....
|
-- extract highlight_name from %#highlight_name#....
|
||||||
right_highlight_name = vim.fn.matchlist(right_section_data, [[%#\(.\{-\}\)#]])[2]
|
right_highlight_name = vim.fn.matchlist(right_section_data,
|
||||||
|
[[%#\(.\{-\}\)#]])[2]
|
||||||
else
|
else
|
||||||
-- When right section us unavailable default to lualine_c
|
-- When right section us unavailable default to lualine_c
|
||||||
right_highlight_name = append_mode('lualine_c')
|
right_highlight_name = append_mode('lualine_c')
|
||||||
|
@ -176,7 +183,8 @@ function M.get_transitional_highlights(left_section_data, right_section_data, re
|
||||||
if left_highlight_name:find('lualine_') == 1 then
|
if left_highlight_name:find('lualine_') == 1 then
|
||||||
highlight_name = left_highlight_name .. '_to_' .. right_highlight_name
|
highlight_name = left_highlight_name .. '_to_' .. right_highlight_name
|
||||||
else
|
else
|
||||||
highlight_name = 'lualine_' .. left_highlight_name .. '_to_' .. right_highlight_name
|
highlight_name = 'lualine_' .. left_highlight_name .. '_to_' ..
|
||||||
|
right_highlight_name
|
||||||
end
|
end
|
||||||
|
|
||||||
if not utils.highlight_exists(highlight_name) then
|
if not utils.highlight_exists(highlight_name) then
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local utils_component = require('lualine.utils.component')
|
local utils_component = require('lualine.utils.component')
|
||||||
local utils = require('lualine.utils.utils')
|
local utils = require('lualine.utils.utils')
|
||||||
local highlight = require('lualine.highlight')
|
local highlight = require('lualine.highlight')
|
||||||
|
@ -11,7 +10,7 @@ M.options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'gruvbox',
|
theme = 'gruvbox',
|
||||||
component_separators = {'', ''},
|
component_separators = {'', ''},
|
||||||
section_separators = {'', ''},
|
section_separators = {'', ''}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.sections = {
|
M.sections = {
|
||||||
|
@ -20,7 +19,7 @@ M.sections = {
|
||||||
lualine_c = {'filename'},
|
lualine_c = {'filename'},
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||||
lualine_y = {'progress'},
|
lualine_y = {'progress'},
|
||||||
lualine_z = { 'location' },
|
lualine_z = {'location'}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.inactive_sections = {
|
M.inactive_sections = {
|
||||||
|
@ -41,15 +40,14 @@ local function apply_configuration(config_table)
|
||||||
local function parse_sections(section_group_name)
|
local function parse_sections(section_group_name)
|
||||||
if not config_table[section_group_name] then return end
|
if not config_table[section_group_name] then return end
|
||||||
for section_name, section in pairs(config_table[section_group_name]) do
|
for section_name, section in pairs(config_table[section_group_name]) do
|
||||||
M[section_group_name][section_name] = config_table[section_group_name][section_name]
|
M[section_group_name][section_name] =
|
||||||
|
config_table[section_group_name][section_name]
|
||||||
if type(section) == 'table' then
|
if type(section) == 'table' then
|
||||||
for _, component in pairs(section) do
|
for _, component in pairs(section) do
|
||||||
if type(component) == 'table' and type(component[2]) == 'table' then
|
if type(component) == 'table' and type(component[2]) == 'table' then
|
||||||
local options = component[2]
|
local options = component[2]
|
||||||
component[2] = nil
|
component[2] = nil
|
||||||
for key, val in pairs(options) do
|
for key, val in pairs(options) do component[key] = val end
|
||||||
component[key] = val
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -67,16 +65,22 @@ local function check_single_separator()
|
||||||
local section_separator = M.options.section_separators
|
local section_separator = M.options.section_separators
|
||||||
if M.options.component_separators ~= nil then
|
if M.options.component_separators ~= nil then
|
||||||
if type(M.options.component_separators) == 'string' then
|
if type(M.options.component_separators) == 'string' then
|
||||||
M.options.component_separators = {compoennt_separator, compoennt_separator}
|
M.options.component_separators = {
|
||||||
|
compoennt_separator, compoennt_separator
|
||||||
|
}
|
||||||
elseif #M.options.component_separators == 1 then
|
elseif #M.options.component_separators == 1 then
|
||||||
M.options.component_separators = {M.options.component_separators[1], M.options.component_separators[1]}
|
M.options.component_separators = {
|
||||||
|
M.options.component_separators[1], M.options.component_separators[1]
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if M.options.section_separators ~= nil then
|
if M.options.section_separators ~= nil then
|
||||||
if type(M.options.section_separators) == 'string' then
|
if type(M.options.section_separators) == 'string' then
|
||||||
M.options.section_separators = {section_separator, section_separator}
|
M.options.section_separators = {section_separator, section_separator}
|
||||||
elseif #M.options.section_separators == 1 then
|
elseif #M.options.section_separators == 1 then
|
||||||
M.options.section_separators = {M.options.section_separators[1], M.options.section_separators[1]}
|
M.options.section_separators = {
|
||||||
|
M.options.section_separators[1], M.options.section_separators[1]
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -112,7 +116,11 @@ local function load_special_components(component)
|
||||||
local ok, return_val = pcall(vim.fn[component])
|
local ok, return_val = pcall(vim.fn[component])
|
||||||
if not ok then return '' end -- function call failed
|
if not ok then return '' end -- function call failed
|
||||||
ok, return_val = pcall(tostring, return_val)
|
ok, return_val = pcall(tostring, return_val)
|
||||||
if ok then return return_val else return '' end
|
if ok then
|
||||||
|
return return_val
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -125,12 +133,11 @@ local function component_loader(component)
|
||||||
component.component_name = component[1]
|
component.component_name = component[1]
|
||||||
-- apply default args
|
-- apply default args
|
||||||
for opt_name, opt_val in pairs(M.options) do
|
for opt_name, opt_val in pairs(M.options) do
|
||||||
if component[opt_name] == nil then
|
if component[opt_name] == nil then component[opt_name] = opt_val end
|
||||||
component[opt_name] = opt_val
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
-- load the component
|
-- load the component
|
||||||
local ok, loaded_component = pcall(require, 'lualine.components.' .. component.component_name)
|
local ok, loaded_component = pcall(require, 'lualine.components.' ..
|
||||||
|
component.component_name)
|
||||||
if not ok then
|
if not ok then
|
||||||
loaded_component = load_special_components(component.component_name)
|
loaded_component = load_special_components(component.component_name)
|
||||||
end
|
end
|
||||||
|
@ -142,7 +149,8 @@ local function component_loader(component)
|
||||||
if component.color then
|
if component.color then
|
||||||
local function update_color()
|
local function update_color()
|
||||||
component.color_highlight = highlight.create_component_highlight_group(
|
component.color_highlight = highlight.create_component_highlight_group(
|
||||||
component.color, component.component_name, component)
|
component.color,
|
||||||
|
component.component_name, component)
|
||||||
end
|
end
|
||||||
update_color()
|
update_color()
|
||||||
utils.expand_set_theme(update_color)
|
utils.expand_set_theme(update_color)
|
||||||
|
@ -200,7 +208,6 @@ local function lualine_set_theme()
|
||||||
highlight.create_highlight_groups(M.options.theme)
|
highlight.create_highlight_groups(M.options.theme)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function statusline(sections, is_focused)
|
local function statusline(sections, is_focused)
|
||||||
local function create_status_builder()
|
local function create_status_builder()
|
||||||
-- The sequence sections should maintain
|
-- The sequence sections should maintain
|
||||||
|
@ -210,10 +217,14 @@ local function statusline(sections, is_focused)
|
||||||
if sections['lualine_' .. section_name] then
|
if sections['lualine_' .. section_name] then
|
||||||
-- insert highlight+components of this section to status_builder
|
-- insert highlight+components of this section to status_builder
|
||||||
local section_highlight = highlight.format_highlight(is_focused,
|
local section_highlight = highlight.format_highlight(is_focused,
|
||||||
'lualine_'..section_name)
|
'lualine_' ..
|
||||||
local section_data = utils_component.draw_section(sections['lualine_'..section_name], section_highlight)
|
section_name)
|
||||||
|
local section_data = utils_component.draw_section(
|
||||||
|
sections['lualine_' .. section_name],
|
||||||
|
section_highlight)
|
||||||
if #section_data > 0 then
|
if #section_data > 0 then
|
||||||
table.insert(status_builder, {name = section_name, data = section_data,})
|
table.insert(status_builder,
|
||||||
|
{name = section_name, data = section_data})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -228,7 +239,8 @@ local function statusline(sections, is_focused)
|
||||||
for i = 1, #status_builder do
|
for i = 1, #status_builder do
|
||||||
-- midsection divider
|
-- midsection divider
|
||||||
if not half_passed and status_builder[i].name > 'c' then
|
if not half_passed and status_builder[i].name > 'c' then
|
||||||
table.insert(status, highlight.format_highlight(is_focused, 'lualine_c') .. '%=')
|
table.insert(status,
|
||||||
|
highlight.format_highlight(is_focused, 'lualine_c') .. '%=')
|
||||||
half_passed = true
|
half_passed = true
|
||||||
end
|
end
|
||||||
-- provide section_separators when statusline is in focus
|
-- provide section_separators when statusline is in focus
|
||||||
|
@ -240,9 +252,13 @@ local function statusline(sections, is_focused)
|
||||||
local next_section = status_builder[i + 1] or {}
|
local next_section = status_builder[i + 1] or {}
|
||||||
-- For 2nd half we need to show separator before section
|
-- For 2nd half we need to show separator before section
|
||||||
if current_section.name > 'x' then
|
if current_section.name > 'x' then
|
||||||
local transitional_highlight = highlight.get_transitional_highlights(previous_section.data, current_section.data, true)
|
local transitional_highlight = highlight.get_transitional_highlights(
|
||||||
if transitional_highlight and M.options.section_separators and M.options.section_separators[2] then
|
previous_section.data,
|
||||||
table.insert(status, transitional_highlight .. M.options.section_separators[2])
|
current_section.data, true)
|
||||||
|
if transitional_highlight and M.options.section_separators and
|
||||||
|
M.options.section_separators[2] then
|
||||||
|
table.insert(status, transitional_highlight ..
|
||||||
|
M.options.section_separators[2])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -251,9 +267,13 @@ local function statusline(sections, is_focused)
|
||||||
|
|
||||||
-- For 1st half we need to show separator after section
|
-- For 1st half we need to show separator after section
|
||||||
if current_section.name < 'c' then
|
if current_section.name < 'c' then
|
||||||
local transitional_highlight = highlight.get_transitional_highlights(current_section.data, next_section.data)
|
local transitional_highlight = highlight.get_transitional_highlights(
|
||||||
if transitional_highlight and M.options.section_separators and M.options.section_separators[1] then
|
current_section.data,
|
||||||
table.insert(status, transitional_highlight .. M.options.section_separators[1])
|
next_section.data)
|
||||||
|
if transitional_highlight and M.options.section_separators and
|
||||||
|
M.options.section_separators[1] then
|
||||||
|
table.insert(status, transitional_highlight ..
|
||||||
|
M.options.section_separators[1])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else -- when not in focus
|
else -- when not in focus
|
||||||
|
@ -262,7 +282,8 @@ local function statusline(sections, is_focused)
|
||||||
end
|
end
|
||||||
-- incase none of x,y,z was configured lets not fill whole statusline with a,b,c section
|
-- incase none of x,y,z was configured lets not fill whole statusline with a,b,c section
|
||||||
if not half_passed then
|
if not half_passed then
|
||||||
table.insert(status, highlight.format_highlight(is_focused,'lualine_c').."%=")
|
table.insert(status,
|
||||||
|
highlight.format_highlight(is_focused, 'lualine_c') .. '%=')
|
||||||
end
|
end
|
||||||
return table.concat(status)
|
return table.concat(status)
|
||||||
end
|
end
|
||||||
|
@ -286,22 +307,16 @@ local function status_dispatch()
|
||||||
local extension_sections = get_extension_sections()
|
local extension_sections = get_extension_sections()
|
||||||
if vim.g.statusline_winid == vim.fn.win_getid() then
|
if vim.g.statusline_winid == vim.fn.win_getid() then
|
||||||
local sections = extension_sections.sections
|
local sections = extension_sections.sections
|
||||||
if sections == nil then
|
if sections == nil then sections = M.sections end
|
||||||
sections = M.sections
|
|
||||||
end
|
|
||||||
return statusline(sections, true)
|
return statusline(sections, true)
|
||||||
else
|
else
|
||||||
local inactive_sections = extension_sections.inactive_sections
|
local inactive_sections = extension_sections.inactive_sections
|
||||||
if inactive_sections == nil then
|
if inactive_sections == nil then inactive_sections = M.inactive_sections end
|
||||||
inactive_sections = M.inactive_sections
|
|
||||||
end
|
|
||||||
return statusline(inactive_sections, false)
|
return statusline(inactive_sections, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function tabline()
|
local function tabline() return statusline(M.tabline, true) end
|
||||||
return statusline(M.tabline, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function setup_theme()
|
local function setup_theme()
|
||||||
lualine_set_theme()
|
lualine_set_theme()
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit itchyny, jackno (lightline)
|
-- Credit itchyny, jackno (lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
black = '#000000',
|
black = '#000000',
|
||||||
maroon = '#800000',
|
maroon = '#800000',
|
||||||
|
@ -22,29 +21,24 @@ local colors = {
|
||||||
aqua = '#00ffff',
|
aqua = '#00ffff',
|
||||||
white = '#ffffff',
|
white = '#ffffff',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.white, bg = colors.blue , gui = 'bold', },
|
a = {fg = colors.white, bg = colors.blue, gui = 'bold'},
|
||||||
b = { fg = colors.white, bg = colors.gray , },
|
b = {fg = colors.white, bg = colors.gray},
|
||||||
c = { fg = colors.silver, bg = colors.black , }
|
c = {fg = colors.silver, bg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.white, bg = colors.green, gui = 'bold'}}
|
||||||
a = { fg = colors.white, bg = colors.green , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.white, bg = colors.purple, gui = 'bold'}}
|
||||||
a = { fg = colors.white, bg = colors.purple , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.white, bg = colors.red, gui = 'bold'}}
|
||||||
a = { fg = colors.white, bg = colors.red , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.silver, bg = colors.gray , gui = 'bold', },
|
a = {fg = colors.silver, bg = colors.gray, gui = 'bold'},
|
||||||
b = { fg = colors.gray, bg = colors.black , },
|
b = {fg = colors.gray, bg = colors.black},
|
||||||
c = { fg = colors.silver, bg = colors.black , },
|
c = {fg = colors.silver, bg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -15,7 +15,11 @@ local function getHi( scope, syntaxlist )
|
||||||
if vim.fn.hlexists(highlight_name) ~= 0 then
|
if vim.fn.hlexists(highlight_name) ~= 0 then
|
||||||
local color = utils.extract_highlight_colors(highlight_name)
|
local color = utils.extract_highlight_colors(highlight_name)
|
||||||
if color.reverse then
|
if color.reverse then
|
||||||
if scope == 'guibg' then scope = 'guifg' else scope = 'guibg' end
|
if scope == 'guibg' then
|
||||||
|
scope = 'guifg'
|
||||||
|
else
|
||||||
|
scope = 'guibg'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if color[scope] then return color[scope] end
|
if color[scope] then return color[scope] end
|
||||||
end
|
end
|
||||||
|
@ -25,11 +29,13 @@ end
|
||||||
|
|
||||||
-- truns #rrggbb -> { red, green, blue }
|
-- truns #rrggbb -> { red, green, blue }
|
||||||
local function rgb_str2num(rgb_color_str)
|
local function rgb_str2num(rgb_color_str)
|
||||||
if rgb_color_str:find('#') == 1 then rgb_color_str = rgb_color_str:sub(2, #rgb_color_str) end
|
if rgb_color_str:find('#') == 1 then
|
||||||
|
rgb_color_str = rgb_color_str:sub(2, #rgb_color_str)
|
||||||
|
end
|
||||||
local red = tonumber(rgb_color_str:sub(1, 2), 16)
|
local red = tonumber(rgb_color_str:sub(1, 2), 16)
|
||||||
local green = tonumber(rgb_color_str:sub(3, 4), 16)
|
local green = tonumber(rgb_color_str:sub(3, 4), 16)
|
||||||
local blue = tonumber(rgb_color_str:sub(5, 6), 16)
|
local blue = tonumber(rgb_color_str:sub(5, 6), 16)
|
||||||
return { red = red, green = green, blue = blue, }
|
return {red = red, green = green, blue = blue}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- turns { red, green, blue } -> #rrggbb
|
-- turns { red, green, blue } -> #rrggbb
|
||||||
|
@ -85,13 +91,12 @@ local function apply_contrast(highlight)
|
||||||
local hightlight_bg_avg = get_color_avg(highlight.bg)
|
local hightlight_bg_avg = get_color_avg(highlight.bg)
|
||||||
local contrast_threshold_config = clamp(contrast_threshold, 0, 0.5)
|
local contrast_threshold_config = clamp(contrast_threshold, 0, 0.5)
|
||||||
local contranst_change_step = 5
|
local contranst_change_step = 5
|
||||||
if hightlight_bg_avg > .5 then
|
if hightlight_bg_avg > .5 then contranst_change_step = -contranst_change_step end
|
||||||
contranst_change_step = -contranst_change_step
|
|
||||||
end
|
|
||||||
|
|
||||||
-- donn't waste too much time here max 25 interation should be more than enough
|
-- donn't waste too much time here max 25 interation should be more than enough
|
||||||
local iteration_count = 1
|
local iteration_count = 1
|
||||||
while (math.abs(get_color_avg(highlight.fg) - hightlight_bg_avg) < contrast_threshold_config and iteration_count < 25) do
|
while (math.abs(get_color_avg(highlight.fg) - hightlight_bg_avg) <
|
||||||
|
contrast_threshold_config and iteration_count < 25) do
|
||||||
highlight.fg = contrast_modifier(highlight.fg, contranst_change_step)
|
highlight.fg = contrast_modifier(highlight.fg, contranst_change_step)
|
||||||
iteration_count = iteration_count + 1
|
iteration_count = iteration_count + 1
|
||||||
end
|
end
|
||||||
|
@ -106,10 +111,9 @@ local colors = {
|
||||||
command = getHi('guifg', {'Identifier'}),
|
command = getHi('guifg', {'Identifier'}),
|
||||||
back1 = getHi('guibg', {'Normal', 'StatusLineNC'}),
|
back1 = getHi('guibg', {'Normal', 'StatusLineNC'}),
|
||||||
fore = getHi('guifg', {'Normal', 'StatusLine'}),
|
fore = getHi('guifg', {'Normal', 'StatusLine'}),
|
||||||
back2 = getHi( 'guibg', {'StatusLine' } ),
|
back2 = getHi('guibg', {'StatusLine'})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Change brightness of colors
|
-- Change brightness of colors
|
||||||
-- darken incase of light theme lighten incase of dark theme
|
-- darken incase of light theme lighten incase of dark theme
|
||||||
|
|
||||||
|
@ -126,28 +130,28 @@ local M = {
|
||||||
normal = {
|
normal = {
|
||||||
a = {bg = colors.normal, fg = colors.back1, gui = 'bold'},
|
a = {bg = colors.normal, fg = colors.back1, gui = 'bold'},
|
||||||
b = {bg = colors.back1, fg = colors.normal},
|
b = {bg = colors.back1, fg = colors.normal},
|
||||||
c = { bg = colors.back2, fg = colors.fore },
|
c = {bg = colors.back2, fg = colors.fore}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = {bg = colors.insert, fg = colors.back1, gui = 'bold'},
|
a = {bg = colors.insert, fg = colors.back1, gui = 'bold'},
|
||||||
b = {bg = colors.back1, fg = colors.insert},
|
b = {bg = colors.back1, fg = colors.insert},
|
||||||
c = { bg = colors.back2, fg = colors.fore },
|
c = {bg = colors.back2, fg = colors.fore}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = {bg = colors.replace, fg = colors.back1, gui = 'bold'},
|
a = {bg = colors.replace, fg = colors.back1, gui = 'bold'},
|
||||||
b = {bg = colors.back1, fg = colors.replace},
|
b = {bg = colors.back1, fg = colors.replace},
|
||||||
c = { bg = colors.back2, fg= colors.fore },
|
c = {bg = colors.back2, fg = colors.fore}
|
||||||
},
|
},
|
||||||
visual = {
|
visual = {
|
||||||
a = {bg = colors.visual, fg = colors.back1, gui = 'bold'},
|
a = {bg = colors.visual, fg = colors.back1, gui = 'bold'},
|
||||||
b = {bg = colors.back1, fg = colors.visual},
|
b = {bg = colors.back1, fg = colors.visual},
|
||||||
c = { bg = colors.back2, fg= colors.fore },
|
c = {bg = colors.back2, fg = colors.fore}
|
||||||
},
|
},
|
||||||
command = {
|
command = {
|
||||||
a = {bg = colors.command, fg = colors.back1, gui = 'bold'},
|
a = {bg = colors.command, fg = colors.back1, gui = 'bold'},
|
||||||
b = {bg = colors.back1, fg = colors.command},
|
b = {bg = colors.back1, fg = colors.command},
|
||||||
c = { bg = colors.back2, fg = colors.fore },
|
c = {bg = colors.back2, fg = colors.fore}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.terminal = M.command
|
M.terminal = M.command
|
||||||
|
@ -155,9 +159,7 @@ M.inactive = M.normal
|
||||||
|
|
||||||
-- Apply prpper contrast so text is readable
|
-- Apply prpper contrast so text is readable
|
||||||
for _, section in pairs(M) do
|
for _, section in pairs(M) do
|
||||||
for _, highlight in pairs(section) do
|
for _, highlight in pairs(section) do apply_contrast(highlight) end
|
||||||
apply_contrast(highlight)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -2,41 +2,42 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color2 = "#0f1419",
|
color2 = '#0f1419',
|
||||||
color3 = "#ffee99",
|
color3 = '#ffee99',
|
||||||
color4 = "#e6e1cf",
|
color4 = '#e6e1cf',
|
||||||
color5 = "#14191f",
|
color5 = '#14191f',
|
||||||
color13 = "#b8cc52",
|
color13 = '#b8cc52',
|
||||||
color10 = "#36a3d9",
|
color10 = '#36a3d9',
|
||||||
color8 = "#f07178",
|
color8 = '#f07178',
|
||||||
color9 = "#3e4b59",
|
color9 = '#3e4b59',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local ayu_dark = {
|
local ayu_dark = {
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color2, bg = colors.color3 , "bold", },
|
a = {fg = colors.color2, bg = colors.color3, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color2, bg = colors.color8 , "bold", },
|
a = {fg = colors.color2, bg = colors.color8, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
c = {fg = colors.color4, bg = colors.color2},
|
c = {fg = colors.color4, bg = colors.color2},
|
||||||
a = { fg = colors.color4, bg = colors.color5 , "bold", },
|
a = {fg = colors.color4, bg = colors.color5, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
c = {fg = colors.color9, bg = colors.color2},
|
c = {fg = colors.color9, bg = colors.color2},
|
||||||
a = { fg = colors.color2, bg = colors.color10 , "bold", },
|
a = {fg = colors.color2, bg = colors.color10, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color2, bg = colors.color13 , "bold", },
|
a = {fg = colors.color2, bg = colors.color13, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ayu_dark
|
return ayu_dark
|
||||||
|
|
|
@ -2,41 +2,42 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color2 = "#f3f3f3",
|
color2 = '#f3f3f3',
|
||||||
color3 = "#A37ACC",
|
color3 = '#A37ACC',
|
||||||
color4 = "#5C6773",
|
color4 = '#5C6773',
|
||||||
color5 = "#d3d3d3",
|
color5 = '#d3d3d3',
|
||||||
color13 = "#86B300",
|
color13 = '#86B300',
|
||||||
color10 = "#59c2ff",
|
color10 = '#59c2ff',
|
||||||
color8 = "#f07178",
|
color8 = '#f07178',
|
||||||
color9 = "#828C99",
|
color9 = '#828C99',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local ayu_light = {
|
local ayu_light = {
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color2, bg = colors.color3 , "bold", },
|
a = {fg = colors.color2, bg = colors.color3, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color2, bg = colors.color8 , "bold", },
|
a = {fg = colors.color2, bg = colors.color8, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
c = {fg = colors.color4, bg = colors.color2},
|
c = {fg = colors.color4, bg = colors.color2},
|
||||||
a = { fg = colors.color4, bg = colors.color5 , "bold", },
|
a = {fg = colors.color4, bg = colors.color5, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
c = {fg = colors.color9, bg = colors.color2},
|
c = {fg = colors.color9, bg = colors.color2},
|
||||||
a = { fg = colors.color2, bg = colors.color10 , "bold", },
|
a = {fg = colors.color2, bg = colors.color10, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color2, bg = colors.color13 , "bold", },
|
a = {fg = colors.color2, bg = colors.color13, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ayu_light
|
return ayu_light
|
||||||
|
|
|
@ -2,41 +2,42 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color2 = "#242b38",
|
color2 = '#242b38',
|
||||||
color3 = "#d4bfff",
|
color3 = '#d4bfff',
|
||||||
color4 = "#d9d7ce",
|
color4 = '#d9d7ce',
|
||||||
color5 = "#272d38",
|
color5 = '#272d38',
|
||||||
color13 = "#bbe67e",
|
color13 = '#bbe67e',
|
||||||
color10 = "#59c2ff",
|
color10 = '#59c2ff',
|
||||||
color8 = "#f07178",
|
color8 = '#f07178',
|
||||||
color9 = "#607080",
|
color9 = '#607080',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local ayu_mirage = {
|
local ayu_mirage = {
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color2, bg = colors.color3 , "bold", },
|
a = {fg = colors.color2, bg = colors.color3, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color2, bg = colors.color8 , "bold", },
|
a = {fg = colors.color2, bg = colors.color8, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
c = {fg = colors.color4, bg = colors.color2},
|
c = {fg = colors.color4, bg = colors.color2},
|
||||||
a = { fg = colors.color4, bg = colors.color5 , "bold", },
|
a = {fg = colors.color4, bg = colors.color5, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
c = {fg = colors.color9, bg = colors.color2},
|
c = {fg = colors.color9, bg = colors.color2},
|
||||||
a = { fg = colors.color2, bg = colors.color10 , "bold", },
|
a = {fg = colors.color2, bg = colors.color10, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color2, bg = colors.color13 , "bold", },
|
a = {fg = colors.color2, bg = colors.color13, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ayu_mirage
|
return ayu_mirage
|
||||||
|
|
|
@ -1,45 +1,44 @@
|
||||||
-- Copyright (c) 2020-2021 Shatur95
|
-- Copyright (c) 2020-2021 Shatur95
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
|
|
||||||
local codedark = {}
|
local codedark = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
gray = "#3C3C3C",
|
gray = '#3C3C3C',
|
||||||
lightred = "#D16969",
|
lightred = '#D16969',
|
||||||
blue = "#569CD6",
|
blue = '#569CD6',
|
||||||
pink = "#C586C0",
|
pink = '#C586C0',
|
||||||
black = "#262626",
|
black = '#262626',
|
||||||
white = "#D4D4D4",
|
white = '#D4D4D4',
|
||||||
green = "#608B4E",
|
green = '#608B4E',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
codedark.normal = {
|
codedark.normal = {
|
||||||
b = {fg = colors.green, bg = colors.black},
|
b = {fg = colors.green, bg = colors.black},
|
||||||
a = { fg = colors.black, bg = colors.green , "bold", },
|
a = {fg = colors.black, bg = colors.green, 'bold'},
|
||||||
c = { fg = colors.white, bg = colors.black },
|
c = {fg = colors.white, bg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
codedark.visual = {
|
codedark.visual = {
|
||||||
b = {fg = colors.pink, bg = colors.black},
|
b = {fg = colors.pink, bg = colors.black},
|
||||||
a = { fg = colors.black, bg = colors.pink , "bold", },
|
a = {fg = colors.black, bg = colors.pink, 'bold'}
|
||||||
}
|
}
|
||||||
|
|
||||||
codedark.inactive = {
|
codedark.inactive = {
|
||||||
b = {fg = colors.black, bg = colors.blue},
|
b = {fg = colors.black, bg = colors.blue},
|
||||||
a = { fg = colors.white, bg = colors.gray , "bold", },
|
a = {fg = colors.white, bg = colors.gray, 'bold'}
|
||||||
}
|
}
|
||||||
|
|
||||||
codedark.replace = {
|
codedark.replace = {
|
||||||
b = {fg = colors.lightred, bg = colors.black},
|
b = {fg = colors.lightred, bg = colors.black},
|
||||||
a = { fg = colors.black, bg = colors.lightred , "bold", },
|
a = {fg = colors.black, bg = colors.lightred, 'bold'},
|
||||||
c = { fg = colors.white, bg = colors.black },
|
c = {fg = colors.white, bg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
codedark.insert = {
|
codedark.insert = {
|
||||||
b = {fg = colors.blue, bg = colors.black},
|
b = {fg = colors.blue, bg = colors.black},
|
||||||
a = { fg = colors.black, bg = colors.blue , "bold", },
|
a = {fg = colors.black, bg = colors.blue, 'bold'},
|
||||||
c = { fg = colors.white, bg = colors.black },
|
c = {fg = colors.white, bg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
return codedark
|
return codedark
|
||||||
|
|
|
@ -1,56 +1,55 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit itchyny, jackno (lightline)
|
-- Credit itchyny, jackno (lightline)
|
||||||
|
|
||||||
local dracula = {}
|
local dracula = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
gray = "#44475a",
|
gray = '#44475a',
|
||||||
lightgray = "#5f6a8e",
|
lightgray = '#5f6a8e',
|
||||||
orange = "#ffb86c",
|
orange = '#ffb86c',
|
||||||
purple = "#bd93f9",
|
purple = '#bd93f9',
|
||||||
red = "#ff5555",
|
red = '#ff5555',
|
||||||
yellow = "#f1fa8c",
|
yellow = '#f1fa8c',
|
||||||
green = "#50fa7b",
|
green = '#50fa7b',
|
||||||
white = "#f8f8f2",
|
white = '#f8f8f2',
|
||||||
black = "#282a36",
|
black = '#282a36',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
dracula.normal = {
|
dracula.normal = {
|
||||||
a = { bg = colors.purple, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.purple, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = {bg = colors.gray, fg = colors.white}
|
c = {bg = colors.gray, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
dracula.insert = {
|
dracula.insert = {
|
||||||
a = { bg = colors.green, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.green, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = {bg = colors.gray, fg = colors.white}
|
c = {bg = colors.gray, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dracula.visual = {
|
dracula.visual = {
|
||||||
a = { bg = colors.yellow, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.yellow, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = { bg = colors.gray, fg = colors.white },
|
c = {bg = colors.gray, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
dracula.replace = {
|
dracula.replace = {
|
||||||
a = { bg = colors.red, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.red, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = { bg = colors.gray, fg = colors.white },
|
c = {bg = colors.gray, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
dracula.command = {
|
dracula.command = {
|
||||||
a = { bg = colors.orange, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.orange, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = { bg = colors.gray, fg = colors.white },
|
c = {bg = colors.gray, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
dracula.inactive = {
|
dracula.inactive = {
|
||||||
a = { bg = colors.gray, fg = colors.white, gui = 'bold', },
|
a = {bg = colors.gray, fg = colors.white, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = { bg = colors.gray, fg = colors.white },
|
c = {bg = colors.gray, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
return dracula
|
return dracula
|
||||||
|
|
|
@ -1,61 +1,61 @@
|
||||||
-- Copyright (c) 2020-2021 gnuyent
|
-- Copyright (c) 2020-2021 gnuyent
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local forest_night = {}
|
local forest_night = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
bg0 = "#323d43",
|
bg0 = '#323d43',
|
||||||
bg1 = "#3c474d",
|
bg1 = '#3c474d',
|
||||||
bg3 = "#505a60",
|
bg3 = '#505a60',
|
||||||
fg = "#d8caac",
|
fg = '#d8caac',
|
||||||
aqua = "#87c095",
|
aqua = '#87c095',
|
||||||
green = "#a7c080",
|
green = '#a7c080',
|
||||||
orange = "#e39b7b",
|
orange = '#e39b7b',
|
||||||
purple = "#d39bb6",
|
purple = '#d39bb6',
|
||||||
red = "#e68183",
|
red = '#e68183',
|
||||||
grey1 = "#868d80",
|
grey1 = '#868d80',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
forest_night.normal = {
|
forest_night.normal = {
|
||||||
a = { bg = colors.green, fg = colors.bg0, gui = 'bold', },
|
a = {bg = colors.green, fg = colors.bg0, gui = 'bold'},
|
||||||
b = { bg = colors.bg3, fg = colors.fg, },
|
b = {bg = colors.bg3, fg = colors.fg},
|
||||||
c = { bg = colors.bg1, fg = colors.fg, },
|
c = {bg = colors.bg1, fg = colors.fg}
|
||||||
}
|
}
|
||||||
|
|
||||||
forest_night.insert = {
|
forest_night.insert = {
|
||||||
a = { bg = colors.fg, fg = colors.bg0, gui = 'bold', },
|
a = {bg = colors.fg, fg = colors.bg0, gui = 'bold'},
|
||||||
b = { bg = colors.bg3, fg = colors.fg, },
|
b = {bg = colors.bg3, fg = colors.fg},
|
||||||
c = { bg = colors.bg1, fg = colors.fg, },
|
c = {bg = colors.bg1, fg = colors.fg}
|
||||||
}
|
}
|
||||||
|
|
||||||
forest_night.visual = {
|
forest_night.visual = {
|
||||||
a = { bg = colors.red, fg = colors.bg0, gui = 'bold', },
|
a = {bg = colors.red, fg = colors.bg0, gui = 'bold'},
|
||||||
b = { bg = colors.bg3, fg = colors.fg, },
|
b = {bg = colors.bg3, fg = colors.fg},
|
||||||
c = { bg = colors.bg1, fg = colors.fg, },
|
c = {bg = colors.bg1, fg = colors.fg}
|
||||||
}
|
}
|
||||||
|
|
||||||
forest_night.replace = {
|
forest_night.replace = {
|
||||||
a = { bg = colors.orange, fg = colors.bg0, gui = 'bold', },
|
a = {bg = colors.orange, fg = colors.bg0, gui = 'bold'},
|
||||||
b = { bg = colors.bg3, fg = colors.fg, },
|
b = {bg = colors.bg3, fg = colors.fg},
|
||||||
c = { bg = colors.bg1, fg = colors.fg, },
|
c = {bg = colors.bg1, fg = colors.fg}
|
||||||
}
|
}
|
||||||
|
|
||||||
forest_night.command = {
|
forest_night.command = {
|
||||||
a = { bg = colors.aqua, fg = colors.bg0, gui = 'bold', },
|
a = {bg = colors.aqua, fg = colors.bg0, gui = 'bold'},
|
||||||
b = { bg = colors.bg3, fg = colors.fg, },
|
b = {bg = colors.bg3, fg = colors.fg},
|
||||||
c = { bg = colors.bg1, fg = colors.fg, },
|
c = {bg = colors.bg1, fg = colors.fg}
|
||||||
}
|
}
|
||||||
|
|
||||||
forest_night.terminal = {
|
forest_night.terminal = {
|
||||||
a = { bg = colors.purple, fg = colors.bg0, gui = 'bold', },
|
a = {bg = colors.purple, fg = colors.bg0, gui = 'bold'},
|
||||||
b = { bg = colors.bg3, fg = colors.fg, },
|
b = {bg = colors.bg3, fg = colors.fg},
|
||||||
c = { bg = colors.bg1, fg = colors.fg, },
|
c = {bg = colors.bg1, fg = colors.fg}
|
||||||
}
|
}
|
||||||
|
|
||||||
forest_night.inactive = {
|
forest_night.inactive = {
|
||||||
a = { bg = colors.bg1, fg = colors.grey1, gui = 'bold', },
|
a = {bg = colors.bg1, fg = colors.grey1, gui = 'bold'},
|
||||||
b = { bg = colors.bg1, fg = colors.grey1, },
|
b = {bg = colors.bg1, fg = colors.grey1},
|
||||||
c = { bg = colors.bg1, fg = colors.grey1, },
|
c = {bg = colors.bg1, fg = colors.grey1}
|
||||||
}
|
}
|
||||||
|
|
||||||
return forest_night
|
return forest_night
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
-- Copyright (c) 2020-2021 hoob3rt
|
-- Copyright (c) 2020-2021 hoob3rt
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local gruvbox = {}
|
local gruvbox = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
black = "#282828",
|
black = '#282828',
|
||||||
white = '#ebdbb2',
|
white = '#ebdbb2',
|
||||||
red = '#fb4934',
|
red = '#fb4934',
|
||||||
green = '#b8bb26',
|
green = '#b8bb26',
|
||||||
|
@ -15,42 +14,42 @@ local colors = {
|
||||||
lightgray = '#504945',
|
lightgray = '#504945',
|
||||||
inactivegray = '#7c6f64',
|
inactivegray = '#7c6f64',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
gruvbox.normal = {
|
gruvbox.normal = {
|
||||||
a = { bg = colors.gray, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.gray, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = {bg = colors.darkgray, fg = colors.gray}
|
c = {bg = colors.darkgray, fg = colors.gray}
|
||||||
}
|
}
|
||||||
|
|
||||||
gruvbox.insert = {
|
gruvbox.insert = {
|
||||||
a = { bg = colors.blue, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.blue, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = {bg = colors.lightgray, fg = colors.white}
|
c = {bg = colors.lightgray, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gruvbox.visual = {
|
gruvbox.visual = {
|
||||||
a = { bg = colors.yellow, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.yellow, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = { bg = colors.inactivegray, fg = colors.black },
|
c = {bg = colors.inactivegray, fg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
gruvbox.replace = {
|
gruvbox.replace = {
|
||||||
a = { bg = colors.red, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.red, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = { bg = colors.black, fg = colors.white },
|
c = {bg = colors.black, fg = colors.white}
|
||||||
}
|
}
|
||||||
|
|
||||||
gruvbox.command = {
|
gruvbox.command = {
|
||||||
a = { bg = colors.green, fg = colors.black, gui = 'bold', },
|
a = {bg = colors.green, fg = colors.black, gui = 'bold'},
|
||||||
b = { bg = colors.lightgray, fg = colors.white, },
|
b = {bg = colors.lightgray, fg = colors.white},
|
||||||
c = { bg = colors.inactivegray, fg = colors.black },
|
c = {bg = colors.inactivegray, fg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
gruvbox.inactive = {
|
gruvbox.inactive = {
|
||||||
a = { bg = colors.darkgray, fg = colors.gray, gui = 'bold', },
|
a = {bg = colors.darkgray, fg = colors.gray, gui = 'bold'},
|
||||||
b = { bg = colors.darkgray, fg = colors.gray, },
|
b = {bg = colors.darkgray, fg = colors.gray},
|
||||||
c = { bg = colors.darkgray, fg = colors.gray },
|
c = {bg = colors.darkgray, fg = colors.gray}
|
||||||
}
|
}
|
||||||
|
|
||||||
return gruvbox
|
return gruvbox
|
||||||
|
|
|
@ -1,42 +1,31 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
fg1 = "#282828",
|
fg1 = '#282828',
|
||||||
color2 = "#504945",
|
color2 = '#504945',
|
||||||
fg2 = "#ddc7a1",
|
fg2 = '#ddc7a1',
|
||||||
color3 = "#32302f",
|
color3 = '#32302f',
|
||||||
color4 = "#a89984",
|
color4 = '#a89984',
|
||||||
color5 = "#7daea3",
|
color5 = '#7daea3',
|
||||||
color6 = "#a9b665",
|
color6 = '#a9b665',
|
||||||
color7 = "#d8a657",
|
color7 = '#d8a657',
|
||||||
color8 = "#d3869b",
|
color8 = '#d3869b',
|
||||||
color9 = "#ea6962",
|
color9 = '#ea6962',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
normal = {
|
normal = {
|
||||||
a = { fg = colors.fg1, bg = colors.color4, "bold" },
|
a = {fg = colors.fg1, bg = colors.color4, 'bold'},
|
||||||
b = { fg = colors.fg2, bg = colors.color2, },
|
b = {fg = colors.fg2, bg = colors.color2},
|
||||||
c = { fg = colors.fg2, bg = colors.color3, },
|
c = {fg = colors.fg2, bg = colors.color3}
|
||||||
},
|
|
||||||
command = {
|
|
||||||
a = { fg = colors.fg1, bg = colors.color5, "bold" },
|
|
||||||
},
|
|
||||||
inactive = {
|
|
||||||
a = { fg = colors.fg2, bg = colors.color2, },
|
|
||||||
},
|
|
||||||
insert = {
|
|
||||||
a = { fg = colors.fg1, bg = colors.color6, "bold" },
|
|
||||||
},
|
|
||||||
replace = {
|
|
||||||
a = { fg = colors.fg1, bg = colors.color7, "bold" },
|
|
||||||
},
|
|
||||||
terminal = {
|
|
||||||
a = { fg = colors.fg1, bg = colors.color8, "bold" },
|
|
||||||
},
|
|
||||||
visual = {
|
|
||||||
a = { fg = colors.fg1, bg = colors.color9, "bold" },
|
|
||||||
},
|
},
|
||||||
|
command = {a = {fg = colors.fg1, bg = colors.color5, 'bold'}},
|
||||||
|
inactive = {a = {fg = colors.fg2, bg = colors.color2}},
|
||||||
|
insert = {a = {fg = colors.fg1, bg = colors.color6, 'bold'}},
|
||||||
|
replace = {a = {fg = colors.fg1, bg = colors.color7, 'bold'}},
|
||||||
|
terminal = {a = {fg = colors.fg1, bg = colors.color8, 'bold'}},
|
||||||
|
visual = {a = {fg = colors.fg1, bg = colors.color9, 'bold'}}
|
||||||
}
|
}
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -2,43 +2,44 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color2 = "#161821",
|
color2 = '#161821',
|
||||||
color3 = "#b4be82",
|
color3 = '#b4be82',
|
||||||
color4 = "#6b7089",
|
color4 = '#6b7089',
|
||||||
color5 = "#2e313f",
|
color5 = '#2e313f',
|
||||||
color8 = "#e2a478",
|
color8 = '#e2a478',
|
||||||
color9 = "#3e445e",
|
color9 = '#3e445e',
|
||||||
color10 = "#0f1117",
|
color10 = '#0f1117',
|
||||||
color11 = "#17171b",
|
color11 = '#17171b',
|
||||||
color12 = "#818596",
|
color12 = '#818596',
|
||||||
color15 = "#84a0c6",
|
color15 = '#84a0c6',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local iceberg = {
|
local iceberg = {
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color2, bg = colors.color3 , "bold", },
|
a = {fg = colors.color2, bg = colors.color3, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color2, bg = colors.color8 , "bold", },
|
a = {fg = colors.color2, bg = colors.color8, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
c = {fg = colors.color9, bg = colors.color10},
|
c = {fg = colors.color9, bg = colors.color10},
|
||||||
a = { fg = colors.color9, bg = colors.color10 , "bold", },
|
a = {fg = colors.color9, bg = colors.color10, 'bold'},
|
||||||
b = { fg = colors.color9, bg = colors.color10 },
|
b = {fg = colors.color9, bg = colors.color10}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
c = {fg = colors.color9, bg = colors.color10},
|
c = {fg = colors.color9, bg = colors.color10},
|
||||||
a = { fg = colors.color11, bg = colors.color12 , "bold", },
|
a = {fg = colors.color11, bg = colors.color12, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color2, bg = colors.color15 , "bold", },
|
a = {fg = colors.color2, bg = colors.color15, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return iceberg
|
return iceberg
|
||||||
|
|
|
@ -2,41 +2,42 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color5 = "#668e3d",
|
color5 = '#668e3d',
|
||||||
color8 = "#757ca3",
|
color8 = '#757ca3',
|
||||||
color9 = "#8b98b6",
|
color9 = '#8b98b6',
|
||||||
color10 = "#cad0de",
|
color10 = '#cad0de',
|
||||||
color11 = "#2d539e",
|
color11 = '#2d539e',
|
||||||
color0 = "#e8e9ec",
|
color0 = '#e8e9ec',
|
||||||
color1 = "#9fa6c0",
|
color1 = '#9fa6c0',
|
||||||
color2 = "#c57339",
|
color2 = '#c57339',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local iceberg = {
|
local iceberg = {
|
||||||
replace = {
|
replace = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
a = { fg = colors.color0, bg = colors.color2 , "bold", },
|
a = {fg = colors.color0, bg = colors.color2, 'bold'}
|
||||||
},
|
},
|
||||||
visual = {
|
visual = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
a = { fg = colors.color0, bg = colors.color5 , "bold", },
|
a = {fg = colors.color0, bg = colors.color5, 'bold'}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
a = { fg = colors.color0, bg = colors.color8 , "bold", },
|
a = {fg = colors.color0, bg = colors.color8, 'bold'},
|
||||||
c = { fg = colors.color9, bg = colors.color10 },
|
c = {fg = colors.color9, bg = colors.color10}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
b = {fg = colors.color9, bg = colors.color10},
|
b = {fg = colors.color9, bg = colors.color10},
|
||||||
a = { fg = colors.color9, bg = colors.color10 , "bold", },
|
a = {fg = colors.color9, bg = colors.color10, 'bold'},
|
||||||
c = { fg = colors.color9, bg = colors.color10 },
|
c = {fg = colors.color9, bg = colors.color10}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
a = { fg = colors.color0, bg = colors.color11 , "bold", },
|
a = {fg = colors.color0, bg = colors.color11, 'bold'}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return iceberg
|
return iceberg
|
||||||
|
|
|
@ -2,42 +2,43 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color2 = "#30302c",
|
color2 = '#30302c',
|
||||||
color3 = "#f0a0c0",
|
color3 = '#f0a0c0',
|
||||||
color4 = "#e8e8d3",
|
color4 = '#e8e8d3',
|
||||||
color5 = "#4e4e43",
|
color5 = '#4e4e43',
|
||||||
color8 = "#cf6a4c",
|
color8 = '#cf6a4c',
|
||||||
color9 = "#666656",
|
color9 = '#666656',
|
||||||
color10 = "#808070",
|
color10 = '#808070',
|
||||||
color11 = "#8197bf",
|
color11 = '#8197bf',
|
||||||
color14 = "#99ad6a",
|
color14 = '#99ad6a',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local jellybeans = {
|
local jellybeans = {
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color2, bg = colors.color3 , "bold", },
|
a = {fg = colors.color2, bg = colors.color3, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color2, bg = colors.color8 , "bold", },
|
a = {fg = colors.color2, bg = colors.color8, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
c = {fg = colors.color9, bg = colors.color2},
|
c = {fg = colors.color9, bg = colors.color2},
|
||||||
a = { fg = colors.color10, bg = colors.color2 , "bold", },
|
a = {fg = colors.color10, bg = colors.color2, 'bold'},
|
||||||
b = { fg = colors.color9, bg = colors.color2 },
|
b = {fg = colors.color9, bg = colors.color2}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
c = {fg = colors.color10, bg = colors.color2},
|
c = {fg = colors.color10, bg = colors.color2},
|
||||||
a = { fg = colors.color2, bg = colors.color11 , "bold", },
|
a = {fg = colors.color2, bg = colors.color11, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color2, bg = colors.color14 , "bold", },
|
a = {fg = colors.color2, bg = colors.color14, 'bold'},
|
||||||
b = { fg = colors.color4, bg = colors.color5 },
|
b = {fg = colors.color4, bg = colors.color5}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return jellybeans
|
return jellybeans
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: Lokesh Krishna(lightline)
|
-- Credit: Lokesh Krishna(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
fg = '#eeffff',
|
fg = '#eeffff',
|
||||||
bg = '#263238',
|
bg = '#263238',
|
||||||
|
@ -17,32 +16,33 @@ local colors = {
|
||||||
gray2 = '#2E3C43',
|
gray2 = '#2E3C43',
|
||||||
gray3 = '#515559',
|
gray3 = '#515559',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.bg, bg = colors.blue , gui = 'bold', },
|
a = {fg = colors.bg, bg = colors.blue, gui = 'bold'},
|
||||||
b = { fg = colors.fg, bg = colors.gray3 , },
|
b = {fg = colors.fg, bg = colors.gray3},
|
||||||
c = { fg = colors.fg, bg = colors.gray2 , }
|
c = {fg = colors.fg, bg = colors.gray2}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {
|
||||||
a = { fg = colors.bg, bg = colors.green, 'bold' , gui = 'bold', },
|
a = {fg = colors.bg, bg = colors.green, 'bold', gui = 'bold'},
|
||||||
b = { fg = colors.fg, bg = colors.gray3 , },
|
b = {fg = colors.fg, bg = colors.gray3}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {
|
||||||
a = { fg = colors.bg, bg = colors.purple, 'bold' , gui = 'bold', },
|
a = {fg = colors.bg, bg = colors.purple, 'bold', gui = 'bold'},
|
||||||
b = { fg = colors.fg, bg = colors.gray3 , },
|
b = {fg = colors.fg, bg = colors.gray3}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {
|
||||||
a = { fg = colors.bg, bg = colors.red1 , gui = 'bold', },
|
a = {fg = colors.bg, bg = colors.red1, gui = 'bold'},
|
||||||
b = { fg = colors.fg, bg = colors.gray3 , },
|
b = {fg = colors.fg, bg = colors.gray3}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.fg, bg = colors.bg , gui = 'bold', },
|
a = {fg = colors.fg, bg = colors.bg, gui = 'bold'},
|
||||||
b = { fg = colors.fg, bg = colors.bg , },
|
b = {fg = colors.fg, bg = colors.bg},
|
||||||
c = { fg = colors.fg, bg = colors.gray2 , },
|
c = {fg = colors.fg, bg = colors.gray2}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: challsted(lightline)
|
-- Credit: challsted(lightline)
|
||||||
|
|
||||||
local molokai = {}
|
local molokai = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
black = '#232526',
|
black = '#232526',
|
||||||
gray = '#808080',
|
gray = '#808080',
|
||||||
|
@ -15,29 +14,24 @@ local colors = {
|
||||||
red = '#ff0000',
|
red = '#ff0000',
|
||||||
yellow = '#e6db74',
|
yellow = '#e6db74',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
molokai.normal = {
|
molokai.normal = {
|
||||||
a = { fg = colors.black, bg = colors.cyan , gui = 'bold', },
|
a = {fg = colors.black, bg = colors.cyan, gui = 'bold'},
|
||||||
b = { fg = colors.black, bg = colors.pink , },
|
b = {fg = colors.black, bg = colors.pink},
|
||||||
c = { fg = colors.orange, bg = colors.black , }
|
c = {fg = colors.orange, bg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
molokai.insert = {
|
molokai.insert = {a = {fg = colors.black, bg = colors.green, gui = 'bold'}}
|
||||||
a = { fg = colors.black, bg = colors.green , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
molokai.visual = {
|
molokai.visual = {a = {fg = colors.black, bg = colors.yellow, gui = 'bold'}}
|
||||||
a = { fg = colors.black, bg = colors.yellow , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
molokai.replace = {
|
molokai.replace = {a = {fg = colors.black, bg = colors.red, gui = 'bold'}}
|
||||||
a = { fg = colors.black, bg = colors.red , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
molokai.inactive = {
|
molokai.inactive = {
|
||||||
a = { fg = colors.pink, bg = colors.black , gui = 'bold', },
|
a = {fg = colors.pink, bg = colors.black, gui = 'bold'},
|
||||||
b = { fg = colors.white, bg = colors.pink , },
|
b = {fg = colors.white, bg = colors.pink},
|
||||||
c = { fg = colors.gray, bg = colors.black , },
|
c = {fg = colors.gray, bg = colors.black}
|
||||||
}
|
}
|
||||||
|
|
||||||
return molokai
|
return molokai
|
||||||
|
|
|
@ -1,39 +1,40 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color3 = "#2c3043",
|
color3 = '#2c3043',
|
||||||
color6 = "#a1aab8",
|
color6 = '#a1aab8',
|
||||||
color7 = "#82aaff",
|
color7 = '#82aaff',
|
||||||
color8 = "#ae81ff",
|
color8 = '#ae81ff',
|
||||||
color0 = "#092236",
|
color0 = '#092236',
|
||||||
color1 = "#ff5874",
|
color1 = '#ff5874',
|
||||||
color2 = "#c3ccdc",
|
color2 = '#c3ccdc',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local nightfly = {
|
local nightfly = {
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color0, bg = colors.color1 , "bold", },
|
a = {fg = colors.color0, bg = colors.color1, 'bold'},
|
||||||
b = { fg = colors.color2, bg = colors.color3 },
|
b = {fg = colors.color2, bg = colors.color3}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
a = { fg = colors.color6, bg = colors.color3 , "bold", },
|
a = {fg = colors.color6, bg = colors.color3, 'bold'},
|
||||||
b = {fg = colors.color6, bg = colors.color3},
|
b = {fg = colors.color6, bg = colors.color3},
|
||||||
c = { fg = colors.color6, bg = colors.color3 },
|
c = {fg = colors.color6, bg = colors.color3}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
a = { fg = colors.color0, bg = colors.color7 , "bold", },
|
a = {fg = colors.color0, bg = colors.color7, 'bold'},
|
||||||
b = {fg = colors.color2, bg = colors.color3},
|
b = {fg = colors.color2, bg = colors.color3},
|
||||||
c = { fg = colors.color2, bg = colors.color3 },
|
c = {fg = colors.color2, bg = colors.color3}
|
||||||
},
|
},
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color0, bg = colors.color8 , "bold", },
|
a = {fg = colors.color0, bg = colors.color8, 'bold'},
|
||||||
b = { fg = colors.color2, bg = colors.color3 },
|
b = {fg = colors.color2, bg = colors.color3}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color0, bg = colors.color2 , "bold", },
|
a = {fg = colors.color0, bg = colors.color2, 'bold'},
|
||||||
b = { fg = colors.color2, bg = colors.color3 },
|
b = {fg = colors.color2, bg = colors.color3}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nightfly
|
return nightfly
|
||||||
|
|
|
@ -1,40 +1,34 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local nord = {}
|
local nord = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
nord1 = "#3B4252",
|
nord1 = '#3B4252',
|
||||||
nord3 = "#4C566A",
|
nord3 = '#4C566A',
|
||||||
nord5 = "#E5E9F0",
|
nord5 = '#E5E9F0',
|
||||||
nord6 = "#ECEFF4",
|
nord6 = '#ECEFF4',
|
||||||
nord7 = "#8FBCBB",
|
nord7 = '#8FBCBB',
|
||||||
nord8 = "#88C0D0",
|
nord8 = '#88C0D0',
|
||||||
nord13 = "#EBCB8B",
|
nord13 = '#EBCB8B',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
nord.normal = {
|
nord.normal = {
|
||||||
a = { fg = colors.nord1, bg = colors.nord8, gui = 'bold', },
|
a = {fg = colors.nord1, bg = colors.nord8, gui = 'bold'},
|
||||||
b = { fg = colors.nord5, bg = colors.nord1, },
|
b = {fg = colors.nord5, bg = colors.nord1},
|
||||||
c = { fg = colors.nord5, bg = colors.nord3, }
|
c = {fg = colors.nord5, bg = colors.nord3}
|
||||||
}
|
}
|
||||||
|
|
||||||
nord.insert = {
|
nord.insert = {a = {fg = colors.nord1, bg = colors.nord6, gui = 'bold'}}
|
||||||
a = { fg = colors.nord1, bg = colors.nord6, gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
nord.visual = {
|
nord.visual = {a = {fg = colors.nord1, bg = colors.nord7, gui = 'bold'}}
|
||||||
a = { fg = colors.nord1, bg = colors.nord7, gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
nord.replace = {
|
nord.replace = {a = {fg = colors.nord1, bg = colors.nord13, gui = 'bold'}}
|
||||||
a = { fg = colors.nord1, bg = colors.nord13, gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
nord.inactive = {
|
nord.inactive = {
|
||||||
a = { fg = colors.nord1, bg = colors.nord8, gui = 'bold', },
|
a = {fg = colors.nord1, bg = colors.nord8, gui = 'bold'},
|
||||||
b = { fg = colors.nord5, bg = colors.nord1, },
|
b = {fg = colors.nord5, bg = colors.nord1},
|
||||||
c = { fg = colors.nord5, bg = colors.nord1, },
|
c = {fg = colors.nord5, bg = colors.nord1}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nord
|
return nord
|
||||||
|
|
|
@ -2,44 +2,45 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color0 = "#ffffff",
|
color0 = '#ffffff',
|
||||||
color1 = "#99c794",
|
color1 = '#99c794',
|
||||||
color2 = "#65737e",
|
color2 = '#65737e',
|
||||||
color3 = "#343d46",
|
color3 = '#343d46',
|
||||||
color4 = "#6699cc",
|
color4 = '#6699cc',
|
||||||
color5 = "#d8dee9",
|
color5 = '#d8dee9',
|
||||||
color6 = "#f99157",
|
color6 = '#f99157',
|
||||||
color7 = "#ec5f67",
|
color7 = '#ec5f67',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local oceanicnext = {
|
local oceanicnext = {
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color0, bg = colors.color1 , "bold", },
|
a = {fg = colors.color0, bg = colors.color1, 'bold'},
|
||||||
b = {fg = colors.color0, bg = colors.color2},
|
b = {fg = colors.color0, bg = colors.color2},
|
||||||
c = { fg = colors.color0, bg = colors.color3 },
|
c = {fg = colors.color0, bg = colors.color3}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
a = { fg = colors.color0, bg = colors.color4 , "bold", },
|
a = {fg = colors.color0, bg = colors.color4, 'bold'},
|
||||||
b = {fg = colors.color0, bg = colors.color2},
|
b = {fg = colors.color0, bg = colors.color2},
|
||||||
c = { fg = colors.color0, bg = colors.color3 },
|
c = {fg = colors.color0, bg = colors.color3}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
a = { fg = colors.color5, bg = colors.color2 , "bold", },
|
a = {fg = colors.color5, bg = colors.color2, 'bold'},
|
||||||
b = {fg = colors.color5, bg = colors.color3},
|
b = {fg = colors.color5, bg = colors.color3},
|
||||||
c = { fg = colors.color2, bg = colors.color3 },
|
c = {fg = colors.color2, bg = colors.color3}
|
||||||
},
|
},
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color0, bg = colors.color6 , "bold", },
|
a = {fg = colors.color0, bg = colors.color6, 'bold'},
|
||||||
b = {fg = colors.color0, bg = colors.color2},
|
b = {fg = colors.color0, bg = colors.color2},
|
||||||
c = { fg = colors.color0, bg = colors.color3 },
|
c = {fg = colors.color0, bg = colors.color3}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color0, bg = colors.color7 , "bold", },
|
a = {fg = colors.color0, bg = colors.color7, 'bold'},
|
||||||
b = {fg = colors.color0, bg = colors.color2},
|
b = {fg = colors.color0, bg = colors.color2},
|
||||||
c = { fg = colors.color0, bg = colors.color3 },
|
c = {fg = colors.color0, bg = colors.color3}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return oceanicnext
|
return oceanicnext
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: Zoltan Dalmadi(lightline)
|
-- Credit: Zoltan Dalmadi(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
blue = '#61afef',
|
blue = '#61afef',
|
||||||
green = '#98c379',
|
green = '#98c379',
|
||||||
|
@ -17,29 +16,24 @@ local colors = {
|
||||||
gray2 = '#2c323d',
|
gray2 = '#2c323d',
|
||||||
gray3 = '#3e4452',
|
gray3 = '#3e4452',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.bg, bg = colors.green , gui = 'bold', },
|
a = {fg = colors.bg, bg = colors.green, gui = 'bold'},
|
||||||
b = { fg = colors.fg, bg = colors.gray3 , },
|
b = {fg = colors.fg, bg = colors.gray3},
|
||||||
c = { fg = colors.fg, bg = colors.gray2 , }
|
c = {fg = colors.fg, bg = colors.gray2}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.bg, bg = colors.blue, gui = 'bold'}}
|
||||||
a = { fg = colors.bg, bg = colors.blue , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.bg, bg = colors.purple, gui = 'bold'}}
|
||||||
a = { fg = colors.bg, bg = colors.purple , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.bg, bg = colors.red1, gui = 'bold'}}
|
||||||
a = { fg = colors.bg, bg = colors.red1 , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.gray1, bg = colors.bg , gui = 'bold', },
|
a = {fg = colors.gray1, bg = colors.bg, gui = 'bold'},
|
||||||
b = { fg = colors.gray1, bg = colors.bg , },
|
b = {fg = colors.gray1, bg = colors.bg},
|
||||||
c = { fg = colors.gray1, bg = colors.gray2 , },
|
c = {fg = colors.gray1, bg = colors.gray2}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: Zoltan Dalmadi(lightline)
|
-- Credit: Zoltan Dalmadi(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
blue = '#61afef',
|
blue = '#61afef',
|
||||||
green = '#98c379',
|
green = '#98c379',
|
||||||
|
@ -17,29 +16,24 @@ local colors = {
|
||||||
gray2 = '#f0f0f0',
|
gray2 = '#f0f0f0',
|
||||||
gray3 = '#d0d0d0',
|
gray3 = '#d0d0d0',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.bg, bg = colors.green , gui = 'bold', },
|
a = {fg = colors.bg, bg = colors.green, gui = 'bold'},
|
||||||
b = { fg = colors.fg, bg = colors.gray3 , },
|
b = {fg = colors.fg, bg = colors.gray3},
|
||||||
c = { fg = colors.fg, bg = colors.gray2 , }
|
c = {fg = colors.fg, bg = colors.gray2}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.bg, bg = colors.blue, gui = 'bold'}}
|
||||||
a = { fg = colors.bg, bg = colors.blue , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.bg, bg = colors.purple, gui = 'bold'}}
|
||||||
a = { fg = colors.bg, bg = colors.purple , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.bg, bg = colors.red1, gui = 'bold'}}
|
||||||
a = { fg = colors.bg, bg = colors.red1 , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.bg, bg = colors.gray3 , gui = 'bold', },
|
a = {fg = colors.bg, bg = colors.gray3, gui = 'bold'},
|
||||||
b = { fg = colors.bg, bg = colors.gray3 , },
|
b = {fg = colors.bg, bg = colors.gray3},
|
||||||
c = { fg = colors.gray3, bg = colors.gray2 , },
|
c = {fg = colors.gray3, bg = colors.gray2}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,44 +1,48 @@
|
||||||
|
-- Copyright (c) 2020-2021 IGI-111
|
||||||
|
-- MIT license, see LICENSE for more details.
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
vertsplit = "#181A1F",
|
vertsplit = '#181A1F',
|
||||||
special_grey = "#3B4048",
|
special_grey = '#3B4048',
|
||||||
menu_grey = "#3E4452",
|
menu_grey = '#3E4452',
|
||||||
cursor_grey = "#2C323C",
|
cursor_grey = '#2C323C',
|
||||||
gutter_fg_grey = "#4B5263",
|
gutter_fg_grey = '#4B5263',
|
||||||
blue = "#82b1ff",
|
blue = '#82b1ff',
|
||||||
dark_red = "#BE5046",
|
dark_red = '#BE5046',
|
||||||
white = "#bfc7d5",
|
white = '#bfc7d5',
|
||||||
green = "#C3E88D",
|
green = '#C3E88D',
|
||||||
purple = "#c792ea",
|
purple = '#c792ea',
|
||||||
yellow = "#ffcb6b",
|
yellow = '#ffcb6b',
|
||||||
light_red = "#ff869a",
|
light_red = '#ff869a',
|
||||||
red = "#ff5370",
|
red = '#ff5370',
|
||||||
dark_yellow = "#F78C6C",
|
dark_yellow = '#F78C6C',
|
||||||
cyan = "#89DDFF",
|
cyan = '#89DDFF',
|
||||||
comment_grey = "#697098",
|
comment_grey = '#697098',
|
||||||
black = "#292D3E",
|
black = '#292D3E',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
return {
|
return {
|
||||||
normal = {
|
normal = {
|
||||||
a = { fg = colors.black, bg = colors.purple, "bold" },
|
a = {fg = colors.black, bg = colors.purple, 'bold'},
|
||||||
b = {fg = colors.purple, bg = colors.menu_grey},
|
b = {fg = colors.purple, bg = colors.menu_grey},
|
||||||
c = { fg = colors.comment_grey, bg = colors.black },
|
c = {fg = colors.comment_grey, bg = colors.black}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.black, bg = colors.blue, "bold" },
|
a = {fg = colors.black, bg = colors.blue, 'bold'},
|
||||||
b = { fg = colors.blue, bg = colors.menu_grey },
|
b = {fg = colors.blue, bg = colors.menu_grey}
|
||||||
},
|
},
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.black, bg = colors.cyan, "bold", },
|
a = {fg = colors.black, bg = colors.cyan, 'bold'},
|
||||||
b = { fg = colors.cyan, bg = colors.menu_grey },
|
b = {fg = colors.cyan, bg = colors.menu_grey}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.black, bg = colors.green, "bold" },
|
a = {fg = colors.black, bg = colors.green, 'bold'},
|
||||||
b = { fg = colors.green, bg = colors.menu_grey },
|
b = {fg = colors.green, bg = colors.menu_grey}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
a = { fg = colors.black, bg = colors.menu_grey, "bold" },
|
a = {fg = colors.black, bg = colors.menu_grey, 'bold'},
|
||||||
b = {fg = colors.black, bg = colors.menu_grey},
|
b = {fg = colors.black, bg = colors.menu_grey},
|
||||||
c = { fg = colors.black, bg = colors.menu_grey },
|
c = {fg = colors.black, bg = colors.menu_grey}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: itchyny(lightline)
|
-- Credit: itchyny(lightline)
|
||||||
|
|
||||||
local background = vim.o.background
|
local background = vim.o.background
|
||||||
|
|
||||||
return require("lualine.themes.papercolor_"..background)
|
return require('lualine.themes.papercolor_' .. background)
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: TKNGUE(lightline)
|
-- Credit: TKNGUE(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
red = '#df0000',
|
red = '#df0000',
|
||||||
green = '#008700',
|
green = '#008700',
|
||||||
|
@ -26,29 +25,24 @@ local colors = {
|
||||||
visual_fg = '#000000',
|
visual_fg = '#000000',
|
||||||
visual_bg = '#8787af',
|
visual_bg = '#8787af',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.foreground, bg = colors.background , gui = 'bold', },
|
a = {fg = colors.foreground, bg = colors.background, gui = 'bold'},
|
||||||
b = { fg = colors.statusline_active_fg, bg = colors.status , },
|
b = {fg = colors.statusline_active_fg, bg = colors.status},
|
||||||
c = { fg = colors.statusline_active_fg, bg = colors.statusline_active_bg , }
|
c = {fg = colors.statusline_active_fg, bg = colors.statusline_active_bg}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.background, bg = colors.blue, gui = 'bold'}}
|
||||||
a = { fg = colors.background, bg = colors.blue, gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.visual_fg, bg = colors.visual_bg, gui = 'bold'}}
|
||||||
a = { fg = colors.visual_fg, bg = colors.visual_bg , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.background, bg = colors.pink, gui = 'bold'}}
|
||||||
a = { fg = colors.background, bg = colors.pink , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.foreground, bg = colors.background , gui = 'bold', },
|
a = {fg = colors.foreground, bg = colors.background, gui = 'bold'},
|
||||||
b = { fg = colors.foreground, bg = colors.background , },
|
b = {fg = colors.foreground, bg = colors.background},
|
||||||
c = { fg = colors.foreground, bg = colors.background , },
|
c = {fg = colors.foreground, bg = colors.background}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: TKNGUE(lightline)
|
-- Credit: TKNGUE(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
red = '#df0000',
|
red = '#df0000',
|
||||||
green = '#008700',
|
green = '#008700',
|
||||||
|
@ -24,29 +23,24 @@ local colors = {
|
||||||
statusline_inactive_fg = '#4d4d4c',
|
statusline_inactive_fg = '#4d4d4c',
|
||||||
statusline_inactive_bg = '#dadada',
|
statusline_inactive_bg = '#dadada',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.foreground, bg = colors.background , gui = 'bold', },
|
a = {fg = colors.foreground, bg = colors.background, gui = 'bold'},
|
||||||
b = { fg = colors.statusline_active_fg, bg = colors.status , },
|
b = {fg = colors.statusline_active_fg, bg = colors.status},
|
||||||
c = { fg = colors.statusline_active_fg, bg = colors.statusline_active_bg , }
|
c = {fg = colors.statusline_active_fg, bg = colors.statusline_active_bg}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.blue, bg = colors.background, gui = 'bold'}}
|
||||||
a = { fg = colors.blue, bg = colors.background , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.background, bg = colors.orange, gui = 'bold'}}
|
||||||
a = { fg = colors.background, bg = colors.orange , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.background, bg = colors.pink, gui = 'bold'}}
|
||||||
a = { fg = colors.background, bg = colors.pink , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.foreground, bg = colors.background , gui = 'bold', },
|
a = {fg = colors.foreground, bg = colors.background, gui = 'bold'},
|
||||||
b = { fg = colors.foreground, bg = colors.background , },
|
b = {fg = colors.foreground, bg = colors.background},
|
||||||
c = { fg = colors.foreground, bg = colors.background , },
|
c = {fg = colors.foreground, bg = colors.background}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local powerline = {}
|
local powerline = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local Colors = {
|
local Colors = {
|
||||||
white = '#ffffff',
|
white = '#ffffff',
|
||||||
darkestgreen = '#005f00',
|
darkestgreen = '#005f00',
|
||||||
|
@ -20,32 +19,32 @@ local Colors = {
|
||||||
gray7 = '#9e9e9e',
|
gray7 = '#9e9e9e',
|
||||||
gray10 = '#f0f0f0',
|
gray10 = '#f0f0f0',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
powerline.normal = {
|
powerline.normal = {
|
||||||
a = { fg = Colors.darkestgreen, bg = Colors.brightgreen, gui = 'bold', },
|
a = {fg = Colors.darkestgreen, bg = Colors.brightgreen, gui = 'bold'},
|
||||||
b = { fg = Colors.gray10, bg = Colors.gray5, },
|
b = {fg = Colors.gray10, bg = Colors.gray5},
|
||||||
c = { fg = Colors.gray7, bg = Colors.gray2, },
|
c = {fg = Colors.gray7, bg = Colors.gray2}
|
||||||
}
|
}
|
||||||
|
|
||||||
powerline.insert = {
|
powerline.insert = {
|
||||||
a = { fg = Colors.darkestcyan, bg = Colors.white, gui = 'bold', },
|
a = {fg = Colors.darkestcyan, bg = Colors.white, gui = 'bold'},
|
||||||
b = { fg = Colors.darkestcyan, bg = Colors.mediumcyan, },
|
b = {fg = Colors.darkestcyan, bg = Colors.mediumcyan},
|
||||||
c = { fg = Colors.mediumcyan, bg = Colors.darkestblue, },
|
c = {fg = Colors.mediumcyan, bg = Colors.darkestblue}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
powerline.visual = {
|
powerline.visual = {
|
||||||
a = { fg = Colors.darkred, bg = Colors.brightorange, gui = 'bold', },
|
a = {fg = Colors.darkred, bg = Colors.brightorange, gui = 'bold'}
|
||||||
}
|
}
|
||||||
|
|
||||||
powerline.replace = {
|
powerline.replace = {
|
||||||
a = { fg = Colors.white, bg = Colors.brightred, gui = 'bold', },
|
a = {fg = Colors.white, bg = Colors.brightred, gui = 'bold'}
|
||||||
}
|
}
|
||||||
|
|
||||||
powerline.inactive = {
|
powerline.inactive = {
|
||||||
a = { fg = Colors.gray1, bg = Colors.gray5, gui = 'bold', },
|
a = {fg = Colors.gray1, bg = Colors.gray5, gui = 'bold'},
|
||||||
b = { fg = Colors.gray1, bg = Colors.gray5, },
|
b = {fg = Colors.gray1, bg = Colors.gray5},
|
||||||
c = { bg = Colors.gray1, fg = Colors.gray5, },
|
c = {bg = Colors.gray1, fg = Colors.gray5}
|
||||||
}
|
}
|
||||||
|
|
||||||
return powerline
|
return powerline
|
||||||
|
|
|
@ -2,42 +2,43 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color5 = "#d7afaf",
|
color5 = '#d7afaf',
|
||||||
color6 = "#666656",
|
color6 = '#666656',
|
||||||
color7 = "#808070",
|
color7 = '#808070',
|
||||||
color10 = "#87af87",
|
color10 = '#87af87',
|
||||||
color13 = "#df5f87",
|
color13 = '#df5f87',
|
||||||
color14 = "#87afaf",
|
color14 = '#87afaf',
|
||||||
color0 = "#e8e8d3",
|
color0 = '#e8e8d3',
|
||||||
color1 = "#4e4e43",
|
color1 = '#4e4e43',
|
||||||
color4 = "#30302c",
|
color4 = '#30302c',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local seoul256 = {
|
local seoul256 = {
|
||||||
visual = {
|
visual = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
a = { fg = colors.color4, bg = colors.color5 , "bold", },
|
a = {fg = colors.color4, bg = colors.color5, 'bold'}
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
b = {fg = colors.color6, bg = colors.color4},
|
b = {fg = colors.color6, bg = colors.color4},
|
||||||
c = {fg = colors.color6, bg = colors.color4},
|
c = {fg = colors.color6, bg = colors.color4},
|
||||||
a = { fg = colors.color7, bg = colors.color4 , "bold", },
|
a = {fg = colors.color7, bg = colors.color4, 'bold'}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
a = { fg = colors.color4, bg = colors.color10 , "bold", },
|
a = {fg = colors.color4, bg = colors.color10, 'bold'}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
a = { fg = colors.color4, bg = colors.color13 , "bold", },
|
a = {fg = colors.color4, bg = colors.color13, 'bold'}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
b = {fg = colors.color0, bg = colors.color1},
|
b = {fg = colors.color0, bg = colors.color1},
|
||||||
c = {fg = colors.color7, bg = colors.color4},
|
c = {fg = colors.color7, bg = colors.color4},
|
||||||
a = { fg = colors.color4, bg = colors.color14 , "bold", },
|
a = {fg = colors.color4, bg = colors.color14, 'bold'}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return seoul256
|
return seoul256
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: itchyny(lightline)
|
-- Credit: itchyny(lightline)
|
||||||
-- License: MIT License
|
-- License: MIT License
|
||||||
|
|
||||||
local background = vim.o.background
|
local background = vim.o.background
|
||||||
|
|
||||||
return require("lualine.themes.solarized_"..background)
|
return require('lualine.themes.solarized_' .. background)
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: itchyny(lightline)
|
-- Credit: itchyny(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
base03 = '#002b36',
|
base03 = '#002b36',
|
||||||
base02 = '#073642',
|
base02 = '#073642',
|
||||||
|
@ -22,29 +21,24 @@ local colors = {
|
||||||
cyan = '#2aa198',
|
cyan = '#2aa198',
|
||||||
green = '#859900',
|
green = '#859900',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.base03, bg = colors.blue , gui = 'bold', },
|
a = {fg = colors.base03, bg = colors.blue, gui = 'bold'},
|
||||||
b = { fg = colors.base03, bg = colors.base1 , },
|
b = {fg = colors.base03, bg = colors.base1},
|
||||||
c = { fg = colors.base1, bg = colors.base02 , }
|
c = {fg = colors.base1, bg = colors.base02}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.base03, bg = colors.green, gui = 'bold'}}
|
||||||
a = { fg = colors.base03, bg = colors.green , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.base03, bg = colors.magenta, gui = 'bold'}}
|
||||||
a = { fg = colors.base03, bg = colors.magenta , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.base03, bg = colors.red, gui = 'bold'}}
|
||||||
a = { fg = colors.base03, bg = colors.red , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.base0, bg = colors.base02 , gui = 'bold', },
|
a = {fg = colors.base0, bg = colors.base02, gui = 'bold'},
|
||||||
b = { fg = colors.base03, bg = colors.base00 , },
|
b = {fg = colors.base03, bg = colors.base00},
|
||||||
c = { fg = colors.base01, bg = colors.base02 , },
|
c = {fg = colors.base01, bg = colors.base02}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: itchyny(lightline)
|
-- Credit: itchyny(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
base3 = '#002b36',
|
base3 = '#002b36',
|
||||||
base2 = '#073642',
|
base2 = '#073642',
|
||||||
|
@ -22,29 +21,24 @@ local colors = {
|
||||||
cyan = '#2aa198',
|
cyan = '#2aa198',
|
||||||
green = '#859900',
|
green = '#859900',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.base03, bg = colors.blue , gui = 'bold', },
|
a = {fg = colors.base03, bg = colors.blue, gui = 'bold'},
|
||||||
b = { fg = colors.base03, bg = colors.base1 , },
|
b = {fg = colors.base03, bg = colors.base1},
|
||||||
c = { fg = colors.base1, bg = colors.base02 , }
|
c = {fg = colors.base1, bg = colors.base02}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.base03, bg = colors.green, gui = 'bold'}}
|
||||||
a = { fg = colors.base03, bg = colors.green , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.base03, bg = colors.magenta, gui = 'bold'}}
|
||||||
a = { fg = colors.base03, bg = colors.magenta , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.base03, bg = colors.red, gui = 'bold'}}
|
||||||
a = { fg = colors.base03, bg = colors.red , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.base0, bg = colors.base02 , gui = 'bold', },
|
a = {fg = colors.base0, bg = colors.base02, gui = 'bold'},
|
||||||
b = { fg = colors.base03, bg = colors.base00 , },
|
b = {fg = colors.base03, bg = colors.base00},
|
||||||
c = { fg = colors.base01, bg = colors.base02 , },
|
c = {fg = colors.base01, bg = colors.base02}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -2,44 +2,45 @@
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Genarated by lightline to lualine theme converter
|
-- Genarated by lightline to lualine theme converter
|
||||||
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
color14 = "#718c00",
|
color14 = '#718c00',
|
||||||
color0 = "#666666",
|
color0 = '#666666',
|
||||||
color1 = "#c8c8c8",
|
color1 = '#c8c8c8',
|
||||||
color2 = "#808080",
|
color2 = '#808080',
|
||||||
color3 = "#fafafa",
|
color3 = '#fafafa',
|
||||||
color4 = "#4271ae",
|
color4 = '#4271ae',
|
||||||
color5 = "#4d4d4c",
|
color5 = '#4d4d4c',
|
||||||
color6 = "#b4b4b4",
|
color6 = '#b4b4b4',
|
||||||
color7 = "#555555",
|
color7 = '#555555',
|
||||||
color8 = "#8959a8",
|
color8 = '#8959a8',
|
||||||
color11 = "#f5871f",
|
color11 = '#f5871f',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
local tomorrow = {
|
local tomorrow = {
|
||||||
inactive = {
|
inactive = {
|
||||||
a = { fg = colors.color0, bg = colors.color1, gui = "bold" },
|
a = {fg = colors.color0, bg = colors.color1, gui = 'bold'},
|
||||||
b = {fg = colors.color2, bg = colors.color3},
|
b = {fg = colors.color2, bg = colors.color3},
|
||||||
c = { fg = colors.color0, bg = colors.color1 },
|
c = {fg = colors.color0, bg = colors.color1}
|
||||||
},
|
},
|
||||||
normal = {
|
normal = {
|
||||||
a = { fg = colors.color1, bg = colors.color4, gui = "bold" },
|
a = {fg = colors.color1, bg = colors.color4, gui = 'bold'},
|
||||||
b = {fg = colors.color5, bg = colors.color6},
|
b = {fg = colors.color5, bg = colors.color6},
|
||||||
c = { fg = colors.color7, bg = colors.color1 },
|
c = {fg = colors.color7, bg = colors.color1}
|
||||||
},
|
},
|
||||||
visual = {
|
visual = {
|
||||||
a = { fg = colors.color1, bg = colors.color8, gui = "bold" },
|
a = {fg = colors.color1, bg = colors.color8, gui = 'bold'},
|
||||||
b = { fg = colors.color5, bg = colors.color6 },
|
b = {fg = colors.color5, bg = colors.color6}
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { fg = colors.color1, bg = colors.color11, gui = "bold" },
|
a = {fg = colors.color1, bg = colors.color11, gui = 'bold'},
|
||||||
b = { fg = colors.color5, bg = colors.color6 },
|
b = {fg = colors.color5, bg = colors.color6}
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { fg = colors.color1, bg = colors.color14, gui = "bold" },
|
a = {fg = colors.color1, bg = colors.color14, gui = 'bold'},
|
||||||
b = { fg = colors.color5, bg = colors.color6 },
|
b = {fg = colors.color5, bg = colors.color6}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tomorrow
|
return tomorrow
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
-- Credit: itchyny(lightline)
|
-- Credit: itchyny(lightline)
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- LuaFormatter off
|
||||||
local colors = {
|
local colors = {
|
||||||
base03 = '#242424',
|
base03 = '#242424',
|
||||||
base023 = '#353535',
|
base023 = '#353535',
|
||||||
|
@ -22,29 +21,24 @@ local colors = {
|
||||||
cyan = '#8ac6f2',
|
cyan = '#8ac6f2',
|
||||||
green = '#95e454',
|
green = '#95e454',
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
M.normal = {
|
M.normal = {
|
||||||
a = { fg = colors.base02, bg = colors.blue , gui = 'bold', },
|
a = {fg = colors.base02, bg = colors.blue, gui = 'bold'},
|
||||||
b = { fg = colors.base02, bg = colors.base0 , },
|
b = {fg = colors.base02, bg = colors.base0},
|
||||||
c = { fg = colors.base2, bg = colors.base02 , }
|
c = {fg = colors.base2, bg = colors.base02}
|
||||||
}
|
}
|
||||||
|
|
||||||
M.insert = {
|
M.insert = {a = {fg = colors.base02, bg = colors.green, gui = 'bold'}}
|
||||||
a = { fg = colors.base02, bg = colors.green , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.visual = {
|
M.visual = {a = {fg = colors.base02, bg = colors.magenta, gui = 'bold'}}
|
||||||
a = { fg = colors.base02, bg = colors.magenta , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.replace = {
|
M.replace = {a = {fg = colors.base023, bg = colors.red, gui = 'bold'}}
|
||||||
a = { fg = colors.base023, bg = colors.red , gui = 'bold', },
|
|
||||||
}
|
|
||||||
|
|
||||||
M.inactive = {
|
M.inactive = {
|
||||||
a = { fg = colors.base1, bg = colors.base02 , gui = 'bold', },
|
a = {fg = colors.base1, bg = colors.base02, gui = 'bold'},
|
||||||
b = { fg = colors.base023, bg = colors.base01 , },
|
b = {fg = colors.base023, bg = colors.base01},
|
||||||
c = { fg = colors.base1, bg = colors.base023 , },
|
c = {fg = colors.base1, bg = colors.base023}
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local highlight = require 'lualine.highlight'
|
local highlight = require 'lualine.highlight'
|
||||||
|
@ -39,7 +38,8 @@ end
|
||||||
-- Applies custom highlights for component
|
-- Applies custom highlights for component
|
||||||
local function apply_highlights(status, options, default_hl)
|
local function apply_highlights(status, options, default_hl)
|
||||||
if options.color_highlight then
|
if options.color_highlight then
|
||||||
status = highlight.component_format_highlight(options.color_highlight) .. status
|
status = highlight.component_format_highlight(options.color_highlight) ..
|
||||||
|
status
|
||||||
end
|
end
|
||||||
return status .. default_hl
|
return status .. default_hl
|
||||||
end
|
end
|
||||||
|
@ -59,8 +59,11 @@ local function apply_spearator(status, options)
|
||||||
if options.separator and #options.separator > 0 then
|
if options.separator and #options.separator > 0 then
|
||||||
separator = options.separator
|
separator = options.separator
|
||||||
elseif options.component_separators then
|
elseif options.component_separators then
|
||||||
if options.self.section < 'lualine_x' then separator = options.component_separators[1]
|
if options.self.section < 'lualine_x' then
|
||||||
else separator = options.component_separators[2] end
|
separator = options.component_separators[1]
|
||||||
|
else
|
||||||
|
separator = options.component_separators[2]
|
||||||
|
end
|
||||||
options.separator = separator
|
options.separator = separator
|
||||||
end
|
end
|
||||||
if separator then status = status .. separator end
|
if separator then status = status .. separator end
|
||||||
|
@ -83,7 +86,8 @@ function M.draw_section(section, highlight_name)
|
||||||
for _, component in pairs(section) do
|
for _, component in pairs(section) do
|
||||||
local localstatus = component[1]()
|
local localstatus = component[1]()
|
||||||
if #localstatus > 0 then
|
if #localstatus > 0 then
|
||||||
local custom_highlight_at_begining = localstatus:find('%%#.*#') == 1 or component.color ~= nil
|
local custom_highlight_at_begining =
|
||||||
|
localstatus:find('%%#.*#') == 1 or component.color ~= nil
|
||||||
-- Apply modifier functions for options
|
-- Apply modifier functions for options
|
||||||
if component.format then localstatus = component.format(localstatus) end
|
if component.format then localstatus = component.format(localstatus) end
|
||||||
localstatus = apply_icon(localstatus, component)
|
localstatus = apply_icon(localstatus, component)
|
||||||
|
@ -91,8 +95,8 @@ function M.draw_section(section, highlight_name)
|
||||||
localstatus = apply_padding(localstatus, component)
|
localstatus = apply_padding(localstatus, component)
|
||||||
localstatus = apply_highlights(localstatus, component, highlight_name)
|
localstatus = apply_highlights(localstatus, component, highlight_name)
|
||||||
localstatus = apply_spearator(localstatus, component)
|
localstatus = apply_spearator(localstatus, component)
|
||||||
if custom_highlight_at_begining or
|
if custom_highlight_at_begining or (#drawn_components > 0 and
|
||||||
(#drawn_components > 0 and not drawn_components[#drawn_components].separator_applied)then
|
not drawn_components[#drawn_components].separator_applied) then
|
||||||
-- Don't prepend with old highlight when the component changes it imidiately
|
-- Don't prepend with old highlight when the component changes it imidiately
|
||||||
-- Or when it was already applied with separator
|
-- Or when it was already applied with separator
|
||||||
table.insert(status, localstatus)
|
table.insert(status, localstatus)
|
||||||
|
@ -106,8 +110,8 @@ function M.draw_section(section, highlight_name)
|
||||||
if #status == 0 then return '' end
|
if #status == 0 then return '' end
|
||||||
-- Remove separators sorounding custom highlighted component
|
-- Remove separators sorounding custom highlighted component
|
||||||
for i = 1, #status do
|
for i = 1, #status do
|
||||||
if (drawn_components[i].color and drawn_components[i].color.bg)
|
if (drawn_components[i].color and drawn_components[i].color.bg) or
|
||||||
or drawn_components[i].custom_highlight then
|
drawn_components[i].custom_highlight then
|
||||||
status[i] = strip_separator(status[i], drawn_components[i])
|
status[i] = strip_separator(status[i], drawn_components[i])
|
||||||
if i > 1 then
|
if i > 1 then
|
||||||
status[i - 1] = strip_separator(status[i - 1], drawn_components[i - 1])
|
status[i - 1] = strip_separator(status[i - 1], drawn_components[i - 1])
|
||||||
|
@ -118,5 +122,4 @@ function M.draw_section(section, highlight_name)
|
||||||
return table.concat(status)
|
return table.concat(status)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
-- LuaFormatter off
|
||||||
-- color conversion
|
-- color conversion
|
||||||
local color_table = {
|
local color_table = {
|
||||||
-- lookup table for cterm colors
|
-- lookup table for cterm colors
|
||||||
|
@ -273,6 +272,7 @@ local color_table = {
|
||||||
{'254', { 228, 228, 228 }},
|
{'254', { 228, 228, 228 }},
|
||||||
{'255', { 238, 238, 238 }},
|
{'255', { 238, 238, 238 }},
|
||||||
}
|
}
|
||||||
|
-- LuaFormatter on
|
||||||
|
|
||||||
function M.get_cterm_color(hex_color)
|
function M.get_cterm_color(hex_color)
|
||||||
local function get_color_distance(color1, color2)
|
local function get_color_distance(color1, color2)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
-- Works as a decorator to expand set_lualine_theme functions
|
-- Works as a decorator to expand set_lualine_theme functions
|
||||||
|
@ -21,7 +20,7 @@ function M.extract_highlight_colors(color_group, scope)
|
||||||
local cterm_colors = vim.api.nvim_get_hl_by_name(color_group, false)
|
local cterm_colors = vim.api.nvim_get_hl_by_name(color_group, false)
|
||||||
local color = {
|
local color = {
|
||||||
ctermfg = cterm_colors.foreground,
|
ctermfg = cterm_colors.foreground,
|
||||||
ctermbg = cterm_colors.background,
|
ctermbg = cterm_colors.background
|
||||||
}
|
}
|
||||||
if gui_colors.background then
|
if gui_colors.background then
|
||||||
color.guibg = string.format('#%06x', gui_colors.background)
|
color.guibg = string.format('#%06x', gui_colors.background)
|
||||||
|
|
Loading…
Reference in New Issue