summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kosarek <matthew.kosarek@vention.cc>2023-01-04 10:46:22 -0500
committerMatthew Kosarek <matthew.kosarek@vention.cc>2023-01-04 10:46:22 -0500
commita5ea55766f7c09f9d105239c547029cf8c7405ad (patch)
tree789b84af4604d1c827d4edda03cab934e46240db
parent6147c614415231543619577dc8c3f666824a4da7 (diff)
Improved file search, and tsx support
-rw-r--r--lisp/general.el7
-rw-r--r--lisp/web.el15
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 "<f2>") #'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)