From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Samuel Banya" Newsgroups: gmane.emacs.help Subject: Re: Question Regarding Line Number Mode For Working With LSP Mode Date: Thu, 26 May 2022 11:47:25 -0400 Message-ID: <175b3b5e-b8db-4559-a97c-d3463a1c6368@www.fastmail.com> References: <542fbc3a-f7da-477d-85e4-4d9db00f06f8@www.fastmail.com> <80ef30d5-6b40-4549-8567-3733eab1cae9@www.fastmail.com> <3db07348-0079-4899-b21b-459a7cc4edcf@www.fastmail.com> <83sfoy4a1y.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="3237"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27 To: "Emanuel Berg" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 26 17:48:27 2022 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 1nuFir-0000Zu-Qi for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 17:48:25 +0200 Original-Received: from localhost ([::1]:50098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuFiq-0007ng-E6 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 11:48:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuFiH-0007nI-5J for help-gnu-emacs@gnu.org; Thu, 26 May 2022 11:47:49 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuFiF-0000bg-64 for help-gnu-emacs@gnu.org; Thu, 26 May 2022 11:47:48 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 677515C020E for ; Thu, 26 May 2022 11:47:46 -0400 (EDT) Original-Received: from imap50 ([10.202.2.100]) by compute5.internal (MEProxy); Thu, 26 May 2022 11:47:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1653580066; x=1653666466; bh=/nTdUEvY9e DRFA3l6keff85sDe138rz9mtdW7zmIHxk=; b=AdOvh/eQBnU5q2xGQ3AahDHadM poSoS5/667mqmD0TvIUoMPtHwBdsEKyyPHYXiD7RXFfRN1E5WsbC6OS6AqZ5BZe3 BWIgEWcdP/JUPufIj8FSjTBnvHiLnmqNT6ppwxeepUdw2DrxghLKdBQIyhXTHrju 8/zvs61ztKYDNRiHb1cJzdu/EmSVACGTth017gbjEixs8HtHfkbhu8ZuMeRnVpVx l28cH7xzK3d7kjimiDpK5usElDZhNBciKDa+xg5FUhPw3SyTD/6xyR76h+jf8ckn JVrQMl1usrKp5MoVLb9iIgMyXfMp1TkpQU3oXsfVvNBb4BzxUxpBjZWcabPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1653580066; x=1653666466; bh=/nTdUEvY9eDRFA3l6keff85sDe13 8rz9mtdW7zmIHxk=; b=bR2ZR47qBervErEc2FGjOIiH8qHljeF3NTElMdKu1sSy xU3sOgqXq0COu6WAzOaNZAVoSStg9qK8ypONUejuRZFLRqiN1LytJI2yPC5U3HrQ TVsyKa5bltESdh4ckXRTjAWpR9WyKl+VyrcjcfDs1mou2201WB4BBGckdjSIj3UZ icLGzmtYbjB8plHCcog86oZNOua2gcwQFAYFNzmsQRQVImRWWPEh3byXRK6HH5PR EdL6yrF5f/74PsgJl+wlgxQrneTN/JJs08S2q8nIvvzt2MW/sYGWE/k/7dQ3hFng Ml0RAc2N0qlroOYRva8cUyxT7MAM8N7nA3J23trnfg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrjeejgdeludcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtre erreertdenucfhrhhomhepfdfurghmuhgvlhcuuegrnhihrgdfuceoshgsrghnhigrsehf rghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepgeejgfeiudefteehieevud dufffhheetfefhhfeugeehudevteeiffefiedujeeunecuffhomhgrihhnpehgihhthhhu sgdrtghomhdptghonhhfihhguhhrrghtihhonhdrohhrghdphihouhhtuhgsvgdrtghomh dpmhgrthhtughutghkrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepshgsrghnhigrsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib97947f6:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2B5801700068; Thu, 26 May 2022 11:47:46 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <83sfoy4a1y.fsf@gnu.org> Received-SPF: pass client-ip=66.111.4.27; envelope-from=sbanya@fastmail.com; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:137413 Archived-At: Hey Eli, I tried to do this, but unfortunately using ':hook' for LSP mode within my config doesn't work for some reason, check the ':hook' section below (https://github.com/SamuelBanya/SamsEmacs/blob/main/configuration.org) #+begin_src emacs-lisp (defun ef/lsp-mode-setup () ;; Taken from this 'System Crafters' video: ;; https://www.youtube.com/watch?v=E-NAM9U5JYE ;; This allows breadcrumb segments to appear in projects (setq lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols)) (lsp-headerline-breadcrumb-mode)) (use-package lsp-mode :ensure t :commands (lsp lsp-deferred) ;; Taken from this page: ;; https://www.mattduck.com/lsp-python-getting-started.html :init (setq lsp-keymap-prefix "C-c l") (add-hook 'c-mode-hook 'lsp) (add-hook 'c++-mode-hook 'lsp) (add-hook 'python-mode-hook 'lsp) (add-hook 'ruby-mode-hook 'lsp) (add-hook 'js2-mode-hook 'lsp) (add-hook 'typescript-mode-hook 'lsp) (add-hook 'web-mode-hook 'lsp) (add-hook 'csharp-mode-hook 'lsp) (add-hook 'vue-mode-hook 'lsp) (add-hook 'yaml-mode-hook 'lsp) :hook (display-line-numbers-mode) :config (lsp-enable-which-key-integration t) ;; Set 'lsp-idle-delay' to 0.5 seconds for quick autocompletion (setq lsp-idle-delay 0.5) ;; Adding this to force lsp to auto-guess the root directory of the project: (setq lsp-auto-guess-root t)) #+end_src On Tue, May 24, 2022, at 10:31 PM, Eli Zaretskii wrote: > > Date: Tue, 24 May 2022 20:18:24 -0400 > > From: "Samuel Banya" > > > > My last question is this: > > How do I get the function from 'M-x display-line-numbers-mode' to trigger when LSP mode is engaged? > > Turn it on in the LSP mode hook. > >