@@ -65,6 +65,11 @@ Use http://download.eclipse.org/che/che-ls-jdt/snapshots/che-jdt-language-server
65
65
" face for activity message"
66
66
:group 'lsp-java )
67
67
68
+ (defcustom lsp-java-project-types '(" pom.xml" " build.gradle" " build.gradle.kts" " .project" )
69
+ " File names of possible project configuration files found at project root."
70
+ :group 'lsp-java
71
+ :type '(repeat file))
72
+
68
73
(defcustom lsp-java-workspace-dir (expand-file-name (locate-user-emacs-file " workspace/" ))
69
74
" LSP java workspace directory."
70
75
:group 'lsp-java
@@ -472,9 +477,8 @@ The current directory is assumed to be the java project’s root otherwise."
472
477
((string= default-directory lsp-java-workspace-cache-dir) default-directory)
473
478
((and (featurep 'projectile ) (projectile-project-p)) (projectile-project-root))
474
479
((vc-backend default-directory) (expand-file-name (vc-root-dir )))
475
- (t (let ((project-types '(" pom.xml" " build.gradle" " .project" )))
476
- (or (seq-some (lambda (file ) (locate-dominating-file default-directory file)) project-types)
477
- default-directory)))))
480
+ (t (or (seq-some (lambda (file ) (locate-dominating-file default-directory file)) lsp-java-project-types)
481
+ default-directory))))
478
482
479
483
(defun lsp-java--language-status-callback (workspace params )
480
484
" Callback for client initialized.
@@ -1122,7 +1126,7 @@ PROJECT-URI uri of the item."
1122
1126
(" registerOptions" (ht (" watchers"
1123
1127
(vector (ht (" globPattern" " **/*.java" ))
1124
1128
(ht (" globPattern" " **/pom.xml" ))
1125
- (ht (" globPattern" " **/*.gradle" ))
1129
+ (ht (" globPattern" " **/*.gradle{,.kts} " ))
1126
1130
(ht (" globPattern" " **/.project" ))
1127
1131
(ht (" globPattern" " **/.classpath" ))
1128
1132
(ht (" globPattern" " **/settings/*.prefs" ))))))))))
0 commit comments