From 9f556fdf37185be04409bdf3f2216152485dca4d Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Mon, 20 Sep 2021 17:46:38 +0600 Subject: [PATCH] chore: add license statements and update benchmarks --- Makefile | 2 ++ README.md | 18 ++++++++++++------ doc/lualine.txt | 17 +++++++++++------ .../components/special/eval_func_component.lua | 3 +++ .../components/special/function_component.lua | 2 ++ .../components/special/vim_var_component.lua | 2 ++ lua/lualine/themes/auto.lua | 2 ++ lua/lualine/themes/gruvbox_light.lua | 2 ++ lua/lualine/themes/modus-vivendi.lua | 18 +++++++++--------- lua/lualine/themes/pywal.lua | 3 +++ lua/lualine/utils/job.lua | 3 +++ lua/lualine/utils/notices.lua | 3 +++ lua/lualine_require.lua | 2 ++ lua/tests/helpers.lua | 3 +++ lua/tests/minimal_init.lua | 3 +++ lua/tests/spec/component_spec.lua | 3 +++ lua/tests/spec/config_spec.lua | 3 +++ lua/tests/spec/utils_spec.lua | 3 +++ scripts/docgen.sh | 3 +++ 19 files changed, 74 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 8332973..5d2bf47 100644 --- a/Makefile +++ b/Makefile @@ -14,4 +14,6 @@ test: docgen: @bash ./scripts/docgen.sh +precommit_check: docgen format test lint + check: lint test diff --git a/README.md b/README.md index 04e4b8c..76baf63 100644 --- a/README.md +++ b/README.md @@ -59,14 +59,19 @@ For those who want to break the norms. You can create custom looks in lualine. Unlike other statusline plugins lualine loads only defined components, nothing else. -Startup time performance measured with an amazing plugin [tweekmonster/startuptime.vim](https://github.com/tweekmonster/startuptime.vim) +Startup time performance measured with an amazing plugin [dstein64/vim-startuptime](https://github.com/dstein64/vim-startuptime) -All times are measured with only `startuptime.vim` and given statusline plugin installed +All times are measured with clean `init.vim` with only `vim-startuptime`, +`vim-plug` and given statusline plugin installed. +In controle just `vim-startuptime` and`vim-plug` is installed. +And mesured time is complete startuptime of vim not time spent +on specific plugin. -| clean vimrc | lualine | lightline | airline | -| :------------: | :----------: | :----------: | :----------: | -| 8.943 ms | 9.034 ms | 11.463 ms | 13.425 ms | +| control | lualine | lightline | airline | +| :--------: | :-------: | :-------: | :-------: | +| 8.943 ms | 10.140 ms | 12.522 ms | 38.850 ms | +Last Updated On: 20-09-2021 ## Installation @@ -76,7 +81,6 @@ All times are measured with only `startuptime.vim` and given statusline plugin i Plug 'hoob3rt/lualine.nvim' " If you want to have icons in your statusline choose one of these Plug 'kyazdani42/nvim-web-devicons' -Plug 'ryanoasis/vim-devicons' ``` ### [packer.nvim](https://github.com/wbthomason/packer.nvim) @@ -88,6 +92,8 @@ use { } ``` +You'll also have need to have a patched font if you want icons. + ## Usage and customization Lualine has sections as shown below. diff --git a/doc/lualine.txt b/doc/lualine.txt index 054626e..e6d34b2 100644 --- a/doc/lualine.txt +++ b/doc/lualine.txt @@ -32,15 +32,19 @@ Unlike other statusline plugins lualine loads only defined components, nothing else. Startup time performance measured with an amazing plugin -tweekmonster/startuptime.vim +dstein64/vim-startuptime -All times are measured with only `startuptime.vim` and given statusline plugin -installed +All times are measured with clean `init.vim` with only `vim-startuptime`, +`vim-plug` and given statusline plugin installed. In controle just +`vim-startuptime` and`vim-plug` is installed. And mesured time is complete +startuptime of vim not time spent on specific plugin. -│clean vimrc│lualine │lightline│ airline │ -│ 8.943 ms │9.034 ms│11.463 ms│13.425 ms│ +│control │ lualine │lightline│ airline │ +│8.943 ms│10.140 ms│12.522 ms│38.850 ms│ +Last Updated On: 20-09-2021 + INSTALLATION *lualine-installation* VIM-PLUG ~ @@ -49,7 +53,6 @@ VIM-PLUG ~ Plug 'hoob3rt/lualine.nvim' " If you want to have icons in your statusline choose one of these Plug 'kyazdani42/nvim-web-devicons' - Plug 'ryanoasis/vim-devicons' < @@ -63,6 +66,8 @@ PACKER.NVIM ~ < +You’ll also have need to have a patched font if you want icons. + USAGE AND CUSTOMIZATION *lualine-usage-and-customization* Lualine has sections as shown below. diff --git a/lua/lualine/components/special/eval_func_component.lua b/lua/lualine/components/special/eval_func_component.lua index e40b516..4656b89 100644 --- a/lua/lualine/components/special/eval_func_component.lua +++ b/lua/lualine/components/special/eval_func_component.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + local EvalFuncComponent = require('lualine.component'):new() EvalFuncComponent.update_status = function(self) diff --git a/lua/lualine/components/special/function_component.lua b/lua/lualine/components/special/function_component.lua index 27685c4..b360c31 100644 --- a/lua/lualine/components/special/function_component.lua +++ b/lua/lualine/components/special/function_component.lua @@ -1,3 +1,5 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. local FunctionComponent = require('lualine.component'):new() FunctionComponent.update_status = function(self, is_focused) diff --git a/lua/lualine/components/special/vim_var_component.lua b/lua/lualine/components/special/vim_var_component.lua index 53a99a8..eb46b28 100644 --- a/lua/lualine/components/special/vim_var_component.lua +++ b/lua/lualine/components/special/vim_var_component.lua @@ -1,3 +1,5 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. local VarComponent = require('lualine.component'):new() VarComponent.update_status = function(self) local component = self.options[1] diff --git a/lua/lualine/themes/auto.lua b/lua/lualine/themes/auto.lua index c787c24..a976ee0 100644 --- a/lua/lualine/themes/auto.lua +++ b/lua/lualine/themes/auto.lua @@ -1,3 +1,5 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. local utils = require 'lualine.utils.utils' local loader = require 'lualine.utils.loader' diff --git a/lua/lualine/themes/gruvbox_light.lua b/lua/lualine/themes/gruvbox_light.lua index 99bbeff..75adb3a 100644 --- a/lua/lualine/themes/gruvbox_light.lua +++ b/lua/lualine/themes/gruvbox_light.lua @@ -1,3 +1,5 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. -- stylua: ignore local colors = { black = '#3c3836', diff --git a/lua/lualine/themes/modus-vivendi.lua b/lua/lualine/themes/modus-vivendi.lua index 7170fd3..3ad42af 100644 --- a/lua/lualine/themes/modus-vivendi.lua +++ b/lua/lualine/themes/modus-vivendi.lua @@ -2,15 +2,15 @@ -- MIT license, see LICENSE for more details. -- stylua: ignore local colors = { - black = '#000000', - white = '#eeeeee', - red = '#ffa0a0', - green = '#88cf88', - blue = '#92baff', - magenta = '#feacd0', - cyan = '#a0bfdf', - gray = '#2f2f2f', - darkgray = '#202020', + black = '#000000', + white = '#eeeeee', + red = '#ffa0a0', + green = '#88cf88', + blue = '#92baff', + magenta = '#feacd0', + cyan = '#a0bfdf', + gray = '#2f2f2f', + darkgray = '#202020', lightgray = '#434343' } diff --git a/lua/lualine/themes/pywal.lua b/lua/lualine/themes/pywal.lua index 7391e32..bbd7b53 100644 --- a/lua/lualine/themes/pywal.lua +++ b/lua/lualine/themes/pywal.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + local lualine_require = require 'lualine_require' local modules = lualine_require.lazy_require { utils_notices = 'lualine.utils.notices', diff --git a/lua/lualine/utils/job.lua b/lua/lualine/utils/job.lua index 8178f1b..a5e5586 100644 --- a/lua/lualine/utils/job.lua +++ b/lua/lualine/utils/job.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + -- Wrapper arround job api local Job = setmetatable({ start = function(self) diff --git a/lua/lualine/utils/notices.lua b/lua/lualine/utils/notices.lua index f22796f..4bc54ef 100644 --- a/lua/lualine/utils/notices.lua +++ b/lua/lualine/utils/notices.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + -- To provide notices for user local M = {} local notices = {} diff --git a/lua/lualine_require.lua b/lua/lualine_require.lua index ae14a37..4d86887 100644 --- a/lua/lualine_require.lua +++ b/lua/lualine_require.lua @@ -1,3 +1,5 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. local M = {} M.sep = package.config:sub(1, 1) diff --git a/lua/tests/helpers.lua b/lua/tests/helpers.lua index 6c632ca..1f46144 100644 --- a/lua/tests/helpers.lua +++ b/lua/tests/helpers.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + local eq = assert.are.same local M = {} diff --git a/lua/tests/minimal_init.lua b/lua/tests/minimal_init.lua index e82a8e7..37b701d 100644 --- a/lua/tests/minimal_init.lua +++ b/lua/tests/minimal_init.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + -- load lualine and plenary vim.api.nvim_exec( [[ diff --git a/lua/tests/spec/component_spec.lua b/lua/tests/spec/component_spec.lua index eb9482d..5e02586 100644 --- a/lua/tests/spec/component_spec.lua +++ b/lua/tests/spec/component_spec.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + local helpers = require 'tests.helpers' local eq = assert.are.same diff --git a/lua/tests/spec/config_spec.lua b/lua/tests/spec/config_spec.lua index 3e9df0d..484e6d7 100644 --- a/lua/tests/spec/config_spec.lua +++ b/lua/tests/spec/config_spec.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + local eq = assert.are.same describe('config parsing', function() diff --git a/lua/tests/spec/utils_spec.lua b/lua/tests/spec/utils_spec.lua index 59e7988..ced2a16 100644 --- a/lua/tests/spec/utils_spec.lua +++ b/lua/tests/spec/utils_spec.lua @@ -1,3 +1,6 @@ +-- Copyright (c) 2020-2021 shadmansaleh +-- MIT license, see LICENSE for more details. + local helpers = require 'tests.helpers' local eq = assert.are.same diff --git a/scripts/docgen.sh b/scripts/docgen.sh index 77eafcd..04b1b48 100644 --- a/scripts/docgen.sh +++ b/scripts/docgen.sh @@ -1,3 +1,6 @@ +# Copyright (c) 2020-2021 shadmansaleh +# MIT license, see LICENSE for more details. + PANVIMDOC_TAG_VERSION="v2.7.1" # panvimdoc version # panvimdocs metadata