Add clang and clojure configuration

This commit is contained in:
Maciej 2019-05-02 09:55:54 +03:00
parent af539db4c6
commit e41192395c
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
3 changed files with 32 additions and 1 deletions

16
20clang.el Normal file
View file

@ -0,0 +1,16 @@
(defun activate-clang-mode ()
"Goodies for editing c files"
(set-indent 4)
(column-enforce-n 80)
(add-to-list (make-local-variable 'company-backends)
'(company-etags company-yasnippet))
(setq-local
ctags-refresh-command
(format
"ctags -e -R --languages=C -f %sTAGS %s."
(projectile-project-root) (projectile-project-root)
)))
(add-hook 'c-mode-hook 'activate-clang-mode)

9
20clojure.el Normal file
View file

@ -0,0 +1,9 @@
(add-hook 'clojure-mode-hook 'cider-mode)
(defun activate-clojure-mode ()
"Goodies for clojure files."
(set-indent 2) ;; Default indentation of 2 characters
(column-enforce-n 80)
)
(add-hook 'clojure-mode-hook 'activate-clojure-mode)

View file

@ -79,6 +79,10 @@
tern tern
company-tern company-tern
;; Clojure
clojure-mode
cider
;; Infrastructure files ;; Infrastructure files
dockerfile-mode dockerfile-mode
terraform-mode terraform-mode
@ -118,6 +122,8 @@
(load "~/.emacs.d/20erlang.el") (load "~/.emacs.d/20erlang.el")
(load "~/.emacs.d/20sh.el") (load "~/.emacs.d/20sh.el")
(load "~/.emacs.d/20rust.el") (load "~/.emacs.d/20rust.el")
(load "~/.emacs.d/20clang.el")
(load "~/.emacs.d/20clojure.el")
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
@ -126,7 +132,7 @@
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(package-selected-packages '(package-selected-packages
(quote (quote
(erlang rspec-mode crystal-mode dap-mode lsp-ui company-lsp lsp-mode nginx-mode gitignore-mode js2-mode keyfreq company-web visual-regexp enh-ruby-mode counsel-projectile counsel ivy flycheck-rust flycheck racer rust-mode hydra markdown-mode solarized-theme company-ansible alchemist window-purpose column-enforce-mode yaml-mode ansible dockerfile-mode ruby-end web-mode dash-at-point base16-theme exec-path-from-shell)))) (cider clojure-mode erlang rspec-mode crystal-mode dap-mode lsp-ui company-lsp lsp-mode nginx-mode gitignore-mode js2-mode keyfreq company-web visual-regexp enh-ruby-mode counsel-projectile counsel ivy flycheck-rust flycheck hydra solarized-theme company-ansible alchemist column-enforce-mode yaml-mode ansible dockerfile-mode ruby-end dash-at-point base16-theme exec-path-from-shell))))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.