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: Thu, 28 Apr 2022 17:53:48 -0400
User-agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27

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?

Thanks,

Sam

On Thu, Apr 28, 2022, at 4:36 PM, Óscar Fuentes wrote:
> "Samuel Banya" <sbanya@fastmail.com> writes:
> 
> > I'm wondering if anyone could help me figure out why
> > 'aggressive-indent' and 'LSP Mode' in my config just do not get along
> > with each other, or could offer their config examples to help me
> > figure out how to solve that issue.
> 
> What follows is my experience as a happy user of aggressive-indent (for
> lisp-like languages) and lsp-mode for Dart/Flutter. I'm not an expert on
> lsp-mode.
> 
> Usually the lsp server takes the responsability of indenting your code,
> so aggressive-indent shouldn't be needed. AFAIK both lsp-mode and
> aggressive-indent watch for changes on the buffer as triggers to do
> their work, which is to delegate to the language server or to Emacs'
> mode-specific indentation system, respectively.
> 
> OTOH, your mode-dependent indentation settings (such as
> typescript-indent-level) may or may not be respected by the language's
> lsp server, in case it takes control of the indentation. The mode must
> tell the server about those settings.
> 
> Why do you want to use aggressive-indent with lsp-mode? Is it because
> the auto-indentation doesn't happen often enough? IIRC lsp-mode (or the
> Emacs part of the language server) has configs for determining when to
> trigger each feature.
> 
> 
> 


reply via email to

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