From 11f9c6cbae789cf6acfbac337224148086e3908b Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Wed, 10 Apr 2024 10:48:36 +0200 Subject: [PATCH] Arrow now uses dr over e, also, switch to my fork which fixes the statusline The statusline now takes a bufnr instead of using the current buffer, this way it works with multiple statuslines at the same time, like incline. Additionally, it doesnt dissapear when open floating windows. --- nvim/lua/plugs/arrow.lua | 22 ++++++++++++++++++++-- nvim/lua/plugs/incline.lua | 8 ++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/nvim/lua/plugs/arrow.lua b/nvim/lua/plugs/arrow.lua index 0686973..0800fc2 100644 --- a/nvim/lua/plugs/arrow.lua +++ b/nvim/lua/plugs/arrow.lua @@ -1,7 +1,25 @@ return { - "otavioschwanck/arrow.nvim", + "LarssonMartin1998/arrow.nvim", opts = { show_icons = true, - leader_key = "," + leader_key = ",", + global_bookmarks = true, + custom_actions = { + open = function(filename, _) + vim.cmd(string.format(":drop %s", filename)) + end, + }, + mappings = { + edit = "e", + delete_mode = "d", + clear_all_items = "C", + toggle = "s", + open_vertical = "v", + open_horizontal = "h", + quit = "q", + remove = "x", + next_item = "n", + prev_item = "p", + } } } diff --git a/nvim/lua/plugs/incline.lua b/nvim/lua/plugs/incline.lua index 259dc07..67221ca 100644 --- a/nvim/lua/plugs/incline.lua +++ b/nvim/lua/plugs/incline.lua @@ -52,17 +52,13 @@ return { return label end - -- TODO: Make this fetch data from arrow using the file that the statusline is running on. - -- This will require a pull request to change how it handles the statusline. - -- Right now it just uses the current buffer. - -- It can still be the same UX but with the option of sending in a path to work on. local function get_arrow_label() local statusline = require("arrow.statusline") - if statusline.is_on_arrow_file() == nil then + if statusline.is_on_arrow_file(props.buf) == nil then return "" end - return " " .. statusline.text_for_statusline_with_icons() + return " " .. statusline.text_for_statusline_with_icons(props.buf) end return {