[Emacs] Add typescript keybinds, fix auto-mode-alist addition

This commit is contained in:
Lucien Cartier-Tilet 2021-12-07 10:14:41 +01:00
parent 3d71fb43af
commit b31562078d
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -6185,7 +6185,19 @@ development. First, lets install the most important package,
:hook (typescript-tsx-mode . rainbow-delimiters-mode)
:commands typescript-tsx-mode
:init
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . #'typescript-tsx-mode))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode))
:general
(phundrak/major-leader-key
:packages 'lsp
:keymaps '(typescript-mode-map typescript-tsx-mode-map)
:infix "a"
"" '(:keymap lsp-command-map :which-key "lsp")
"=" '(:ignore t :wk "format")
"a" '(:ignore t :which-key "actions"))
(phundrak/major-leader-key
:packages 'typescript-mode
:keymaps '(typescript-mode-map typescript-tsx-mode-map)
"n" '(:keymap npm-mode-command-keymap :which-key "npm"))
:config
(after! flycheck
(flycheck-add-mode 'javascript-eslint 'web-mode)