From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Michael Reilly Newsgroups: gmane.emacs.devel Subject: Re: Setting up language servers for Eglot Date: Sat, 8 Aug 2020 01:59:48 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000075fd0a05ac576eba" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1088"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 08 08:01:14 2020 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 1k4Hur-0000Bf-GS for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Aug 2020 08:01:13 +0200 Original-Received: from localhost ([::1]:59152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4Huq-0004vV-HT for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Aug 2020 02:01:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4Hti-0003oy-Jf for emacs-devel@gnu.org; Sat, 08 Aug 2020 02:00:02 -0400 Original-Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]:40431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4Htg-0006i3-FQ for emacs-devel@gnu.org; Sat, 08 Aug 2020 02:00:02 -0400 Original-Received: by mail-io1-xd2f.google.com with SMTP id l17so4009448iok.7 for ; Fri, 07 Aug 2020 22:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pajato-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X3JJko+v3SUErhVMbDS9fs/nwgLKLcICVaQ86LuFQdE=; b=Ad+At0KUdx8jRYmivkadknldeQiqcn30f9b7+YyQTMxazXj1354fOxDF6PCX5ZO6aP FGNvZMd1jHBof7fuCoqf0WromEB7EkNb62QEnAmtwJGP38FKCceqeJHqkIysxOStnU8x qSdCMw1QgKAgD5Zlqu1UeMHCFt9Sv3zgfhMOb48R5Ej7cv13m/mCbma52Qah4jy1AF8E YBMEidpaAfjktc85YdWm+ral78vfL2i5iRshPyB7xSKDlpzFSujuSMCkXcf9yX2T7Fz4 QgyxwUy+eURz4CXVghN6dOHnWrn2+SixnlqNSvPtELiF7LhQFSQbhQe4qTotpwds3Ev3 GOQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X3JJko+v3SUErhVMbDS9fs/nwgLKLcICVaQ86LuFQdE=; b=T1t1SbHm9cRTcfTv2vu6s+Oy8rE4bb3ihrkHbs2uPBMIttArujOcgbdZ54CQIIwibx QNNpuF/yWEwe6wh5VmDu0lfl5G2swdPjND860jnjUlZV3ZOO5c020bjFcRprSzdnL8TM bkc5i9I9z2uou1oLKmRlPMllqoQ+6PLeZdSO1T3lCJjYnED4UqdWfO9Jt8rvsRMKdzMI 3B3cz4p8UNztOsLQCcxXWOGJL5Q+TW8YoOGTnd17EZBNKsYwYyDnh6+a/VWYNkkGNsKL P73A2s5ZSuZzes39OXXYP7RjD9v8XuWxUspAKSURJ11YhmvclbQoBrIPsZEr5Ed2D0ig Hi3Q== X-Gm-Message-State: AOAM533LQWF04EH+/3cJyHnbKyTKRSsU2Q65IROcNet83WRcgn4nFQXX iGUnZpE40+mv8GqIHLs0T/rrR4GvCY54rbGbQpcKyg== X-Google-Smtp-Source: ABdhPJytxM4DuBQ/MP7E44WWJm0imKyBbD2JvWxmci5vkQpcVTYRTjZwbqyKd2XEPrWvLTFGUvnKSyrOyo8W64r/jDQ= X-Received: by 2002:a6b:b5c1:: with SMTP id e184mr7948263iof.208.1596866398906; Fri, 07 Aug 2020 22:59:58 -0700 (PDT) In-Reply-To: Received-SPF: none client-ip=2607:f8b0:4864:20::d2f; envelope-from=pmr@pajato.com; helo=mail-io1-xd2f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:253513 Archived-At: --00000000000075fd0a05ac576eba Content-Type: text/plain; charset="UTF-8" > > Also, try switching to the *EGLOT events for ... * buffer. That usually > holds > useful information about what went on when trying to start or communicate > with the server. > This did not help clean up my issue with understanding how Eglot should deal with an "unregistered" language server/language mode combination but boyo is it incredibly useful and helpful to know about once I did get the Kotlin language server working correctly (which was stupidity on my part and easily fixed). So my question for anyone building and/or supporting Emacs libraries/packages that require a language server is: how would/should a User deal with an advertised as supported language that is not in fact supported? Seems to me this is a clear bug and the User should file a bug report on the library/package. In the case of Eglot, it's a bit sticky because, apparently, there is no default Kotlin mode available as part of Emacs but one can use an ELPA/MELPA provided mode. So this case seems detectable to me: if there is no kotlin mode that can be associated with a language server, then Eglot errors out in the case it thinks it is dealing with Kotlin. If there is a kotlin mode and an associated language server exists, then Eglot should continue and just work. But this scenario implies that Eglot should set up all supported language servers ahead of time. Is that realistic? Can someone point me at an Eglot example I might base a Kotlin support fix on? --00000000000075fd0a05ac576eba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Also, try switching to the *EGLOT = events for ... * buffer.=C2=A0 That usually holds
useful inf= ormation about what went on when trying to start or communicate
<= div>with the server.

This did n= ot help clean up my issue with understanding how Eglot should deal with an = "unregistered" language server/language mode combination but boyo= is it incredibly useful and helpful to know about once I did get the Kotli= n language server working correctly (which was stupidity on my part and eas= ily fixed).

So my question for anyone building and= /or supporting Emacs libraries/packages that require a language server is: = how would/should a User deal with an advertised as supported language=C2=A0= that is not in fact supported? Seems to me this is a clear bug and the User= should file a bug report on the library/package.=C2=A0 In the case of Eglo= t, it's a bit sticky because, apparently, there is no default Kotlin mo= de available as part of Emacs but one can use an ELPA/MELPA provided mode. = So this case seems detectable to me: if there is no kotlin mode that can be= associated with a language server, then Eglot errors out in the case it=C2= =A0thinks it is dealing with Kotlin. If there is a kotlin mode and an assoc= iated language server exists, then Eglot should continue and just work. But= this scenario implies that Eglot should set up all supported language serv= ers ahead of time. Is that realistic? Can someone point me at an Eglot exam= ple I might base a Kotlin support fix on?

--00000000000075fd0a05ac576eba--