unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Samuel Banya" <sbanya@fastmail.com>
To: "Emanuel Berg" <help-gnu-emacs@gnu.org>
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	[thread overview]
Message-ID: <4442f0a4-ebe1-47dc-88cc-c2f52abea030@www.fastmail.com> (raw)
In-Reply-To: <87sfpxaqtk.fsf@telefonica.net>

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	other threads:[~2022-04-28 21:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 16:46 Looking For Any Emacs Config Examples That Has LSP Mode With 'aggressive-indent' Mode Samuel Banya
2022-04-28 20:36 ` Óscar Fuentes
2022-04-28 21:53   ` Samuel Banya [this message]
2022-04-28 23:44     ` Óscar Fuentes
2022-04-30  1:42       ` Samuel Banya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4442f0a4-ebe1-47dc-88cc-c2f52abea030@www.fastmail.com \
    --to=sbanya@fastmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).