Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs freezes when open a python file with lsp backend #14125

Closed
eakirtas opened this issue Nov 11, 2020 · 2 comments
Closed

Emacs freezes when open a python file with lsp backend #14125

eakirtas opened this issue Nov 11, 2020 · 2 comments

Comments

@eakirtas
Copy link

Description :octocat:

I am using Emacs along with spacemacs to python development. Today I decide to
change my backend into lsp backend. I've checkout out to dev branch and I
followed the guide for LSP-layer.

Although setups seems right, every time I open a python file emacs freeze. To be
more accurate, the emacs seems running but moving cursor takes a whole minute.

I can't figure out what happening and I didn't found any related issue

Reproduction guide 🪲

  • Start Emacs
  • C-x C-f open a .py file

Observed behaviour: 👀 💔
UI seems to freeze

Spacemacs configuration about python-layer

     (python
      :variables
      python-backend 'lsp
      python-lsp-server 'mypyls
      python-formatter 'yapf
      python-lsp-git-root "~/.lib/python-language-server"
      python-enable-yapf-format-on-save t
      python-test-runner 'pytest
      python-save-before-test nil
      python-fill-column 99
      python-sort-imports-on-save t
      )

System Info 💻

  • OS: gnu/linux
  • Emacs: 26.3
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. c3872f1)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: hybrid
  • Completion: helm
  • Layers:
(octave csv rust haskell
        (javascript :variables javascript-disable-tern-port-files nil)
        yaml php ipython-notebook html lsp helm
        (auto-completion :variables auto-completion-enable-help-tooltip t)
        emacs-lisp git org spell-checking syntax-checking version-control
        (c-c++ :variables c-c++-enable-clang-support t)
        semantic cscope gtags tmux shell-scripts python-notebook
        (python :variables python-backend 'lsp python-lsp-server 'mypyls python-formatter 'yapf python-lsp-git-root "~/.lib/python-language-server" python-enable-yapf-format-on-save t python-test-runner 'pytest python-save-before-test nil python-fill-column 99 python-sort-imports-on-save t))
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2
@eakirtas
Copy link
Author

Here is the profiler-report when just moving the cursor around

 - call-interactively                                     204,150,774  85%
  - funcall-interactively                                 204,150,774  85%
   - spacemacs/helm-M-x-fuzzy-matching                    200,293,907  83%
    - let                                                 200,293,907  83%
     - call-interactively                                 200,289,779  83%
      - funcall-interactively                             200,289,763  83%
       - helm-M-x                                         200,289,763  83%
        - helm-M-x-read-extended-command                  200,288,707  83%
         - helm                                           199,645,163  83%
          - apply                                         199,644,139  83%
           - helm                                         199,644,139  83%
            - apply                                       199,644,139  83%
             - helm-internal                              199,644,139  83%
              + helm-read-pattern-maybe                    84,898,945  35%
              + helm-display-buffer                        66,263,734  27%
              + helm-execute-selection-action              48,322,413  20%
              + helm-initialize                               114,232   0%
              + #<compiled 0x17b8591>                          31,175   0%
              + select-window                                   8,448   0%
                advice-add                                      4,136   0%
            helm-parse-keys                                     1,024   0%
         + helm-make-source                                   639,408   0%
     + add-to-list                                              4,128   0%
   + previous-line                                          3,834,371   1%
   + mouse-drag-region                                          8,448   0%
   + mouse-set-point                                            7,392   0%
   + handle-focus-in                                            5,600   0%
   + lsp-ui-doc--handle-mouse-movement                          1,056   0%

@arifer612
Copy link
Contributor

#14342 is a relevant active issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants