diff --git a/lib/ide_service/vscode_service.py b/lib/ide_service/vscode_service.py index 1cac140..356a76e 100644 --- a/lib/ide_service/vscode_service.py +++ b/lib/ide_service/vscode_service.py @@ -1,5 +1,3 @@ -import os - from .rpc import rpc_call from .types import LocationWithText @@ -66,6 +64,7 @@ def active_text_editor(): code = "return vscode.window.activeTextEditor;" return run_code(code=code) + def get_selected_text(): code = """ const editor = vscode.window.activeTextEditor; @@ -77,6 +76,7 @@ def get_selected_text(): """ return run_code(code=code) + def open_folder(folder: str): folder = folder.replace("\\", "/") code = ( @@ -100,6 +100,7 @@ def get_visible_text(): """ return run_code(code=code) + def visible_lines(): active_document = active_text_editor() fail_result = {