Skip to content

Commit 85bc891

Browse files
committed
Add new dart sdk configuration flags
1 parent 3184702 commit 85bc891

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.18.0
4+
5+
* Add `lsp-dart-show-todos` as false by default.
6+
* Add `lsp-dart-complete-function-calls` as true by default.
7+
38
## 1.17.14
49

510
* Fix cache when debugging devices/emulators - Fixes #96

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ lsp-dart supports running Flutter and Dart commands as following:
179179
| `lsp-dart-server-command` | `analysis_server` executable to use | Check source file |
180180
| `lsp-dart-enable-sdk-formatter` | Whether to enable server formatting. | `t` |
181181
| `lsp-dart-line-length` | Line length used by server formatter. | 80 |
182+
| `lsp-dart-show-todos` | Whether to generate diagnostics for TODO comments. If unspecified, diagnostics will not be generated. | `nil` |
183+
| `lsp-dart-complete-function-calls` | Completes functions/methods with their required parameters. | `t` |
182184
| `lsp-dart-extra-library-directories` | Extra libs to analyze besides Dart SDK libs | `'()` |
183185
| `lsp-dart-only-analyze-projects-with-open-files` | Analysis will only be performed for projects that have open files rather than the root workspace folder | `t` |
184186
| `lsp-dart-suggest-from-unimported-libraries` | Completion will not include symbols that are not already imported into the current file. | `t` |

lsp-dart.el

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ imported into the current file."
8484
:type 'number
8585
:group 'lsp-dart)
8686

87+
(defcustom lsp-dart-show-todos nil
88+
"Whether to generate diagnostics for TODO comments.
89+
If unspecified, diagnostics will not be generated."
90+
:type 'boolean
91+
:group 'lsp-dart)
92+
93+
(defcustom lsp-dart-complete-function-calls t
94+
"Completes functions/methods with their required parameters."
95+
:type 'boolean
96+
:group 'lsp-dart)
97+
8798

8899
;;; Internal
89100

@@ -99,6 +110,8 @@ imported into the current file."
99110
(defun lsp-dart--configuration (_workspace _items)
100111
"Return the client workspace configuration."
101112
(vector (lsp-ht ("enableSdkFormatter" lsp-dart-enable-sdk-formatter)
113+
("completeFunctionCalls" lsp-dart-complete-function-calls)
114+
("showTodos" lsp-dart-show-todos)
102115
("lineLength" lsp-dart-line-length))))
103116

104117
(defun lsp-dart--server-command ()

0 commit comments

Comments
 (0)