diff options
Diffstat (limited to 'emacs.d/modules')
31 files changed, 689 insertions, 0 deletions
diff --git a/emacs.d/modules/module-appareance.el b/emacs.d/modules/module-appareance.el new file mode 100644 index 0000000..53a34fd --- /dev/null +++ b/emacs.d/modules/module-appareance.el @@ -0,0 +1,46 @@ +;; I don't want a startup screen +(setq inhibit-startup-screen t) + +;; fullscreen +(global-set-key (kbd "<s-return>") 'toggle-frame-fullscreen) + +;; disable tool bar and the scroll bar +(dolist (mode '(tool-bar-mode scroll-bar-mode)) + (when (fboundp mode) (funcall mode -1))) + +;; Set default font. +(set-face-attribute 'default nil :height 130 :weight 'normal :width 'normal) + +;; no bell +(setq visible-bell nil) +(setq ring-bell-function 'ignore) + +;; don't use native full screen on OS-X +(when (eq system-type 'darwin) + (setq ns-use-native-fullscreen nil)) + +;; highlight current line +(global-hl-line-mode 1) + +;; cursor is a horizontal bar +(setq-default cursor-type 'hbar) + +;; no blinking cursor +(blink-cursor-mode -1) + +;; I don't want a frindge on the right +(fringe-mode '(6 . 0)) + +;; frame title +(setq frame-title-format '( "%f" " [" (:eval mode-name) "]")) + +;; show parenthesis +(show-paren-mode +1) + +;; show column number in the mode line +(setq column-number-mode t) + +;; unclutter the modeline +(use-package diminish) + +(provide 'module-appareance) diff --git a/emacs.d/modules/module-autocomplete.el b/emacs.d/modules/module-autocomplete.el new file mode 100644 index 0000000..c0ae31b --- /dev/null +++ b/emacs.d/modules/module-autocomplete.el @@ -0,0 +1,16 @@ +(require 'config-package) + +(use-package company + :ensure t + :commands company-mode + :diminish company-mode + :config + (global-company-mode) + (setq company-global-modes '(not term-mode)) + (setq company-idle-delay 0.3 + company-selection-wrap-around t + company-show-numbers t + company-tooltip-align-annotations t + company-require-match nil)) + +(provide 'module-autocomplete) diff --git a/emacs.d/modules/module-c.el b/emacs.d/modules/module-c.el new file mode 100644 index 0000000..f21cc30 --- /dev/null +++ b/emacs.d/modules/module-c.el @@ -0,0 +1,7 @@ +(require 'config-package) + +(use-package google-c-style + :commands + (google-set-c-style)) + +(provide 'module-c) diff --git a/emacs.d/modules/module-codestyle.el b/emacs.d/modules/module-codestyle.el new file mode 100644 index 0000000..5a18b34 --- /dev/null +++ b/emacs.d/modules/module-codestyle.el @@ -0,0 +1,20 @@ +(require 'config-package) + +(setq show-paren-delay 0) + +;; turn off tab indentation +(setq-default indent-tabs-mode nil) + +;; when saving the file, ensure a newline exists at the end of the file +(setq require-final-newline t) + +(use-package whitespace + ;; highlight white spaces + :config + (setq whitespace-style '(face trailing)) + (add-hook 'prog-mode-hook 'whitespace-mode)) + +(add-hook 'prog-mode-hook + (lambda () (setq show-trailing-whitespace t))) + +(provide 'module-codestyle) diff --git a/emacs.d/modules/module-dired.el b/emacs.d/modules/module-dired.el new file mode 100644 index 0000000..6879da9 --- /dev/null +++ b/emacs.d/modules/module-dired.el @@ -0,0 +1,17 @@ +(require 'config-package) + +;; Keep dired buffers updated when the file system changes. +(setq global-auto-revert-non-file-buffers t) +(setq auto-revert-verbose nil) + +;; (setq dired-omit-files +;; (concat dired-omit-files "\\|^.DS_Store$\\|^.projectile$\\|^.git$\\|^.svn"))) + +(let ((gls "/opt/twitter/bin/gls")) + (if (file-exists-p gls) + (setq insert-directory-program gls + dired-listing-switches "-aBhl --group-directories-first"))) + +(global-set-key (kbd "C-x C-d") 'dired) + +(provide 'module-dired) diff --git a/emacs.d/modules/module-docker.el b/emacs.d/modules/module-docker.el new file mode 100644 index 0000000..4583b0b --- /dev/null +++ b/emacs.d/modules/module-docker.el @@ -0,0 +1,13 @@ +(require 'config-package) + +(use-package dockerfile-mode + :bind ("C-z" . hybrdo-docker/body)) + +(defhydra hydra-docker (:hint nil :exit t) +" +^Command^ +_b_: build" + ("b" dockerfile-build-buffer) + ("q" nil "quit" :color blue)) + +(provide 'module-docker) diff --git a/emacs.d/modules/module-editing.el b/emacs.d/modules/module-editing.el new file mode 100644 index 0000000..a49e856 --- /dev/null +++ b/emacs.d/modules/module-editing.el @@ -0,0 +1,15 @@ +(require 'config-package) + +;; auto close bracket, parenthesis insertion +(electric-pair-mode 1) + +;; Remap join-line to M-j where it's easier to get to. +(global-set-key (kbd "M-j") 'join-line) + +;; configuration for tramp +(use-package tramp + :config + (setq tramp-default-method "ssh" + tramp-persistency-file-name (expand-file-name "var/tramp" user-emacs-directory))) + +(provide 'module-editing) diff --git a/emacs.d/modules/module-flycheck.el b/emacs.d/modules/module-flycheck.el new file mode 100644 index 0000000..3e2116c --- /dev/null +++ b/emacs.d/modules/module-flycheck.el @@ -0,0 +1,11 @@ +(require 'config-package) + +(use-package flycheck + :config + (progn + (add-hook 'prog-mode-hook 'flycheck-mode) + (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc)) + (setq flycheck-highlighting-mode 'lines) + (setq flycheck-check-syntax-automatically '(mode-enabled save)))) + +(provide 'module-flycheck) diff --git a/emacs.d/modules/module-flyspell.el b/emacs.d/modules/module-flyspell.el new file mode 100644 index 0000000..ade45ee --- /dev/null +++ b/emacs.d/modules/module-flyspell.el @@ -0,0 +1,17 @@ +(require 'config-package) + +;; check the spelling +(use-package flyspell + :init + (use-package ispell + :ensure t + :config + (setq ispell-program-name "aspell" + ispell-list-command "--list")) + (use-package flyspell-popup + :ensure t + :bind ("C-:" . flyspell-popup-correct)) + :config + (add-hook 'text-mode-hook 'flyspell-mode)) + +(provide 'module-flyspell) diff --git a/emacs.d/modules/module-general.el b/emacs.d/modules/module-general.el new file mode 100644 index 0000000..6feec76 --- /dev/null +++ b/emacs.d/modules/module-general.el @@ -0,0 +1,59 @@ +;; set utf-8 as the default encoding +(prefer-coding-system 'utf-8-unix) +(set-terminal-coding-system 'utf-8) +(set-keyboard-coding-system 'utf-8) + +;; alias yes-or-no to y-or-n +(fset 'yes-or-no-p 'y-or-n-p) + +;; where to save the bookmarks +(setq bookmark-default-file (expand-file-name "var/bookmarks" user-emacs-directory) + bookmark-save-flag 1) + +;; reload the buffer when a file changes +(global-auto-revert-mode 1) + +;; clean old buffers at midnight +(use-package midnight + :config + (midnight-mode t)) + +;; scroll 5 lines at a time +(setq next-screen-context-lines 5) + +;; when using TAB, always indent +(setq tab-always-indent 'complete) + +;; don't auto save files +(setq auto-save-default nil) + +;; I really don't want backup files +(setq auto-save-list-file-prefix nil + make-backup-files nil) + +;; How long to display an echo-area message when the minibuffer is active. +(setq minibuffer-message-timeout 0.5) + +;; don't use a lock file +(setq-default create-lockfiles nil) + +;; where to save custom settings +(setq custom-file (expand-file-name "var/emacs-custom.el" user-emacs-directory)) + + +;; automatically revert the buffer if the content changed on disk +(use-package autorevert :diminish auto-revert-mode) + + +;; configuration for recentf, to interact with recent files +(use-package recentf + :config + (setq recentf-save-file (expand-file-name "var/recentf" user-emacs-directory))) + +(use-package server + :config + (unless (server-running-p) (server-start))) + + + +(provide 'module-general) diff --git a/emacs.d/modules/module-git.el b/emacs.d/modules/module-git.el new file mode 100644 index 0000000..f974bfe --- /dev/null +++ b/emacs.d/modules/module-git.el @@ -0,0 +1,30 @@ +(require 'config-package) + +(use-package magit + :mode (("differential-update-comments" . git-commit-mode) + ("new-commit" . git-commit-mode)) + + :bind (("C-x g s" . magit-status) + ("C-x g b" . magit-checkout)) + + :init + (progn + (setq magit-completing-read-function 'ivy-completing-read)) + + :config + (progn + (global-git-commit-mode) + (use-package git-commit :ensure t :defer t) + (add-hook 'magit-mode-hook + (lambda() + (setq mode-name "⎇"))) + (add-hook 'magit-log-edit-mode-hook + #'(lambda () + (set-fill-column 72) + (flyspell-mode))))) + +;; I don't care about any frontend other than magit +(setf vc-handled-backends nil + vc-follow-symlinks t) + +(provide 'module-git) diff --git a/emacs.d/modules/module-go.el b/emacs.d/modules/module-go.el new file mode 100644 index 0000000..19f40db --- /dev/null +++ b/emacs.d/modules/module-go.el @@ -0,0 +1,50 @@ +(require 'config-package) + +(use-package go-mode + :mode (("\\.go\\'" . go-mode)) + :bind ("C-z" . hydra-go/body)) + +(use-package go-eldoc + :config + (add-hook 'go-mode-hook 'go-eldoc-setup)) + +(use-package gotest) + +(use-package go-guru) + +(use-package go-imports) + +(use-package golint) + +(use-package go-projectile) + +(use-package company-go + :config + (add-hook 'go-mode-hook (lambda() (add-to-list 'company-backends 'company-go)))) + +(defun fc/my-go-hook () + (set (make-local-variable 'compile-command) + "go build -v && go test -v && go vet") + (setq-local tab-width 2)) + +(add-hook 'before-save-hook 'gofmt-before-save) +(add-hook 'go-mode-hook 'fc/my-go-hook) +(add-hook 'go-mode-hook 'company-mode) + +(defhydra hydra-go (:hint nil :exit t) +" +^Command^ ^Imports^ ^Doc^ +^-------^------^-------^-------^---^ +_r_: run _ig_: goto _d_: doc at point +_g_: guru _ia_: add +^ ^ _ir_: remove +" + ("g" 'hydra-go-guru/body :color blue) + ("r" go-run-main) + ("d" godoc-at-point) + ("ig" go-goto-imports ) + ("ia" go-import-add) + ("ir" go-remove-unused-imports) + ("q" nil "quit" :color blue)) + +(provide 'module-go) diff --git a/emacs.d/modules/module-hydra.el b/emacs.d/modules/module-hydra.el new file mode 100644 index 0000000..0b569c2 --- /dev/null +++ b/emacs.d/modules/module-hydra.el @@ -0,0 +1,5 @@ +(require 'config-package) + +(use-package hydra) + +(provide 'module-hydra) diff --git a/emacs.d/modules/module-ibuffer.el b/emacs.d/modules/module-ibuffer.el new file mode 100644 index 0000000..f914069 --- /dev/null +++ b/emacs.d/modules/module-ibuffer.el @@ -0,0 +1,42 @@ +(require 'config-package) + +(use-package ibuffer + :bind ("C-x C-b" . ibuffer) + :init + (setq-default ibuffer-eliding-string "…") + (setq ibuffer-show-empty-filter-groups nil + ibuffer-formats '((mark modified read-only " " + (name 30 30 :left :elide) + " " + (size 9 -1 :right) + " " + (mode 16 16 :left :elide) + " " filename-and-process) + (mark " " + (name 16 -1) + " " filename)) + ibuffer-saved-filter-groups + (quote (("default" + ("dired" (mode . dired-mode)) + ("elisp" (mode . emacs-lisp-mode)) + ("emacs" (or (name . "^\\*.*\\*$") (mode . fundamental-mode))) + ("go" (mode . go-mode)) + ("java" (mode . java-mode)) + ("json" (mode . json-mode)) + ("lisp" (mode . lisp-mode)) + ("magit" (mode . magit-mode)) + ("puppet" (mode . puppet-mode)) + ("python" (mode . python-mode)) + ("repl" (name . "repl")) + ("ruby" (mode . ruby-mode)) + ("rust" (mode . rust-mode)) + ("sh" (mode . sh-mode)) + ("text" (mode . text-mode)))))) + + (add-hook 'ibuffer-mode-hook ;; organise by filter-groups + '(lambda () + (ibuffer-auto-mode 1) + (setq mode-name "≣") + (ibuffer-switch-to-saved-filter-groups "default")))) + +(provide 'module-ibuffer) diff --git a/emacs.d/modules/module-ivy.el b/emacs.d/modules/module-ivy.el new file mode 100644 index 0000000..438563d --- /dev/null +++ b/emacs.d/modules/module-ivy.el @@ -0,0 +1,54 @@ +(require 'config-package) + +(use-package swiper) + +(use-package counsel + :bind* + (("M-x" . counsel-M-x) + ("C-s" . counsel-grep-or-swiper) + ("C-x C-f" . counsel-find-file) + ("C-x C-r" . counsel-recentf) + ("C-c f" . counsel-git) + ("C-c s" . counsel-git-grep) + ("C-c /" . counsel-ag)) + + :config + (setq counsel-find-file-at-point t)) + +(use-package ivy + :diminish (ivy-mode . "") + + :bind ("C-c m" . ivy-switch-project) + + :config + (ivy-mode 1) + (setq ivy-use-virtual-buffers t + ivy-height 10 + ivy-count-format "(%d/%d) " + ivy-initial-inputs-alist nil + ivy-use-ignore-default 'always + ivy-ignore-buffers '("company-statistics-cache.el" "company-statistics-autoload.el") + ivy-re-builders-alist '((swiper . ivy--regex-ignore-order) + (t . ivy--regex-fuzzy) + (t . ivy--regex-ignore-order))) + + (defun ivy-switch-project () + (interactive) + (ivy-read + "Switch to project: " + (if (projectile-project-p) + (cons (abbreviate-file-name (projectile-project-root)) + (projectile-relevant-known-projects)) + projectile-known-projects) + :action #'projectile-switch-project-by-name)) + + (ivy-set-actions + 'ivy-switch-project + '(("d" dired "Open Dired in project's directory") + ("v" counsel-projectile "Open project root in vc-dir or magit") + ("c" projectile-compile-project "Compile project") + ("r" projectile-remove-known-project "Remove project(s)")))) + +(use-package counsel-projectile) + +(provide 'module-ivy) diff --git a/emacs.d/modules/module-java.el b/emacs.d/modules/module-java.el new file mode 100644 index 0000000..33351fb --- /dev/null +++ b/emacs.d/modules/module-java.el @@ -0,0 +1,69 @@ +(require 'config-package) + +(use-package autodisass-java-bytecode) + +(use-package meghanada + :defer t + + :commands meghanada-mode + + :init + (add-hook 'java-mode-hook + (lambda() + (google-set-c-style) + (google-make-newline-indent) + (meghanada-mode t) + (smartparens-mode t) + (rainbow-delimiters-mode t) + (highlight-symbol-mode t))) + + :config + (setq meghanada-server-remote-debug t + meghanada-use-company t + meghanada-use-flycheck t + meghanada-auto-start t + meghanada-server-install-dir (expand-file-name "var/meghanada" user-emacs-directory)) + (meghanada-install-server) + + :bind + (:map meghanada-mode-map + ("C-S-t" . meghanada-switch-testcase) + ("M-r" . meghanada-reference) + ("M-t" . meghanada-typeinfo) + ("C-z" . hydra-meghanada/body))) + +(defhydra hydra-meghanada (:hint nil :exit t) +" +^Edit^ ^Tast or Task^ +^----^---------------------------^------------^ +_f_: meghanada-compile-file _m_: meghanada-restart +_c_: meghanada-compile-project _t_: meghanada-run-task +_o_: meghanada-optimize-import _j_: meghanada-run-junit-test-case +_s_: meghanada-switch-test-case _J_: meghanada-run-junit-class +_v_: meghanada-local-variable _R_: meghanada-run-junit-recent +_i_: meghanada-import-all _r_: meghanada-reference +_g_: magit-status _T_: meghanada-typeinfo +_q_: exit +" + ("f" meghanada-compile-file) + ("m" meghanada-restart) + + ("c" meghanada-compile-project) + ("o" meghanada-optimize-import) + ("s" meghanada-switch-testcase) + ("v" meghanada-local-variable) + ("i" meghanada-import-all) + + ("g" magit-status) + + ("t" meghanada-run-task) + ("T" meghanada-typeinfo) + ("j" meghanada-run-junit-test-case) + ("J" meghanada-run-junit-class) + ("R" meghanada-run-junit-recent) + ("r" meghanada-reference) + + ("q" exit) + ("z" nil "leave")) + +(provide 'module-java) diff --git a/emacs.d/modules/module-json.el b/emacs.d/modules/module-json.el new file mode 100644 index 0000000..40f46e5 --- /dev/null +++ b/emacs.d/modules/module-json.el @@ -0,0 +1,17 @@ +(require 'config-package) + +(use-package json-mode + :mode "\\.json\\'" + :config + (setq json-reformat:indent-width 2) + :bind ("C-z" . hydra-json/body)) + +(defhydra hydra-json (:hint nil :exit t) +" +^Command^ +_f_: format +" + ("f" json-reformat-region) + ("q" nil "quit" :color blue)) + +(provide 'module-json) diff --git a/emacs.d/modules/module-lisp.el b/emacs.d/modules/module-lisp.el new file mode 100644 index 0000000..11f6823 --- /dev/null +++ b/emacs.d/modules/module-lisp.el @@ -0,0 +1,14 @@ +(require 'config-package) + +(require 'eldoc) + +(add-hook 'emacs-lisp-mode-hook (lambda() + (setq mode-name "λ"))) + +(add-hook 'emacs-lisp-mode-hook 'eldoc-mode) +(add-hook 'lisp-interaction-mode-hook 'eldoc-mode) + +(define-key emacs-lisp-mode-map (kbd "C-c C-e") 'eval-buffer) +(define-key emacs-lisp-mode-map (kbd "C-c C-r") 'eval-region) + +(provide 'module-lisp) diff --git a/emacs.d/modules/module-make.el b/emacs.d/modules/module-make.el new file mode 100644 index 0000000..5735670 --- /dev/null +++ b/emacs.d/modules/module-make.el @@ -0,0 +1,8 @@ +(require 'config-package) + +(use-package make-mode + :config + (add-hook 'makefile-mode-hook (lambda () + (setq-local tab-width 2)))) + +(provide 'module-make) diff --git a/emacs.d/modules/module-markdown.el b/emacs.d/modules/module-markdown.el new file mode 100644 index 0000000..7d993b4 --- /dev/null +++ b/emacs.d/modules/module-markdown.el @@ -0,0 +1,17 @@ +(require 'config-package) + +(use-package markdown-mode + ;; mode to support files in the Markdown format + :ensure t + + :commands (markdown-mode gfm-mode) + + :mode (("\\.md\\'" . gfm-mode) + ("\\.markdown\\'" . gfm-mode)) + + :init (setq markdown-command "pandoc -f markdown_github -c https://goo.gl/OVmlwT --self-contained") + + :config + (add-hook 'gfm-mode-hook 'visual-line-mode)) + +(provide 'module-markdown) diff --git a/emacs.d/modules/module-pants.el b/emacs.d/modules/module-pants.el new file mode 100644 index 0000000..5a7abbb --- /dev/null +++ b/emacs.d/modules/module-pants.el @@ -0,0 +1,27 @@ +(require 'config-package) + +(use-package pants + :load-path (lambda () (expand-file-name "github.com/fcuny/pants.el/" fcuny/workspace)) + + :config + (setq pants-completion-system 'ivy + pants-source-tree-root (expand-file-name "git.twitter.biz/source" fcuny/workspace) + pants-bury-compilation-buffer t + pants-extra-args "-q") + + :bind (("C-c b" . pants-find-build-file) + ("C-c r" . pants-run-binary) + ("C-c t" . pants-run-test))) + +(defhydra hydra-pants (:hint nil :exit t) +" +^Command^ +_g_: go to build +_b_: build a binary +_t_: run the tests +" + ("g" pants-find-build-file) + ("b" pants-run-binary) + ("t" pants-run-test)) + +(provide 'module-pants) diff --git a/emacs.d/modules/module-project.el b/emacs.d/modules/module-project.el new file mode 100644 index 0000000..893f135 --- /dev/null +++ b/emacs.d/modules/module-project.el @@ -0,0 +1,30 @@ +(require 'config-package) + +(use-package projectile + :diminish projectile-mode + :bind-keymap ("C-c p" . projectile-command-map) + + :init + (add-hook 'after-init-hook #'projectile-mode) + + :config + (setq projectile-switch-project-action 'projectile-dired + projectile-enable-caching t + projectile-completion-system 'ivy + projectile-known-projects-file (expand-file-name "var/projectile-bookmarks.eld" user-emacs-directory) + projectile-cache-file (expand-file-name "var/projectile.cache" user-emacs-directory)) + (add-to-list 'projectile-globally-ignored-files ".DS_Store")) + +(use-package ag + :commands (counsel-ag ag) + :bind (:map ag-mode-map + ("p" . compilation-previous-error) + ("n" . compilation-next-error) + ("N" . compilation-next-file) + ("P" . compilation-previous-file)) + :config + (setq ag-highlight-search t + ag-reuse-buffers t + ag-reuse-window t)) + +(provide 'module-project) diff --git a/emacs.d/modules/module-protobuf.el b/emacs.d/modules/module-protobuf.el new file mode 100644 index 0000000..5ef1aee --- /dev/null +++ b/emacs.d/modules/module-protobuf.el @@ -0,0 +1,7 @@ +(require 'config-package) + +(use-package protobuf-mode + :ensure t + :mode ("\\.proto$" . protobuf-mode)) + +(provide 'module-protobuf) diff --git a/emacs.d/modules/module-puppet.el b/emacs.d/modules/module-puppet.el new file mode 100644 index 0000000..150ce19 --- /dev/null +++ b/emacs.d/modules/module-puppet.el @@ -0,0 +1,14 @@ +(require 'config-package) + +;; To setup flycheck in the GCP's repository: +;; ((puppet-mode +;; (flycheck-puppet-lint-rc .(expand-file-name "gcp-pupet-manifests/.puppet-lint.rc") fcuny/path-twitter-git))) + +(use-package puppet-mode + :mode ("\\.pp\\'" . puppet-mode) + + :init (add-hook 'puppet-mode-hook 'flycheck-mode)) + ;; :config + ;; (setq flycheck-puppet-lint-rc "/Users/fcuny/workspace/svn.twitter.biz/twitter-ops/utilities/puppet/.puppet-lint.rc")) + +(provide 'module-puppet) diff --git a/emacs.d/modules/module-python.el b/emacs.d/modules/module-python.el new file mode 100644 index 0000000..f495115 --- /dev/null +++ b/emacs.d/modules/module-python.el @@ -0,0 +1,26 @@ +(require 'config-package) + +(use-package python + :mode(("\\.aurora$" . python-mode) + ("BUILD$" . python-mode) + ("\\.py$" . python-mode)) + + :interpreter ("python" . python-mode) + + :config + (setq python-indent-offset 2) + (add-hook 'python-mode-hook 'eldoc-mode t)) + +;;; errors are reported like this: +;;; E241:ERROR <file name>:<line> <message> +(flycheck-define-checker source-check + "A syntax checker for python source code in Source, using `check.pex'" + :command ("check.pex" source) + :error-patterns ((error line-start (id (1+ nonl)) ":ERROR" (1+ nonl) ":" line (message) line-end) + (warning line-start (id (1+ nonl)) ":WARNING" (1+ nonl) ":" line (message) line-end)) + :predicate fc/check-source-p + :modes (python-mode)) + +(add-to-list 'flycheck-checkers 'source-check) + +(provide 'module-python) diff --git a/emacs.d/modules/module-rust.el b/emacs.d/modules/module-rust.el new file mode 100644 index 0000000..0dc3199 --- /dev/null +++ b/emacs.d/modules/module-rust.el @@ -0,0 +1,14 @@ +(require 'config-package) + +(use-package rust-mode) + +(use-package cargo + :hook (rust-mode . cargo-minor-mode) + :config + (setq compilation-ask-about-save nil) + ;; Automatically re-run compilation command on manual save inside a project. + ;; Will do nothing if a compilation hasn't been manually triggered + ;; in the past. + :diminish cargo-minor-mode) + +(provide 'module-rust) diff --git a/emacs.d/modules/module-scala.el b/emacs.d/modules/module-scala.el new file mode 100644 index 0000000..bb8a3cb --- /dev/null +++ b/emacs.d/modules/module-scala.el @@ -0,0 +1,7 @@ +(require 'config-package) + +(use-package scala-mode + ;; mode to work with scala files + :ensure t) + +(provide 'module-scala) diff --git a/emacs.d/modules/module-shell.el b/emacs.d/modules/module-shell.el new file mode 100644 index 0000000..763d133 --- /dev/null +++ b/emacs.d/modules/module-shell.el @@ -0,0 +1,14 @@ +(require 'config-package) + +(use-package sh-script + ;; configuration to interact with shell scripts + :mode ("bashrc" . sh-mode) + + :config + (defun set-sh-mode-indent () + (setq sh-basic-offset 2 + sh-indentation 2)) + (add-hook 'sh-mode-hook 'set-sh-mode-indent) + (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)) + +(provide 'module-shell) diff --git a/emacs.d/modules/module-thrift.el b/emacs.d/modules/module-thrift.el new file mode 100644 index 0000000..03e301a --- /dev/null +++ b/emacs.d/modules/module-thrift.el @@ -0,0 +1,10 @@ +(require 'config-package) + +(use-package thrift + ;; mode to work with thrift files + :mode ("\\.thrift\\'" . thrift-mode) + + :config + (setq thrift-indent-level 2)) + +(provide 'module-thrift) diff --git a/emacs.d/modules/module-toml.el b/emacs.d/modules/module-toml.el new file mode 100644 index 0000000..42c6bf8 --- /dev/null +++ b/emacs.d/modules/module-toml.el @@ -0,0 +1,5 @@ +(require 'config-package) + +(use-package toml-mode :ensure t) + +(provide 'module-toml) diff --git a/emacs.d/modules/module-yaml.el b/emacs.d/modules/module-yaml.el new file mode 100644 index 0000000..5c111ef --- /dev/null +++ b/emacs.d/modules/module-yaml.el @@ -0,0 +1,8 @@ +(require 'config-package) + +(use-package yaml-mode + :ensure t + :init (add-hook 'yaml-mode-hook 'flycheck-mode) + :mode ("\\.ya?ml\\'" . yaml-mode)) + +(provide 'module-yaml) |