Last active
August 1, 2019 08:36
-
-
Save ilyaguy/439609c5e5daded5326d8b42f4b34887 to your computer and use it in GitHub Desktop.
.emacs/init.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; package --- customize | |
;;; Commentary: | |
;; Customize | |
;;; Code: | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(calendar-christian-all-holidays-flag t) | |
'(calendar-mark-holidays-flag t) | |
'(calendar-week-start-day 1) | |
'(column-number-mode t) | |
'(completion-auto-help (quote lazy)) | |
'(confirm-kill-emacs (quote yes-or-no-p)) | |
'(custom-safe-themes | |
(quote | |
("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" default))) | |
'(display-battery-mode t) | |
'(display-time-mode t) | |
'(ecb-auto-expand-tag-tree (quote expand-spec)) | |
'(ecb-auto-update-methods-after-save t) | |
'(ecb-create-layout-frame-width 90) | |
'(ecb-highlight-tag-with-point (quote highlight)) | |
'(ecb-ignore-pop-up-frames nil) | |
'(ecb-layout-name "left15") | |
'(ecb-methods-menu-sorter nil) | |
'(ecb-methods-show-node-info (quote (always . name+type))) | |
'(ecb-options-version "2.50") | |
'(flycheck-highlighting-mode (quote lines)) | |
'(flycheck-navigation-minimum-level (quote error)) | |
'(flycheck-php-phpcs-executable "/Users/illiahai/.composer/vendor/bin/phpcs") | |
'(flycheck-php-phpmd-executable "/Users/illiahai/.composer/vendor/bin/phpmd") | |
'(flycheck-phpcs-standard "PSR2") | |
'(ggtags-global-output-format (quote ctags-x)) | |
'(global-hl-line-mode t) | |
'(global-linum-mode t) | |
'(inhibit-startup-screen t) | |
'(js-flat-functions t) | |
'(list-matching-lines-default-context-lines 2) | |
'(lsp-auto-guess-root t) | |
'(lsp-eldoc-render-all t) | |
'(lsp-enable-snippet t) | |
'(lsp-prefer-flymake nil) | |
'(lsp-ui-flycheck-enable t) | |
'(lsp-ui-sideline-ignore-duplicate t) | |
'(magit-process-yes-or-no-prompt-regexp "[([]([Yy](es)?)[\\/|]([Nn]o?)[\\])] ?:? ?$") | |
'(ns-right-alternate-modifier (quote none)) | |
'(org-agenda-start-with-clockreport-mode t) | |
'(org-agenda-start-with-log-mode (quote clockcheck)) | |
'(org-agenda-view-columns-initially t) | |
'(org-clock-in-switch-to-state "INPROGRESS") | |
'(org-closed-keep-when-no-todo t) | |
'(org-enforce-todo-checkbox-dependencies t) | |
'(org-enforce-todo-dependencies t) | |
'(org-log-done (quote note)) | |
'(org-log-note-clock-out t) | |
'(org-time-clocksum-use-effort-durations t) | |
'(org-todo-keyword-faces (quote (("CANCELLED" . "GREEN") ("INPROGRESS" . "ORANGE")))) | |
'(org-todo-keywords (quote ((sequence "TODO" "INPROGRESS" "DONE")))) | |
'(org-treat-insert-todo-heading-as-state-change t) | |
'(package-archives | |
(quote | |
(("gnu" . "http://elpa.gnu.org/packages/") | |
("melpa" . "https://melpa.org/packages/") | |
("org" . "https://orgmode.org/elpa/")))) | |
'(package-selected-packages | |
(quote | |
(php-cs-fixer dap-mode docker-cli magit-diff-flycheck doom-modeline auto-yasnippet web-mode js2-highlight-vars xref-js2 eslint-fix flymake-eslint yasnippet-snippets hl-block-mode dashboard dashboard-project-status org-dashboard yasnippet-classic-snippets fringe-current-line flycheck flycheck-css-colorguard flymake flymake-php flymake-phpcs git-identity magit-libgit mood-line php-mode docker-compose-mode gitlab gitlab-ci-mode gitlab-ci-mode-flycheck 2048-game ac-php-core php-auto-yasnippets php-scratch company-lsp lsp-php lsp-ui helm pandoc php-boris color-theme-solarized phpcbf company-php git-commit json-navigator suggest ukrainian-holidays company-phpactor apache-mode nginx-mode counsel-gtags counsel-projectile minimap delight ggtags gxref eldoc-overlay ac-js2 projectile-speedbar xah-css-mode ecb projectile flycheck-phpstan emmet-mode phan flycheck-popup-tip forecast exec-path-from-shell edit-indirect ac-etags narrowed-page-navigation page-break-lines neotree diff-hl stickyfunc-enhance org org-plus-contrib org-link-minor-mode coffee-mode ob-restclient w3 htmlize es-mode edbi php-refactor-mode which-key timesheet osx-org-clock-menubar ediprolog butler ctags-update smarty-mode flycheck-tip flycheck-title org-clock-today flymake-jslint flymake-json dockerfile-mode company-quickhelp ac-php gited yaml-mode php-eldoc jira magit magit-gitflow flyparens mic-paren mmm-mode mo-git-blame ## xml-rpc wpuzzle web-completion-data web-beautify sokoban poker package-filter json-mode js2-mode highlight-symbol gnugo geben flycheck-color-mode-line auctex))) | |
'(paren-display-message (quote always)) | |
'(php-cs-fixer-command "phpcs") | |
'(php-cs-fixer-config-option "--standard=PSR2") | |
'(php-do-not-use-semantic-imenu t) | |
'(php-insert-doc-author-email "[email protected]") | |
'(php-insert-doc-author-name "Illia Hai") | |
'(php-insert-doc-copyright-email "[email protected]") | |
'(php-insert-doc-copyright-name "domain.com") | |
'(php-lineup-cascaded-calls t) | |
'(php-mode-coding-style (quote psr2)) | |
'(php-mode-do-not-use-semantic-imenu t) | |
'(php-mode-lineup-cascaded-calls t) | |
'(php-mode-warn-if-mumamo-off "Don't warn") | |
'(php-refactor-command "/Users/illiahai/bin/refactor.phar") | |
'(phpcbf-executable "/Users/illiahai/.composer/vendor/bin/phpcbf") | |
'(phpcbf-standard "PSR2") | |
'(send-mail-function (quote sendmail-send-it)) | |
'(show-paren-mode t) | |
'(size-indication-mode t) | |
'(speedbar-show-unknown-files t) | |
'(speedbar-sort-tags t) | |
'(speedbar-supported-extension-expressions | |
(quote | |
(".php" ".org" ".[ch]\\(\\+\\+\\|pp\\|c\\|h\\|xx\\)?" ".tex\\(i\\(nfo\\)?\\)?" ".el" ".emacs" ".l" ".lsp" ".p" ".java" ".js" ".f\\(90\\|77\\|or\\)?" ".ad[abs]" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g" ".s?html" ".ma?k" "[Mm]akefile\\(\\.in\\)?" ".tpl" ".coffee"))) | |
'(speedbar-tag-hierarchy-method | |
(quote | |
(speedbar-prefix-group-tag-hierarchy speedbar-trim-words-tag-hierarchy speedbar-simple-group-tag-hierarchy speedbar-sort-tag-hierarchy))) | |
'(speedbar-track-mouse-flag t) | |
'(speedbar-update-flag nil) | |
'(speedbar-verbosity-level 2) | |
'(sql-electric-stuff (quote semicolon)) | |
'(sql-input-ring-file-name "~/.emacs.d/sql_history") | |
'(sql-mysql-login-params (quote (user password server database port))) | |
'(sql-product (quote mysql)) | |
'(sr-speedbar-right-side nil) | |
'(tab-always-indent (quote complete)) | |
'(tab-width 4) | |
'(tool-bar-mode nil) | |
'(uniquify-buffer-name-style (quote forward) nil (uniquify)) | |
'(uniquify-strip-common-suffix nil) | |
'(vc-git-diff-switches (quote ("-w")))) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(lsp-ui-sideline-code-action ((t (:foreground "dark red" :underline t)))) | |
'(lsp-ui-sideline-current-symbol ((t (:foreground "dark blue" :box (:line-width -1 :color "dark blue") :weight ultra-bold :height 0.99)))) | |
'(lsp-ui-sideline-global ((t (:background "bisque")))) | |
'(lsp-ui-sideline-symbol ((t (:foreground "dark cyan" :box (:line-width -1 :color "dark cyan") :height 0.99)))) | |
'(mmm-default-submode-face ((t nil))) | |
'(mmm-output-submode-face ((t (:background "khaki1")))) | |
'(vc-edited-state ((t (:inherit vc-state-base :slant italic))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; package --- init | |
;;; Commentary: | |
;; Added by Package.el. This must come before configurations of | |
;; installed packages. Don't delete this line. If you don't want it, | |
;; just comment it out by adding a semicolon to the start of the line. | |
;; You may delete these explanatory comments. | |
(require 'package) | |
;;; Code: | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
;; (require 'semantic/sb) | |
;; (require 'semantic/ia) | |
(setq custom-file "~/.emacs.d/custom-file.el") | |
(load custom-file 'noerror) | |
(when (memq window-system '(mac ns x)) | |
(exec-path-from-shell-initialize)) | |
(require 'uniquify) | |
(require 'linum) | |
; (global-linum-mode 1) ;; disable linum. | |
(setq frame-title-format | |
'(:eval | |
(if buffer-file-name | |
(replace-regexp-in-string | |
"\\\\" "/" | |
(replace-regexp-in-string | |
(regexp-quote (getenv "HOME")) "~" | |
(convert-standard-filename buffer-file-name))) | |
(buffer-name)))) | |
;;; find matching parens like xemacs | |
(load-library "mic-paren") | |
(global-set-key [(ctrl shift right)] 'paren-forward-sexp) | |
(global-set-key [(ctrl shift left)] 'paren-backward-sexp) | |
(global-set-key (kbd "C-c C-c") 'comment-or-uncomment-region) | |
(add-to-list 'load-path "~/.emacs.d/lisp") | |
(require 'highlight-symbol) | |
(require 'yasnippet) | |
;; LSP | |
(require 'company-php) | |
(require 'lsp-mode) | |
(require 'lsp-ui) | |
;; PHP | |
(require 'lsp-php) | |
(require 'php-mode) | |
(require 'php-doc) | |
;; Configure css-mode | |
(autoload 'css-mode "css-mode") | |
(add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode)) | |
(setq cssm-indent-function #'cssm-c-style-indenter) | |
(setq cssm-indent-level '4) | |
(require 'mmm-mode) | |
(setq mmm-global-mode 'maybe) | |
(mmm-add-mode-ext-class 'html-mode "\\.phtml\\'" 'html-php) | |
(mmm-add-mode-ext-class 'html-mode "\\.phtml\\'" 'html-js) | |
(mmm-add-mode-ext-class 'html-mode "\\.tpl\\'" 'html-php) | |
(mmm-add-mode-ext-class 'html-mode "\\.tpl\\'" 'html-js) | |
(mmm-add-mode-ext-class 'html-mode "\\.blade.\\'" 'html-php) | |
(mmm-add-mode-ext-class 'html-mode "\\.blade.\\'" 'html-js) | |
(add-hook 'lsp-mode-hook 'lsp-ui-mode) | |
(add-hook 'php-mode-hook 'lsp-mode) | |
(add-hook 'php-mode-hook #'lsp) | |
(setq lsp-php-show-file-parse-notifications nil) | |
;;; Hooks for PHP-mode. | |
(add-hook 'php-mode-hook | |
'(lambda () | |
(setq cas-fold-search t) | |
(php-enable-psr2-coding-style) | |
(local-set-key (kbd "M-P") 'php-insert-doc-block) | |
(diff-hl-mode) | |
(highlight-symbol-nav-mode) | |
(company-mode t) | |
(ac-php-core-eldoc-setup) ;; enable eldoc | |
(make-local-variable 'company-backends) | |
(add-to-list 'company-backends 'company-ac-php-backend) | |
(define-key php-mode-map (kbd "C-]") 'ac-php-find-symbol-at-point) | |
(define-key php-mode-map (kbd "s-t") 'ac-php-location-stack-back) | |
(define-key php-mode-map (kbd "C-?") 'ac-php-show-tip) | |
(define-key php-mode-map (kbd "C-c C--") 'php-current-class) | |
(define-key php-mode-map (kbd "C-c C-=") 'php-current-namespace) | |
(define-key php-mode-map (kbd "s-/") 'flymake-popup-current-error-menu) | |
(ggtags-mode 1) | |
; (setq imenu-create-index-function 'semantic-create-imenu-index) | |
)) | |
;; Javascript | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
(setq-default flycheck-disabled-checkers | |
(append flycheck-disabled-checkers | |
'(javascript-jshint))) | |
(setq-default flycheck-disabled-checkers | |
(append flycheck-disabled-checkers | |
'(json-jsonlist))) | |
(flycheck-add-mode 'javascript-eslint 'js2-mode) | |
(add-hook 'js2-mode-hook #'lsp) | |
(add-hook 'js2-mode | |
'(lambda() | |
(diff-hl-mode) | |
(highlight-symbol-nav-mode) | |
(company-mode t) | |
(lsp-mode) | |
(lsp) | |
;; (semantic-mode) | |
)) | |
;; Hook for WEB-mode | |
(add-to-list 'auto-mode-alist '("\\.phtml$" . web-mode)) | |
(add-hook 'web-mode-hook #'lsp) | |
(add-hook 'web-mode-hook | |
'(lambda () | |
(diff-hl-mode) | |
(company-mode t) | |
(highlight-symbol-nav-mode) | |
)) | |
(which-function-mode 1) | |
;; The following lines are always needed. Choose your own keys. | |
(global-set-key "\C-cl" 'org-store-link) | |
(global-set-key "\C-ca" 'org-agenda) | |
(global-set-key "\C-cc" 'org-capture) | |
(global-set-key "\C-cb" 'org-iswitchb) | |
(global-set-key "\C-csp" 'swiper-thing-at-point) | |
(add-to-list 'auto-mode-alist '("\\.rest\\'" . restclient-mode)) | |
;; (setq projectile-keymap-prefix (kbd "C-c p")) | |
(projectile-global-mode t) | |
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) | |
(add-hook 'html-mode-hook | |
(lambda () | |
;; Default indentation is usually 2 spaces, changing to 4. | |
(set (make-local-variable 'sgml-basic-offset) 4))) | |
(gitlab-ci-mode-flycheck-enable) | |
(require 'dashboard) | |
(dashboard-setup-startup-hook) | |
(setq dashboard-items '((recents . 15) | |
(bookmarks . 5) | |
(projects . 10) | |
(agenda . 5) | |
(registers . 5))) | |
(require 'ox-confluence) | |
(provide 'init) | |
;;; init.el ends here | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment