From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Josh Elsasser Newsgroups: gmane.emacs.devel Subject: Re: New jrpc.el JSONRPC library Date: Sun, 20 May 2018 20:32:38 -0700 Message-ID: <53FD4988-1E18-41CD-B37C-B71403F3233E@elsasser.ca> References: <87lgcrqgvz.fsf@gmail.com> <831seipvdb.fsf@gnu.org> <871se9lyid.fsf_-_@gmail.com> <83r2m8ghiq.fsf@gnu.org> <877enys4ot.fsf@gmail.com> <90d77452-87f2-50b3-4757-bceaacc144f5@gmail.com> <2DEC39CE-E4A9-496E-89BF-A4EAD63076DA@elsasser.ca> <87r2m5rjy6.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1526873455 17573 195.159.176.226 (21 May 2018 03:30:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 May 2018 03:30:55 +0000 (UTC) Cc: =?utf-8?Q?Cl=C3=A9ment_Pit-Claudel?= , emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 21 05:30:51 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fKbX8-0004R6-Ad for ged-emacs-devel@m.gmane.org; Mon, 21 May 2018 05:30:50 +0200 Original-Received: from localhost ([::1]:48644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKbZD-0003SG-DK for ged-emacs-devel@m.gmane.org; Sun, 20 May 2018 23:32:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKbZ0-0003RM-20 for emacs-devel@gnu.org; Sun, 20 May 2018 23:32:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fKbYw-0006lV-VY for emacs-devel@gnu.org; Sun, 20 May 2018 23:32:46 -0400 Original-Received: from mail-pg0-x22b.google.com ([2607:f8b0:400e:c05::22b]:36277) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fKbYw-0006l7-Np for emacs-devel@gnu.org; Sun, 20 May 2018 23:32:42 -0400 Original-Received: by mail-pg0-x22b.google.com with SMTP id 63-v6so3587881pgg.3 for ; Sun, 20 May 2018 20:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elsasser-ca.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hKI9pQllyEvBoeY9A4Q58r2zs6dNKBczDSODdB7Ufkc=; b=nGY7najv7EmOsGNNj2hVtE1f+4TmT398VZGZiKAWNcGnrpvjIg3ua1/zug8eZ+rLr3 iTiXF515ft6m0US2xy99j517V45MoDoe7z7Ut8jXD3KBrC2QJAvDwaOTFgUty/YWMlMr AZV72BFIW3UbcoL+EQGnEdD7V9LVWhNBQFR5TDGEXHPUzlYvSwugsaPJniN5PkW+hUmq xWj3fjrZrM7FobGTiv4qYFVpmkvIQck2sYF53PLtrL/nLj4aB1IOBAVIsk2ZBGMCNy5a pzrS3R4Dj/d5ZMerk4OlgT0iBGoWcODbY68IypGHk6DY3kxfZU5yPmbizh+dg/pdcxUh 9otA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hKI9pQllyEvBoeY9A4Q58r2zs6dNKBczDSODdB7Ufkc=; b=X3cG75OC+Yxj9AEtgf1Tjcrw943eXF6Dvo16o4CrneVZNI02bPz19cM60rI18s0cw3 HWjoqZixRQ5nLSkOVXPRbYr95EwAPfJQOf00DCtgBbmlR1vg7pjNIwNzQgKkfiM9SAk9 73yCEfSfLjSlGLi2AMuPBu+yG0oEHaHikabhCsPFOkuhBe+h1VumBAwG+ZFxZxisdh9u lk5U5/t9f/F7B40Hs5UmnlPg4ulXWqceUth2QnbLtllESXNA8lS/pNouDREaOfnFRzZ5 WstdM3tprI8QuYUAXYHHHQ4nwpxOItjp4hbhJnSV/XxRofj9HHD45bSjWxjcbMjlHu6j 81LQ== X-Gm-Message-State: ALKqPwdOqnwWm6f9fTkdCBGQaNARbBv2DCpKiw689JtRn3IRR7XYu2MD BZHKRDTaRQzSfh3t+4pI3TXCzA== X-Google-Smtp-Source: AB8JxZqH932BOSWGHRU2AIR9dkXm/y7YLroigxp4PKLN0yo0xyCizEl0+DpV3KN0kHv/6Olkp2NVuQ== X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr18358275pfe.115.1526873561667; Sun, 20 May 2018 20:32:41 -0700 (PDT) Original-Received: from jltm97.lan (64-46-6-129.dyn.novuscom.net. [64.46.6.129]) by smtp.gmail.com with ESMTPSA id k193-v6sm16232051pgc.39.2018.05.20.20.32.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 20:32:40 -0700 (PDT) In-Reply-To: <87r2m5rjy6.fsf@gmail.com> X-Mailer: Apple Mail (2.3445.6.18) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225500 Archived-At: Cl=C3=A9ment Pit-Claudel wrote: > Thanks for the positive feedback, and indeed creating a clean API was = a > design goal, but notice that: >=20 > (cl-defun eglot--server-myLangServer/customMethodName > (proc &key param1 param2) > ...)=20 >=20 > has two dashes in it. It isn't (yet) a part of the official eglot.el = LSP > API, and your particular example might very well become something = like: Ah, fair. I was mostly thinking aloud about extending the current GitHub = master with cquery support, which'd mean hideifdef support (if I was going to = use it at my day job, at least). May=E2=80=99ve been getting a little ahead of = myself :) >=20 > (cl-defmethod eglot-handle-notification > (proc (method (eql :myLangServer/customMethodName)) &key param1 = param2) > ...) >=20 > or, for requests >=20 > (cl-defmethod eglot-handle-request > (proc id (method (eql :myLangServer/customMethodName)) &key param1 = param2) > ...) >=20 > This seems cleaner than the "automagical" function names, although it > has two minor drawbacks: IMHO the cl-defmethod approach looks a lot nicer for someone hoping to = build off eglot. Took a bit of headscratching to make the connection between the = intern + fboundp and having the various handler functions, and I could see it = being a pain to manage scores of magic functions scattered throughout files. Can=E2=80=99t wait to give eglot a spin, though! I=E2=80=99ll try and = implement / test basic cquery support in the next couple days. I=E2=80=99ll need to add an extra = per-proc variable to pass a required initialzationOptions param (persistent cache directory), but = that shouldn=E2=80=99t prove too difficult. -- Josh=