mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 11:30:23 +10:00
Updating Doom Emacs.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
;;; lang/scala/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +scala-comment-indent-new-line (&optional _)
|
||||
(defun +scala-comment-indent-new-line-fn (&optional _)
|
||||
"Continue the commnt on the current line.
|
||||
|
||||
Meant to be used for `scala-mode's `comment-line-break-function'."
|
||||
@@ -40,11 +40,15 @@ Meant to be used for `scala-mode's `comment-line-break-function'."
|
||||
(interactive)
|
||||
(if (and (require 'sbt-mode nil t)
|
||||
(sbt:find-root))
|
||||
(run-scala)
|
||||
(let ((buffer-name "*scala-repl")
|
||||
buffer)
|
||||
(unless (comint-check-proc buffer-name)
|
||||
(setq buffer (make-comint-in-buffer
|
||||
"scala-repl" buffer-name "scala")))
|
||||
(let ((buffer-name (sbt:buffer-name)))
|
||||
(unless (comint-check-proc buffer-name)
|
||||
(kill-buffer buffer-name))
|
||||
(run-scala)
|
||||
(get-buffer buffer-name))
|
||||
(let* ((buffer-name "*scala-repl")
|
||||
(buffer
|
||||
(if (comint-check-proc buffer-name)
|
||||
(get-buffer buffer-name)
|
||||
(make-comint-in-buffer "scala-repl" buffer-name "scala"))))
|
||||
(display-buffer buffer)
|
||||
buffer)))
|
||||
|
||||
@@ -13,12 +13,39 @@
|
||||
scala-indent:use-javadoc-style t)
|
||||
|
||||
(setq-hook! 'scala-mode-hook
|
||||
comment-line-break-function #'+scala-comment-indent-new-line)
|
||||
comment-line-break-function #'+scala-comment-indent-new-line-fn)
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'scala-mode-local-vars-hook #'lsp!)))
|
||||
(add-hook 'scala-mode-local-vars-hook #'lsp!))
|
||||
|
||||
(set-pretty-symbols! 'scala-mode
|
||||
;; Functional
|
||||
:def "def"
|
||||
:composition "compose"
|
||||
;; HKT
|
||||
:lambda "Lambda"
|
||||
;; Types
|
||||
:null "none"
|
||||
:null "None"
|
||||
:true "true"
|
||||
:false "false"
|
||||
:int "Int"
|
||||
:str "String"
|
||||
:float "Float"
|
||||
:bool "Boolean"
|
||||
:list "List"
|
||||
;; Flow
|
||||
:for "for"
|
||||
:not "!"
|
||||
:and "&&"
|
||||
:or "||"
|
||||
:yield "yield"
|
||||
;; Other
|
||||
:union "union"
|
||||
:intersect "intersect"
|
||||
:diff "diff"))
|
||||
|
||||
|
||||
(use-package! sbt-mode
|
||||
:after scala-mode
|
||||
:config (set-repl-handler! 'scala-mode #'+scala/open-repl))
|
||||
:config (set-repl-handler! 'scala-mode #'+scala/open-repl :persist t))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/scala/packages.el
|
||||
|
||||
(package! sbt-mode)
|
||||
(package! scala-mode)
|
||||
(package! sbt-mode :pin "633a315ad4")
|
||||
(package! scala-mode :pin "46bb948345")
|
||||
|
||||
Reference in New Issue
Block a user