From c9fe44fae50c3a10bd6b9f942c4722e13ce92a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=80=D0=B5=D0=B4=D1=80=D0=B0=D0=B3=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=9B?= Date: Thu, 25 Jan 2024 22:20:39 +0100 Subject: [PATCH] Rafal having good suggestions as always :) --- plugin/documents.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/documents.py b/plugin/documents.py index fef1b4c6b..72ce043f3 100644 --- a/plugin/documents.py +++ b/plugin/documents.py @@ -529,10 +529,8 @@ def on_text_command(self, command_name: str, args: Optional[dict]) -> Optional[T return None def on_post_text_command(self, command_name: str, args: Optional[Dict[str, Any]]) -> None: - format_on_paste = self.view.settings().get('lsp_format_on_paste', None) - format_on_paste_enabled = format_on_paste if isinstance(format_on_paste, bool) \ - else userprefs().lsp_format_on_paste - if command_name == 'paste' and format_on_paste_enabled: + format_on_paste = self.view.settings().get('lsp_format_on_paste', userprefs().lsp_format_on_paste) + if command_name == 'paste' and format_on_paste: self._did_paste = True elif command_name in ("next_field", "prev_field") and args is None: sublime.set_timeout_async(lambda: self.do_signature_help_async(manual=True))