Hello fellow Emacs enthusiasts,

I’m reaching out to see if there’s anyone here who’s successfully integrated a modern development environment within Emacs for Python programming. Specifically, I’m interested in a setup that incorporates eglot, tree-sitter and company.

I’ve encountered a significant issue: whenever I enable python-ts-mode, Emacs consumes all my system’s memory and crashes. While I’ve managed to use a more basic setup that limits tree-sitter to syntax highlighting only, I can’t shake the feeling that I’m missing out on some great functionality.

To help with investigation:

  • I am running on a Mac
  • The bare minimum to reproduce this problem is on the following gist: https://gist.github.com/hnarayanan/a6397d6723fce19e2802d4305071e611
  • I happen to use Emacs from MacPorts, but to double-check, I also attempted to download it from https://emacsformacosx.com and it crashed in the same way
  • This seems to happen independent of the language server used in the backend. I intend on using python-lsp-server, but it fails even if I don’t have it installed.

Has anyone faced a similar problem and found a solution? Perhaps I am doing something very wrong with my config? I’m eager to learn from your experiences and would greatly appreciate any advice or tips you can offer.

Thank you!

  • mnp@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Well, they used to call it “Eight Megabytes and Constantly Swapping” :-) One could only wish, now!

    Seriously, I’ve also seen some poor behavior with ts-mode and ts-folding also, maybe with python or yaml, ending in a hang or crash, not sure of specifics yet. I’ll pay better attention next time.