summary refs log tree commit diff
path: root/emacs/custom/fcuny-prog.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom/fcuny-prog.el')
-rw-r--r--emacs/custom/fcuny-prog.el85
1 files changed, 7 insertions, 78 deletions
diff --git a/emacs/custom/fcuny-prog.el b/emacs/custom/fcuny-prog.el
index a3eec01..af4eb3a 100644
--- a/emacs/custom/fcuny-prog.el
+++ b/emacs/custom/fcuny-prog.el
@@ -26,85 +26,10 @@
   (dolist (hook '(emacs-lisp-mode-hook))
     (add-hook hook #'lispy-mode)))
 
-;; 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 lsp-mode
-  :ensure t
-  :commands (lsp lsp-deferred)
-  :diminish lsp-mode
-  :hook ((go-mode . lsp-deferred)
-         (nix-mode . lsp-deferred)
-         (lsp-mode . (lambda() (let ((lsp-keymap-prefix "C-c l"))
-                                 (lsp-enable-which-key-integration)))))
-  :config
-  (define-key lsp-mode-map (kbd "C-c l") lsp-command-map)
-  (lsp-register-custom-settings
-   '(("gopls.completeUnimported" t t)
-     ("gopls.staticcheck" t t)))
-  :bind
-  (("C-c l i" . lsp-ui-imenu))
-  :custom
-  (lsp-session-file (expand-file-name "lsp-session-v1" fcuny/path-emacs-var))
-  (lsp-enable-snippet nil)
-  (lsp-signature-doc-lines 5)
-  (lsp-modeline-diagnostic-scope :workspace)
-  (lsp-completion-provider :capf)
-  (lsp-completion-enable t)
-  (lsp-enable-indentation t)
-  (lsp-eldoc-render-all t)
-  (lsp-prefer-flymake nil))
-
-(use-package lsp-ui
-  :ensure t
-  :hook (lsp-mode . lsp-ui-mode)
-  :commands lsp-ui-mode
-  :custom
-  (lsp-ui-doc-delay 0.4)
-  (lsp-ui-doc-enable t)
-  (lsp-ui-doc-position 'top)
-  (lsp-ui-doc-include-signature t)
-  (lsp-ui-peek-enable t)
-  (lsp-ui-sideline-enable t)
-  (lsp-ui-imenu-enable t)
-  (lsp-ui-flycheck-enable t))
-
-(use-package lsp-ivy
+(use-package eglot
   :ensure t
-  :commands lsp-ivy-workspace-symbol)
-
-(use-package lsp-treemacs
-  :ensure t
-  :config
-  (lsp-treemacs-sync-mode 1))
-
-(use-package dap-mode
-  :ensure t
-  :after (lsp-mode)
-  :bind ("C-c d" . dap-hydra)
-  :init
-  (use-package dap-go)
-  :custom
-  (dap-utils-extension-path (expand-file-name ".extension" fcuny/path-emacs-var))
-  (dap-breakpoints-file (expand-file-name "dap-breakpoints" fcuny/path-emacs-var))
-  (dap-ui-controls-mode nil)
-  (dap-ui-buffer-configurations
-   `((,dap-ui--locals-buffer       . ((side . right) (slot . 1) (window-width . 0.2)))
-     (,dap-ui--expressions-buffer  . ((side . right) (slot . 2) (window-width . 0.2)))
-     (,dap-ui--sessions-buffer     . ((side . right) (slot . 3) (window-width . 0.2)))
-     (,dap-ui--breakpoints-buffer  . ((side . right) (slot . 4) (window-width . 0.2)))
-     (,dap-ui--repl-buffer         . ((side . bottom) (slot . 1) (window-width . 0.4)))
-     (,dap-ui--debug-window-buffer . ((side . bottom) (slot . 2) (window-height . 0.2)))))
-  :config
-  (dap-mode t)
-  (dap-ui-mode t)
-  (dap-tooltip-mode t)
-  (tooltip-mode t))
-
-;; I don't want to have the icons as an overlay in the UI, I prefer to
-;; use the bindings or the mapping provided by hydra
-(eval-after-load 'lsp-mode '(advice-add 'dap-ui--update-controls :override #'ignore))
+  :hook ((go-mode . eglot-ensure)
+         (nix-mode . eglot-ensure)))
 
 (use-package sh-script
   :mode ("bashrc" . sh-mode)
@@ -129,6 +54,10 @@
       (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)