@@ -110,13 +110,6 @@ If unspecified, diagnostics will not be generated."
110110 (append (list (file-name-directory (buffer-file-name ))) lsp-dart-extra-library-directories)
111111 lsp-dart-extra-library-directories)))
112112
113- (defun lsp-dart--configuration (_workspace _items )
114- " Return the client workspace configuration."
115- (vector (lsp-ht (" enableSdkFormatter" lsp-dart-enable-sdk-formatter)
116- (" completeFunctionCalls" lsp-dart-complete-function-calls)
117- (" showTodos" lsp-dart-show-todos)
118- (" lineLength" lsp-dart-line-length))))
119-
120113(defun lsp-dart--server-command ()
121114 " Generate LSP startup command."
122115 (or lsp-dart-server-command
@@ -138,6 +131,12 @@ If unspecified, diagnostics will not be generated."
138131 (when lsp-dart-main-code-lens (lsp-dart-main-code-lens-mode 1 ))
139132 (when lsp-dart-test-code-lens (lsp-dart-test-code-lens-mode 1 )))
140133
134+ (lsp-register-custom-settings
135+ '((" dart.enableSdkFormatter" lsp-dart-enable-sdk-formatter)
136+ (" dart.completeFunctionCalls" lsp-dart-complete-function-calls)
137+ (" dart.showTodos" lsp-dart-show-todos)
138+ (" dart.lineLength" lsp-dart-line-length)))
139+
141140(lsp-register-client
142141 (make-lsp-client :new-connection
143142 (lsp-stdio-connection #'lsp-dart--server-command )
@@ -160,7 +159,6 @@ If unspecified, diagnostics will not be generated."
160159 (when (lsp-dart-flutter-project-p)
161160 (run-hook-with-args 'lsp-dart-flutter-outline-arrived-hook notification))))
162161 (" $/analyzerStatus" #'ignore ))
163- :request-handlers (lsp-ht (" workspace/configuration" #'lsp-dart--configuration ))
164162 :after-open-fn #'lsp-dart--activate-features
165163 :custom-capabilities `((experimental . ((snippetTextEdit . ,(and lsp-enable-snippet (featurep 'yasnippet ))))))
166164 :server-id 'dart_analysis_server ))
0 commit comments