Skip to content

Commit 3a03020

Browse files
committed
remove code register for python documents
1 parent 12d7398 commit 3a03020

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

robotcode/language_server/robotframework/protocol.py

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import uuid
21
from dataclasses import dataclass
32
from typing import TYPE_CHECKING, Any, Optional
43

@@ -10,14 +9,7 @@
109
)
1110
from ...utils.dataclasses import from_dict
1211
from ...utils.logging import LoggingDescriptor
13-
from ..common.lsp_types import (
14-
DocumentFilter,
15-
InitializeError,
16-
Model,
17-
TextDocumentChangeRegistrationOptions,
18-
TextDocumentRegistrationOptions,
19-
TextDocumentSyncKind,
20-
)
12+
from ..common.lsp_types import InitializeError, Model
2113
from ..common.parts.document_symbols import symbol_information_label
2214
from ..common.protocol import LanguageServerProtocol
2315
from .parts.codelens import RobotCodeLensProtocolPart
@@ -106,7 +98,6 @@ def __init__(self, server: "RobotLanguageServer"):
10698
super().__init__(server)
10799
self.options = Options()
108100
self.on_initialize.add(self._on_initialize)
109-
self.on_initialized.add(self._on_initialized)
110101
self.on_shutdown.add(self._on_shutdown)
111102

112103
@_logger.call
@@ -126,30 +117,3 @@ async def _on_initialize(self, sender: Any, initialization_options: Optional[Any
126117
self.options = from_dict(initialization_options, Options)
127118

128119
self._logger.debug(f"initialized with {repr(self.options)}")
129-
130-
@_logger.call
131-
async def _on_initialized(self, sender: Any) -> None:
132-
if (
133-
self.client_capabilities
134-
and self.client_capabilities.workspace
135-
and self.client_capabilities.workspace.file_operations
136-
and self.client_capabilities.workspace.file_operations.dynamic_registration
137-
):
138-
document_selector = [DocumentFilter(language="python")]
139-
await self.register_capability(
140-
str(uuid.uuid4()),
141-
"textDocument/didOpen",
142-
TextDocumentRegistrationOptions(document_selector=document_selector),
143-
)
144-
await self.register_capability(
145-
str(uuid.uuid4()),
146-
"textDocument/didChange",
147-
TextDocumentChangeRegistrationOptions(
148-
document_selector=document_selector, sync_kind=TextDocumentSyncKind.INCREMENTAL
149-
),
150-
)
151-
await self.register_capability(
152-
str(uuid.uuid4()),
153-
"textDocument/didClose",
154-
TextDocumentRegistrationOptions(document_selector=document_selector),
155-
)

0 commit comments

Comments
 (0)