From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Too long completion delay time in LISP interaction mode. Date: Thu, 21 Oct 2021 10:50:53 +0200 Message-ID: <871r4epxmg.fsf@gnu.org> References: <87tuhcs2ov.fsf@gnu.org> <87pms0s0ex.fsf@gnu.org> <87lf2orz4c.fsf@gnu.org> <87h7dcrwf0.fsf@gnu.org> <875ytrorog.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26363"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.3; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 21 10:54:10 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1mdTpy-0006dQ-Fr for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 10:54:10 +0200 Original-Received: from localhost ([::1]:54042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdTpx-0000Ht-7a for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 04:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdTpO-0000Dp-Hk for help-gnu-emacs@gnu.org; Thu, 21 Oct 2021 04:53:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43872) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdTpK-0001KZ-8E; Thu, 21 Oct 2021 04:53:30 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:50589) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdTpK-00075I-5D; Thu, 21 Oct 2021 04:53:30 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 8567E27C0054; Thu, 21 Oct 2021 04:53:29 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 21 Oct 2021 04:53:29 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddviedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepvd fhudevuedvtdevieeffeehvdffueegheejtdffhfeiveelvdfgheeujefgheffnecuffho mhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgr lhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgse hfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 21 Oct 2021 04:53:28 -0400 (EDT) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133942 Archived-At: Hongyi Zhao writes: >> assuming that lsp-mode defines its own completion category which I don't know >> (since I use eglot for my LSP interaction). > > They are defined as follows: > > https://github.com/emacs-lsp/lsp-mode/blob/1ece3b81ad10d1b10a2c73c6617b4426e673cbc7/lsp-completion.el#L745 > > (make-local-variable 'completion-category-defaults) > (setf (alist-get 'lsp-capf completion-category-defaults) '((styles . > (lsp-passthrough)))) That might suggest that lsp-mode wants its own `lsp-passthrough' style and nothing else, not sure. > So, I adjusted to the following configuration based on orderless package: > > (use-package orderless > :config > ;; https://github.com/oantolin/orderless#ivy > (setq ivy-re-builders-alist '((t . orderless-ivy-re-builder)) > completion-styles '(partial-completion substring flex orderless) > completion-category-overrides > '((project-file > (styles partial-completion substring initials)) > (file > (styles partial-completion substring initials)) > (eglot > (styles partial-completion substring)) > (lsp > (styles partial-completion substring)) The definition you've cited says `lsp-capf', not just `lsp'. Bye, Tassilo