help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking For Any Emacs Config Examples That Has LSP Mode With 'aggres


From: Samuel Banya
Subject: Re: Looking For Any Emacs Config Examples That Has LSP Mode With 'aggressive-indent' Mode
Date: Fri, 29 Apr 2022 21:42:30 -0400
User-agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27

Yeah, that's the crazy part, I kind of like both in their own way.

However, I did look more into the configuration options for LSP mode, and there 
really is just only an on-off switch for indentation itself.

I guess its up to the LSP server itself to be more wary of how and when to 
indent blocks of code.

Hoping someone has a good idea for what else to do or at least a sample LSP 
config that I can check out.

Thanks,

Sam

On Thu, Apr 28, 2022, at 7:44 PM, Óscar Fuentes wrote:
> "Samuel Banya" <sbanya@fastmail.com> writes:
> 
> > Hello Oscar,
> >
> > Yeah, LSP on its own doesn't do enough indentation.
> >
> > Aggressive indent is awesome because it does a ton more work for you.
> >
> > LSP always really only reacts when you hit the Enter key in some cases, 
> > hard to describe.
> >
> > Its just not on point in comparison.
> >
> > Does anyone have any configs that combine the two or at least gets a
> > more aggressive LSP mode present?
> 
> If you are happy with aggressive-indent, you can disable lsp-mode
> indentation system altogether. See lsp-enable-indent (and probably
> lsp-enable-on-type-formatting too).
> 
> IIRC lsp-mode has settings for choosing when to trigger the
> auto-formatting, but can't remember them right now. You can try a
> brute-force solution consisting on invoking lsp-format-buffer from a
> function on self-insert-hook.
> 
> 
> 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]