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: Óscar Fuentes
Subject: Re: Looking For Any Emacs Config Examples That Has LSP Mode With 'aggressive-indent' Mode
Date: Thu, 28 Apr 2022 22:36:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"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]