Browse Source

Fix Web-mode colors, add another directory index

master
Macoy Madson 2 years ago
parent
commit
dd5236c6c9
  1. 9
      Emacs/index-management.el
  2. 9
      Emacs/syntaxes.el
  3. 12
      Emacs/visual-late.el

9
Emacs/index-management.el

@ -1,3 +1,7 @@
;; Turns "D:/srcTip" into "/d/srcTip"
(defun macoy-windows-path-to-gitbash-path (path)
(format "/%s" (replace-regexp-in-string ":/" "/" path)))
;; Index management: determine which index files to use for things like tags, codesearch, etc.
(defun macoy-set-index-directories (&optional code-dir data-dir)
"Change which directories Codesearch, tags, and other utilities create their indexes for"
@ -17,11 +21,14 @@
;; Follow up by updating things which rely on this statically
(setq tortoise-svn-repository-path macoy-active-code-dir)
(setq macoy-active-code-dir-gitbash (macoy-windows-path-to-gitbash-path macoy-active-code-dir))
(setq macoy-active-data-dir-escaped (macoy-unix-path-to-windows-path macoy-active-data-dir))
;; Narrow the search a bit
(setq macoy-active-data-search-dir (format "%s/data" macoy-active-data-dir))
(setq codesearch-dir-to-index macoy-active-code-dir)
(setq codesearch-cindex-args (list "-reset" "-exclude" (format "%s/csearchIgnorePatterns" macoy-active-code-dir)))
;; TODO Make this an add-to-list conditionally on exclude
(setq codesearch-cindex-args
(list "-reset" "-exclude" (format "%s/csearchIgnorePatterns" macoy-active-code-dir)))
(setq macoy-codesearch-search-data-dir macoy-active-data-search-dir))
;; TODO: Make codesearch support multiple index files. Is that possible?

9
Emacs/syntaxes.el

@ -6,18 +6,9 @@
;; This is for better syntax highlighting when editing templated web files (e.g. files with Nunjucks)
;; Only enabled at work because I only need web mode for template stuff
(when (require 'web-mode)
;; TODO: Customize colors (see http://web-mode.org/ "Syntax highlighting")
;; I like to manually enable rainbow-mode if I want to see colors (this might not work...)
(setq web-mode-enable-css-colorization nil)
;; (set-face-foreground 'web-mode-html-attr-custom-face (face-foreground 'font-lock-variable-name-face))
;; (set-face-foreground 'web-mode-html-attr-name-face (face-foreground 'font-lock-variable-name-face))
(set-face-foreground 'web-mode-html-attr-custom-face (face-foreground 'default))
(set-face-foreground 'web-mode-html-attr-name-face (face-foreground 'default))
(set-face-foreground 'web-mode-html-tag-bracket-face (face-foreground 'default))
(set-face-foreground 'web-mode-html-tag-face (face-foreground 'font-lock-function-name-face))
;; Associate web files with web-mode
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js?\\'" . web-mode))

12
Emacs/visual-late.el

@ -128,8 +128,16 @@
(set-face-attribute 'smerge-markers nil :background (face-background 'match))
(set-face-attribute 'smerge-base nil :background "#482300")
(set-face-attribute 'smerge-upper nil :background "#4f2929")
(set-face-attribute 'smerge-lower nil :background "#233c20")
)
(set-face-attribute 'smerge-lower nil :background "#233c20"))
(when (require 'web-mode)
;; TODO: Customize colors (see http://web-mode.org/ "Syntax highlighting")
;; (set-face-foreground 'web-mode-html-attr-custom-face (face-foreground 'font-lock-variable-name-face))
;; (set-face-foreground 'web-mode-html-attr-name-face (face-foreground 'font-lock-variable-name-face))
(set-face-foreground 'web-mode-html-attr-custom-face (face-foreground 'default))
(set-face-foreground 'web-mode-html-attr-name-face (face-foreground 'default))
(set-face-foreground 'web-mode-html-tag-bracket-face (face-foreground 'default))
(set-face-foreground 'web-mode-html-tag-face (face-foreground 'font-lock-function-name-face)))
;; Make magit's diff look similar/the same as diff-mode
(when (require 'magit)

Loading…
Cancel
Save