Statusline - obsidian-nvim/obsidian.nvim GitHub Wiki
To see statusline component similar to the obsidian app, you just need to read the global variable vim.g.obsidian
to get a formatted text.
If you are using lualine.nvim
, use:
require("lualine").setup {
sections = {
lualine_x = {
"g:obsidian",
},
},
}
The status is lazily computed, only updates when you are in an obsidian note, and when the properties change.
You can also turn it off or reformat the string in the statusline module:
require("obsdian").setup {
statusline = {
enabled = false, -- turn it off
format = "{{backlinks}} backlinks {{properties}} properties {{words}} words {{chars}} chars", -- works like the template system
},
}