-
Notifications
You must be signed in to change notification settings - Fork 42
Add Dir Bookmarks #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Dir Bookmarks #112
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,8 +25,10 @@ return { | |||||
| }, | ||||||
| opts = { | ||||||
| show_icons = true, | ||||||
| icon_provider = 'nvim-web-devicons', -- or 'mini.icons' | ||||||
| leader_key = ';', -- Recommended to be a single key | ||||||
| buffer_leader_key = 'm', -- Per Buffer Mappings | ||||||
|
|
||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
@@ -81,6 +83,7 @@ Just press the leader_key set on setup and follow you heart. (Is that easy) | |||||
| remove = "x", -- only used if separate_save_and_remove is true | ||||||
| next_item = "]", | ||||||
| prev_item = "[" | ||||||
|
||||||
| prev_item = "[" | |
| prev_item = "[", |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,37 +1,52 @@ | ||||||||||
| local config = require("arrow.config") | ||||||||||
|
|
||||||||||
| local M = {} | ||||||||||
|
|
||||||||||
| local get_icon_from_web_dev_icons = function(file_name) | ||||||||||
| local webdevicons = require("nvim-web-devicons") | ||||||||||
| local extension = vim.fn.fnamemodify(file_name, ":e") | ||||||||||
| local icon, hl_group = webdevicons.get_icon(file_name, extension, { default = true }) | ||||||||||
| if vim.fn.isdirectory(file_name) == 1 then | ||||||||||
| return "H", "Normal" | ||||||||||
|
||||||||||
| return "H", "Normal" | |
| local icon, hl_group = webdevicons.get_icon(file_name, "", { default = true }) | |
| return icon, hl_group |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function does not return a value when provider is neither 'web_dev_icons' nor 'mini'. This can lead to nil values being returned unexpectedly. Add an else clause at the end that either throws an error about invalid provider or provides a default fallback.
| end | |
| end | |
| error("Invalid icon provider: " .. tostring(provider), vim.log.levels.ERROR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The icon_provider value 'nvim-web-devicons' does not match the implementation in lua/arrow/integration/icons.lua which expects 'web_dev_icons' (line 31). This mismatch will cause the icon provider selection to fail. Change to 'web_dev_icons' to match the implementation.