Skip to content

Commit

Permalink
Rafal having good suggestions as always :)
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Jan 25, 2024
1 parent 8bf0685 commit c9fe44f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugin/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c9fe44f

Please sign in to comment.