Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
style: format with stylua (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-reineke authored Dec 27, 2021
1 parent 6f7c7e7 commit e2171a6
Show file tree
Hide file tree
Showing 20 changed files with 344 additions and 325 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Pull request check

on:
pull_request:

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: JohnnyMorganz/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --check .

block-fixup:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Block Fixup Commit Merge
uses: 13rac1/[email protected]
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@ Before you make a Pull Request, always make sure to:

### Standards and Styleguides

Feline has no strict coding standards or styleguides that you must follow while making changes. Just
try to make sure that the styling in the new or modified code stays consistent with the old code.
Feline uses [StyLua](https://github.com/JohnnyMorganz/StyLua) to format the code.
For commits, always use [semantic commit messages](https://www.conventionalcommits.org/).
6 changes: 4 additions & 2 deletions benchmark/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ if not pcall(require, 'profiler') then
vim.opt.packpath:append(tmpdir .. '/nvim/site')

if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system({'git', 'clone', 'https://github.com/norcalli/profiler.nvim', install_path})
vim.fn.system({ 'git', 'clone', 'https://github.com/norcalli/profiler.nvim', install_path })
end
end

-- Setup gitsigns
local ok, gitsigns = pcall(require, 'gitsigns')
if ok then gitsigns.setup() end
if ok then
gitsigns.setup()
end

-- Start benchmark
require('profiler').wrap(require('feline').setup())
12 changes: 6 additions & 6 deletions benchmark/statusline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if not pcall(require, 'plenary.benchmark') then
vim.opt.packpath:append(tmpdir .. '/nvim/site')

if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system({'git', 'clone', 'https://github.com/nvim-lua/plenary.nvim', install_path})
vim.fn.system({ 'git', 'clone', 'https://github.com/nvim-lua/plenary.nvim', install_path })
end
end

Expand All @@ -28,12 +28,12 @@ local function statusline_generator()
gen.generate_statusline(true)
end

benchmark("Feline statusline generation benchmark", {
benchmark('Feline statusline generation benchmark', {
runs = 10000,
fun = {
{
"Generating statusline",
statusline_generator
}
}
'Generating statusline',
statusline_generator,
},
},
})
34 changes: 17 additions & 17 deletions lua/feline/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

return {
theme = {
type = {'table', 'string'},
default_value = 'default'
type = { 'table', 'string' },
default_value = 'default',
},
separators = {
type = 'table',
Expand All @@ -33,8 +33,8 @@ return {
left_rounded_thin = '',
right_rounded = '',
right_rounded_thin = '',
circle = ''
}
circle = '',
},
},
vi_mode_colors = {
type = 'table',
Expand All @@ -54,8 +54,8 @@ return {
['COMMAND'] = 'green',
['SHELL'] = 'green',
['TERM'] = 'green',
['NONE'] = 'yellow'
}
['NONE'] = 'yellow',
},
},
force_inactive = {
type = 'table',
Expand All @@ -67,32 +67,32 @@ return {
'^fugitive$',
'^fugitiveblame$',
'^qf$',
'^help$'
'^help$',
},
buftypes = {
'^terminal$'
}
}
'^terminal$',
},
},
},
disable = {
type = 'table',
default_value = {}
default_value = {},
},
highlight_reset_triggers = {
type = 'table',
default_value = {
'SessionLoadPost',
'ColorScheme'
}
'ColorScheme',
},
},
custom_providers = {
type = 'table',
default_value = {}
default_value = {},
},
components = {
type = 'table'
type = 'table',
},
preset = {
type = 'string'
}
type = 'string',
},
}
Loading

0 comments on commit e2171a6

Please sign in to comment.