Commit 11c8bf9 1 parent 0c1eccd commit 11c8bf9 Copy full SHA for 11c8bf9
File tree 3 files changed +40
-0
lines changed
modules/nixos/programs/emacs
3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 62
62
# Python
63
63
nodePackages . pyright
64
64
ruff-lsp
65
+ # Java
66
+ jdk21
67
+ jdt-language-server
65
68
] ;
66
69
67
70
elementary . home = {
68
71
programs . emacs = {
69
72
enable = true ;
70
73
package = emacsPackage ;
74
+ extraConfig = ''
75
+ (setq lsp-java-server-install-dir "${ pkgs . jdt-language-server } /share/java/jdtls")
76
+ (setq lsp-java-server-config-dir (concat (file-name-as-directory (xdg-config-home)) "lsp-java/config_linux/"))
77
+ (add-to-list 'lsp-java-vmargs "-javaagent:${ pkgs . elementary . lombok-jar } /share/java/lombok.jar")
78
+ '' ;
71
79
} ;
72
80
file = {
73
81
".emacs.d/init.el" . source = ./init.el ;
74
82
".emacs.d/early-init.el" . text = earlyInitText ;
83
+ ".config/lsp-java/config_linux/config.ini" . source = "${ pkgs . jdt-language-server } /share/java/jdtls/config_linux/config.ini" ;
75
84
} ;
76
85
} ;
77
86
Original file line number Diff line number Diff line change 657
657
(bound-and-true-p lsp-mode))
658
658
(lsp-format-buffer)))))
659
659
660
+ (use-package lsp-java
661
+ :init
662
+ (add-hook 'java-ts-mode-hook . (lambda ()
663
+ (require 'lsp-java )
664
+ (lsp))))
665
+
660
666
(use-package markdown-mode
661
667
:custom
662
668
(markdown-fontify-code-blocks-natively t )
Original file line number Diff line number Diff line change
1
+ { lib , stdenv , fetchurl } :
2
+
3
+ stdenv . mkDerivation rec {
4
+ pname = "lombok-jar" ;
5
+ version = "1.18.30" ;
6
+
7
+ src = fetchurl {
8
+ url = "https://projectlombok.org/downloads/lombok-${ version } .jar" ;
9
+ sha256 = "sha256-1+4SLu4erutFGCqJ/zb8LdCGhY0bL1S2Fcb+97odYBI=" ;
10
+ } ;
11
+
12
+ buildCommand = ''
13
+ mkdir -p $out/share/java
14
+ cp $src $out/share/java/lombok.jar
15
+ '' ;
16
+
17
+ meta = {
18
+ description = "A library that can write a lot of boilerplate for your Java project" ;
19
+ platforms = lib . platforms . all ;
20
+ sourceProvenance = with lib . sourceTypes ; [ binaryBytecode ] ;
21
+ license = lib . licenses . mit ;
22
+ homepage = "https://projectlombok.org/" ;
23
+ maintainers = [ lib . maintainers . CrystalGamma ] ;
24
+ } ;
25
+ }
You can’t perform that action at this time.
0 commit comments