-
Notifications
You must be signed in to change notification settings - Fork 139
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
Sly completion UI issue: small window size and inconsistent highlighting #597
Comments
I just noticed that completion highlighting syntax problem only occurs with |
im not that good at elisp, but i at tried to fix the highlighting: (defun sly-simple-completions (prefix)
"Return (COMPLETIONS COMMON) where COMPLETIONS complete the PREFIX.
COMPLETIONS is a list of propertized strings.
COMMON a string, the common prefix."
(cl-loop with first-difference-pos = (length prefix)
with (completions common) =
(sly--completion-request-completions prefix 'slynk-completion:simple-completions)
for completion in completions
do (let ((diff-pos (1+ first-difference-pos)))
(put-text-property 0
(- diff-pos 1)
'face 'completions-common-part
completion))
do (let ((diff-pos (1+ first-difference-pos)))
(put-text-property first-difference-pos
(min diff-pos (1- (length completion)))
'face 'completions-first-difference
completion))
collect completion into formatted
finally return (list formatted common))) |
Submit a patch for the highlighting. Read As for the temp buffer resize mode, it doesn't seem to make anything useful in my testing, so my advice is not to use it. But you could try |
When ill have time ill submit complete fix for sly-simple-completions and sly-flex-completions highlighting. |
Hello, I've tried various settings and the completion UI window is sometimes too small (see 2nd picture) and the highlighting does not match the text that we are trying to complete (see the 1st picture).
Note that the 3nd picture is not sly-mode, but i added to illustrate how default emacs completion highlighting should look like
The text was updated successfully, but these errors were encountered: