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",
},
},
}) |
lua/nvim-tree/view.lua
Outdated
| log.profile_end(profile) | ||
| end | ||
|
|
||
| ---@param extmarks table |
There was a problem hiding this comment.
| ---@param extmarks table | |
| ---@param vim.api.keyset.get_extmark_item[] as per vim.api.nvim_buf_get_extmarks |
lua/nvim-tree/view.lua
Outdated
|
|
||
| ---@param extmarks table | ||
| ---@return number | ||
| function M.extmarks_length(extmarks) |
There was a problem hiding this comment.
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:
|
alex-courtis
left a comment
There was a problem hiding this comment.
Many thanks for the thorough fix!










Closes #2746
Also I added functionality for copying over right-aligned icons to the float.
Before:
After: