From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 5 Jun 2021 03:14:10 +0700 Message-ID: References: <831r9iw473.fsf@gnu.org> <87h7ieyma7.fsf@gmail.com> <15be7dd8-e901-e317-5111-e1a34f6f0416@gmail.com> <83k0n9l9pv.fsf@gnu.org> <83eedhl83r.fsf@gnu.org> 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="22106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jim Porter , ubolonton@gmail.com, theo@thornhill.no, Emacs developers , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Daniel Colascione To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 04 22:22:54 2021 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 1lpGLF-0005ZO-VR for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 22:22:53 +0200 Original-Received: from localhost ([::1]:54448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpGLE-0005AH-UO for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Jun 2021 16:22:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpGDA-0003Ym-1C for emacs-devel@gnu.org; Fri, 04 Jun 2021 16:14:33 -0400 Original-Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]:33372) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpGD1-0006gB-Vl; Fri, 04 Jun 2021 16:14:31 -0400 Original-Received: by mail-vs1-xe35.google.com with SMTP id f11so5507092vst.0; Fri, 04 Jun 2021 13:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=lr7SI6ZVnMEYHgHXr9RYC6QP4F+qu31+6NaQFGBdln8=; b=V/jnHmfiyO6ZyvZwK6/iouAQzfljVGVyKSE5TAmaE54Ekpklf1Gtjv5mCRYkSxTMqv uX/Mu39HUyiKtCtGdvHe8F/WmA2sgWhDuUMhqIJENUWSIyo35SpT0dz50AaNtGlCXjCP ZcRq29C7Eruawfo9XGdq2YTlI5G7ERpn7ZWbK3UB9S1UiIejIDr9KRUcTsokjU9r6Ug8 o+l+t9CqXI4NJ8rZ4zeMsh0NCODLr0ScCJGYElGav4uIyoi701ez5zdDWkmd4iLWm3lg zhEm3NW8u80OFp/8/42CDWOy0yp1Cyy6dCeDDQOwjcajTDlS1m++LxPb37LeeenIWwte UolQ== 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:content-transfer-encoding; bh=lr7SI6ZVnMEYHgHXr9RYC6QP4F+qu31+6NaQFGBdln8=; b=FZxAVOhibsHWx5mJNTJvmG+cNI5AiSduS97Ogkm6Mb/vF2mqEi1YjMYSeQiAt89IQ4 gmN/QXIFddP6x3QtOLeE3kNPbNKu1Y9jpW8VGK5HyC75kLC53kYhc3t2SmP9bGwAK1Dg KR3FzxpQM5aLYccSgV4pq/xGJ33xLUggj2dq5zI140+qnT6oXPGxmT+/tYX8ZBYoILLw B8lcQFEYTvYHlKnBHQ1E9Pm3emnVdV2w9GRl3plLkyQT1HqGNrtmwKd7uD2sh67HttPe KBFjuCEeiaoMJuQS10bXNjtW+eYhWELvQWjkysJCau/NHEr75urlDpBbnLnqNue2L21Z EVoA== X-Gm-Message-State: AOAM530raAKsUtEnjgHLk+caMRHuUffjM63dezl9PklDu6uo0BKi42gi yIB3fwvLpnnY8a4C8h9uVpNzUreI6KtR4cvY78RkeX16xvQ= X-Google-Smtp-Source: ABdhPJxyDp1E3XnfjGdqZylMQTHMs5mnxikn0GVYDK0vwkD98N5x8aa2gZSCPSJrz1r/QpLtOPh+hUAqqhtjvtUHhRM= X-Received: by 2002:a67:b349:: with SMTP id b9mr4383298vsm.12.1622837661876; Fri, 04 Jun 2021 13:14:21 -0700 (PDT) In-Reply-To: <83eedhl83r.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, 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.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:270410 Archived-At: On Sat, 5 Jun 2021 at 02:53, Eli Zaretskii wrote: > > Currently, the way Eglot works for remote files is that it > > runs the LSP server on the remote host via TRAMP. > > Why does it do that? Does the LSP server have to access the file > itself? We have all the contents of that file locally in a buffer, so > we could hand it to LSP locally. The contents of the file are not sufficient to parse it. A C file will #include some headers. A Python program will import some modules. Some of these (e.g. the standard library) will likely be installed both locally and remotely, but might be different versions. Some (first-party dependencies) will be resolvable from the source file. Some (third-party dependencies) will be installed remotely but not locally. A useful pattern is to build a Docker container, mount the source tree as a volume, install the toolchain and any third-party dependencies into the container, and run the LSP server in there. This way, these dependencies do not contaminate the developer=E2=80=99s machine, while stil= l being available to the LSP server. The container can also run different versions of compilers, interpreters, etc. than are installed on the developer=E2=80=99s machine.