Skip to content

Commit

Permalink
Update types.py
Browse files Browse the repository at this point in the history
  • Loading branch information
95833 authored Dec 22, 2024
1 parent dd2bbc6 commit ae4dd82
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions plugin/core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,15 +845,6 @@ def set_view_status(self, view: sublime.View, message: str) -> None:
def erase_view_status(self, view: sublime.View) -> None:
view.erase_status(self.status_key)

def match_view(self, view: sublime.View, scheme: str) -> bool:
syntax = view.syntax()
if not syntax:
return False
selector = self.selector.strip()
if not selector:
return False
return scheme in self.schemes and sublime.score_selector(syntax.scope, selector) > 0

def map_uri_on_payload(self, payload: Any, is_from_client_to_server: bool) -> Any:
if isinstance(payload, dict):
for k, v in payload.items():
Expand All @@ -871,6 +862,15 @@ def map_uri_on_payload(self, payload: Any, is_from_client_to_server: bool) -> An
payload = path

return payload

def match_view(self, view: sublime.View, scheme: str) -> bool:
syntax = view.syntax()
if not syntax:
return False
selector = self.selector.strip()
if not selector:
return False
return scheme in self.schemes and sublime.score_selector(syntax.scope, selector) > 0

def map_client_path_to_server_uri(self, path: str) -> str:
return self.map_uri_on_payload(filename_to_uri(path), is_from_client_to_server=True)
Expand Down

0 comments on commit ae4dd82

Please sign in to comment.