-
Notifications
You must be signed in to change notification settings - Fork 29
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
Is there a way to have unicode characters working like idents? #230
Comments
There is a way to have this, if we changed prettify-symbols-predicate. See the definition of |
I did but I still have no clue, sorry! |
Try this after loading company-coq, maybe? (defconst ~/numbers '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))
(defun ~/prettify-symbols--same-ish-syntax (other ref)
"Check if the syntax class of OTHER is similar to that of REF."
(let ((stx-other (char-syntax (or other ?\s))))
(pcase (char-syntax ref)
(?w (and (eq stx-other ?w)
(eq (memq ref ~/numbers) (memq other ~/numbers))))
(?_ (eq stx-other ?_))
(_ (memq stx-other '(?. ?\\))))))
(advice-add 'company-coq-features/prettify-symbols--same-ish-syntax
:override #'~/prettify-symbols--same-ish-syntax) |
It seems to work. Is there a reason not to have it by default? In any case, I ended up coding everything in unicode (that's the reason for asking better support at fuzzy search in the first place). |
Not sure. I could try making it the default and seeing whether people complain ^^ |
If I define a rule
I would expect
_M1
,_M'
,_M_blah
be printed asℳ₁
,ℳ'
, andℳ_blah
respectively.Instead, I need to redefine them too as in:
("_M'" . (?ℳ (Br . Bl) ?'))
Which is far from ideal.
Is there a way to have this?
The text was updated successfully, but these errors were encountered: