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: Fri, 29 Apr 2022 21:42:30 -0400 Message-ID: References: <6f6d11c1-d2f0-48b8-992b-5687804132ea@www.fastmail.com> <87sfpxaqtk.fsf@telefonica.net> <4442f0a4-ebe1-47dc-88cc-c2f52abea030@www.fastmail.com> <87o80kbwnr.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="33516"; 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 Sat Apr 30 03:43:24 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 1nkc8q-0008aE-9R for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 30 Apr 2022 03:43:24 +0200 Original-Received: from localhost ([::1]:42664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkc8o-00038h-P7 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 29 Apr 2022 21:43:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkc8P-00038K-5d for help-gnu-emacs@gnu.org; Fri, 29 Apr 2022 21:42:57 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:42089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkc8N-0002xW-3K for help-gnu-emacs@gnu.org; Fri, 29 Apr 2022 21:42:56 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id E568432008FF for ; Fri, 29 Apr 2022 21:42:51 -0400 (EDT) Original-Received: from imap50 ([10.202.2.100]) by compute5.internal (MEProxy); Fri, 29 Apr 2022 21:42:52 -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=1651282971; x=1651369371; bh=lrmbO0Yx+U Fh5CbMAzoqanEuLwe7qMyiKJBc24R4CTs=; b=Q/gCmCoatFXIynEPrvMd36nFmN OonVlqXl6a68uZ7P4bSjdJ/RotYoPOE+yV5zD5+7cFJdtB51hM++prYgPmH/7Pm5 gi1/RxHtmQxiEnqkSAXxytjfnsrRLAxwZ+0GxmUkZkNsBH1AOXk6uqPVjCLrPpbu AoRXKskJQQlNPWSU1TBM3oe2XTsvMYI1NOlgXZpxeZwjeKVCrvstI8UfVIMn6N/i zApMTX2pg06utcZgP3CbNtBuizeSjC8wZymn8TuYups2bA4X1wKblCZ7cGbAGkBW Voa+rwf5bDrt9yobFo/rCifYZgKK/etfO5C6Fy9dU5HGv+hb9xaIcE/AjtNQ== 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=1651282971; x= 1651369371; bh=lrmbO0Yx+UFh5CbMAzoqanEuLwe7qMyiKJBc24R4CTs=; b=O wDkg65HD2KbCeoh4cXIJVMqlxU8L2aFyCgsOQADOZmw/ZMP/8YyfDV13Oa+c5avr 3I1X8HafsHG0L4OC+DC5e1Shx6cUbbnUAmbLGI9F/8HL0PP3m7D4qseyHJ/z+onX mqSsloZeNYWWWHR2o7Vwr544ItRBj2TIPrpzEdzbmfhIexIuoWQcfpMPungLfxFn JsaAXbQfJHCS4AtCm5l2ZtzidHCEc+uzWNqOOm58ukskAfIYXflxOfesEJp2YTVQ AzeZ+gDEJi7W8k8ThWE2XpX5j24l0AyTdILNMifykMhWW4QjZSB1e0tnLESyDI+I MyWdMp+DDXuYH7m/1q+2A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddtgdegkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtre erreerjeenucfhrhhomhepfdfurghmuhgvlhcuuegrnhihrgdfuceoshgsrghnhigrsehf rghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepfeekhedvuefhveeiteetje fhffetjeevkeduleejffdtvedthfeikeehgeefleegnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepshgsrghnhigrsehfrghsthhmrghilhdrtg homh X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 224EF192008C; Fri, 29 Apr 2022 21:42:51 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87o80kbwnr.fsf@telefonica.net> Received-SPF: pass client-ip=64.147.123.20; envelope-from=sbanya@fastmail.com; helo=wout4-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:137091 Archived-At: 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, an= d 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, =C3=93scar Fuentes wrote: > "Samuel Banya" writes: >=20 > > 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 cas= es, 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? >=20 > 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). >=20 > 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. >=20 >=20 >=20