Coder Social home page Coder Social logo

Comments (5)

itchyny avatar itchyny commented on August 11, 2024 1

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.

itchyny avatar itchyny commented on August 11, 2024

What value should lightline give for the arguments?

from lightline.vim.

tkapias avatar tkapias commented on August 11, 2024

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.

itchyny avatar itchyny commented on August 11, 2024

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.

tkapias avatar tkapias commented on August 11, 2024

I see 2 reasons:

  1. 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.

  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.