Skip to content

Commit

Permalink
scala: Initial commit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mohkale committed Jun 23, 2024
1 parent 470d0eb commit 4171656
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions init.org
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ Welcome to my personal Emacs configuration 😎.
;; robotframework
;; ruby
;; rust
;; scala
sh-script
sql
ssh-config
Expand Down Expand Up @@ -24334,6 +24335,46 @@ Welcome to my personal Emacs configuration 😎.
(provide '+lang-rust)
#+end_src

** Scala
:PROPERTIES:
:header-args+: :tangle (package-lisp! +lang-scala scala)
:END:
#+begin_src emacs-lisp :tangle (package-yes! scala)
(require '+lang-scala)
#+end_src

*** Scala Mode
#+begin_src emacs-lisp :tangle (package-lisp! +lang-scala scala (not tree-sitter))
(use-package scala-mode
:straight t)
#+end_src

*** Scala Tree Sitter Mode
#+begin_src emacs-lisp :tangle (package-lisp! +lang-scala scala tree-sitter)
(use-package scala-ts-mode
:straight t)
#+end_src

*** Metals :lsp:
:PROPERTIES:
:header-args+: :tangle (package-lisp! +lang-scala scala eglot)
:END:

#+begin_src emacs-lisp
(use-package eglot
:after scala-ts-mode
:autoload eglot-alternatives
:config
(push `((scala-mode scala-ts-mode)
. ,(eglot-alternatives '("metals" "metals-emacs")))
eglot-server-programs))
#+end_src

*** Appendix
#+begin_src emacs-lisp
(provide '+lang-scala)
#+end_src

** Shell Script
:PROPERTIES:
:header-args+: :tangle (package-lisp! +lang-sh-script sh-script)
Expand Down

0 comments on commit 4171656

Please sign in to comment.