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
;; 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
("<tab>" . 'copilot-accept-completion)
("TAB" . 'copilot-accept-completion)
("C-TAB" . 'copilot-accept-completion-by-word)
("C-<tab>" . '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 <tab> in Evil's insert state
(evil-define-key 'insert 'global (kbd "<tab>") 'my/copilot-tab-or-default))
;; (use-package! copilot
;; :hook (prog-mode . copilot-mode)
;; :bind (:map copilot-completion-map
;; ("<tab>" . 'copilot-accept-completion)
;; ("TAB" . 'copilot-accept-completion)
;; ("C-TAB" . 'copilot-accept-completion-by-word)
;; ("C-<tab>" . '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 <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
(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

@ -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)

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

@ -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

Loading…
Cancel
Save