Closed archer-n closed 7 months ago
I pushed my version of this change in
master
, let me know if it looks okay to you.
He doesn't fix the problem, because js-ts-mode-map
is copied from js-mode-map
rather than inherited, so just modifying js-mode-map
is invalid.
(defvar js-ts-mode-map (copy-keymap js-mode-map)
"Keymap used in `js-ts-mode'.")
I think this could work:
(let ((base-mode (if (fboundp 'js-base-mode) 'js-base-mode 'js-mode)))
(with-eval-after-load 'js
(add-hook (derived-mode-hook-name base-mode) 'sanityinc/enable-xref-js2)
(define-key js-mode-map (kbd "M-.") nil)
+ (define-key js-ts-mode-map (kbd "M-.") nil)
))
But there is another good news. In the emacs master branch, the commit Remove 'M-.' binding from js-mode and js-ts-mode
has deleted this keybind.
Thanks. I committed a further fix here anyway.
I pushed my version of this change in
master
, let me know if it looks okay to you.