From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Too long completion delay time in LISP interaction mode. Date: Thu, 21 Oct 2021 18:38:25 +0800 Message-ID: References: <87tuhcs2ov.fsf@gnu.org> <87pms0s0ex.fsf@gnu.org> <87lf2orz4c.fsf@gnu.org> <87h7dcrwf0.fsf@gnu.org> <875ytrorog.fsf@gnu.org> <871r4epxmg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36970"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 21 12:39:18 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 1mdVTi-0009QU-CW for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 12:39:18 +0200 Original-Received: from localhost ([::1]:57748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdVTg-0005I3-LL for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 06:39:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdVT6-0005HZ-De for help-gnu-emacs@gnu.org; Thu, 21 Oct 2021 06:38:40 -0400 Original-Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:45676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdVT4-0002SW-CJ; Thu, 21 Oct 2021 06:38:40 -0400 Original-Received: by mail-ua1-x929.google.com with SMTP id a17so173616uax.12; Thu, 21 Oct 2021 03:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=glRZKg6jJ0CIVut1KnbYqX+FgxtVHvrG2bNY/LiSwuE=; b=QkGh0ZX6ShbpIBaxeKOGGmu/EXPyejMSbE1of0XipxKDSRbFZVTILbHPNXTu+nmt1p V8QOgHdIexkY9YRzh0YNzycMakLt7bDiCPxVGL9AmaAcY9S50xmyysfesp49wz5xgTpE Bp9VLHSLag5dqVt+rth+4BSMZOzXRT3jviv/nq4ynwT9kDqxFcBQIkkXd8t7IaCiF21W dJGCz3CrvkpWvItdSmKIvAJFOB0rt73m8JwhoHxs2wqV+rggBNnTS2/jU0zykE3b2KJZ YgJ3Mv9iAk5MlBVerXcP+qbCLCv4mjgSGJiRPioX7tpULOMbEXE3AOpuMvKAi3T7qXrE 6o2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=glRZKg6jJ0CIVut1KnbYqX+FgxtVHvrG2bNY/LiSwuE=; b=OgkjQ+iZbYVX0MbYlb4ygYgZIJPdGxqKpy6wamvovliSHYe1tcAOZicWNIHHj7AZHC S/efI0DFI32VnCCZmR9L9sZGQ55LmsX+VLpFpU0SGukaSjB+kmMjPmc0wre7RiHTjkcn uTpfZhHv4/vQQiuigC3sRTrASNbBe8JdEgzTUYfEuffyqDGVj3HkCjzW95or9ykA8dPT bQpa9NBoP4OZlBgFl0mruNSge76QHM6Ma2/pzc+IpCsOmjvaa3zf0fXKtA2n3FYkIZ/B CentQU9S18N0Jc3puPGymg7jqm/V7GEm4FdVCfoMsD0ZRHBjp70gMbl9mLDQTWQaoPb8 MyuA== X-Gm-Message-State: AOAM533hZ68fr0CcCueOtNGH2JRz4VN2L/jYvzZ6Ej8T9lSZYw2Istz9 8mMoMzUOCp6c7ku3LhkeSr3P8JWR9KNfEcEE4+uJEo2gmqdAcg== X-Google-Smtp-Source: ABdhPJz4o98MS34wWeDv0S01i1QS8+ko4hTi907+DcXOgOeyrZ0W84C9tbUGRTudsmOcf5xDtUKCjHtYz6g6DkRq5g8= X-Received: by 2002:a67:edd7:: with SMTP id e23mr5113660vsp.14.1634812716864; Thu, 21 Oct 2021 03:38:36 -0700 (PDT) In-Reply-To: <871r4epxmg.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::929; envelope-from=hongyi.zhao@gmail.com; helo=mail-ua1-x929.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: 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:133954 Archived-At: On Thu, Oct 21, 2021 at 4:53 PM Tassilo Horn wrote: > > 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'. Thank you for pointing this out. HZ