all repos

init.lua @ ee6a2e76980531e2c21b9beaed6948a15cee18c1

my nvim config
1 files changed, 8 insertions(+), 3 deletions(-)
feat(harpoon_status): add some types and kinda optimization
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-03-17 23:55:11 +0200
Parent: b2e97aa
M lua/scratch/harpoon_status.lua

@@ -1,11 +1,14 @@

-local h = require "harpoon" local M = {} +---@param v number +---@return string local function get_active_indicator(v) return string.format("|%d|", v) end +---@return string function M.status() + local h = require "harpoon" local list = h:list() local rdir = list.config:get_root_dir() local cfpath = vim.api.nvim_buf_get_name(0)

@@ -26,9 +29,11 @@

return table.concat(status, " ") end +---@return string function M.lualine() - if not package.loaded["harpoon"] ~= nil then - return + local harpoon_loaded = package.loaded["harpoon"] ~= nil + if not harpoon_loaded then + return "" end return M.status():reverse() end