From bb2540a2c9c734444edec310dcbd4903695fd8f7 Mon Sep 17 00:00:00 2001 From: Mars Date: Wed, 9 Oct 2024 23:02:14 -0400 Subject: [PATCH] more stuf --- config.org | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/config.org b/config.org index 49a8738..e71457f 100644 --- a/config.org +++ b/config.org @@ -288,6 +288,8 @@ (add-hook 'before-save-hook #'eglot-format-buffer -10 t))) (add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save) (add-to-list 'eglot-server-programs '(nix-mode . ("nixd"))) + (add-to-list 'eglot-server-programs + `(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never"))) :hook (rust-mode . eglot-ensure) (rust-ts-mode . eglot-ensure) @@ -311,9 +313,22 @@ (use-package rust-mode :ensure t) + (use-package tuareg + :ensure t + :mode ("\\.ml\\'" . tuareg-mode) + :hook (tuareg-mode . eglot-ensure)) + + (use-package merlin + :ensure t + :hook (tuareg-mode . merlin-mode)) + + (use-package glsl-mode + :ensure t + :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'")) + (use-package eldoc-box :custom - (eldoc-box-max-pixel-width 1280) + (eldoc-box-max-pixel-width 1024) :config (setq eldoc-message-function #'ignore) (setq eldoc-idle-delay 0) @@ -357,6 +372,16 @@ *** Corfu #+begin_src emacs-lisp + (use-package copilot + :ensure (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")) + :hook (prog-mode . copilot-mode) + :bind (("C-TAB" . 'copilot-complete) + :map copilot-completion-map + ("" . 'copilot-accept-completion) + ("C-" . 'copilot-accept-completion-by-word) + ("C-" . 'copilot-accept-completion-by-line))) + + (use-package corfu :ensure t :custom @@ -566,11 +591,4 @@ (add-hook 'org-mode-hook #'org-modern-indent-mode 90)) (add-hook 'eglot-managed-mode-hook #'flymake-mode) - - (use-package flymake-diagnostic-at-point - :after flymake - :hook - (flymake-mode . flymake-diagnostic-at-point-mode) - :config - (setq flymake-diagnostic-at-point-timer-delay 0)) #+end_src