Get the current workspace in Lua #967
Replies: 2 comments 1 reply
-
local dirman = neorg.modules.get_module("core.dirman")
local current_workspace = dirman.get_current_workspace() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
salkin-mada
-
local function neorg_workspace()
if vim.bo.filetype == 'norg' then
local dm = require('neorg').modules.get_module("core.dirman")
local ws = dm.get_current_workspace()
return "🌈⃤ "..ws[1].." → "..ws[2]
else
return ""
end
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If one wants to list the current
workspace
in say lualine.nvim.Is this then the way to do it? Or does the
dirman
module provide some other method that I missed?Beta Was this translation helpful? Give feedback.
All reactions