[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question Regarding Line Number Mode For Working With LSP Mode
From: |
Samuel Banya |
Subject: |
Re: Question Regarding Line Number Mode For Working With LSP Mode |
Date: |
Thu, 26 May 2022 14:05:38 -0400 |
User-agent: |
Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27 |
I actually got it to work by doing the following revision after the
'use-package' declaration for LSP mode:
(add-hook 'lsp-mode-hook #'display-line-numbers-mode)
Thanks for the help on this.
On Thu, May 26, 2022, at 12:24 PM, Eli Zaretskii wrote:
> > Date: Thu, 26 May 2022 11:47:25 -0400
> > From: "Samuel Banya" <sbanya@fastmail.com>
> >
> > 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)
>
> Sorry, I'm unfamiliar with use-package.
>
> > :hook
> > (display-line-numbers-mode)
>
> What is the syntax and the semantics of :hook?
>
>