3 votes

How to start lsp-mode connections lazily after desktop is restored?

The accepted answer didn't work for me, since when lsp-mode is already listed as a minor mode in the saved buffers, desktop-read will activate it before lsp-deferred runs. Instead, I'm using this: (...
scry's user avatar
  • 133
3 votes
Accepted

How to fix lsp-mode for Elisp?

emacs-lisp-mode is derived from prog-mode (as so many modes are), so lsp was already being started in your Emacs Lisp buffers. The warning simply tells you that lsp doesn’t know what programming ...
db48x's user avatar
  • 18k
2 votes

lsp-mode open declaration / definition in other window

You’ve already found the solution in the comments, but I’ll go ahead and spell out how you can use it: (defun thehobbit-lsp-find-definition () (interactive) (lsp-find-definition :display-action '...
db48x's user avatar
  • 18k
2 votes
Accepted

How to list a source file's "structure" (e.g. list all the methods) with eglot/lsp?

Emacs has a built–in feature called Imenu that lets you easily jump to any definition in the current file (or project) by name. Any major mode can populate this menu, and therefore most do. Type M-g i ...
db48x's user avatar
  • 18k
1 vote

lsp function doesn't work

xref-auto-jump-to-first-definition is a variable defined in ‘xref.el’. ... This variable was introduced, or its default value was changed, in version 28.1 of Emacs. Are you using Emacs 27 or ...
phils's user avatar
  • 51.1k
1 vote

PHP and LSP mode - code formatting?

Check whether web-mode-enable-auto-indentation is enabled. It should be so for GUI Emacs (not in terminal) by default. With this option enabled, buffer contents should be re-indented automatically. ...
Y. E.'s user avatar
  • 767
1 vote
Accepted

Jump/Goto next highlighted symbol in lsp-mode

I'm not aware of such, but if you want to navigate highlights within a file, here's an interactive function (lsp-next-document-highlight-in-file) that implements that. (defun lsp-is-lsp-highlighted (...
Hi-Angel's user avatar
  • 736
1 vote
Accepted

`recenter` issue in `xref-go-back` when using `lsp-mode`

This is in fact one of the effects of setting scroll-conservatively: when a point moves inside a buffer, the window is scrolled in this particular way. Anyway, to solve this specifically for xref-go-...
Dmitry's user avatar
  • 3,768
1 vote
Accepted

No output in Python inferior buffer after C-c C-c

First, the code under if __name__ == "__main__": function is only executed when running python as a program (see here for example). Second, as far as I remember, when using python-shell-send-...
dalanicolai's user avatar
  • 7,805
1 vote

lsp-mode, Jump to Next Warning

For real-time diagnostics, lsp-mode utilizes either flycheck or a built-in package flymake (in Emacs open manual with C-h R flymake RET). flycheck documentation on interaction with errors states: By ...
Y. E.'s user avatar
  • 767
1 vote

lsp-mode, Jump to Next Warning

lsp-mode integrates with flycheck or flymake. Please check the variable lsp-diagnostics-provider. For example, flycheck provides flycheck-next-error and flycheck-previous-error to help navigate across ...
Swarnendu Biswas's user avatar
1 vote

lsp-mode, Show Potential Fixes

You can try exploring the following commands. lsp-modeline-code-actions-mode - Toggle code actions on Emacs modeline. lsp-execute-code-action - Execute a code action selected from the list of ...
Swarnendu Biswas's user avatar
1 vote

Where does `lsp-mode` keep session state?

The path is given by the variable lsp-session-file which is defined in the file lsp-mode.el. The docstring says "File where session information is stored.", and the default value is (expand-...
Swarnendu Biswas's user avatar
1 vote
Accepted

Javascript LSP mode in Emacs (using typescript-language-server) uses inconsistent indentation between files

lsp-mode documentation states the following: settings that are controlled on lsp-mode level are indent size and whether the server should use tabs or spaces. Refer to lsp--formatting-indent-alist to ...
Y. E.'s user avatar
  • 767

Only top scored, non community-wiki answers of a minimum length are eligible