Commit Graph

15 Commits

Author SHA1 Message Date
Anthony Ruhier 5d85dc7858
Add options to the Tabs module to align it with the Buffers module (#920)
* Add a path option for tabs

Add get_props to align the module on Buffers.

* Add option to set the tab max size

Shorten dynamically the tab name to minimize its length when needed.

* Show modified status
2023-10-17 15:37:24 +06:00
shadmansaleh 557715ff91 chore: autogen (vimdocs+formating) 2023-03-30 05:25:45 +00:00
Will Hopkins 7f5f2d811d
feat: change active color of `buffers`, `tabs` & `windows` component according to mode (#971)
- Added `M.get_mode_suffix()` in `highlight.lua` to simplify retrieving the mode suffix.
- Fixed graphical bug occurring when `buffers` component color was changed.
    - Separators would not change to new color.
    - Fixed by adding the mode suffix to the highlight name
        in `M.component_format_highlight` if the output of
        `highlight.fn()` is a string.
- Added `use_mode_colors` option to `buffers`, `tabs`, and `windows` components.
    - If it's set to true, the component's colors will change with the
      mode, as most other components do.
- Updated readme.
2023-03-30 11:25:14 +06:00
Daemon b61afc44e6
docs: cleanup formatting and comment typos (#696)
* docs: fix typo in component notice

* refactor: rename typo param 'pattern'

* docs: fix comments typos across project files

Cleanup misspellings and wording in comment lines.

* docs: improve readability of `CONTRIBUTING.md`

* docs: improve readability of `README.md`

- Minor typos
- Clarify information
- Separate sections from paragraphs

* docs: add newline below headers in `THEMES.md`

Aim's to be consistent with other documents.

* docs: fix unname tabpage command reference

* docs: reword 'directly bused' for `setup_theme()`

* docs: fix extra indent in contribution list

* docs: more separation in readme/tabs, remove extra backtick

* docs: further improve wording for `setup_theme`

* docs: improve wording for `setup` function

* docs: missing underscore in lualine/config
2022-05-30 20:25:05 +06:00
shadmansaleh 13ead784c4 enhace: add create&format_hl to make hl easier for componemet 2022-04-18 05:20:29 +06:00
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 98dc2dd3a2 fix: LualineRenameTab crashing lualine
fixes https://github.com/nvim-lualine/lualine.nvim/pull/574#pullrequestreview-874872853

Issue was neovim's tabpage handle used by rpc-api isn't same as tab no
in viml.
Now the tabpage handle is stores in self.tabId and tab no is stored in
self.tabnr in `Tab` so any can be used when necessary.
2022-02-07 22:13:42 +06:00
Tokubara d52ff470de
feature to rename tabs (#574)
* (feat) add rename

* remove tabname if LualineRenameTab is ran without args

* document LualineRenameTab

Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
2022-02-07 21:26:25 +06:00
shadmansaleh 6f28adb21f chore: autogen (vimdocs+formating) 2022-02-01 08:04:03 +00:00
shadmansaleh b18b7ee8ac chore: Use paranthesis for function calls. No paran can trip new lua users 2022-01-02 17:38:39 +06:00
shadmansaleh 93c934a641 fixup: fix padding, fmt options in tabs and buffers
Previously these options were applied to entire tabs/buffers components.
Now they are applied to specific buffer/tab.

Note: Now icon, color options are no longer applicable to buffers & tabs
component. I can't see how they make sense here. Also cond stil applies
to entire component.

fixes #414
2021-11-18 08:12:33 +06:00
github-actions[bot] 7eff9bbeb4
chore: formated with stylua (#410)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-10-29 19:13:17 +06:00
Shadman ecaa491c3c feat: add support for function in max_length option (tabs & buffers) 2021-10-29 19:07:11 +06:00
Shadman 08d1340ec9
doc: improve code documentation (#82) 2021-10-12 20:04:47 +06:00
shadmansaleh 6e936efe06 refactor: allow components, extensions, themes to be multi file module
(#81)

utilize that to split tabs & buffers components into smaller files
2021-10-11 16:42:57 +06:00