chore: use stylua for formating

* Switch to stylua for formating

* Change lua-format ignore to stylua ignore.

* Add workflow for formating with stylua
This commit is contained in:
Shadman 2021-09-04 00:20:34 +06:00 committed by GitHub
parent b2fcf50742
commit 4042e837f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 116 additions and 76 deletions

39
.github/workflows/formating.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: formatting
on:
push:
paths:
- "lua/**.lua"
- "examples/**.lua"
branches: ["master"]
jobs:
stylua:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STYLUA_VERSION: 0.10.1
steps:
- uses: actions/checkout@v2
- name: Setup git
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
printf 'STYLE_BRANCH=bot/style/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
- name: Apply stylua
run: |
git checkout -b ${STYLE_BRANCH}
curl -Lo /tmp/stylua.zip https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-${STYLUA_VERSION}-linux.zip
unzip -d /tmp/ /tmp/stylua.zip
chmod +x /tmp/stylua
/tmp/stylua --config-path=.stylua.toml lua/ examples/
- name: Create PR
run: |
if ! [[ -z $(git status -s) ]]; then
git add -u
git commit -m "chore: formated with stylua"
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${STYLE_BRANCH}
gh pr create --fill --base ${GITHUB_REF#refs/heads/} --head ${STYLE_BRANCH} || true
fi

View File

@ -1,3 +0,0 @@
indent_width: 2
continuation_indent_with: 2
double_quote_to_single_quote: true

4
.stylua.toml Normal file
View File

@ -0,0 +1,4 @@
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferSingle"
no_call_parentheses = true

View File

@ -6,7 +6,7 @@ lint:
@luacheck examples/ @luacheck examples/
format: format:
@for file in `find . -name '*.lua'`;do lua-format $$file -i; done; @stylua --config-path=.stylua.toml lua/ examples/
test: test:
@nvim --headless -u lua/tests/minimal_init.lua -c "PlenaryBustedDirectory lua/tests/ { minimal_init = './lua/tests/minimal_init.lua' }" @nvim --headless -u lua/tests/minimal_init.lua -c "PlenaryBustedDirectory lua/tests/ { minimal_init = './lua/tests/minimal_init.lua' }"

View File

@ -2,7 +2,7 @@
-- Author: lokesh-krishna -- Author: lokesh-krishna
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
blue = '#80a0ff', blue = '#80a0ff',
cyan = '#79dac8', cyan = '#79dac8',
@ -12,7 +12,6 @@ local colors = {
violet = '#d183e8', violet = '#d183e8',
grey = '#303030', grey = '#303030',
} }
-- LuaFormatter on
local bubbles_theme = { local bubbles_theme = {
normal = { normal = {

View File

@ -2,6 +2,7 @@
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
local FileFormat = require('lualine.component'):new() local FileFormat = require('lualine.component'):new()
-- stylua: ignore
FileFormat.icon = { FileFormat.icon = {
unix = '', -- e712 unix = '', -- e712
dos = '', -- e70f dos = '', -- e70f

View File

@ -1,7 +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.
-- Credit itchyny, jackno (lightline) -- Credit itchyny, jackno (lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
black = '#000000', black = '#000000',
maroon = '#800000', maroon = '#800000',
@ -20,7 +20,7 @@ local colors = {
aqua = '#00ffff', aqua = '#00ffff',
white = '#ffffff', white = '#ffffff',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.white, bg = colors.blue, gui = 'bold'}, a = {fg = colors.white, bg = colors.blue, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color0 = '#ffffff', color0 = '#ffffff',
color1 = '#99c794', color1 = '#99c794',
@ -13,7 +13,7 @@ local colors = {
color6 = '#f99157', color6 = '#f99157',
color7 = '#ec5f67', color7 = '#ec5f67',
} }
-- LuaFormatter on
return { return {
insert = { insert = {
a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, a = {fg = colors.color0, bg = colors.color1, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color14 = '#718c00', color14 = '#718c00',
color0 = '#666666', color0 = '#666666',
@ -16,7 +16,7 @@ local colors = {
color8 = '#8959a8', color8 = '#8959a8',
color11 = '#f5871f', color11 = '#f5871f',
} }
-- LuaFormatter on
return { return {
inactive = { inactive = {
a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, a = {fg = colors.color0, bg = colors.color1, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color2 = '#0f1419', color2 = '#0f1419',
color3 = '#ffee99', color3 = '#ffee99',
@ -13,7 +13,7 @@ local colors = {
color8 = '#f07178', color8 = '#f07178',
color9 = '#3e4b59', color9 = '#3e4b59',
} }
-- LuaFormatter on
return { return {
visual = { visual = {
a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, a = {fg = colors.color2, bg = colors.color3, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color2 = '#f3f3f3', color2 = '#f3f3f3',
color3 = '#A37ACC', color3 = '#A37ACC',
@ -13,7 +13,7 @@ local colors = {
color8 = '#f07178', color8 = '#f07178',
color9 = '#828C99', color9 = '#828C99',
} }
-- LuaFormatter on
return { return {
visual = { visual = {
a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, a = {fg = colors.color2, bg = colors.color3, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color2 = '#242b38', color2 = '#242b38',
color3 = '#d4bfff', color3 = '#d4bfff',
@ -13,7 +13,7 @@ local colors = {
color8 = '#f07178', color8 = '#f07178',
color9 = '#607080', color9 = '#607080',
} }
-- LuaFormatter on
return { return {
visual = { visual = {
a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, a = {fg = colors.color2, bg = colors.color3, gui = 'bold'},

View File

@ -1,6 +1,6 @@
-- Copyright (c) 2020-2021 Shatur95 -- Copyright (c) 2020-2021 Shatur95
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
gray = '#3C3C3C', gray = '#3C3C3C',
lightred = '#D16969', lightred = '#D16969',
@ -10,7 +10,7 @@ local colors = {
white = '#D4D4D4', white = '#D4D4D4',
green = '#608B4E', green = '#608B4E',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
b = {fg = colors.green, bg = colors.black}, b = {fg = colors.green, bg = colors.black},

View File

@ -1,7 +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.
-- Credit itchyny, jackno (lightline) -- Credit itchyny, jackno (lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
gray = '#44475a', gray = '#44475a',
lightgray = '#5f6a8e', lightgray = '#5f6a8e',
@ -13,7 +13,7 @@ local colors = {
white = '#f8f8f2', white = '#f8f8f2',
black = '#282a36', black = '#282a36',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {bg = colors.purple, fg = colors.black, gui = 'bold'}, a = {bg = colors.purple, fg = colors.black, gui = 'bold'},

View File

@ -1,6 +1,6 @@
-- Copyright (c) 2020-2021 gnuyent -- Copyright (c) 2020-2021 gnuyent
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
bg0 = '#323d43', bg0 = '#323d43',
bg1 = '#3c474d', bg1 = '#3c474d',
@ -13,7 +13,7 @@ local colors = {
red = '#e68183', red = '#e68183',
grey1 = '#868d80', grey1 = '#868d80',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {bg = colors.green, fg = colors.bg0, gui = 'bold'}, a = {bg = colors.green, fg = colors.bg0, gui = 'bold'},

View File

@ -1,6 +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.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
fg1 = '#282828', fg1 = '#282828',
color2 = '#504945', color2 = '#504945',
@ -13,7 +13,7 @@ local colors = {
color8 = '#d3869b', color8 = '#d3869b',
color9 = '#ea6962', color9 = '#ea6962',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.fg1, bg = colors.color4, gui = 'bold'}, a = {fg = colors.fg1, bg = colors.color4, gui = 'bold'},

View File

@ -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 -- stylua: ignore
local colors = { local colors = {
black = '#282828', black = '#282828',
white = '#ebdbb2', white = '#ebdbb2',
@ -13,7 +13,7 @@ local colors = {
lightgray = '#504945', lightgray = '#504945',
inactivegray = '#7c6f64', inactivegray = '#7c6f64',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {bg = colors.gray, fg = colors.black, gui = 'bold'}, a = {bg = colors.gray, fg = colors.black, gui = 'bold'},

View File

@ -1,3 +1,4 @@
-- stylua: ignore
local colors = { local colors = {
black = '#3c3836', black = '#3c3836',
white = '#f9f5d7', white = '#f9f5d7',
@ -9,6 +10,7 @@ local colors = {
lightgray = '#ebdbb2', lightgray = '#ebdbb2',
inactivegray = '#a89984' inactivegray = '#a89984'
} }
return { return {
normal = { normal = {
a = {bg = colors.darkgray, fg = colors.white, gui = 'bold'}, a = {bg = colors.darkgray, fg = colors.white, gui = 'bold'},

View File

@ -1,6 +1,6 @@
-- Copyright (c) 2021 Jnhtr -- Copyright (c) 2021 Jnhtr
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
black = '#1c1e26', black = '#1c1e26',
white = '#6C6F93', white = '#6C6F93',
@ -13,7 +13,7 @@ local colors = {
lightgray = '#2E303E', lightgray = '#2E303E',
inactivegray = '#1C1E26', inactivegray = '#1C1E26',
} }
--LuaFormatter on
return { return {
normal = { normal = {
a = {bg = colors.gray, fg = colors.black, gui = 'bold'}, a = {bg = colors.gray, fg = colors.black, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color2 = '#161821', color2 = '#161821',
color3 = '#b4be82', color3 = '#b4be82',
@ -15,7 +15,7 @@ local colors = {
color12 = '#818596', color12 = '#818596',
color15 = '#84a0c6', color15 = '#84a0c6',
} }
-- LuaFormatter on
return { return {
visual = { visual = {
a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, a = {fg = colors.color2, bg = colors.color3, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color5 = '#668e3d', color5 = '#668e3d',
color8 = '#757ca3', color8 = '#757ca3',
@ -13,7 +13,7 @@ local colors = {
color1 = '#9fa6c0', color1 = '#9fa6c0',
color2 = '#c57339', color2 = '#c57339',
} }
-- LuaFormatter on
return { return {
replace = { replace = {
b = {fg = colors.color0, bg = colors.color1}, b = {fg = colors.color0, bg = colors.color1},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color2 = '#30302c', color2 = '#30302c',
color3 = '#f0a0c0', color3 = '#f0a0c0',
@ -14,7 +14,7 @@ local colors = {
color11 = '#8197bf', color11 = '#8197bf',
color14 = '#99ad6a', color14 = '#99ad6a',
} }
-- LuaFormatter on
return { return {
visual = { visual = {
a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, a = {fg = colors.color2, bg = colors.color3, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: Lokesh Krishna(lightline) -- Credit: Lokesh Krishna(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
fg = '#eeffff', fg = '#eeffff',
bg = '#263238', bg = '#263238',
@ -15,7 +15,7 @@ local colors = {
gray2 = '#2E3C43', gray2 = '#2E3C43',
gray3 = '#515559', gray3 = '#515559',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.bg, bg = colors.blue, gui = 'bold'}, a = {fg = colors.bg, bg = colors.blue, gui = 'bold'},

View File

@ -1,6 +1,6 @@
-- Copyright (c) 2020-2021 ronniedroid -- Copyright (c) 2020-2021 ronniedroid
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
black = '#000000', black = '#000000',
white = '#eeeeee', white = '#eeeeee',
@ -13,7 +13,7 @@ local colors = {
darkgray = '#202020', darkgray = '#202020',
lightgray = '#434343' lightgray = '#434343'
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {bg = colors.blue, fg = colors.lightgray, gui = 'bold'}, a = {bg = colors.blue, fg = colors.lightgray, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: challsted(lightline) -- Credit: challsted(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
black = '#232526', black = '#232526',
gray = '#808080', gray = '#808080',
@ -13,7 +13,7 @@ local colors = {
red = '#ff0000', red = '#ff0000',
yellow = '#e6db74', yellow = '#e6db74',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.black, bg = colors.cyan, gui = 'bold'}, a = {fg = colors.black, bg = colors.cyan, gui = 'bold'},

View File

@ -3,7 +3,7 @@
-- URL: github.com/bluz71/vim-moonfly-colors -- URL: github.com/bluz71/vim-moonfly-colors
-- License: MIT (https://opensource.org/licenses/MIT) -- License: MIT (https://opensource.org/licenses/MIT)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
color3 = '#303030', color3 = '#303030',
color6 = '#9e9e9e', color6 = '#9e9e9e',
@ -14,7 +14,6 @@ local colors = {
color2 = '#c6c6c6', color2 = '#c6c6c6',
} }
-- LuaFormatter on
return { return {
replace = { replace = {
a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, a = {fg = colors.color0, bg = colors.color1, gui = 'bold'},

View File

@ -1,6 +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.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
color3 = '#2c3043', color3 = '#2c3043',
color6 = '#a1aab8', color6 = '#a1aab8',
@ -10,7 +10,7 @@ local colors = {
color1 = '#ff5874', color1 = '#ff5874',
color2 = '#c3ccdc', color2 = '#c3ccdc',
} }
-- LuaFormatter on
return { return {
replace = { replace = {
a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, a = {fg = colors.color0, bg = colors.color1, gui = 'bold'},

View File

@ -1,6 +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.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
nord1 = '#3B4252', nord1 = '#3B4252',
nord3 = '#4C566A', nord3 = '#4C566A',
@ -10,7 +10,7 @@ local colors = {
nord8 = '#88C0D0', nord8 = '#88C0D0',
nord13 = '#EBCB8B', nord13 = '#EBCB8B',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.nord1, bg = colors.nord8, gui = 'bold'}, a = {fg = colors.nord1, bg = colors.nord8, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: Zoltan Dalmadi(lightline) -- Credit: Zoltan Dalmadi(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
blue = '#61afef', blue = '#61afef',
green = '#98c379', green = '#98c379',
@ -15,7 +15,7 @@ local colors = {
gray2 = '#2c323d', gray2 = '#2c323d',
gray3 = '#3e4452', gray3 = '#3e4452',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.bg, bg = colors.green, gui = 'bold'}, a = {fg = colors.bg, bg = colors.green, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: Zoltan Dalmadi(lightline) -- Credit: Zoltan Dalmadi(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
blue = '#61afef', blue = '#61afef',
green = '#98c379', green = '#98c379',
@ -15,7 +15,7 @@ local colors = {
gray2 = '#f0f0f0', gray2 = '#f0f0f0',
gray3 = '#d0d0d0', gray3 = '#d0d0d0',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.bg, bg = colors.green, gui = 'bold'}, a = {fg = colors.bg, bg = colors.green, gui = 'bold'},

View File

@ -1,6 +1,6 @@
-- Copyright (c) 2020-2021 IGI-111 -- Copyright (c) 2020-2021 IGI-111
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
vertsplit = '#181A1F', vertsplit = '#181A1F',
special_grey = '#3B4048', special_grey = '#3B4048',
@ -20,7 +20,7 @@ local colors = {
comment_grey = '#697098', comment_grey = '#697098',
black = '#292D3E', black = '#292D3E',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.black, bg = colors.purple, gui = 'bold'}, a = {fg = colors.black, bg = colors.purple, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: TKNGUE(lightline) -- Credit: TKNGUE(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
red = '#df0000', red = '#df0000',
green = '#008700', green = '#008700',
@ -24,7 +24,7 @@ local colors = {
visual_fg = '#000000', visual_fg = '#000000',
visual_bg = '#8787af', visual_bg = '#8787af',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.foreground, bg = colors.background, gui = 'bold'}, a = {fg = colors.foreground, bg = colors.background, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: TKNGUE(lightline) -- Credit: TKNGUE(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
red = '#df0000', red = '#df0000',
green = '#008700', green = '#008700',
@ -22,7 +22,6 @@ local colors = {
statusline_inactive_fg = '#4d4d4c', statusline_inactive_fg = '#4d4d4c',
statusline_inactive_bg = '#dadada', statusline_inactive_bg = '#dadada',
} }
-- LuaFormatter on
return { return {
normal = { normal = {

View File

@ -1,6 +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.
-- LuaFormatter off -- stylua: ignore
local Colors = { local Colors = {
white = '#ffffff', white = '#ffffff',
darkestgreen = '#005f00', darkestgreen = '#005f00',
@ -18,7 +18,7 @@ local Colors = {
gray7 = '#9e9e9e', gray7 = '#9e9e9e',
gray10 = '#f0f0f0', gray10 = '#f0f0f0',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = Colors.darkestgreen, bg = Colors.brightgreen, gui = 'bold'}, a = {fg = Colors.darkestgreen, bg = Colors.brightgreen, gui = 'bold'},

View File

@ -1,6 +1,6 @@
-- Copyright (c) 2021 Ashish Panigrahi -- Copyright (c) 2021 Ashish Panigrahi
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
black = '#202020', black = '#202020',
neon = '#DFFF00', neon = '#DFFF00',
@ -21,7 +21,7 @@ local colors = {
brightred = '#AF0000', brightred = '#AF0000',
cyan = '#00DFFF', cyan = '#00DFFF',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {bg = colors.neon, fg = colors.black, gui = 'bold'}, a = {bg = colors.neon, fg = colors.black, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- 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 -- stylua: ignore
local colors = { local colors = {
color5 = '#d7afaf', color5 = '#d7afaf',
color6 = '#666656', color6 = '#666656',
@ -14,7 +14,7 @@ local colors = {
color1 = '#4e4e43', color1 = '#4e4e43',
color4 = '#30302c', color4 = '#30302c',
} }
-- LuaFormatter on
return { return {
visual = { visual = {
b = {fg = colors.color0, bg = colors.color1}, b = {fg = colors.color0, bg = colors.color1},

View File

@ -1,7 +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.
-- Credit: itchyny(lightline) -- Credit: itchyny(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
base03 = '#002b36', base03 = '#002b36',
base02 = '#073642', base02 = '#073642',
@ -20,7 +20,7 @@ local colors = {
cyan = '#2aa198', cyan = '#2aa198',
green = '#859900', green = '#859900',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.base03, bg = colors.blue, gui = 'bold'}, a = {fg = colors.base03, bg = colors.blue, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: itchyny(lightline) -- Credit: itchyny(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
base3 = '#002b36', base3 = '#002b36',
base2 = '#073642', base2 = '#073642',
@ -20,7 +20,7 @@ local colors = {
cyan = '#2aa198', cyan = '#2aa198',
green = '#859900', green = '#859900',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.base03, bg = colors.blue, gui = 'bold'}, a = {fg = colors.base03, bg = colors.blue, gui = 'bold'},

View File

@ -1,7 +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.
-- Credit: itchyny(lightline) -- Credit: itchyny(lightline)
-- LuaFormatter off -- stylua: ignore
local colors = { local colors = {
base03 = '#242424', base03 = '#242424',
base023 = '#353535', base023 = '#353535',
@ -20,7 +20,7 @@ local colors = {
cyan = '#8ac6f2', cyan = '#8ac6f2',
green = '#95e454', green = '#95e454',
} }
-- LuaFormatter on
return { return {
normal = { normal = {
a = {fg = colors.base02, bg = colors.blue, gui = 'bold'}, a = {fg = colors.base02, bg = colors.blue, gui = 'bold'},

View File

@ -2,7 +2,7 @@
-- MIT license, see LICENSE for more details. -- MIT license, see LICENSE for more details.
local M = {} local M = {}
-- LuaFormatter off -- stylua: ignore start
-- color conversion -- color conversion
local color_table = { local color_table = {
-- lookup table for cterm colors -- lookup table for cterm colors
@ -272,7 +272,7 @@ local color_table = {
{'254', { 228, 228, 228 }}, {'254', { 228, 228, 228 }},
{'255', { 238, 238, 238 }}, {'255', { 238, 238, 238 }},
} }
-- LuaFormatter on -- stylua: ignore end
function M.rgb2cterm(hex_color) function M.rgb2cterm(hex_color)
local function get_color_distance(color1, color2) local function get_color_distance(color1, color2)

View File

@ -1,7 +1,7 @@
-- 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 Mode = {} local Mode = {}
-- LuaFormatter off -- stylua: ignore
Mode.map = { Mode.map = {
['n'] = 'NORMAL', ['n'] = 'NORMAL',
['no'] = 'O-PENDING', ['no'] = 'O-PENDING',
@ -33,7 +33,7 @@ Mode.map = {
['!'] = 'SHELL', ['!'] = 'SHELL',
['t'] = 'TERMINAL', ['t'] = 'TERMINAL',
} }
-- LuaFormatter on
function Mode.get_mode() function Mode.get_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