add ollama pluigin

This commit is contained in:
Barak Michener 2024-06-14 12:38:14 -07:00
parent cc1b5ae9c7
commit 010f692b41
4 changed files with 43 additions and 22 deletions

View file

@ -2,18 +2,30 @@ require('lsp-progress').setup({
})
-- Define a function to check the status and return the corresponding icon
local function get_ollama_status()
local status = require("ollama").status()
if status == "IDLE" then
return ""
elseif status == "WORKING" then
return "OLLAMA BUSY"
end
end
local config = {
sections = {
lualine_c = {
'filename',
function()
return require('lsp-progress').progress()
end,
},
lualine_x = {
'filetype',
}
}
sections = {
lualine_c = {
'filename',
function()
return require('lsp-progress').progress()
end,
},
lualine_x = {
'filetype',
get_ollama_status,
}
}
}
--local function ins_left(component)