Commit Graph

13 Commits

Author SHA1 Message Date
Shadman 37a314b9e3
feat: add support for dynamic color with functions in color options (#566)
* feat: allow functions in color options.

* update_evilline

* docs: document color functions

* remove unnecesery stuff

* add dynamic color supoort for themes

* chore: autogen (vimdocs+formating)

* fix dynamic colors not working as color fallback

* fix transitional separators not updating for dynamic colors dynamic colors

* fix failing tests

* apply format

* Allow cases where theme doesn't even define nornal color for some mode

* allow color function to return nil

* some enhancements

* more enhancements

* code cleanup

* if we don't have even normal in theme we should just nvim highlight it with it's ususal stl colors

* not sure how it get here . It should be in different pr

* keep only c of lualine_c in component section name

* use sh to run docgen

* fix filetype component not respecting color option properly

* fix section x,y,z not falling back to correct colors

* auto format

* actually fix xyz not falling back to correct mode

* fix comp sep not correctly removed properly on function hl

* pass only section in color fn

* more enhancements

* update docs

* update create_comp_hl call locations

* enhancements+fixes

* fix broken hls in tabline

* Fix function color options not inheriting right colors

* some enhancements

* fix tests

* tweek docs

Co-authored-by: shadmansaleh <shadmansaleh@users.noreply.github.com>
2022-03-02 19:37:08 +06:00
shadmansaleh 6f28adb21f chore: autogen (vimdocs+formating) 2022-02-01 08:04:03 +00:00
shadmansaleh 70691ae350 enhance: undeprecate nvim_lsp and completely remove `nvim` diagnostics source 😉
- Now `nvim_lsp` source shows diagnostics generated by vim.lsp only
  avoids uses vim.diagnostic to avoid deprecation warning on nvim 0.6+
  Why? `vim.lsp.diagnostic` deprecation warnings are way too aggressive.
  And I'm annoyed by people complaining here even though the warning is
  generated by some other plugin (After introduction of nvim_diagnostic
  source lualine just can't produce that warning it used to switch users
  to nvim_diagnostic source with a warning on nvim0.6+).
  Forget it just let anyone that wants lsp specific diagnostics have
  `nvim_lsp` . I'd still recommend using `nvim_diagnostic` over
  `nvim_lsp` as diagnostics generayed by plugins like `null-ls` won't
  showup in `nvim_lsp`
- Remove remanents of `nvim` diagnostics source.
2022-01-12 22:35:44 +06:00
kylo252 02e1f6cd5b
refactor: use nvim api directly for bufnr (#526) 2022-01-04 19:17:16 +06:00
shadmansaleh b18b7ee8ac chore: Use paranthesis for function calls. No paran can trip new lua users 2022-01-02 17:38:39 +06:00
Shadman f4ab5b56da
fix: diagnostics component in nvim-0.5 (#476) 2021-12-10 06:00:06 +06:00
shadmansaleh 4231b63196 fix: lsp.diagnostics deprecation warning
- change default diagnostics source from nvim_lsp to nvim_diagnostic
  and deprecate nvim_lsp on neovim-0.6 and higher.
- rename diagnostics source nvim to nvim_diagnostic. nvim could be
  confusing.

fixes #473
2021-12-09 23:33:36 +06:00
Anakael 3b1a367d76
doc: fix hint icon doc in diagnostics component (#426) 2021-11-09 10:03:03 +06:00
Arthur Skobara 3f5cdc51a0
fixup: missing hint value inside vim_lsp source (#421) 2021-11-05 12:55:28 +06:00
shadmansaleh 8d8c538fb9 fixup: fix update_in_insert caching colors in diagnostics
- mention colored option in docs
- sort component option list alphabeticaly

close #402
2021-10-26 14:37:50 +06:00
Mat Jones e909cc3caf feat: add option to always show diagnostics
* rename option and add to default config

* combine separate if statements using else if
2021-10-22 18:07:34 +06:00
Shadman 08d1340ec9
doc: improve code documentation (#82) 2021-10-12 20:04:47 +06:00
shadmansaleh 0b599b0ace refactor: split diagnostics component (#81) 2021-10-11 17:43:49 +06:00