Commit Graph

238 Commits

Author SHA1 Message Date
Matthew Toohey 7185c61e9e
feat: pywal theme (#35)
* feat: pywal theme
* docs: add pywal screenshots

Co-authored-by: mtoohey31 <mtoohey31@users.noreply.github.com>
2021-09-04 23:17:19 +06:00
github-actions[bot] db448f41e6
chore: formated with stylua (#32)
Apply initial stylua format

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-04 00:28:20 +06:00
Shadman 4042e837f8
chore: use stylua for formating
* Switch to stylua for formating

* Change lua-format ignore to stylua ignore.

* Add workflow for formating with stylua
2021-09-04 00:20:34 +06:00
shadmansaleh b2fcf50742 enhance: Reload lualine for ColorScheme so auto can self update 2021-09-03 20:16:54 +06:00
shadmansaleh a643a24d94 enhance: improve function component
- provide self as 1st argument
- handle error in function call
- convert the result to string by default
2021-09-03 18:19:00 +06:00
shadmansaleh c0f53e4acd Refactor: better handle how default options are applied 2021-09-03 18:04:48 +06:00
shadmansaleh b3c5c4403c feat: add new filesize component 2021-09-03 16:16:10 +06:00
shadmansaleh 8b4f70817c Refactor: Rename lualine_conifg.lua -> lualine/config.lua
This is loaded by lualine require so the peroformence will not be effected.
2021-09-03 15:59:00 +06:00
shadmansaleh e409e9fc32 Enhace: add a faster fallback for lualine_require for requiring files out of repo
If that fails it still falls back to original require a last resort
2021-08-30 23:58:23 +06:00
shadmansaleh 70d925ab17 Perf: More optimizations 2021-08-30 20:52:49 +06:00
shadmansaleh d7304f2b4e Remove support for deprecated themes 2021-08-30 06:35:33 -07:00
shadmansaleh ba1efb2a00 Remove deprecated feature: string color option bering treated as fg 2021-08-30 06:35:06 -07:00
shadmansaleh 85545bd192 Perf: move the files loaded at startup to &rtp/lua require is faster
renamed:    lualine/init.lua -> lualine.lua
renamed:    lualine/config.lua -> lualine_config.lua
2021-08-30 19:02:01 +06:00
shadmansaleh b0da16addd enhance:Don't load notice module when there are no notices 2021-08-30 19:02:01 +06:00
shadmansaleh 1afc45294a refactor: rename cterm_color.lua -> color_utils.lua 2021-08-30 19:02:01 +06:00
shadmansaleh 1439ba6d37 perf: Improve startup by droping most of the requires + refactors
Important: It's no longer guaranteed that if component/extension
of same name exists in multiple entries in rtp which one will be
loaded. The guarantee is still there for themes . Means other
plugins or users config can overwrite a lualines internal theme
with same file name . I'm droping the guarantee for components
and extensions because there isn't much usecase for it . It's simple
to have a unique name and droping that guarantee allows more
optimizations that speeds up lualine.
2021-08-30 17:54:23 +06:00
shadmansaleh 2b90200998 enahce: sync diff&branch component to buffer based of bufnr instead of BufEnter 2021-08-30 12:18:08 +06:00
shadmansaleh 0a032cf43e fix: Properly disable internal diff when source is given 2021-08-30 12:03:07 +06:00
shadmansaleh 114a840a41 enhace: Allow transitional hl to be applied at begining and end of stl
Since for left sep at left most location we will not find and prev_hl
We will use 'Normal' for right sep of right most position we will not
find a next_hl we will use 'Normal'.
2021-08-30 09:45:42 +06:00
shadmansaleh 649b7dd652 Skip right sep when %<left_sep is righr after it(lualine_b->c) 2021-08-30 09:41:26 +06:00
shadmansaleh 9be79955b8 Revert "enhace: Allow transitional hl to be applied at beginung and end of stl"
This reverts commit bae19db8d0.
2021-08-30 09:37:50 +06:00
shadmansaleh bae19db8d0 enhace: Allow transitional hl to be applied at beginung and end of stl
Since for left sep at left most location we will not find and prev_hl
We will use the next hl after component similarly for right sep of right most position
we will not find a next_hl we will use previous hl before component
2021-08-29 17:59:13 +06:00
Ashish Panigrahi 09169739fa added powerline-dark theme
* added replace colorscheme

 * updated screenshots

 * added patched font screenshots
2021-08-28 23:29:51 +06:00
shadmansaleh 6c9330d240 Enhance: Truncate from section c this way a&b won't disapear when stl becomes wide 2021-08-28 01:06:19 +06:00
shadmansaleh 276ba5d19e feat: Support indexing dictionaries in var components 2021-08-28 00:32:44 +06:00
shadmansaleh 2348eaea2f enhace: Use nvim_call_function instead of vim.fn so vim.fn does not get populated 2021-08-28 00:13:50 +06:00
shadmansaleh 1c57d7e61c chore: update extensions to have empty section_c so transitional separators can work
closes #23
2021-08-27 01:02:32 +06:00
shadmansaleh cfb6e3db14 perf: remove ale diagnostics source from default config
It is too expensive to check if ale is installed or not when ale is not
instaled . It is not that expensive when is is installed. So anyone
useing ale can just add ale to sources option in their config.
2021-08-27 01:02:20 +06:00
shadmansaleh d4f83afa7f Enhance: extract helper functions from apply_trans_sep() 2021-08-27 00:46:29 +06:00
shadmansaleh dd9e1b7bf0 fix: Section seperator disapearing when x section is empty
closes #22
2021-08-26 20:29:25 +06:00
shadmansaleh c0b9757ab0 Fix tests 2021-08-26 18:20:16 +06:00
shadmansaleh c9b5f364dc Fix various visual bugs in components transitional sep 2021-08-26 18:20:16 +06:00
shadmansaleh f728edd31d fix: odd situation of section separators with ayz/abz section configured 2021-08-26 18:20:16 +06:00
shadmansaleh 1c57497863 refactor: Improve section separators
- behaviour change now statusline won't be separated with %=
  if you don't have at lest one of lualine_x/y/z
- fixed some bugs
- simplified the transitional separators quite a bit. I think now
  it's understandable . Yay .
- Perf improvements too.
2021-08-26 18:20:16 +06:00
shadmansaleh fa1f001207 fix: branch assumes git file will be correctly formated 2021-08-26 17:09:18 +06:00
shadmansaleh 1cbf0686b4 fix: branch incorrectly assumes .git/ without .git/HEAD to be valid
fixes high cpu uses on windows in projects with empty .git folder.
2021-08-26 17:09:18 +06:00
Daniel Enrique 8648ee6d06 Add toggleterm extension.
Add # symbol.
2021-08-26 07:00:42 +06:00
shadmansaleh c5bd65d05b chore: Add focused arg to statusline function (To make debugging easier) 2021-08-22 14:06:46 +06:00
shadmansaleh c9c5e3f9d1 feat: Add type option to hint what type of component is the string
String values for component are way too overloaded . This means lualine
has to make lots of checks to understand how to load a string value
as a component . With type option users can specify exactly what they
want.
2021-08-22 13:54:05 +06:00
Shadman be83cb947e
Merge pull request #14 from bluz71/moonfly-theme
feat: Add moonfly theme
2021-08-20 10:51:40 +06:00
shadmansaleh 15dcaababd fix: Add '-' to valid filename chars 2021-08-20 10:34:31 +06:00
Dennis B 7b7fe983f8 Add moonfly theme 2021-08-20 14:15:31 +10:00
shadmansaleh 6c99ba6ba7 Fix string component containging ['{] taking long to load 2021-08-20 09:54:18 +06:00
shadmansaleh 849d6acc66 feat: Allow (neo)vim's statusline items to be used as component directly 2021-08-20 08:15:57 +06:00
shadmansaleh 895fda9b91 fix: component highlight fall backs failing
Color/theme created with `highlight_group_name` are handled with link.
Because of that we don't have a table on bg/fg instead a name .
Currently component highlights doesn't take this into account.

After colors from those groups will be extracted to provide fall backs
for component highlight.
2021-08-20 01:40:14 +06:00
shadmansaleh bdc3073d31 fix: Partially process config when setup is called
Otherwise successive calls to setups before redraw are ignored.

closes #12
2021-08-17 13:26:44 +06:00
shadmansaleh fcb61280f2 config: Add diff and diagnostics components to default config 2021-08-17 00:30:33 +06:00
shadmansaleh 33defeffb5 feat: Allow function as diagnostics source 2021-08-17 00:17:56 +06:00
shadmansaleh 0126ac0cc0 perf: lazy load modules and dalay config loading till status redraw
This should make require'lualine' less expensive and make lualine
have less impact in startuptime
2021-08-16 23:40:27 +06:00
shadmansaleh d360039969 fix(filename): include window_width to space estimation & expose
shorting_target option

setting shorting target to 0 disables path shorting
closes #8

Co-authored-by: NullVoxPopuli <LPSego3+dev@gmail.com>
2021-08-14 21:24:48 +06:00