nvimdev / galaxyline.nvim

neovim statusline plugin written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separator Function Type

lncrespo opened this issue · comments

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

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

-- Wrong
local foo = bar .. separator

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

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