diff options
Diffstat (limited to '')
-rw-r--r-- | emacs.d/custom/fcuny-prog.el | 40 |
1 files changed, 35 insertions, 5 deletions
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) |