this post was submitted on 25 Oct 2023
1 points (100.0% liked)

Emacs

313 readers
3 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 new to python. I guess there are libraries called numpy, anaconda etc. What the best init.el setup for this. (I want to work on ML or Data Science)

you are viewing a single comment's thread
view the rest of the comments
[–] jangid@alien.top 1 points 1 year ago

Following is my configuration for Python; I am using Emacs 29.1 --with-tree-sitter:

  (use-package treesit
    :config
    (setq treesit-language-source-alist
	  '((python . ("https://github.com/tree-sitter/tree-sitter-python.git"))))
    (add-to-list 'auto-mode-alist
		 `("\\.py[iw]?\\'\\|python[0-9.]*" . python-ts-mode)))

  (use-package eglot
    :hook ((python-mode . eglot-ensure)	; pip install 'python-language-server[all]'
	   (python-ts-mode . eglot-ensure)))