-
Notifications
You must be signed in to change notification settings - Fork 93
Added: elixir-quoted-minor-mode #103
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
Added: elixir-quoted-minor-mode #103
Conversation
You are a man after my own heart. Unfortunately this uses In order to check out the functionality (which is really cool!) I added the following to (defvar font-lock-ensure-function
(lambda (_beg _end)
(unless font-lock-fontified (font-lock-default-fontify-buffer)))
"Function to make sure a region has been fontified.
Called with two arguments BEG and END.")
(defun font-lock-ensure (&optional beg end)
"Make sure the region BEG...END has been fontified.
If the region is not specified, it defaults to the whole buffer."
(font-lock-set-defaults)
(funcall font-lock-ensure-function
(or beg (point-min)) (or end (point-max)))) I also added the following line to the (set (make-local-variable 'font-lock-ensure-function)
'jit-lock-fontify-now) Adding those made it work flawlessly. I will be more than happy to merge this pull request if you can add a guard so that it's only activated if the user's emacs has I'm really excited about this (I am a fan of Clojure's emacs tooling as well) but can't merge it without guarantees for users that it will either work or be unavailable. Thanks Matt |
This could probably be accomplished through the use of (when (functionp 'font-lock-ensure)
(define-minor-mode elixir-quoted-minor-mode
"Minor mode for displaying elixir quoted expressions"
:group 'elixir-quoted :lighter " quoted"
:keymap '(("q" . quit-window))
(setq buffer-read-only t))) |
How does this look? 415dc6e...mdeboard-elixir-quoted-minor-mode If that looks right, merge it into your branch and I'll merge the PR. |
Hi, Matt! It's seems that there is no need in this call at all 😄. Looks like |
I took this idea of |
👍 |
Add elixir-quoted-minor-mode.
New feature: Suggest specs based on Dialyzer's success typings using code lenses
* :cwd option expects a charlist * Signature Help Request should return null instead of empty array when no signature found see https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#textDocument_signatureHelp * ElixirSense.docs never returns nil instead return null when no subject is found see https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#textDocument_hover
Hi!
I'm a fan of macros and I really miss some slime or cider features about macro expansions in emacs-elixir.
So, this commit adds some interactivity for quoted expressions. Now, one can see a popup window with elixir highlighting and indentation instead of text message and close it with
q
.