From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Samuel Banya" Newsgroups: gmane.emacs.help 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 Message-ID: <4442f0a4-ebe1-47dc-88cc-c2f52abea030@www.fastmail.com> References: <6f6d11c1-d2f0-48b8-992b-5687804132ea@www.fastmail.com> <87sfpxaqtk.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18456"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27 To: "Emanuel Berg" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 29 00:03:57 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkCEu-0004bs-Vf for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 29 Apr 2022 00:03:57 +0200 Original-Received: from localhost ([::1]:48436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkCEt-00063O-9Z for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Apr 2022 18:03:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkC5X-0002Ai-9Z for help-gnu-emacs@gnu.org; Thu, 28 Apr 2022 17:54:15 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkC5S-0003RW-R3 for help-gnu-emacs@gnu.org; Thu, 28 Apr 2022 17:54:12 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0A4C45C00B2 for ; Thu, 28 Apr 2022 17:54:10 -0400 (EDT) Original-Received: from imap50 ([10.202.2.100]) by compute5.internal (MEProxy); Thu, 28 Apr 2022 17:54:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1651182850; x=1651269250; bh=LkEHknVZcr QdR6AIJd2muPGDjO7k7g6bgnllxEw2wS4=; b=btVMPyGeCaGQjiWpfuyoswU3Mq XGn8+F6bHoTmNK1PIlScyjpcrRvhDdXMJRt892ORN4eNybE5COTWl9/NqY8aO5B6 zaURmdXURICOntirirUwhlF6sDufNRbqpOK49I7PEebUILVoXjwKtjBu/JSnaGQh 7qZSP5LhUUVWPzmG+QID20IZXP8DYvydEde6NZpmtsm8w2DgZGdhJg1ehfrbvnO4 bsN/k5GjY+mCs6gdYs1iM28eYsk2blwCIsyEh4XQRg4jPgDkjC1Ded76ER3jbmmw wAaqJY08tBxkDo8AkjNn7c0nprMJfQXK87orbZ2rZmRH1rvpbx/Jl3PWmW+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1651182850; x= 1651269250; bh=LkEHknVZcrQdR6AIJd2muPGDjO7k7g6bgnllxEw2wS4=; b=s VjPGr/ADH1AUIJbYh5BBTJSTZVVAFyzjFPnw0B9cQLG+uqL3G/uRpfIUT09N9GX7 i4vW43xDTzzG+y62oWsz1H71Id39nCNC8yHH94Z0jVHgOemAoG/QrDvv2m6CWQk9 tkLbhw0p4lCcE3zYAZV6mWilybn9qISH1sdvKmWVD3NXG94nlF5vJ5O1IwMJTyTo 70ekqxDRpW+JG/1V7z3KsnKdcs96pCMlwcF1wfdHaPB8UY5ciM+WwwyxQbx3oHSz OVnkDw2x6m00zUL8tkmxGnNEU+/N6qGpyArL+4OSDR2iQbRIynQ3UHLUOab6/xt8 qnaReZ8zLyGe/JGDr4f8g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudekgddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtre erreerjeenucfhrhhomhepfdfurghmuhgvlhcuuegrnhihrgdfuceoshgsrghnhigrsehf rghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepfeekhedvuefhveeiteetje fhffetjeevkeduleejffdtvedthfeikeehgeefleegnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepshgsrghnhigrsehfrghsthhmrghilhdrtg homh X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id CE9B91920089; Thu, 28 Apr 2022 17:54:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87sfpxaqtk.fsf@telefonica.net> Received-SPF: pass client-ip=66.111.4.27; envelope-from=sbanya@fastmail.com; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137075 Archived-At: 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 mor= e aggressive LSP mode present? Thanks, Sam On Thu, Apr 28, 2022, at 4:36 PM, =C3=93scar Fuentes wrote: > "Samuel Banya" writes: >=20 > > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 >=20 >=20