From a5ea55766f7c09f9d105239c547029cf8c7405ad Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 4 Jan 2023 10:46:22 -0500 Subject: Improved file search, and tsx support --- lisp/general.el | 7 ++++--- lisp/web.el | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/lisp/general.el b/lisp/general.el index db045a1..4b65189 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -81,6 +81,7 @@ ;; I am using the helm package, of course (use-package helm) +(helm-mode 1) ;; Projectile for project navigation (use-package projectile) @@ -167,9 +168,9 @@ ;; Global key binds (require 'eglot) (bind-key* (kbd "") #'eglot-rename) -(bind-key* (kbd "C-x C-f") 'counsel-find-file) -(bind-key* (kbd "M-x") 'counsel-M-x) -(bind-key* (kbd "C-;") 'neotree-toggle) +(bind-key* (kbd "C-x C-f") 'helm-find-files) +;(bind-key* (kbd "C-s") 'helm-do-grep-ag) +(bind-key* (kbd "M-x") 'helm-M-x) (bind-key* (kbd "M-.") 'xref-find-definitions) (bind-key* (kbd "C-x k") 'kill-this-buffer) (bind-key* (kbd "C-x b") 'electric-buffer-list) diff --git a/lisp/web.el b/lisp/web.el index eece1e0..c999e45 100644 --- a/lisp/web.el +++ b/lisp/web.el @@ -28,7 +28,20 @@ (push '("\\.js[x]?\\'" . javascript-mode) auto-mode-alist) ;; TypeScript -(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode)) +(use-package tree-sitter-langs + :config + (tree-sitter-require 'tsx) + (add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx)) + ) +(use-package typescript-mode + :mode "\.ts\'" + :config (setq typescript-indent-level 2) + :init + (define-derived-mode typescript-tsx-mode typescript-mode "TypeScript[tsx]") + (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode)) + ) + + (require 'flycheck) -- cgit v1.2.1