diff --git a/dot_vim/lua/lualine_setup.lua b/dot_vim/lua/lualine_setup.lua index b99cd3e..2856362 100644 --- a/dot_vim/lua/lualine_setup.lua +++ b/dot_vim/lua/lualine_setup.lua @@ -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) diff --git a/dot_vim/lua/ollama_setup.lua b/dot_vim/lua/ollama_setup.lua new file mode 100644 index 0000000..a134b82 --- /dev/null +++ b/dot_vim/lua/ollama_setup.lua @@ -0,0 +1,7 @@ +require("ollama").setup({ + model = "codellama", + url = "http://ollama.ollama.svc.k8s.barakmich.com", + serve = { + on_start = false, + }, +}) diff --git a/dot_vim/nvim.lua b/dot_vim/nvim.lua index ac56dd2..bf34091 100644 --- a/dot_vim/nvim.lua +++ b/dot_vim/nvim.lua @@ -342,17 +342,17 @@ require('trouble').setup { jump = { "o", "" }, -- jump to the diagnostic or open / close folds --open_split = { "" }, -- open buffer in new split --open_vsplit = { "" }, -- open buffer in new vsplit - open_tab = {}, -- open buffer in new tab - jump_close = { "" }, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location + open_tab = {}, -- open buffer in new tab + jump_close = { "" }, -- jump to the diagnostic and close the list + toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode + toggle_preview = "P", -- toggle auto_preview + hover = "K", -- opens a small popup with the full multiline message + preview = "p", -- preview the diagnostic location close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds + open_folds = { "zR", "zr" }, -- open all folds toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- previous item - next = "j" -- next item + previous = "k", -- previous item + next = "j" -- next item }, } @@ -504,7 +504,7 @@ require 'nvim-treesitter.configs'.setup { playground = { enable = true, disable = {}, - updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code + updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code persist_queries = false, -- Whether the query persists across vim sessions keybindings = { toggle_query_editor = 'o', @@ -623,6 +623,7 @@ end require("hoversplit").setup({}) -require("murdock") +--require("murdock") +require("ollama_setup") require("lir_setup") require("lualine_setup") diff --git a/dot_vimrc b/dot_vimrc index 79d6829..3930f20 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -233,6 +233,7 @@ Plug 'nvim-lua/popup.nvim' Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'sindrets/diffview.nvim' +Plug 'nomnivore/ollama.nvim' Plug 'kyazdani42/nvim-web-devicons' " for file icons "Plug 'kyazdani42/nvim-tree.lua'