summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs.d/custom/fcuny-company.el11
-rw-r--r--emacs.d/custom/fcuny-go.el54
-rw-r--r--emacs.d/custom/fcuny-prog.el40
-rw-r--r--emacs.d/init.el1
4 files changed, 36 insertions, 70 deletions
diff --git a/emacs.d/custom/fcuny-company.el b/emacs.d/custom/fcuny-company.el
deleted file mode 100644
index fab7c99..0000000
--- a/emacs.d/custom/fcuny-company.el
+++ /dev/null
@@ -1,11 +0,0 @@
-(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))
-
-(provide 'fcuny-company)
diff --git a/emacs.d/custom/fcuny-go.el b/emacs.d/custom/fcuny-go.el
index ffbc1d5..4484b6e 100644
--- a/emacs.d/custom/fcuny-go.el
+++ b/emacs.d/custom/fcuny-go.el
@@ -20,62 +20,10 @@
 
   :config
   (when (memq window-system '(mac ns))
-    (exec-path-from-shell-copy-env "GOPATH"))
-
-  (defhydra hydra-go-menu (:hint nil)
-    "
-^find       ^     ^goto    ^       ^test^
-^-----------^     ^--------^       ^----^
-_r_: referrers    _d_: definition  _T_: test current test
-_i_: implements   _a_: arguments   _F_: test current file
-_D_: describe     _f_: function    _P_: test current package
-^ ^               _R_: return
-"
-    ("r" go-guru-referrers)
-    ("i" go-guru-implements)
-    ("D" go-guru-describe)
-    ("d" go-guru-definition)
-    ("a" go-goto-arguments)
-    ("f" go-goto-function)
-    ("R" go-goto-return-values)
-    ("T" go-test-current-test)
-    ("F" go-test-current-file)
-    ("P" go-test-current-project)
-    ("q" nil "quit" :color blue))
-
-  (define-key go-mode-map (kbd "C-c g") 'hydra-go-menu/body))
-
-(use-package go-guru
-  :ensure t
-  :after go-mode
-  :commands (go-guru-describe go-guru-freevars go-guru-implements go-guru-peers
-             go-guru-referrers go-guru-definition go-guru-pointsto
-             go-guru-callstack go-guru-whicherrs go-guru-callers go-guru-callees
-             go-guru-expand-region)
-  :config
-  (unless (executable-find "guru")
-    (warn "go-mode: couldn't find guru, refactoring commands won't work"))
-  (add-hook 'go-mode-hook #'go-guru-hl-identifier-mode))
-
-(use-package go-eldoc
-  :ensure t
-  :after go-mode
-  :config
-  (add-hook 'go-mode-hook 'go-eldoc-setup))
-
-(use-package godoctor
-  :ensure t
-  :after go-mode)
+    (exec-path-from-shell-copy-env "GOPATH")))
 
 (use-package gotest
   :ensure t
   :after go-mode)
 
-(use-package company-go
-  :ensure t
-  :after (company)
-  :hook (go-mode . (lambda ()
-                     (setq-local company-backends
-                                 (append (list 'company-go) company-backends)))))
-
 (provide 'fcuny-go)
diff --git a/emacs.d/custom/fcuny-prog.el b/emacs.d/custom/fcuny-prog.el
index ab7cc05..92dd9c7 100644
--- a/emacs.d/custom/fcuny-prog.el
+++ b/emacs.d/custom/fcuny-prog.el
@@ -1,9 +1,39 @@
-(use-package eglot
+(require 'fcuny-vars)
+
+(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 lsp-mode
+  :ensure t
+  :commands (lsp lsp-deferred)
+  :hook (go-mode . lsp-deferred)
+  :custom
+  (lsp-session-file (expand-file-name "lsp-session-v1" fcuny/path-emacs-var))
+  (lsp-enable-snippet nil)
+  (lsp-prefer-flymake nil))
+
+(use-package lsp-ui
+  :ensure t
+  :commands lsp-ui-mode
+  :custom
+  (lsp-ui-doc-enable t)
+  (lsp-ui-peek-enable t)
+  (lsp-ui-sideline-enable t)
+  (lsp-ui-imenu-enable t)
+  (lsp-ui-flycheck-enable t))
+
+(use-package company-lsp
   :ensure t
+  :after company
+  :commands company-lsp
   :config
-  (define-key eglot-mode-map (kbd "C-c ; g .") 'xref-find-definitions)
-  (define-key eglot-mode-map (kbd "C-c ; g ,") 'pop-tag-mark)
-  (add-to-list 'eglot-server-programs '(go-mode . ("gopls")))
-  (add-hook 'go-mode-hook 'eglot-ensure))
+  (push 'company-lsp company-backends))
 
 (provide 'fcuny-prog)
diff --git a/emacs.d/init.el b/emacs.d/init.el
index 19d895c..0fa1b86 100644
--- a/emacs.d/init.el
+++ b/emacs.d/init.el
@@ -43,7 +43,6 @@
 (require 'fcuny-puppet)
 (require 'fcuny-yaml)
 
-(require 'fcuny-company)
 (require 'fcuny-go)
 (require 'fcuny-lisp)
 (require 'fcuny-make)