summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-prog.el
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs.d/custom/fcuny-prog.el22
1 files changed, 18 insertions, 4 deletions
diff --git a/emacs.d/custom/fcuny-prog.el b/emacs.d/custom/fcuny-prog.el
index 92dd9c7..b895807 100644
--- a/emacs.d/custom/fcuny-prog.el
+++ b/emacs.d/custom/fcuny-prog.el
@@ -3,17 +3,27 @@
 (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 company-posframe
+  :ensure t
+  :diminish company-posframe-mode
+  :hook (company-mode . company-posframe-mode)
+  :after company)
+
 (use-package lsp-mode
   :ensure t
   :commands (lsp lsp-deferred)
-  :hook (go-mode . lsp-deferred)
+  :bind (:map lsp-mode-map
+              ("C-c e b" . lsp-format-buffer)
+              ("C-c e m" . lsp-ui-imenu)
+              ("C-c e r" . lsp-rename)
+              ("C-c e p" . lsp-ui-peek-find-references)
+              ("C-c e t" . lsp-find-type-definition))
   :custom
   (lsp-session-file (expand-file-name "lsp-session-v1" fcuny/path-emacs-var))
   (lsp-enable-snippet nil)
@@ -23,7 +33,8 @@
   :ensure t
   :commands lsp-ui-mode
   :custom
-  (lsp-ui-doc-enable t)
+  (lsp-ui-doc-enable nil)
+  (lsp-ui-doc-include-signature t)
   (lsp-ui-peek-enable t)
   (lsp-ui-sideline-enable t)
   (lsp-ui-imenu-enable t)
@@ -34,6 +45,9 @@
   :after company
   :commands company-lsp
   :config
-  (push 'company-lsp company-backends))
+  (push 'company-lsp company-backends)
+  :custom
+  (company-lsp-enable-snippet t)
+  (company-lsp-cache-candidates t))
 
 (provide 'fcuny-prog)