Closed milanglacier closed 11 months ago
C-c ' into a python code block will activate python-ts-mode
C-c '
python-ts-mode
python-mode will be activated
python-mode
this is the minimal example config file:
;;; minimal-init.el -*- lexical-binding: t; -*- ;; this is for debugging purpose (require 'package) (setq package-user-dir "~/Downloads/emacs-package-dir") (setq package-list '(markdown-mode edit-indirect)) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) (unless package-archive-contents (package-refresh-contents)) (dolist (package package-list) (unless (package-installed-p package) (package-install package))) (setq warning-minimum-level :error) (menu-bar-mode -1) (tool-bar-mode -1) (scroll-bar-mode -1) (xterm-mouse-mode 1) (setq scroll-step 1) (setq scroll-conservatively 10000) (setq auto-window-vscroll nil) (setq major-mode-remap-alist '((python-mode . python-ts-mode))) (setq treesit-language-source-alist '((python . ("https://github.com/tree-sitter/tree-sitter-python"))))
the minimal markdown file (hello.md) is: https://pastebin.com/ymfgDng6
M-x treesit-install-language-grammar python
emacs -Q -l "minimal-init.el" hello.md
go to the python code block, press C-c ', and C-h v to see the major mode, get python-mode rather than python-ts-mode
C-h v
I have merged #788. Please check latest version.
Expected Behavior
C-c '
into a python code block will activatepython-ts-mode
Actual Behavior
python-mode
will be activatedSteps to Reproduce
this is the minimal example config file:
the minimal markdown file (hello.md) is: https://pastebin.com/ymfgDng6
M-x treesit-install-language-grammar python
emacs -Q -l "minimal-init.el" hello.md
Backtrace
go to the python code block, press
C-c '
, andC-h v
to see the major mode, getpython-mode
rather thanpython-ts-mode
Software Versions