From c7be1fdb9ae437a9f598ba33bc8b48c48bd50230 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Sat, 9 Nov 2024 15:58:50 +0000 Subject: [PATCH] scala stuff --- doomemacs/.config/doom/config.el | 48 ++++++++++--------- doomemacs/.config/doom/init.el | 2 +- doomemacs/.config/doom/packages.el | 6 ++- nix-darwin/home.nix | 4 ++ nvchad/.config/nvim/lua/configs/lspconfig.lua | 14 +++++- 5 files changed, 48 insertions(+), 26 deletions(-) diff --git a/doomemacs/.config/doom/config.el b/doomemacs/.config/doom/config.el index bf78398..a139089 100644 --- a/doomemacs/.config/doom/config.el +++ b/doomemacs/.config/doom/config.el @@ -21,8 +21,6 @@ ;; See 'C-h v doom-font' for documentation and more examples of what they ;; accept. For example: ;; - -(setq doom-font (font-spec :family "Fira Code" :size 12)) ;; ;; If you or Emacs can't find your font, use 'M-x describe-font' to look them ;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to @@ -106,23 +104,29 @@ (global-set-key (kbd "M-g") 'format-all-buffer) ;; accept completion from copilot and fallback to company -(use-package! copilot - :hook (prog-mode . copilot-mode) - :bind (:map copilot-completion-map - ("" . 'copilot-accept-completion) - ("TAB" . 'copilot-accept-completion) - ("C-TAB" . 'copilot-accept-completion-by-word) - ("C-" . 'copilot-accept-completion-by-word))) - -(after! (evil copilot) - ;; Define the custom function that either accepts the completion or does the default behavior - (defun my/copilot-tab-or-default () - (interactive) - (if (and (bound-and-true-p copilot-mode) - ;; Add any other conditions to check for active copilot suggestions if necessary - ) - (copilot-accept-completion) - (evil-insert 1))) ; Default action to insert a tab. Adjust as needed. - - ;; Bind the custom function to in Evil's insert state - (evil-define-key 'insert 'global (kbd "") 'my/copilot-tab-or-default)) +;; (use-package! copilot +;; :hook (prog-mode . copilot-mode) +;; :bind (:map copilot-completion-map +;; ("" . 'copilot-accept-completion) +;; ("TAB" . 'copilot-accept-completion) +;; ("C-TAB" . 'copilot-accept-completion-by-word) +;; ("C-" . 'copilot-accept-completion-by-word))) + +(use-package! drag-stuff + :config + (drag-stuff-global-mode 1) + (map! :v "J" #'drag-stuff-down + :v "K" #'drag-stuff-up)) + +;; (after! (evil copilot) +;; ;; Define the custom function that either accepts the completion or does the default behavior +;; (defun my/copilot-tab-or-default () +;; (interactive) +;; (if (and (bound-and-true-p copilot-mode) +;; ;; Add any other conditions to check for active copilot suggestions if necessary +;; ) +;; (copilot-accept-completion) +;; (evil-insert 1))) ; Default action to insert a tab. Adjust as needed. + +;; ;; Bind the custom function to in Evil's insert state +;; (evil-define-key 'insert 'global (kbd "") 'my/copilot-tab-or-default)) diff --git a/doomemacs/.config/doom/init.el b/doomemacs/.config/doom/init.el index b710d50..03099fc 100644 --- a/doomemacs/.config/doom/init.el +++ b/doomemacs/.config/doom/init.el @@ -118,7 +118,7 @@ ;;beancount ; mind the GAAP (cc +lsp) ; C > C++ == 1 ;;clojure ; java with a lisp - ;;common-lisp ; if you've seen one lisp, you've seen them all + common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c (csharp +lsp) ; unity, .NET, and mono shenanigans diff --git a/doomemacs/.config/doom/packages.el b/doomemacs/.config/doom/packages.el index b4f1808..c5bb8e5 100644 --- a/doomemacs/.config/doom/packages.el +++ b/doomemacs/.config/doom/packages.el @@ -49,5 +49,7 @@ ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;(unpin! t) -(package! copilot - :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) +;; (package! copilot +;; :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) + +(package! drag-stuff) diff --git a/nix-darwin/home.nix b/nix-darwin/home.nix index 41bb64c..2881557 100644 --- a/nix-darwin/home.nix +++ b/nix-darwin/home.nix @@ -160,6 +160,10 @@ python3 python312Packages.pip + # scala + metals + scalafmt + # formatters shfmt nodePackages.prettier diff --git a/nvchad/.config/nvim/lua/configs/lspconfig.lua b/nvchad/.config/nvim/lua/configs/lspconfig.lua index 440fbd3..4e17d60 100644 --- a/nvchad/.config/nvim/lua/configs/lspconfig.lua +++ b/nvchad/.config/nvim/lua/configs/lspconfig.lua @@ -3,7 +3,19 @@ local on_init = require("nvchad.configs.lspconfig").on_init local capabilities = require("nvchad.configs.lspconfig").capabilities local lspconfig = require("lspconfig") -local servers = { "html", "cssls", "tsserver", "clangd", "rust_analyzer", "vhdl_ls", "hls", "tailwindcss", "pyright", "julials" } +local servers = { + "html", + "cssls", + "tsserver", + "clangd", + "rust_analyzer", + "vhdl_ls", + "hls", + "tailwindcss", + "pyright", + "julials", + "metals", +} -- lsps with default config for _, lsp in ipairs(servers) do