Add .gitignore
This commit is contained in:
parent
a7526d4a98
commit
6dd9ce3a2f
2 changed files with 2 additions and 66 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
**/*~
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
(package-initialize)
|
||||
|
||||
(setq inhibit-splash-screen t)
|
||||
(menu-bar-mode -1)
|
||||
(toggle-scroll-bar -1)
|
||||
(tool-bar-mode -1)
|
||||
|
||||
(setq scroll-step 1
|
||||
scroll-conservatively 10000)
|
||||
|
||||
(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
|
||||
'(markdown-mode json-mode yasnippet-snippets yasnippet dracula-theme go-mode company)))
|
||||
(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.
|
||||
)
|
||||
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
||||
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
|
||||
;; and `package-pinned-packages`. Most users will not need or want to do this.
|
||||
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
||||
|
||||
|
||||
(add-to-list 'load-path
|
||||
"~/.emacs.d/plugins/yasnippet")
|
||||
(require 'yasnippet)
|
||||
(yas-global-mode 1)
|
||||
|
||||
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
|
||||
(load-theme 'dracula t)
|
||||
|
||||
(add-hook 'go-mode-hook 'eglot-ensure)
|
||||
|
||||
(add-hook 'go-mode-hook #'eglot-ensure)
|
||||
|
||||
;; Define function to call when go-mode loads
|
||||
(defun my-go-mode-hook ()
|
||||
(if (not (string-match "go" compile-command)) ; set compile command default
|
||||
(set (make-local-variable 'compile-command)
|
||||
"go build -v && go test -v && go vet")))
|
||||
|
||||
;; Connect go-mode-hook with the function we just defined
|
||||
(add-hook 'go-mode-hook 'my-go-mode-hook)
|
||||
|
||||
(defun own/eglot-organize-imports ()
|
||||
(call-interactively 'eglot-code-action-organize-imports))
|
||||
|
||||
(defun own/before-saving-go ()
|
||||
;; you might also like:
|
||||
(add-hook 'before-save-hook #'eglot-format-buffer -10 t)
|
||||
(add-hook 'before-save-hook #'own/eglot-organize-imports nil t))
|
||||
|
||||
(add-hook 'go-mode-hook #'own/before-saving-go)
|
||||
|
||||
(add-hook 'after-init-hook 'global-company-mode)
|
||||
|
||||
|
||||
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
|
Loading…
Reference in a new issue