diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-18 20:19:25 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-18 20:19:25 -0400 |
commit | 716adf2f6b771474b1d9a7fe507abba80bfeae16 (patch) | |
tree | 581412950ac44f279d3f4998119c6dcd0fce2b36 | |
parent | c2385d99b382eeb82082bf338d3ae429c96aede5 (diff) |
emacs: LSP?lukeshu-dw-thinkpad/master
-rw-r--r-- | .config/emacs/custom.el | 15 | ||||
-rw-r--r-- | .config/emacs/init.el | 23 |
2 files changed, 37 insertions, 1 deletions
diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index fc5baaf..df91549 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -4,9 +4,24 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(auth-source-save-behavior nil) + '(custom-safe-themes + '("7dc296b80df1b29bfc4062d1a66ee91efb462d6a7a934955e94e786394d80b71" default)) + '(eglot-autoshutdown t) '(erc-nick "lukeshu") '(global-whitespace-mode nil) '(graphviz-dot-auto-indent-on-semi nil) + '(lsp-go-codelenses + '((vendor . t) + (upgrade_dependency . t) + (tidy . t) + (test . t) + (regenerate_cgo . t) + (generate . t) + (gc_details . t))) + '(lsp-lens-enable t) + '(lsp-ui-sideline-ignore-duplicate t) + '(lsp-ui-sideline-show-code-actions t) + '(lsp-ui-sideline-show-hover t) '(safe-local-variable-values '((Indent-tabs-mode) (c-file-offsets diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 0e305a5..11205f7 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -169,6 +169,7 @@ terraform-indent-level hcl-indent-level)) )) +;; (use-package eglot) (use-package jq-format :commands (jq-format-json-buffer jq-format-json-region @@ -176,6 +177,11 @@ jq-format-jsonlines-buffer jq-format-jsonlines-region jq-format-jsonlines-on-save-mode)) +;; (use-package company) +;; (use-package flycheck) +;; (use-package yasnippet) +;; (use-package lsp-mode :commands lsp) +;; (use-package lsp-ui :commands lsp-ui-mode) (use-package multiple-cursors :bind (("C-c m l" . mc/edit-lines) ("C-c m n" . mc/insert-numbers))) @@ -219,7 +225,22 @@ (define-key erc-mode-map (kbd "C-c C-u") 'erc-cmd-QUERY) ))) (use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'")) -(use-package go-mode :mode ("\\.go\\'" "go\\.mod")) +(use-package go-mode + :mode ("\\.go\\'" "go\\.mod") + :config (progn + (when (fboundp 'eglot-ensure) + (add-hook 'go-mode-hook + (lambda () + (set (make-local-variable 'eglot-workspace-configuration) + '(:gopls (:codelenses (:generate nil + :gc_details t) + :annotations (:bounds t + :escape t + :inline t + :nil t)))) + (eglot-ensure)))) + (when (fboundp 'lsp) + (add-hook 'go-mode-hook 'lsp-deferred)))) (use-package graphql-mode :mode ("\\.graphql\\'" "\\.gql\\'")) (use-package graphviz-dot-mode :mode ("\\.dot\\'" "\\.gv\\'") |