From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 05 Jun 2021 09:51:34 +0300 Message-ID: <837dj8ls7d.fsf@gnu.org> References: <831r9iw473.fsf@gnu.org> <87h7ieyma7.fsf@gmail.com> <15be7dd8-e901-e317-5111-e1a34f6f0416@gmail.com> <83k0n9l9pv.fsf@gnu.org> <83eedhl83r.fsf@gnu.org> <8735txfkk7.fsf@fastmail.fm> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21643"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 05 08:52:10 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 1lpQAE-0005SY-Hz for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 08:52:10 +0200 Original-Received: from localhost ([::1]:46934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpQAC-0003WV-Mm for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 02:52:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpQ9l-0002s7-UR for emacs-devel@gnu.org; Sat, 05 Jun 2021 02:51:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40752) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpQ9l-0006C1-NI; Sat, 05 Jun 2021 02:51:41 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4906 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpQ9k-0001Om-0o; Sat, 05 Jun 2021 02:51:40 -0400 In-Reply-To: <8735txfkk7.fsf@fastmail.fm> (message from Joost Kremers on Fri, 04 Jun 2021 22:11:06 +0200) 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:270418 Archived-At: > From: Joost Kremers > Date: Fri, 04 Jun 2021 22:11:06 +0200 > > > I'm not an expert on the internals of LSP servers, but it's my > > understanding that for a language server like clangd, it needs access > > not just to the current file, but the entire source tree[1]. > > And speaking from my experience with lsp-mode (not eglot) and Python, it needs > access to the entire virtual env so it can provide type information and > completions for built-in Python packages and for 3rd-party packages that you use > your code. That cannot be a mandatory requirement, right? Because otherwise LSP wouldn't be able to support editing of an unfinished project, where not everything is laid out 100% yet. The user will expect that some completion cases could be inaccurate when not everything is coded yet, but the user will NOT expect to see inaccurate "syntax highlighting" or indentation, nor incorrect "show definition" and "show callers" results for the code that was already written, and in particular for the code in the file being edited. Thus, I'd expect LSP to be able to deal with missing information, which then means it shouldn't require access to the entire tree as a prerequisite for useful functionality. Am I missing something?