Skip to content

Commit 525cfc4

Browse files
committed
feat(nvim): add showing working/idle ollama status
1 parent 3934ca3 commit 525cfc4

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

configuration/.config/nvim/lua/plugins/lualine-nvim-config.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,23 @@ return {
44
"nvim-tree/nvim-web-devicons",
55
},
66
lazy = false, -- load during startup
7+
8+
-- Enhance lualine with information about ollama status
9+
optional = true,
10+
opts = function(_, opts)
11+
table.insert(opts.sections.lualine_x, {
12+
function()
13+
local status = require("ollama").status()
14+
15+
if status == "IDLE" then
16+
return "󱙺" -- nf-md-robot-outline
17+
elseif status == "WORKING" then
18+
return "󰚩" -- nf-md-robot
19+
end
20+
end,
21+
cond = function()
22+
return package.loaded["ollama"] and require("ollama").status() ~= nil
23+
end,
24+
})
25+
end,
726
}

0 commit comments

Comments
 (0)