From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Brand new clojure support in Emacs ;-) Date: Wed, 30 Aug 2023 07:17:35 +0000 Message-ID: <87r0nlngmo.fsf@posteo.net> References: <87il9kksqz.fsf@dfreeman.email> <87a5uw9ivs.fsf@posteo.net> <87ttt42gna.fsf@dfreeman.email> <87wmy080kn.fsf@posteo.net> <83v8djcydl.fsf@gnu.org> <87350ndquw.fsf@dfreeman.email> <83350ncbns.fsf@gnu.org> <87cyzrjbd8.fsf@dfreeman.email> <83zg2vav46.fsf@gnu.org> <87o7j99304.fsf@dfreeman.email> <87zg2hsyrd.fsf@dfreeman.email> <87h6ontwfv.fsf@posteo.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="30178"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Stallman , Danny Freeman , Eli Zaretskii , emacs-devel , Manuel Uberti To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 30 09:18:44 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qbFTP-0007em-Np for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Aug 2023 09:18:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbFSW-0005sf-3G; Wed, 30 Aug 2023 03:17:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbFST-0005sO-JH for emacs-devel@gnu.org; Wed, 30 Aug 2023 03:17:45 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbFSP-0006Py-CF for emacs-devel@gnu.org; Wed, 30 Aug 2023 03:17:45 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6413F24002A for ; Wed, 30 Aug 2023 09:17:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693379858; bh=XVC4vyCpL5nLIwJvK8OOVBX6UHMw23j8F4o4VmlcJG4=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=jxjGmkV6V2vmToztxQ6SlDQV1QzClzwBwC6SBue/NjSknxul5uQoYdBn+iKO0rmxa j1I0BysoK44PGpX6raWTlosVJ7BRS9D2RV5gio1vg0y1FvcQmcIqC11OdAxUDQVx9U xS/mEs9wJx98bpdcEaqNDMwuRAdAKTcqpqPz73YXMMaoiFx5wGOMh5DEBgIV/71CI7 d9kY4otTNlARGW5llXzcG0bJyCuGHj2K5aV8X1KF+3gsjJND2UvnDLCeGRWuoAwtT5 vAvfJxqlUHiztxlSa8FXJreMptBDppbkr6hVxaeDmSMAxT/GqvOCCAi8PhLcNMTuST iPYJa8peMmVEw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RbFxD4B0zz9rxR; Wed, 30 Aug 2023 09:17:36 +0200 (CEST) In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Tue, 29 Aug 2023 22:09:33 +0100") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309531 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > On Fri, Aug 25, 2023 at 8:26=E2=80=AFAM Philip Kaludercic wrote: >> >> Richard Stallman writes: >> >> > [[[ To any NSA and FBI agents reading my email: please consider ]]] >> > [[[ whether defending the US Constitution against all enemies, ]]] >> > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] >> > >> > It appears that there is no clojure-mode command in core Emacs. >> > There is a Clojure mode package, but it is in NonGNU ELPA. >> > >> > I think that language is important enough that, notwithstanding not >> > really being similar to Lisp, we ought to have a major mode to support= it. >> > Would someone please work on that? >> >> I had brought this up in the recent clojure-ts-mode thread, that I >> assume you are referring to. Sadly, I have no experience with the >> language, but one idea might be to extend lisp-data-mode by whatever the > > I don't know if this counts as "work on that" but here's two interesting = lines > Elisp: > > (define-derived-mode clojure-mode lisp-data-mode "Clojure" > "Barebones Clojure") > (add-to-list 'auto-mode-alist '("\\.clj" . clojure-mode)) I suggested something along these lines up the thread, but didn't try it out myself. Nice to see that the idea works. To avoid confusion, I think it might be a good idea to not call this `clojure-mode' as well, but something like "clojure-proto-mode" or "primitive-clojure-mode". > Since it is a lisp dialect many things works here, like indentation, > symbol recognition, parenthesis balancing, C-M navigation, and thing-at-p= oint. > > And then there's LSP, right? > > So I installed clojure-lsp from here: > https://aur.archlinux.org/packages/clojure-lsp-bin > > I created a hello world project with the "lein" tool, git init, found the > src/helloworld/core.clj inside it, pressed M-x eglot and suddenly I had > at-point-documentation, diagnostics, lots of refactorings, completion, et= c. > > The thing that's a bit minimal is the syntax highlighting, but it's > not that bad either IMHO. Eglot doesn't yet support LSP-mandated syntax > highlighting. I have no idea what it takes to add TreeSitter support > to such a bare-bones mode (but shouldn't it be really easy like mapping > syntactic symbols to faces?) > > No idea if this works with the CIDER or SLIME backends for clojure. > Don't ask me to test any more cause I've just uninstalled it all > but any clojurians rading can have a go. I would guess that anyone who is seriously interested in working with Clojure, would install the proper major mode and the proper packages. > Jo=C3=A3o