Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separator Function Type #189

Open
lncrespo opened this issue Jun 26, 2021 · 3 comments
Open

Separator Function Type #189

lncrespo opened this issue Jun 26, 2021 · 3 comments

Comments

@lncrespo
Copy link

lncrespo commented Jun 26, 2021

Hey,

while configuring my galaxyline I tried to generate a separator dynamically using a function like this:

separator = function()
    if next(vim.lsp.get_active_clients()) ~= nil then
        return ""
    else
        return ""
    end
end,

However, this throws the following error:
image

Am I doing this wrong here or can the separator not be a function type? Because as of the README, the separator can be a function type:
image

@mks1508
Copy link

mks1508 commented Jul 14, 2021

separator point to the function
separator() point to the function's result

-- Wrong
local foo = bar .. separator

-- Right
local foo = bar .. separator()

@chipsenkbeil
Copy link

Getting same problem. From the source code, it doesn't look like separator is handled when it's a function.

@morhaham
Copy link

morhaham commented May 3, 2024

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants