(require 'fcuny-vars) (use-package man :init (setq Man-notify-method 'aggressive)) (use-package auto-fill :hook (prog-mode . auto-fill-mode) :custom ;; this does not seem to work .. (comment-fill-column 80) (comment-auto-fill-only-comments t)) (use-package company :ensure t :diminish company-mode :custom (company-minimum-prefix-length 2) (company-tooltip-align-annotations t) (company-tooltip-limit 12) (company-idle-delay 1)) (use-package lispy :ensure t :config (dolist (hook '(emacs-lisp-mode-hook)) (add-hook hook #'lispy-mode))) (use-package eglot :ensure t :hook ((go-mode . eglot-ensure) (nix-mode . eglot-ensure))) (use-package sh-script :mode ("bashrc" . sh-mode) :hook (after-save . executable-make-buffer-file-executable-if-script-p) :config (setq-default sh-indentation 2 sh-basic-offset 2)) (use-package python :mode (("\\.py$" . python-mode)) :commands python-mode :hook ((python-mode . eldoc-mode)) :custom (python-indent-offset 2)) (use-package make-mode :config (add-hook 'makefile-mode-hook (lambda () (setq-local tab-width 2)))) (defun fcuny/setup-go-mode-compile () (if (not (string-match "go" compile-command)) (set (make-local-variable 'compile-command) "go build -v"))) ;; we need to install the following tools: ;; go get golang.org/x/tools/gopls@latest ;; go get golang.org/x/lint/golint@latest ;; go get honnef.co/go/tools/cmd/staticcheck (use-package go-mode :ensure t :hook ((before-save . lsp-format-buffer) (before-save . lsp-organize-imports) (go-mode . fcuny/setup-go-mode-compile)) :config (when (memq window-system '(mac ns)) (exec-path-from-shell-copy-env "GOPATH")) :custom (tab-width 4)) (use-package gotest :ensure t) (use-package lisp-mode :bind (("C-c C-e" . eval-buffer) ("C-c C-r" . eval-region))) (use-package compile :ensure nil :custom (compilation-scroll-output t) ;; Skip over warnings and info messages in compilation (compilation-skip-threshold 2) ;; Don't freeze when process reads from stdin (compilation-disable-input t) ;; Show three lines of context around the current message (compilation-context-lines 3)) (use-package nix-mode :ensure t :mode "\\.nix\\'" :hook ((before-save . nix-format-before-save)) :config) (provide 'fcuny-prog)