summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kosarek <matthew.kosarek@vention.cc>2022-12-30 09:05:12 -0500
committerMatthew Kosarek <matthew.kosarek@vention.cc>2022-12-30 09:05:12 -0500
commitffe416014baa2cdd6afb7e6976b81dea372ba1be (patch)
treea43e2806d9e7b037e857571c6574184f96eb1426
parenta652f92adaa10f53e1b66d6aefd2daab41fa3231 (diff)
Improvements to web mode and removing global flycheck
-rw-r--r--init.el6
-rw-r--r--lisp/general.el19
-rw-r--r--lisp/web.el9
3 files changed, 16 insertions, 18 deletions
diff --git a/init.el b/init.el
index ea3be9a..ba9ff84 100644
--- a/init.el
+++ b/init.el
@@ -23,7 +23,7 @@
;; (registers . 5))))
(setq package-list
- '(go-mode highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org))
+ '(eslint-fix go-mode highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org))
;; Fetch the list of packages available
(unless package-archive-contents
@@ -46,7 +46,7 @@
;; Theme
(require 'doom-themes)
-(load-theme 'modus-operandi t)
+(load-theme 'doom-one t)
(doom-themes-org-config)
; (setq debug-on-error t) ; Uncomment if you would like to debug errors!
@@ -76,7 +76,7 @@
'(org-agenda-files (list org-directory))
'(org-directory "~/Documents/org")
'(package-selected-packages
- '(go-mode css-eldoc dashboard highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org)))
+ '(js-doc eslint-fix eslintd-fix go-mode css-eldoc dashboard highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org)))
;;; init.el ends here
(custom-set-faces
diff --git a/lisp/general.el b/lisp/general.el
index e048836..3a16614 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -1,4 +1,3 @@
-
;;; Code:
;; Backup files
@@ -79,9 +78,9 @@
(setq-default right-fringe-width 20)
;; Initialization screen
-;(setq inhibit-splash-screen t)
-;(setq initial-scratch-message "")
-;(setq initial-major-mode 'text-mode)
+(setq inhibit-splash-screen t)
+(setq initial-scratch-message "* Scratch")
+(setq initial-major-mode 'org-mode)
;; Better undo functionality
;; TODO: Evil mode is disabled for now
@@ -101,8 +100,10 @@
(define-key projectile-mode-map (kbd "s-F") 'projectile-grep)
(define-key projectile-mode-map [?\s-o] 'projectile-switch-project)
(define-key projectile-mode-map [?\s-p] 'projectile-find-file)
-(add-to-list 'projectile-globally-ignored-directories "*node_modules")
-(setq projectile-indexing-method 'alien)
+;(setq projectile-indexing-method 'alien)
+(setq projectile-indexing-method 'native)
+(setq projectile-enable-caching t)
+(add-to-list 'projectile-globally-ignored-directories "node_modules")
;; Ido mode text matching
(require 'ivy)
@@ -162,12 +163,6 @@
(use-package git-gutter-fringe
:ensure t)
-
-;; Show flycheck always and after save
-;(use-package flycheck :ensure t)
-;(global-flycheck-mode)
- ;(add-hook 'after-init-hook #'global-flycheck-mode)
-
;; Emojis
(use-package emojify
:config
diff --git a/lisp/web.el b/lisp/web.el
index e7af0d4..eece1e0 100644
--- a/lisp/web.el
+++ b/lisp/web.el
@@ -30,7 +30,7 @@
;; TypeScript
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
-;; Eslint through Flycheck.
+
(require 'flycheck)
(setq-default flycheck-disabled-checkers
(append flycheck-disabled-checkers
@@ -40,8 +40,8 @@
'(json-jsonlist)))
(flycheck-add-mode 'javascript-eslint 'js-mode)
(flycheck-add-mode 'typescript-tslint 'typescript-mode)
-; use local eslint from node_modules before global
-; http://emacs.stackexchange.com/questions/21205/flycheck-with-file-relative-eslint-executable
+(add-hook 'js-mode-hook 'flycheck-mode)
+(add-hook 'typescript-mode-hook 'flycheck-mode)
(defun my-use-eslint-from-node-modules ()
"Use eslint from local node_modules instead of globally."
(let* ((root (locate-dominating-file
@@ -54,6 +54,9 @@
(setq-local flycheck-javascript-eslint-executable eslint))))
(add-hook 'flycheck-mode-hook #'my-use-eslint-from-node-modules)
+; use local eslint from node_modules before global
+; http://emacs.stackexchange.com/questions/21205/flycheck-with-file-relative-eslint-executable
+
;; Package management
(require 'eglot)
(add-hook 'js-mode-hook 'eglot-ensure)