2023-10-10 19:04:12 +08:00
|
|
|
return {
|
|
|
|
--
|
|
|
|
-- File explorer
|
|
|
|
--
|
|
|
|
|
|
|
|
{
|
|
|
|
'nvim-neo-tree/neo-tree.nvim',
|
|
|
|
dependencies = {
|
|
|
|
'nvim-lua/plenary.nvim',
|
|
|
|
'nvim-tree/nvim-web-devicons',
|
|
|
|
'MunifTanjim/nui.nvim',
|
|
|
|
},
|
|
|
|
keys = {
|
2023-11-20 16:59:51 +08:00
|
|
|
{ '\\', '<cmd>Neotree reveal<cr>', desc = 'Neotree' },
|
2023-10-10 19:04:12 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Statusline
|
|
|
|
--
|
|
|
|
|
|
|
|
{
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
event = 'VeryLazy',
|
|
|
|
dependencies = {
|
|
|
|
'nvim-tree/nvim-web-devicons',
|
|
|
|
},
|
2024-05-07 20:41:52 +08:00
|
|
|
|
2023-10-10 19:04:12 +08:00
|
|
|
config = function()
|
2024-05-07 20:41:52 +08:00
|
|
|
-- Define a function to check that ollama is installed and working
|
|
|
|
local function get_condition()
|
|
|
|
return package.loaded["ollama"] and require("ollama").status ~= nil
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- Define a function to check the status and return the corresponding icon
|
|
|
|
local function get_status_icon()
|
|
|
|
local status = require("ollama").status()
|
|
|
|
|
|
|
|
if status == "IDLE" then
|
|
|
|
return "OLLAMA IDLE"
|
|
|
|
elseif status == "WORKING" then
|
|
|
|
return "OLLAMA BUSY"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-10-10 19:04:12 +08:00
|
|
|
require('lualine').setup {
|
|
|
|
options = {
|
|
|
|
icons_enabled = true,
|
2023-11-20 16:59:40 +08:00
|
|
|
theme = 'gruvbox-material',
|
2023-10-10 19:04:12 +08:00
|
|
|
component_separators = { left = '', right = ''},
|
|
|
|
section_separators = { left = '', right = ''},
|
|
|
|
globalstatus = true,
|
|
|
|
extensions = {
|
|
|
|
'neotree'
|
|
|
|
},
|
2024-01-29 22:31:18 +08:00
|
|
|
},
|
|
|
|
tabline = {
|
|
|
|
lualine_a = {'buffers'},
|
|
|
|
};
|
2024-05-07 20:41:52 +08:00
|
|
|
sections = {
|
|
|
|
lualine_a = {'mode'},
|
|
|
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
|
|
|
lualine_c = { { 'filename', path = 1 } },
|
|
|
|
lualine_x = { get_status_icon, get_condition, 'encoding', 'fileformat', 'filetype' },
|
|
|
|
lualine_y = { "progress" },
|
|
|
|
lualine_z = { "location" },
|
|
|
|
},
|
2023-10-10 19:04:12 +08:00
|
|
|
}
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Git decorations
|
|
|
|
--
|
|
|
|
|
|
|
|
{
|
|
|
|
'lewis6991/gitsigns.nvim',
|
|
|
|
config = function()
|
|
|
|
require('gitsigns').setup()
|
|
|
|
end
|
2024-05-07 20:41:52 +08:00
|
|
|
},
|
2023-10-10 19:04:12 +08:00
|
|
|
}
|
|
|
|
|