Commit Graph

21 Commits

Author SHA1 Message Date
kylo252 4b68b8dd2a
fix: use nvim-api to avoid win_getid exceptions (#525) 2022-01-04 07:22:52 +06:00
shadmansaleh c030a380ef feat: add support for inline custom components 2021-11-25 12:57:00 +06:00
Shadman 08d1340ec9
doc: improve code documentation (#82) 2021-10-12 20:04:47 +06:00
shadmansaleh f7702d8841 enhance: check for new diagnostics highlight groups
- Now DiagnosticError, DiagnosticWarn, DiagnosticInfo, DiagnosticHint
  are also consider3d for default highlight in diagnostics component.
- Moved getHl from auto theme to utils as extract_color_from_hllist

closes #56
2021-09-17 15:28:30 +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
shadmansaleh b2fcf50742 enhance: Reload lualine for ColorScheme so auto can self update 2021-09-03 20:16:54 +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 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 15dcaababd fix: Add '-' to valid filename chars 2021-08-20 10:34:31 +06:00
shadmansaleh 6c99ba6ba7 Fix string component containging ['{] taking long to load 2021-08-20 09:54:18 +06:00
shadmansaleh fac96d71cc [Breaking] Refactor: switch to %{%expr%} from %!expr
Huge change to internal mechanics.
- Now %{%expr%} blocks are used for evaluating statusline instead of
  %!expr . Pros for this is statusline is evaluated on current win and
  buf context instead of active win & bufs context.
- Now all components branch & diff(These two are cached) including users
  function components updates on inactive status.
  - now components update status and function components receive an
    argument (is_focused) when called. It indicates whether it's running
    for active or inactive statusline.
- Now lualine no longer aggrasively takes over 'statusline' option.
  instead it sets the global version of statusline option. So it's
  possible to unset it to hide lualine . Or set buffer local version
  of that option to have different statusline then lualine on thay
  buffer
- Switch vim.o to vim.go or vim.opt.
- BugFix autcommands being set everytime an instence of diff or branch
  component is created
- Added new utils functions define_autocmd & is_focused
- Remove utils function lualine_eval
- Removed hacky require cache modification from component.lua
2021-08-08 22:50:17 +06:00
shadmansaleh ef47235330 Add component evaluation for inactive sections 2021-05-21 11:11:25 +06:00
Shadman 4f53d053a1
Refactor: Remove cterm from hlighlight extractor (#174)
- remove cterm color extraction
- fix lint issues
- apply lua-format
2021-04-13 18:36:51 +06:00
Shadman 1b81b0021f
Refactor: Components now use OOP style (#141) 2021-04-11 10:20:41 +02:00
Shadman 37a3b8cc82
feat: enhance theme (#153)
* Enhance Theme

- loaded theme table is nolonger stored in configs and thus not passed
  to components. Insted it's cached in highlights.lua
- Reintroducing clear_highlights turns out themes can still change if
  setup is called more than once

* Add error messege for invalid theme

It stops lualine from crashing in such incedent

* Apply lua-format

* Small tweeks
2021-04-07 02:34:36 +02:00
Shadman 7c8ddf307b
refactor: highlight improvements
* Refactor highlight restoring after ColorScheme

Previously custom highlights/ component highlights had to call
expand_set_theme to make them restored . That's unintuative . Now any
highlight created by lualine.highlight.highlight() will be restored :)

* Renamed component -> var_name | Proper BugFix
2021-03-22 15:29:37 +01:00
hoob3rt b31b66fa79 refactor: applied lua-format to all files 2021-03-16 00:37:46 +01:00
Shadman 9505115133
enhancement: Donn't create unnececery hl groups (#105) 2021-02-21 15:37:59 +01:00
Shadman 202487d2ef
feat: powerline like section seperators (#94) 2021-02-20 04:21:05 +01:00
Shadman 0dd0a23cac
feat: add colors to signify (#61)
Co-authored-by: hoob3rt <pelczarskihubert@gmail.com>
2021-02-17 19:29:50 +01:00
Shadman 20d7f33ef9
feat: adding component specific options (#60) 2021-02-15 19:09:12 +01:00