-
-
Notifications
You must be signed in to change notification settings - Fork 625
fix(#2746): background and right aligned icons in floating windows #3128
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(#2746): background and right aligned icons in floating windows #3128
Conversation
…r right aligned icons
Good call. It's non-trivial and doesn't really add much value. |
Apologies, I think I might not be understanding; it seems to be adding whitespace to the float, for the right icons: -- vim.opt.culopt = "number"
require("nvim-tree").setup({
view = {
width = 18,
},
renderer = {
full_name = true,
icons = {
git_placement = "right_align",
modified_placement = "right_align",
hidden_placement = "right_align",
diagnostics_placement = "right_align",
bookmarks_placement = "right_align",
},
},
}) |
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.
lua/nvim-tree/view.lua
Outdated
@@ -302,6 +302,21 @@ function M.open(options) | |||
log.profile_end(profile) | |||
end | |||
|
|||
---@param extmarks table |
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.
---@param extmarks table | |
---@param vim.api.keyset.get_extmark_item[] as per vim.api.nvim_buf_get_extmarks |
lua/nvim-tree/view.lua
Outdated
@@ -302,6 +302,21 @@ function M.open(options) | |||
log.profile_end(profile) | |||
end | |||
|
|||
---@param extmarks table | |||
---@return number | |||
function M.extmarks_length(extmarks) |
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.
Thanks for abstracting this.
Small request: move this to utils.lua
. View is being converted into a stateful explorer member as part of the multi-instance view initiative: #3109
Apologies, my time is limited, I'll look at this next weekend. |
…puting condition for full name float to show
Thanks for pointing that out, there was a bug, which now should be fixed. This PR, besides fixing #2746, also fixes this behavior: ![]() ![]() |
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.
Many thanks for the thorough fix!
Closes #2746
Also I added functionality for copying over right-aligned icons to the float.
Before:
After: