Fork me on GitHub
#emacs
<
2023-05-31
>
Colin (fosskers)06:05:34

Has anyone else been noticing freezes when inside a (comment ...) block?

Colin (fosskers)06:05:14

Only on navigation. Spamming C-g usually fixes it after a few times.

elken06:05:05

That's normally clojure-toplevel-inside-comment-form

Colin (fosskers)07:05:48

Which I do have set to t

elken07:05:06

Right which normally triggers it, does it still happen set to nil?

Colin (fosskers)07:05:15

I'll try that

🙌 2
Carlo08:05:06

tl;dr, I wasn't ready to give up the comment block functionality, and it turned out that it was a problem with the hover functionality. To fix it, I do:

;; No hover, it was causing problems on comments block
(after! clojure-mode (setq lsp-eldoc-enable-hover nil))
The after! macro is from doom-emacs, adapt the idea to your setup

elken08:05:40

He's a fellow doomer, but the vanilla equivalent is with-eval-after-load

🙌 4
doom-emacs 2
Colin (fosskers)00:06:59

Ah the acurse'd eldoc hover

Colin (fosskers)00:06:15

It's basically never what I want, so it's getting the axe

joost-diepenmaat16:05:34

Probably a stupid idea, but why aren’t ANSI/SGR codes used as a “plain-text, but with colors and some styling” format?

joost-diepenmaat16:05:17

toying with ideas to have something like “org mode, but with inline colors”.

ag16:05:59

what are you talking about, I'm confused? maybe something like ;;; ansi-color.el --- translate ANSI escape sequences into faces

joost-diepenmaat18:05:34

I mean that there’s no mode to see /and edit/ files with embedded ansi color codes. ANSI-color.el is mostly intended for shells and log files - so showing output of other programs.

tianshu17:05:26

Is there a package for better re-frame experience, e.g. jump to where event/sub is registered?

ag17:05:26

Between the files, lsp (I think) handles it. Within a single file, I use imenu with this: excuse the Doom syntax, I'm sure you know how to fix it for vanilla Emacs.

(add-hook! 'clojurescript-mode-hook
    (defun add-reframe-regs-to-imenu ()
      (add-to-list
       'imenu-generic-expression
       '("re-frame" "^(*reg-\\(event-db\\|sub\\|sub-raw\\|fx\\|event-fx\\|event-ctx\\|cofx\\)[ \n]+\\([^\t \n]+\\)" 2)
       t)))

đź‘€ 2
vemv17:05:17

IIRC one can simply use namespaced keywords and use cider/lsp's "jump to keyword definition" functionality? (yes, a keyword doesn't have a formal "definition" place, but ::foo or ::foo/bar have a natural namespace they refer to, and a first occurrence within that file)

tianshu18:05:52

Good suggestions, let me try

tianshu18:05:18

It seems that cider-find-keyword only works when the target buffer is opened, did I run into a bug?

tianshu18:05:44

So you guys use cider and lsp at the same time?

vemv18:05:03

> It seems that cider-find-keyword only works when the target buffer is opened, did I run into a bug? Seems likely, feel free to open an issue

tianshu18:05:44

It works with LSP, I guess I should pull the latest version of cider and try again.

đź‘Ť 2
tianshu17:05:49

Or something similar to morse in Emacs