this post was submitted on 10 Nov 2023
1 points (100.0% liked)

Emacs

314 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I am a Neovim user, and I am trying out Emacs.

I recently started with doom emacs, it feels pretty good. However, one issue I am facing is that pyright works very slow. I know that it is an issue with pyright, which I faced with Neovim also.

However, I made it faster for my use-case by changing some settings. Neovim allows to have these settings in the setup function for LSP. I was trying to figure out how do I change these settings with doom emacs. Pyright docs suggest to have these settings in pyrightconfig.json.

I think this is more of a pyright issue, but feel like somebody might have already solved it.

top 2 comments
sorted by: hot top controversial new old
[–] dvzubarev@alien.top 1 points 1 year ago

You can put these lines to your config:

  (after! python
    (setq lsp-pyright-multi-root nil
          lsp-pyright-use-library-code-for-types nil))

Press Spc-h-v and start typing lsp-pyright, you will see all available settings (you have to load lsp-pyright before it).

[–] noooit@alien.top 1 points 1 year ago

Eglot is really awful when it comes to dynamic configs like workspace config and initialization option. I really went so far as using environment variable and a shell script for using clangd to support switching cmake binary dir. It's so much easier with vim.

In case of python, I stick with jedi-language-server for now. When I figure out how to use pyright, I might come back here and comment again.