Open LinArcX opened 2 years ago
Hello.
I have the lua folder inside ~/.config/nvim and i put all my user-defined functions there.
~/.config/nvim
There is a file called test.lua in mentioned directory that contains:
test.lua
local test = {} local colors = require("galaxyline.themes.colors").gruvbox function test.foo() require('galaxyline').section.left[14] = { Saeed = { provider = function() return " ✅️ " .. "foo" end, separator = ' ', separator_highlight = {'NONE',colors.bg}, highlight = { colors.green, colors.bg }, }, } end return test
And if i open my init.lua file and put the below line in it, everything will works like a charm:
init.lua
require('test').foo()
The problem is that if i wanted to call this function from command section of neovim like this: :lua require('test').foo()
:lua require('test').foo()
It won't update the statusline, until i do one of these things:
:e
Is it a bug or is there any workaround to fix it?
Hello.
I have the lua folder inside
~/.config/nvim
and i put all my user-defined functions there.There is a file called
test.lua
in mentioned directory that contains:And if i open my
init.lua
file and put the below line in it, everything will works like a charm:require('test').foo()
The problem is that if i wanted to call this function from command section of neovim like this:
:lua require('test').foo()
It won't update the statusline, until i do one of these things:
:e
Is it a bug or is there any workaround to fix it?