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"]
74
74
junit_suite_name = " robotcode"
75
75
log_cli = true
76
76
log_cli_level = " DEBUG"
77
+ log_cli_format = " %(levelname)s %(name)s: %(message)s"
77
78
78
79
[tool .isort ]
79
80
profile = " black"
Original file line number Diff line number Diff line change @@ -407,7 +407,9 @@ async def add_file_watchers(
407
407
watchers = [FileSystemWatcher (glob_pattern = w .glob_pattern , kind = w .kind ) for w in _watchers ]
408
408
),
409
409
)
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." )
411
413
412
414
def remove () -> None :
413
415
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:
314
314
async def get_document (self ) -> TextDocument :
315
315
if self ._document is None :
316
316
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 ()
319
326
320
- assert self ._document is not None
327
+ assert self ._document is not None
321
328
322
329
return self ._document
323
330
@@ -330,7 +337,7 @@ async def get_libdoc(self) -> LibraryDoc:
330
337
if self ._lib_doc is None :
331
338
self ._lib_doc = await (
332
339
await self .parent .parent_protocol .documents_cache .get_resource_namespace (
333
- await self .get_document ()
340
+ await self ._get_document ()
334
341
)
335
342
).get_library_doc ()
336
343
return self ._lib_doc
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Library ${CURDIR}/libs/myvariables.py
7
7
Variables ${CURDIR } /libs/myvariables.py
8
8
# TODO ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Variables Import: len(result) == 1 and result[0].target_uri.endswith("libs/myvariables.py")
9
9
Resource ${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")
11
11
12
12
*** Variables ***
13
13
${A VAR } i'm a var
You can’t perform that action at this time.
0 commit comments