add ollama pluigin
This commit is contained in:
parent
cc1b5ae9c7
commit
010f692b41
4 changed files with 43 additions and 22 deletions
|
|
@ -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)
|
||||
|
|
|
|||
7
dot_vim/lua/ollama_setup.lua
Normal file
7
dot_vim/lua/ollama_setup.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require("ollama").setup({
|
||||
model = "codellama",
|
||||
url = "http://ollama.ollama.svc.k8s.barakmich.com",
|
||||
serve = {
|
||||
on_start = false,
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue