scala stuff

master
Elias Almqvist 2 weeks ago
parent c2732517e3
commit c7be1fdb9a
No known key found for this signature in database
GPG Key ID: E31A99CE3E75A158
  1. 48
      doomemacs/.config/doom/config.el
  2. 2
      doomemacs/.config/doom/init.el
  3. 6
      doomemacs/.config/doom/packages.el
  4. 4
      nix-darwin/home.nix
  5. 14
      nvchad/.config/nvim/lua/configs/lspconfig.lua

@ -21,8 +21,6 @@
;; See 'C-h v doom-font' for documentation and more examples of what they ;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example: ;; 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 ;; 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 ;; 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) (global-set-key (kbd "M-g") 'format-all-buffer)
;; accept completion from copilot and fallback to company ;; accept completion from copilot and fallback to company
(use-package! copilot ;; (use-package! copilot
:hook (prog-mode . copilot-mode) ;; :hook (prog-mode . copilot-mode)
:bind (:map copilot-completion-map ;; :bind (:map copilot-completion-map
("<tab>" . 'copilot-accept-completion) ;; ("<tab>" . 'copilot-accept-completion)
("TAB" . 'copilot-accept-completion) ;; ("TAB" . 'copilot-accept-completion)
("C-TAB" . 'copilot-accept-completion-by-word) ;; ("C-TAB" . 'copilot-accept-completion-by-word)
("C-<tab>" . 'copilot-accept-completion-by-word))) ;; ("C-<tab>" . 'copilot-accept-completion-by-word)))
(after! (evil copilot) (use-package! drag-stuff
;; Define the custom function that either accepts the completion or does the default behavior :config
(defun my/copilot-tab-or-default () (drag-stuff-global-mode 1)
(interactive) (map! :v "J" #'drag-stuff-down
(if (and (bound-and-true-p copilot-mode) :v "K" #'drag-stuff-up))
;; Add any other conditions to check for active copilot suggestions if necessary
) ;; (after! (evil copilot)
(copilot-accept-completion) ;; ;; Define the custom function that either accepts the completion or does the default behavior
(evil-insert 1))) ; Default action to insert a tab. Adjust as needed. ;; (defun my/copilot-tab-or-default ()
;; (interactive)
;; Bind the custom function to <tab> in Evil's insert state ;; (if (and (bound-and-true-p copilot-mode)
(evil-define-key 'insert 'global (kbd "<tab>") 'my/copilot-tab-or-default)) ;; ;; 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 <tab> in Evil's insert state
;; (evil-define-key 'insert 'global (kbd "<tab>") 'my/copilot-tab-or-default))

@ -118,7 +118,7 @@
;;beancount ; mind the GAAP ;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1 (cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp ;;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 ;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c ;;crystal ; ruby at the speed of c
(csharp +lsp) ; unity, .NET, and mono shenanigans (csharp +lsp) ; unity, .NET, and mono shenanigans

@ -49,5 +49,7 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
(package! copilot ;; (package! copilot
:recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) ;; :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist")))
(package! drag-stuff)

@ -160,6 +160,10 @@
python3 python3
python312Packages.pip python312Packages.pip
# scala
metals
scalafmt
# formatters # formatters
shfmt shfmt
nodePackages.prettier nodePackages.prettier

@ -3,7 +3,19 @@ local on_init = require("nvchad.configs.lspconfig").on_init
local capabilities = require("nvchad.configs.lspconfig").capabilities local capabilities = require("nvchad.configs.lspconfig").capabilities
local lspconfig = require("lspconfig") 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 -- lsps with default config
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do

Loading…
Cancel
Save