-
Notifications
You must be signed in to change notification settings - Fork 11
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
Having icons causes issues with the new marginalia alignment logic #12
Comments
Yes, you probably have to adjust to the new alignment logic. Either adjust the marginalia-align-offset by the width of the icons if maginalia-align=left or rewrite the annotations such that you add the additional offset manually. |
I have noticed some alignment issues regardless of Marginalia. Changing [ This is not a patch. Just to share the idea. ] all-the-icons-completion.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/all-the-icons-completion.el b/all-the-icons-completion.el
index 609e147..3db4586 100644
--- a/all-the-icons-completion.el
+++ b/all-the-icons-completion.el
@@ -54,15 +54,15 @@ (defun all-the-icons-completion-get-icon (cand cat)
(file (all-the-icons-completion-get-file-icon cand))
(project-file (all-the-icons-completion-get-file-icon cand))
(buffer (all-the-icons-completion-get-buffer-icon cand))
- (t "")))
+ (t "\t")))
(defun all-the-icons-completion-get-file-icon (cand)
"Return the icon for the candidate CAND of completion category file."
(cond ((file-directory-p cand)
(concat
(all-the-icons-icon-for-dir cand :face 'all-the-icons-completion-dir-face)
- " "))
- (t (concat (all-the-icons-icon-for-file cand) " "))))
+ "\t"))
+ (t (concat (all-the-icons-icon-for-file cand) "\t"))))
(defun all-the-icons-completion-get-buffer-icon (cand)
"Return the icon for the candidate CAND of completion category buffer."
@@ -76,7 +76,7 @@ (defun all-the-icons-completion-get-buffer-icon (cand)
(all-the-icons-faicon "sticky-note-o")
parent-icon)
icon)
- " ")))
+ "\t")))
(defun all-the-icons-completion-completion-metadata-get (orig metadata prop)
"Meant as :around advice for `completion-metadata-get', Add icons as prefix. Before VS After (notice the purple block in the Completions)Before VS After with Marginalia |
This is actually a separate alignment bug, I'll look into how |
I've only noticed this in file annotations, but I assume this is a general problem.
Probably stems from the marginalia alignment logic assuming that there will no extra things it doesn't know about.
cc @minad
The text was updated successfully, but these errors were encountered: