File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed
robotcode/language_server
robotframework/diagnostics
tests/robotcode/language_server/robotframework/parts/data Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ testpaths = ["tests"]
7474junit_suite_name = " robotcode"
7575log_cli = true
7676log_cli_level = " DEBUG"
77+ log_cli_format = " %(levelname)s %(name)s: %(message)s"
7778
7879[tool .isort ]
7980profile = " black"
Original file line number Diff line number Diff line change @@ -407,7 +407,9 @@ async def add_file_watchers(
407407 watchers = [FileSystemWatcher (glob_pattern = w .glob_pattern , kind = w .kind ) for w in _watchers ]
408408 ),
409409 )
410- # TODO: implement own filewatcher if not supported by language server client
410+ else :
411+ # TODO: implement own filewatcher if not supported by language server client
412+ self ._logger .warning ("client did not support workspace/didChangeWatchedFiles." )
411413
412414 def remove () -> None :
413415 if self ._loop .is_running ():
Original file line number Diff line number Diff line change @@ -314,10 +314,17 @@ async def is_valid(self) -> bool:
314314 async def get_document (self ) -> TextDocument :
315315 if self ._document is None :
316316 async with self ._lock :
317- if self ._document is None :
318- await self ._update ()
317+ await self ._get_document ()
318+
319+ assert self ._document is not None
320+
321+ return self ._document
322+
323+ async def _get_document (self ) -> TextDocument :
324+ if self ._document is None :
325+ await self ._update ()
319326
320- assert self ._document is not None
327+ assert self ._document is not None
321328
322329 return self ._document
323330
@@ -330,7 +337,7 @@ async def get_libdoc(self) -> LibraryDoc:
330337 if self ._lib_doc is None :
331338 self ._lib_doc = await (
332339 await self .parent .parent_protocol .documents_cache .get_resource_namespace (
333- await self .get_document ()
340+ await self ._get_document ()
334341 )
335342 ).get_library_doc ()
336343 return self ._lib_doc
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Library ${CURDIR}/libs/myvariables.py
77Variables ${CURDIR } /libs/myvariables.py
88# TODO ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Variables Import: len(result) == 1 and result[0].target_uri.endswith("libs/myvariables.py")
99Resource ${CURDIR } /resources/firstresource.resource
10- # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Resource Import: len(result) == 1 and result[0].target_uri.endswith("/resources/firstresource.resource")
10+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Resource Import: len(result) == 1 and result[0].target_uri.endswith("/resources/firstresource.resource")
1111
1212*** Variables ***
1313${A VAR } i'm a var
You can’t perform that action at this time.
0 commit comments