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?
https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/ may help
https://github.com/ericdallo/dotfiles/blob/master/.config/doom/config.el#L139-L148 is my config
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 :)
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.
try my config, it remove lsp-ui sideline and breadcrumb which are one of the things that most grab attention
this is how it looks in the end
what are these chevrons called next to my functions?
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.
> try my config, will do!
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
those faces are totally configured via lsp-mode faces
ah that makes sense, various packages are alerting me of the same thing. i'll look into that.
that guide you linked great, many thanks. the annotated screenshot is brilliant.
we used to have lots of people asking the same thing, that guide indeed helped :)
to reduce the blinkenlight affect i need to change the lsp face for symbol highlighting, it is much to strong
(in my theme)
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?
i think so
before/after. much better!
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
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.
I would love to see your .emacs @gar
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
Thanks
Here you go, @krishnansh710: https://github.com/reinseth/emacs.d