Comments (5)
I think the existing examples in README.md suggests about the limitation of the function component. But if you send me a PR, I'll review that. Also note that the call()
there exists just for loading the autoload functions, not directly used for the status line.
from lightline.vim.
What value should lightline give for the arguments?
from lightline.vim.
To stay compatible with the actual design the {args} will have to be optional, so f
could be {func}
or {func}, [{args}]
.
My VimL skill is basic so I'm not sure of the most elegant solution. I will continue to look at it to learn.
from lightline.vim.
I don't see the point of the feature request. You configure with your wrapper function, or if you don't like to write the three lines, you can register it as non-function component. Minimal API of the plugin already allows you to configure and I think it's not worth implementing this kind of feature to grow the way how you do to archive the same thing.
from lightline.vim.
I see 2 reasons:
-
A new user has no indication of whether or not arguments can be used here, and does not know at first sight that an empty argument is forced on
call()
. A note to this effect in the readme might also suffice. -
It's a pity to lengthen the vimrc with an extra function when you want to include a function from another plugin that should take an argument. But yeah, it's quite rare because most of the time these arguments are in independent options and not in the function arguments.
Is it worth attempting to make you a PR? If not, a little update in the Readme would be nice.
from lightline.vim.
Related Issues (20)
- Calling lua function from `g:lightline` config HOT 9
- Powerline transparent colorscheme
- bug : Undefined variable: g:lightline HOT 2
- Calling 'vim.diagnostic.goto_next()' inactivates lightline HOT 7
- Update tabline color on mode change HOT 3
- Lineinfo column doesn't match cursor column position HOT 2
- incorrect branch name on Gsplit HOT 4
- `component_function` does not accept vim9 function HOT 1
- Custom colorscheme mode HOT 5
- `laststatus=2` doesn't seem to be working HOT 1
- extra spaces from lightline-problem-12 HOT 1
- All Highlighted/Selected Character Count? HOT 6
- middle active/inactive items missing from statusline HOT 7
- Using `vim.lsp.buf.hover()` breaks lightline. HOT 8
- How to use Catppuccin theme on lightline?
- Returning a statusline item from a component function HOT 2
- theme support for grubbox HOT 2
- How do I ignore certain filetypes? HOT 2
- Changing the color of modified file symbol HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightline.vim.