diff --git a/.github/workflows/formating.yml b/.github/workflows/formating.yml new file mode 100644 index 0000000..b9f878b --- /dev/null +++ b/.github/workflows/formating.yml @@ -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 diff --git a/.lua-format b/.lua-format deleted file mode 100644 index 71f1827..0000000 --- a/.lua-format +++ /dev/null @@ -1,3 +0,0 @@ -indent_width: 2 -continuation_indent_with: 2 -double_quote_to_single_quote: true diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..2cf0ca6 --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,4 @@ +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +no_call_parentheses = true diff --git a/Makefile b/Makefile index 9521e6a..1b9cbaa 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ lint: @luacheck examples/ format: - @for file in `find . -name '*.lua'`;do lua-format $$file -i; done; + @stylua --config-path=.stylua.toml lua/ examples/ test: @nvim --headless -u lua/tests/minimal_init.lua -c "PlenaryBustedDirectory lua/tests/ { minimal_init = './lua/tests/minimal_init.lua' }" diff --git a/examples/bubbles.lua b/examples/bubbles.lua index 84a86b3..4b32f15 100644 --- a/examples/bubbles.lua +++ b/examples/bubbles.lua @@ -2,7 +2,7 @@ -- Author: lokesh-krishna -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { blue = '#80a0ff', cyan = '#79dac8', @@ -12,7 +12,6 @@ local colors = { violet = '#d183e8', grey = '#303030', } --- LuaFormatter on local bubbles_theme = { normal = { diff --git a/lua/lualine/components/fileformat.lua b/lua/lualine/components/fileformat.lua index 6a11c11..a36d7ef 100644 --- a/lua/lualine/components/fileformat.lua +++ b/lua/lualine/components/fileformat.lua @@ -2,10 +2,11 @@ -- MIT license, see LICENSE for more details. local FileFormat = require('lualine.component'):new() +-- stylua: ignore FileFormat.icon = { unix = '', -- e712 - dos = '', -- e70f - mac = '' -- e711 + dos = '', -- e70f + mac = '' -- e711 } FileFormat.update_status = function(self) diff --git a/lua/lualine/themes/16color.lua b/lua/lualine/themes/16color.lua index f77577e..8b0da23 100644 --- a/lua/lualine/themes/16color.lua +++ b/lua/lualine/themes/16color.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit itchyny, jackno (lightline) --- LuaFormatter off +-- stylua: ignore local colors = { black = '#000000', maroon = '#800000', @@ -20,7 +20,7 @@ local colors = { aqua = '#00ffff', white = '#ffffff', } --- LuaFormatter on + return { normal = { a = {fg = colors.white, bg = colors.blue, gui = 'bold'}, diff --git a/lua/lualine/themes/OceanicNext.lua b/lua/lualine/themes/OceanicNext.lua index 19adaca..4bcf6a0 100644 --- a/lua/lualine/themes/OceanicNext.lua +++ b/lua/lualine/themes/OceanicNext.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color0 = '#ffffff', color1 = '#99c794', @@ -13,7 +13,7 @@ local colors = { color6 = '#f99157', color7 = '#ec5f67', } --- LuaFormatter on + return { insert = { a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, diff --git a/lua/lualine/themes/Tomorrow.lua b/lua/lualine/themes/Tomorrow.lua index 826b5a0..bfa29a0 100644 --- a/lua/lualine/themes/Tomorrow.lua +++ b/lua/lualine/themes/Tomorrow.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color14 = '#718c00', color0 = '#666666', @@ -16,7 +16,7 @@ local colors = { color8 = '#8959a8', color11 = '#f5871f', } --- LuaFormatter on + return { inactive = { a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, diff --git a/lua/lualine/themes/ayu_dark.lua b/lua/lualine/themes/ayu_dark.lua index 7f0bc39..a90bf87 100644 --- a/lua/lualine/themes/ayu_dark.lua +++ b/lua/lualine/themes/ayu_dark.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color2 = '#0f1419', color3 = '#ffee99', @@ -13,7 +13,7 @@ local colors = { color8 = '#f07178', color9 = '#3e4b59', } --- LuaFormatter on + return { visual = { a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, diff --git a/lua/lualine/themes/ayu_light.lua b/lua/lualine/themes/ayu_light.lua index 2ce14bc..b1718f2 100644 --- a/lua/lualine/themes/ayu_light.lua +++ b/lua/lualine/themes/ayu_light.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color2 = '#f3f3f3', color3 = '#A37ACC', @@ -13,7 +13,7 @@ local colors = { color8 = '#f07178', color9 = '#828C99', } --- LuaFormatter on + return { visual = { a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, diff --git a/lua/lualine/themes/ayu_mirage.lua b/lua/lualine/themes/ayu_mirage.lua index 39320d8..7264403 100644 --- a/lua/lualine/themes/ayu_mirage.lua +++ b/lua/lualine/themes/ayu_mirage.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color2 = '#242b38', color3 = '#d4bfff', @@ -13,7 +13,7 @@ local colors = { color8 = '#f07178', color9 = '#607080', } --- LuaFormatter on + return { visual = { a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, diff --git a/lua/lualine/themes/codedark.lua b/lua/lualine/themes/codedark.lua index 1d3c9a7..775eb33 100644 --- a/lua/lualine/themes/codedark.lua +++ b/lua/lualine/themes/codedark.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 Shatur95 -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { gray = '#3C3C3C', lightred = '#D16969', @@ -10,7 +10,7 @@ local colors = { white = '#D4D4D4', green = '#608B4E', } --- LuaFormatter on + return { normal = { b = {fg = colors.green, bg = colors.black}, diff --git a/lua/lualine/themes/dracula.lua b/lua/lualine/themes/dracula.lua index bcbba03..e32b45c 100644 --- a/lua/lualine/themes/dracula.lua +++ b/lua/lualine/themes/dracula.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit itchyny, jackno (lightline) --- LuaFormatter off +-- stylua: ignore local colors = { gray = '#44475a', lightgray = '#5f6a8e', @@ -13,7 +13,7 @@ local colors = { white = '#f8f8f2', black = '#282a36', } --- LuaFormatter on + return { normal = { a = {bg = colors.purple, fg = colors.black, gui = 'bold'}, diff --git a/lua/lualine/themes/everforest.lua b/lua/lualine/themes/everforest.lua index 2656b58..4397936 100644 --- a/lua/lualine/themes/everforest.lua +++ b/lua/lualine/themes/everforest.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 gnuyent -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { bg0 = '#323d43', bg1 = '#3c474d', @@ -13,7 +13,7 @@ local colors = { red = '#e68183', grey1 = '#868d80', } --- LuaFormatter on + return { normal = { a = {bg = colors.green, fg = colors.bg0, gui = 'bold'}, diff --git a/lua/lualine/themes/gruvbox-material.lua b/lua/lualine/themes/gruvbox-material.lua index 2fff333..fad89fc 100644 --- a/lua/lualine/themes/gruvbox-material.lua +++ b/lua/lualine/themes/gruvbox-material.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { fg1 = '#282828', color2 = '#504945', @@ -13,7 +13,7 @@ local colors = { color8 = '#d3869b', color9 = '#ea6962', } --- LuaFormatter on + return { normal = { a = {fg = colors.fg1, bg = colors.color4, gui = 'bold'}, diff --git a/lua/lualine/themes/gruvbox_dark.lua b/lua/lualine/themes/gruvbox_dark.lua index 05dd333..3646cad 100644 --- a/lua/lualine/themes/gruvbox_dark.lua +++ b/lua/lualine/themes/gruvbox_dark.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 hoob3rt -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { black = '#282828', white = '#ebdbb2', @@ -13,7 +13,7 @@ local colors = { lightgray = '#504945', inactivegray = '#7c6f64', } --- LuaFormatter on + return { normal = { a = {bg = colors.gray, fg = colors.black, gui = 'bold'}, diff --git a/lua/lualine/themes/gruvbox_light.lua b/lua/lualine/themes/gruvbox_light.lua index de28ac8..2b62052 100644 --- a/lua/lualine/themes/gruvbox_light.lua +++ b/lua/lualine/themes/gruvbox_light.lua @@ -1,3 +1,4 @@ +-- stylua: ignore local colors = { black = '#3c3836', white = '#f9f5d7', @@ -9,6 +10,7 @@ local colors = { lightgray = '#ebdbb2', inactivegray = '#a89984' } + return { normal = { a = {bg = colors.darkgray, fg = colors.white, gui = 'bold'}, diff --git a/lua/lualine/themes/horizon.lua b/lua/lualine/themes/horizon.lua index 030b7f2..0f2a9c2 100644 --- a/lua/lualine/themes/horizon.lua +++ b/lua/lualine/themes/horizon.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2021 Jnhtr -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { black = '#1c1e26', white = '#6C6F93', @@ -13,7 +13,7 @@ local colors = { lightgray = '#2E303E', inactivegray = '#1C1E26', } ---LuaFormatter on + return { normal = { a = {bg = colors.gray, fg = colors.black, gui = 'bold'}, diff --git a/lua/lualine/themes/iceberg_dark.lua b/lua/lualine/themes/iceberg_dark.lua index 21f53d1..c4a3d9f 100644 --- a/lua/lualine/themes/iceberg_dark.lua +++ b/lua/lualine/themes/iceberg_dark.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color2 = '#161821', color3 = '#b4be82', @@ -15,7 +15,7 @@ local colors = { color12 = '#818596', color15 = '#84a0c6', } --- LuaFormatter on + return { visual = { a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, diff --git a/lua/lualine/themes/iceberg_light.lua b/lua/lualine/themes/iceberg_light.lua index 21a27c1..0e50eec 100644 --- a/lua/lualine/themes/iceberg_light.lua +++ b/lua/lualine/themes/iceberg_light.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color5 = '#668e3d', color8 = '#757ca3', @@ -13,7 +13,7 @@ local colors = { color1 = '#9fa6c0', color2 = '#c57339', } --- LuaFormatter on + return { replace = { b = {fg = colors.color0, bg = colors.color1}, diff --git a/lua/lualine/themes/jellybeans.lua b/lua/lualine/themes/jellybeans.lua index 5816eb6..571456a 100644 --- a/lua/lualine/themes/jellybeans.lua +++ b/lua/lualine/themes/jellybeans.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color2 = '#30302c', color3 = '#f0a0c0', @@ -14,7 +14,7 @@ local colors = { color11 = '#8197bf', color14 = '#99ad6a', } --- LuaFormatter on + return { visual = { a = {fg = colors.color2, bg = colors.color3, gui = 'bold'}, diff --git a/lua/lualine/themes/material.lua b/lua/lualine/themes/material.lua index f216ed8..1495aa3 100644 --- a/lua/lualine/themes/material.lua +++ b/lua/lualine/themes/material.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: Lokesh Krishna(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { fg = '#eeffff', bg = '#263238', @@ -15,7 +15,7 @@ local colors = { gray2 = '#2E3C43', gray3 = '#515559', } --- LuaFormatter on + return { normal = { a = {fg = colors.bg, bg = colors.blue, gui = 'bold'}, diff --git a/lua/lualine/themes/modus-vivendi.lua b/lua/lualine/themes/modus-vivendi.lua index 40fa003..fc923a7 100644 --- a/lua/lualine/themes/modus-vivendi.lua +++ b/lua/lualine/themes/modus-vivendi.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 ronniedroid -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { black = '#000000', white = '#eeeeee', @@ -13,7 +13,7 @@ local colors = { darkgray = '#202020', lightgray = '#434343' } --- LuaFormatter on + return { normal = { a = {bg = colors.blue, fg = colors.lightgray, gui = 'bold'}, diff --git a/lua/lualine/themes/molokai.lua b/lua/lualine/themes/molokai.lua index b6cf8a6..31328e8 100644 --- a/lua/lualine/themes/molokai.lua +++ b/lua/lualine/themes/molokai.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: challsted(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { black = '#232526', gray = '#808080', @@ -13,7 +13,7 @@ local colors = { red = '#ff0000', yellow = '#e6db74', } --- LuaFormatter on + return { normal = { a = {fg = colors.black, bg = colors.cyan, gui = 'bold'}, diff --git a/lua/lualine/themes/moonfly.lua b/lua/lualine/themes/moonfly.lua index 16f8f6d..d8a2891 100644 --- a/lua/lualine/themes/moonfly.lua +++ b/lua/lualine/themes/moonfly.lua @@ -3,7 +3,7 @@ -- URL: github.com/bluz71/vim-moonfly-colors -- License: MIT (https://opensource.org/licenses/MIT) --- LuaFormatter off +-- stylua: ignore local colors = { color3 = '#303030', color6 = '#9e9e9e', @@ -14,7 +14,6 @@ local colors = { color2 = '#c6c6c6', } --- LuaFormatter on return { replace = { a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, diff --git a/lua/lualine/themes/nightfly.lua b/lua/lualine/themes/nightfly.lua index 5121140..7516841 100644 --- a/lua/lualine/themes/nightfly.lua +++ b/lua/lualine/themes/nightfly.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { color3 = '#2c3043', color6 = '#a1aab8', @@ -10,7 +10,7 @@ local colors = { color1 = '#ff5874', color2 = '#c3ccdc', } --- LuaFormatter on + return { replace = { a = {fg = colors.color0, bg = colors.color1, gui = 'bold'}, diff --git a/lua/lualine/themes/nord.lua b/lua/lualine/themes/nord.lua index 332ebf5..7eea741 100644 --- a/lua/lualine/themes/nord.lua +++ b/lua/lualine/themes/nord.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { nord1 = '#3B4252', nord3 = '#4C566A', @@ -10,7 +10,7 @@ local colors = { nord8 = '#88C0D0', nord13 = '#EBCB8B', } --- LuaFormatter on + return { normal = { a = {fg = colors.nord1, bg = colors.nord8, gui = 'bold'}, diff --git a/lua/lualine/themes/onedark.lua b/lua/lualine/themes/onedark.lua index 011b668..421ed17 100644 --- a/lua/lualine/themes/onedark.lua +++ b/lua/lualine/themes/onedark.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: Zoltan Dalmadi(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { blue = '#61afef', green = '#98c379', @@ -15,7 +15,7 @@ local colors = { gray2 = '#2c323d', gray3 = '#3e4452', } --- LuaFormatter on + return { normal = { a = {fg = colors.bg, bg = colors.green, gui = 'bold'}, diff --git a/lua/lualine/themes/onelight.lua b/lua/lualine/themes/onelight.lua index 9942c9d..e8a3c35 100644 --- a/lua/lualine/themes/onelight.lua +++ b/lua/lualine/themes/onelight.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: Zoltan Dalmadi(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { blue = '#61afef', green = '#98c379', @@ -15,7 +15,7 @@ local colors = { gray2 = '#f0f0f0', gray3 = '#d0d0d0', } --- LuaFormatter on + return { normal = { a = {fg = colors.bg, bg = colors.green, gui = 'bold'}, diff --git a/lua/lualine/themes/palenight.lua b/lua/lualine/themes/palenight.lua index 9130fd7..570c71b 100644 --- a/lua/lualine/themes/palenight.lua +++ b/lua/lualine/themes/palenight.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 IGI-111 -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { vertsplit = '#181A1F', special_grey = '#3B4048', @@ -20,7 +20,7 @@ local colors = { comment_grey = '#697098', black = '#292D3E', } --- LuaFormatter on + return { normal = { a = {fg = colors.black, bg = colors.purple, gui = 'bold'}, diff --git a/lua/lualine/themes/papercolor_dark.lua b/lua/lualine/themes/papercolor_dark.lua index 8ea6883..5c940e8 100644 --- a/lua/lualine/themes/papercolor_dark.lua +++ b/lua/lualine/themes/papercolor_dark.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: TKNGUE(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { red = '#df0000', green = '#008700', @@ -24,7 +24,7 @@ local colors = { visual_fg = '#000000', visual_bg = '#8787af', } --- LuaFormatter on + return { normal = { a = {fg = colors.foreground, bg = colors.background, gui = 'bold'}, diff --git a/lua/lualine/themes/papercolor_light.lua b/lua/lualine/themes/papercolor_light.lua index b936a01..c395a7b 100644 --- a/lua/lualine/themes/papercolor_light.lua +++ b/lua/lualine/themes/papercolor_light.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: TKNGUE(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { red = '#df0000', green = '#008700', @@ -22,7 +22,6 @@ local colors = { statusline_inactive_fg = '#4d4d4c', statusline_inactive_bg = '#dadada', } --- LuaFormatter on return { normal = { diff --git a/lua/lualine/themes/powerline.lua b/lua/lualine/themes/powerline.lua index a1674e6..93870f8 100644 --- a/lua/lualine/themes/powerline.lua +++ b/lua/lualine/themes/powerline.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local Colors = { white = '#ffffff', darkestgreen = '#005f00', @@ -18,7 +18,7 @@ local Colors = { gray7 = '#9e9e9e', gray10 = '#f0f0f0', } --- LuaFormatter on + return { normal = { a = {fg = Colors.darkestgreen, bg = Colors.brightgreen, gui = 'bold'}, diff --git a/lua/lualine/themes/powerline_dark.lua b/lua/lualine/themes/powerline_dark.lua index 1cdd15c..38f18c5 100644 --- a/lua/lualine/themes/powerline_dark.lua +++ b/lua/lualine/themes/powerline_dark.lua @@ -1,6 +1,6 @@ -- Copyright (c) 2021 Ashish Panigrahi -- MIT license, see LICENSE for more details. --- LuaFormatter off +-- stylua: ignore local colors = { black = '#202020', neon = '#DFFF00', @@ -21,7 +21,7 @@ local colors = { brightred = '#AF0000', cyan = '#00DFFF', } --- LuaFormatter on + return { normal = { a = {bg = colors.neon, fg = colors.black, gui = 'bold'}, diff --git a/lua/lualine/themes/seoul256.lua b/lua/lualine/themes/seoul256.lua index 9e47d16..8f8a6b1 100644 --- a/lua/lualine/themes/seoul256.lua +++ b/lua/lualine/themes/seoul256.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. -- Genarated by lightline to lualine theme converter -- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9 --- LuaFormatter off +-- stylua: ignore local colors = { color5 = '#d7afaf', color6 = '#666656', @@ -14,7 +14,7 @@ local colors = { color1 = '#4e4e43', color4 = '#30302c', } --- LuaFormatter on + return { visual = { b = {fg = colors.color0, bg = colors.color1}, diff --git a/lua/lualine/themes/solarized_dark.lua b/lua/lualine/themes/solarized_dark.lua index 9cca40d..8cbf7e4 100644 --- a/lua/lualine/themes/solarized_dark.lua +++ b/lua/lualine/themes/solarized_dark.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: itchyny(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { base03 = '#002b36', base02 = '#073642', @@ -20,7 +20,7 @@ local colors = { cyan = '#2aa198', green = '#859900', } --- LuaFormatter on + return { normal = { a = {fg = colors.base03, bg = colors.blue, gui = 'bold'}, diff --git a/lua/lualine/themes/solarized_light.lua b/lua/lualine/themes/solarized_light.lua index 41406bf..978316a 100644 --- a/lua/lualine/themes/solarized_light.lua +++ b/lua/lualine/themes/solarized_light.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: itchyny(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { base3 = '#002b36', base2 = '#073642', @@ -20,7 +20,7 @@ local colors = { cyan = '#2aa198', green = '#859900', } --- LuaFormatter on + return { normal = { a = {fg = colors.base03, bg = colors.blue, gui = 'bold'}, diff --git a/lua/lualine/themes/wombat.lua b/lua/lualine/themes/wombat.lua index 4fb625c..391aa3e 100644 --- a/lua/lualine/themes/wombat.lua +++ b/lua/lualine/themes/wombat.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. -- Credit: itchyny(lightline) --- LuaFormatter off +-- stylua: ignore local colors = { base03 = '#242424', base023 = '#353535', @@ -20,7 +20,7 @@ local colors = { cyan = '#8ac6f2', green = '#95e454', } --- LuaFormatter on + return { normal = { a = {fg = colors.base02, bg = colors.blue, gui = 'bold'}, diff --git a/lua/lualine/utils/color_utils.lua b/lua/lualine/utils/color_utils.lua index 5541602..f4147a7 100644 --- a/lua/lualine/utils/color_utils.lua +++ b/lua/lualine/utils/color_utils.lua @@ -2,7 +2,7 @@ -- MIT license, see LICENSE for more details. local M = {} --- LuaFormatter off +-- stylua: ignore start -- color conversion local color_table = { -- lookup table for cterm colors @@ -272,7 +272,7 @@ local color_table = { {'254', { 228, 228, 228 }}, {'255', { 238, 238, 238 }}, } --- LuaFormatter on +-- stylua: ignore end function M.rgb2cterm(hex_color) local function get_color_distance(color1, color2) diff --git a/lua/lualine/utils/mode.lua b/lua/lualine/utils/mode.lua index 8a6dd23..27e19b3 100644 --- a/lua/lualine/utils/mode.lua +++ b/lua/lualine/utils/mode.lua @@ -1,7 +1,7 @@ -- Copyright (c) 2020-2021 hoob3rt -- MIT license, see LICENSE for more details. local Mode = {} --- LuaFormatter off +-- stylua: ignore Mode.map = { ['n'] = 'NORMAL', ['no'] = 'O-PENDING', @@ -33,7 +33,7 @@ Mode.map = { ['!'] = 'SHELL', ['t'] = 'TERMINAL', } --- LuaFormatter on + function Mode.get_mode() local mode_code = vim.api.nvim_get_mode().mode if Mode.map[mode_code] == nil then return mode_code end