40 lines
723 B
Lua
40 lines
723 B
Lua
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',
|
|
get_ollama_status,
|
|
}
|
|
}
|
|
}
|
|
|
|
--local function ins_left(component)
|
|
--table.insert(config.sections.lualine_c, component)
|
|
--end
|
|
|
|
--ins_left({
|
|
--'lsp_progress',
|
|
--display_components = { 'lsp_client_name', { 'percentage' } }
|
|
--})
|
|
|
|
require('lualine').setup(config)
|