emacs

Casey 2025-03-21T13:52:06.518769Z

hi folks, I just enabled the emacs lsp-mode package with clojure-lsp. I like some of the actions it affords, but by default it makes my editor space so cluttered and busy... squiggles, gutter icons, all sorts of linting errors. "Yes, this function i just type is not used, I literally just finished the defn." There are tons of options to tweak.. but I don't want to spend the time to learn them all at the moment. Does anyone have a config shared online that tones down some of the default busyness?

ericdallo 2025-03-21T13:53:06.258409Z

https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/ may help

💯 1
ericdallo 2025-03-21T13:54:22.601079Z

about the unused function squiggle, that's how every LSP in every language that supports that works, it's something to get used to it, as when you finished writing the function, it's indeed not used until you use it :)

Casey 2025-03-21T13:57:53.188939Z

Maybe I need to tweak the colors or something, I want those features generally speaking, but out-of-the-box the visual effect is a bunch of blinkenlights, things are flashing all over and it is very distracting.

ericdallo 2025-03-21T13:58:38.545659Z

try my config, it remove lsp-ui sideline and breadcrumb which are one of the things that most grab attention

🙏 1
ericdallo 2025-03-21T13:59:33.947909Z

this is how it looks in the end

Casey 2025-03-21T14:02:44.239439Z

what are these chevrons called next to my functions?

Casey 2025-03-21T14:05:53.331099Z

also you can see the wut has 3 separate styles applied: a squiggle, a background, and a faded foreground. that's the kind of "too much" I'm referring to.

Casey 2025-03-21T14:06:20.274599Z

> try my config, will do!

ericdallo 2025-03-21T14:06:47.694589Z

that is flycheck saying that there is a squiggle on that line, I don't have that, as I use lsp-ui for squiggles as you can see on my screenshot

ericdallo 2025-03-21T14:07:23.252089Z

those faces are totally configured via lsp-mode faces

Casey 2025-03-21T14:08:57.090639Z

ah that makes sense, various packages are alerting me of the same thing. i'll look into that.

Casey 2025-03-21T14:13:07.596249Z

that guide you linked great, many thanks. the annotated screenshot is brilliant.

👍 1
ericdallo 2025-03-21T14:13:48.355319Z

we used to have lots of people asking the same thing, that guide indeed helped :)

Casey 2025-03-21T14:15:05.113039Z

to reduce the blinkenlight affect i need to change the lsp face for symbol highlighting, it is much to strong

Casey 2025-03-21T14:15:08.670329Z

(in my theme)

Casey 2025-03-21T14:20:00.304179Z

I'm, not too familiar with the emacs customization ui... could you confirm if the lsp-face-highlight-read option is the one that should control that?

ericdallo 2025-03-21T14:21:33.018629Z

i think so

Casey 2025-03-21T14:41:41.897669Z

before/after. much better!

👍 1
Casey 2025-03-21T16:51:23.292089Z

@ericdallo many thanks for your help (and contributions!) 🙏

1
Krishnansh Agarwal 2025-03-21T18:32:06.146849Z

does anyone here uses Emacs for web-development? Like I tried Doom Emacs for a Vue project, that was not as good of a experience as VSCode

gunnar 2025-03-23T20:13:08.605979Z

I used lsp-mode for typescript/tsx/react with great help from the aforementioned article, but have sinced moved on to eglot after running into some issues in emacs 30. Benefits of using eglot is that it is faster to start, and that it integrates with existing emacs interfaces instead of providing its own (e.g. find usages with xref). A major drawback is that you can't connect to different lsp servers in a single workspace with eglot, which is necessary if you want to get tailwindcss autocompletion. There is some ongoing effort, however, to abstract this away through multiplexing (and there are some packages that does this already, which I haven't tried), and I'm ok with waiting for it, since I couldn't get tailwind to work after upgrading to emacs 30 anyway (which is probably due to my config and not the tools themselves, but I couldn't bother spending much time on it.) Another benefit of eglot is https://github.com/joaotavora/breadcrumb. It provides a simple breadcrumbs ui like in lsp-ui, but imporantly it provides a proper symbol outline in an imenu-like interface where navigation actually works. lsp-mode / lsp-ui with imenu and treemacs provides a nice looking outline, but it's pretty useless for typescript as it doesn't let you navigate to top level symbols, which is the only thing I ever would want from such a feature. breadcrumb-mode does this just right. Apart from lsp, I also use the excellent https://github.com/mickeynp/combobulate by Mickey Petersen, and I've cherrypicked one feature from https://github.com/llemaitre19/jtsx on top of that: direct/live editing of jsx tags. If I change a tag name, then the closing tag is automatically updated, no explicit action / keyboard shortcut needed. This is something I've gotten used to with IntelliJ, and is something that I just cannot live without. I'll put together a gist of the relevant config, if that's interesting. I don't have my dotfiles in a public repo.

👀 2
Krishnansh Agarwal 2025-03-24T05:00:40.185479Z

I would love to see your .emacs @gar

Zeniten 2025-03-21T19:38:04.932389Z

Yes, though I haven't tried Doom Emacs; I've used Spacemacs in the past, and now I use my own config. There's some great information in this article that might be of interest to you: https://www.ovistoica.com/blog/2024-7-05-modern-emacs-typescript-web-tsx-config

🚀 1
Krishnansh Agarwal 2025-03-22T04:02:11.783209Z

Thanks

gunnar 2025-03-24T17:52:39.577099Z

Here you go, @krishnansh710: https://github.com/reinseth/emacs.d