You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add setting to save modified files after applying a refactoring (#2433)
* Add argument for rename command to preserve tab states of modified files
* Ensure didChange is never sent after didClose
This fixes for example the Pyright warning
LSP-pyright: Received change text document command for closed file <URI>
when a file is saved and closed immediately after changes were applied.
* Convert to user setting
* Missed something
* Ensure didChange is never sent after didClose
This fixes for example the Pyright warning
LSP-pyright: Received change text document command for closed file <URI>
when a file is saved and closed immediately after changes were applied.
* Missed something
* Add test
* Maybe like this?
* Try something else
* Simplify expression to save one unnecessary API call
view.change_count() returns 0 if the view isn't valid anymore (closed),
so we can simply use short-circuit evaluation for this and don't need
the is_valid() API call.
* Exempt Linux
* Small tweak to save an API call
* Revert "Exempt Linux"
This reverts commit 4dd2e91.
* Fix failing test on Linux
* actually this test passes locally with this line uncommented
* Revert, apparently it fails on the CI...
This reverts commit 43ede82.
* try a slightly different approach just to see... test pass locally
* Revert "try a slightly different approach just to see... test pass locally"
the test still fail on the CI
This reverts commit 11c5ecb.
* Add default value into schema
* Update to make it work with new rename panel
* Resolve more merge conflicts
---------
Co-authored-by: Предраг Николић <[email protected]>
| Save All | unbound | `lsp_save_all`<br>Supports optional args `{"only_files": true}` - to ignore buffers which have no associated file on disk.
36
+
| Save All | unbound | `lsp_save_all`<br>Supports optional args `{"only_files": true | false}` - whether to ignore buffers which have no associated file on disk.
37
37
| Show Call Hierarchy | unbound | `lsp_call_hierarchy`
38
38
| Show Type Hierarchy | unbound | `lsp_type_hierarchy`
39
39
| Signature Help | <kbd>ctrl</kbd> <kbd>alt</kbd> <kbd>space</kbd> | `lsp_signature_help_show`
Copy file name to clipboardExpand all lines: sublime-package.json
+17
Original file line number
Diff line number
Diff line change
@@ -757,6 +757,23 @@
757
757
},
758
758
"uniqueItems": true,
759
759
"markdownDescription": "Determines ranges which initially should be folded when a document is opened, provided that the language server has support for this."
760
+
},
761
+
"refactoring_auto_save": {
762
+
"type": "string",
763
+
"enum": [
764
+
"always",
765
+
"preserve",
766
+
"preserve_opened",
767
+
"never"
768
+
],
769
+
"markdownEnumDescriptions": [
770
+
"Save all affected files",
771
+
"Only save files that didn't have unsaved changes beforehand",
772
+
"Only save opened files that didn't have unsaved changes beforehand and open other files that were affected by the refactoring",
773
+
"Never save files automatically"
774
+
],
775
+
"default": "never",
776
+
"markdownDescription": "Controls if files that were part of a refactoring (e.g. rename) are saved automatically."
0 commit comments