-
-
Save stapelberg/d802e84321d94f946171862e0e9f2c94 to your computer and use it in GitHub Desktop.
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
(setq user-emacs-directory (format "/tmp/emacsd/%s/%s/" (file-name-base load-file-name) emacs-version)) | |
(setq package-user-dir (concat user-emacs-directory "elpa/")) | |
(setq package-archives | |
'(("gnu" . "https://elpa.gnu.org/packages/") | |
("melpa" . "https://melpa.org/packages/"))) | |
(package-initialize) | |
(defun install-package (pkg) | |
(unless (package-installed-p pkg) | |
(package-refresh-contents) | |
(package-install pkg)) | |
(require pkg)) | |
(install-package 'eglot) | |
(install-package 'go-mode) | |
(add-to-list 'eglot-server-programs '(go-mode . ("gopls"))) | |
(add-hook 'go-mode-hook 'eglot-ensure) | |
(add-hook 'after-init-hook | |
(lambda () | |
(find-file "nftables_test.go"))) | |
(run-hooks 'after-init-hook) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment