-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add format on paste * include whitespace to improve format on paste Including whitespace does help some servers to format a range as expected like LSP-json, See: #2311 (comment) * tweak comment * fix flake * move before run_command * move up to be before the early return * introduce lsp_format_on_paste instead of format_on_paste So it can be defined in Preferences.sublime-settings * fix flake * fix over indent flake :( * use $ref for lsp_format_on_paste * Rafal having good suggestions as always :) * handle paste_and_indent as well if lsp_format_on_paste is enabled * make sure that we have LSP running before we override the paste_and_indent and generally make sure to run format_on_paste if the session supports documentRangeFormattingProvider * Update plugin/documents.py Co-authored-by: Rafał Chłodnicki <[email protected]> * fix : * the first paragraph is not necessary * remove unnecessary line and move inside if * avoid quick flash of selected region before format is run Before, occasionally it was possible to see a brief moment when text gets selected, Now, we move that from the async thread to the main thread, thus we will not see that flash * update text to be more user friendly --------- Co-authored-by: Rafał Chłodnicki <[email protected]>
- Loading branch information
1 parent
8023408
commit af3b9ee
Showing
5 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters