Customizations from devserver
This commit is contained in:
parent
a89cc66ee3
commit
8f46f8c275
1 changed files with 94 additions and 52 deletions
|
|
@ -72,10 +72,6 @@
|
||||||
'(("no_proxy" . "^\\(localhost\\|10.*\\)")
|
'(("no_proxy" . "^\\(localhost\\|10.*\\)")
|
||||||
("http" . "fwdproxy:8080")
|
("http" . "fwdproxy:8080")
|
||||||
("https" . "fwdproxy:8080"))))
|
("https" . "fwdproxy:8080"))))
|
||||||
|
|
||||||
;; Hack support for stuff in www
|
|
||||||
(setq hack-for-hiphop-root (expand-file-name "www" "~"))
|
|
||||||
(load "/home/engshare/tools/hack-for-hiphop")
|
|
||||||
))
|
))
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
@ -182,9 +178,22 @@
|
||||||
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
|
||||||
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
|
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
|
||||||
|
|
||||||
;; Consolas. (And, to a lesser extent, Inconsolata.)
|
;; Modeline format:
|
||||||
|
(display-time-mode -1)
|
||||||
|
|
||||||
|
;; ================================================================
|
||||||
|
;; Fonts and windows and the like, only if graphics.
|
||||||
|
;; ================================================================
|
||||||
|
;;
|
||||||
|
;; (I added this because for some reason on 2016-09-26 my emacs started
|
||||||
|
;; segfaulting on my devserver when it called find-font, and I'll be damned
|
||||||
|
;; if I'm going to debug it.)
|
||||||
;;
|
;;
|
||||||
(require 'cl)
|
(require 'cl)
|
||||||
|
(if (display-graphic-p)
|
||||||
|
(progn
|
||||||
|
;; Consolas. (And, to a lesser extent, Inconsolata.)
|
||||||
|
;;
|
||||||
(defun font-candidate (&rest fonts)
|
(defun font-candidate (&rest fonts)
|
||||||
"Return existing font which first match."
|
"Return existing font which first match."
|
||||||
(find-if (lambda (f) (find-font (font-spec :name f))) fonts))
|
(find-if (lambda (f) (find-font (font-spec :name f))) fonts))
|
||||||
|
|
@ -224,15 +233,10 @@
|
||||||
|
|
||||||
;; COLORZ!
|
;; COLORZ!
|
||||||
;;
|
;;
|
||||||
(if (display-graphic-p)
|
|
||||||
(progn
|
|
||||||
(require 'color-theme)
|
(require 'color-theme)
|
||||||
(require 'color-theme-solarized)
|
(require 'color-theme-solarized)
|
||||||
(color-theme-solarized)))
|
(color-theme-solarized)))
|
||||||
|
|
||||||
;; Modeline format:
|
|
||||||
(display-time-mode -1)
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; FUN WITH KEY BINDINGS! YAAAAYYY!!!
|
;; FUN WITH KEY BINDINGS! YAAAAYYY!!!
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
@ -403,7 +407,7 @@
|
||||||
))))
|
))))
|
||||||
|
|
||||||
(defun my-c-mode-hook ()
|
(defun my-c-mode-hook ()
|
||||||
(c-set-style "fb-c"))
|
(c-set-style (if is-fb-environment "fb-c" "ms-c")))
|
||||||
|
|
||||||
(add-hook 'c-mode-hook 'my-c-mode-hook)
|
(add-hook 'c-mode-hook 'my-c-mode-hook)
|
||||||
(add-hook 'c++-mode-hook 'my-c-mode-hook)
|
(add-hook 'c++-mode-hook 'my-c-mode-hook)
|
||||||
|
|
@ -771,7 +775,45 @@
|
||||||
(vv (cadr spev)))
|
(vv (cadr spev)))
|
||||||
(setenv vn vv))))
|
(setenv vn vv))))
|
||||||
|
|
||||||
;; Dirty hack but it makes tramp run faster. This is for when you're experimenting with
|
|
||||||
;; using emacs locally but editing files on your FB devserver. Honestly I think you're
|
;; =================================================================
|
||||||
;; better off just using Nuclide and leaving emacs for other stuff.
|
;; PHP stuff
|
||||||
;; (setq vc-handled-backends nil)
|
;; =================================================================
|
||||||
|
(if is-fb-environment
|
||||||
|
(progn
|
||||||
|
;; Hack support for stuff in www
|
||||||
|
(setq hack-for-hiphop-root (expand-file-name "www" "~"))
|
||||||
|
(load "/home/engshare/tools/hack-for-hiphop")
|
||||||
|
|
||||||
|
(load-library (expand-file-name "emacs-packages/hh-client.el" master-dir))
|
||||||
|
(require 'hh-client)
|
||||||
|
|
||||||
|
(defun my-fb-php-hook ()
|
||||||
|
(global-set-key (kbd "M-.") 'hh-client-find-definition))
|
||||||
|
(add-hook 'php-mode-hook 'my-fb-php-hook)
|
||||||
|
))
|
||||||
|
|
||||||
|
(if is-fb-environment
|
||||||
|
(progn
|
||||||
|
|
||||||
|
(flycheck-define-checker python-fb-flake8
|
||||||
|
"A Python syntax and style checker using FB's Flake8."
|
||||||
|
:command ("flake8")
|
||||||
|
:standard-input f
|
||||||
|
:error-filter (lambda (errors)
|
||||||
|
(let ((errors (flycheck-sanitize-errors errors)))
|
||||||
|
(seq-do #'flycheck-flake8-fix-error-level errors)
|
||||||
|
errors))
|
||||||
|
:error-patterns
|
||||||
|
((warning line-start
|
||||||
|
"stdin:" line ":" (optional column ":") " "
|
||||||
|
(id (one-or-more (any alpha)) (one-or-more digit)) " "
|
||||||
|
(message (one-or-more not-newline))
|
||||||
|
line-end))
|
||||||
|
:modes python-mode)
|
||||||
|
|
||||||
|
(add-hook 'python-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(flycheck-select-checker `python-fb-flake8)
|
||||||
|
))
|
||||||
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue