Add separate keymaps for js/python/css-ts-mode

* lisp/progmodes/js.el (js-ts-mode-map)
* lisp/progmodes/python.el (python-ts-mode-map)
* lisp/textmodes/css-mode.el (css-ts-mode-map): New keymap.
This commit is contained in:
Yuan Fu 2022-11-20 20:43:15 -08:00
parent 3f25b22cad
commit 1e62445200
No known key found for this signature in database
GPG key ID: 56E19BC57664A442
3 changed files with 10 additions and 1 deletions

View file

@ -396,6 +396,9 @@ instead."
map)
"Keymap for `python-mode'.")
(defvar python-ts-mode-map (copy-keymap python-mode-map)
"Keymap for `(copy-keymap python-mode-map)'.")
;;; Python specialized rx
@ -6597,7 +6600,7 @@ implementations: `python-mode' and `python-ts-mode'."
(define-derived-mode python-ts-mode python-base-mode "Python"
"Major mode for editing Python files, using tree-sitter library.
\\{python-mode-map}"
\\{python-ts-mode-map}"
(when (treesit-ready-p 'python)
(treesit-parser-create 'python)
(setq-local treesit-font-lock-feature-list