Skip to content

Instantly share code, notes, and snippets.

@kahunacohen
Last active November 1, 2021 06:18
Show Gist options
  • Save kahunacohen/e122d537797827edefb3781207768c7e to your computer and use it in GitHub Desktop.
Save kahunacohen/e122d537797827edefb3781207768c7e to your computer and use it in GitHub Desktop.
; Generate emacs/prelude.
(defun nolinum ()
(global-linum-mode 0)
)
(add-hook 'org-mode-hook 'nolinum)
(menu-bar-mode -1)
(global-undo-tree-mode 0)
(setq sentence-end-double-space nil)
(setq-default abbrev-mode t)
(add-hook 'python-mode-hook 'anaconda-mode)
(smartparens-global-mode -1)
(global-aggressive-indent-mode 1)
(smartparens-global-mode -1)
(global-nlinum-mode -1)
(use-package rustic)
; foo
; file treeview
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/"))
(global-set-key [f8] 'neotree-toggle)
(setq neo-smart-open t)
;golang
(add-to-list 'load-path "/Users/acohen/.emacs.d/personal")
(autoload 'go-mode "go-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
(add-hook 'before-save-hook 'gofmt-before-save)
;turn off tab hightlighting for gomode
(add-hook 'go-mode-hook
(lambda ()
(add-hook 'before-save-hook 'gofmt-before-save)
(setq whitespace-style '(face empty trailing lines-tail))
(setq tab-width 4)
(setq indent-tabs-mode 1)))
; tide (typescript)
(defun setup-tide-mode ()
(interactive)
(tide-setup)
(flycheck-mode +1)
(setq flycheck-check-syntax-automatically '(save mode-enabled))
(eldoc-mode +1)
(tide-hl-identifier-mode +1)
;; company is an optional dependency. You have to
;; install it separately via package-install
;; `M-x package-install [ret] company`
(company-mode +1))
;; aligns annotation to the right hand side
(setq company-tooltip-align-annotations t)
;; formats the buffer before saving
(add-hook 'before-save-hook 'tide-format-before-save)
(add-hook 'typescript-mode-hook #'setup-tide-mode)
;js mode
(setq js-indent-level 2)
; Allows us to do normal yank operations and content gets
; copied to clipboard.
(xclip-mode 1)
(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.
'(package-selected-packages
'(go-mode tide rustic use-package zop-to-char zenburn-theme yaml-mode which-key web-mode volatile-highlights undo-tree super-save smartrep smartparens rainbow-mode rainbow-delimiters projectile operate-on-number nlinum move-text magit lsp-ui json-mode js2-mode imenu-anywhere hl-todo guru-mode gitignore-mode gitconfig-mode git-timemachine gist flycheck expand-region exec-path-from-shell elisp-slime-nav editorconfig easy-kill discover-my-major diminish diff-hl crux counsel company browse-kill-ring anzu aggressive-indent ag ace-window)))
(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.
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment