robotcode-language-server 2.7.0__py3-none-any.whl → 2.8.0.dev8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. robotcode/language_server/__version__.py +1 -1
  2. robotcode/language_server/cli.py +30 -5
  3. robotcode/language_server/common/parts/diagnostics.py +50 -17
  4. robotcode/language_server/common/parts/documents.py +32 -26
  5. robotcode/language_server/common/parts/workspace.py +57 -55
  6. robotcode/language_server/common/protocol.py +3 -1
  7. robotcode/language_server/robotframework/configuration.py +3 -0
  8. robotcode/language_server/robotframework/parts/code_action_documentation.py +437 -146
  9. robotcode/language_server/robotframework/parts/code_action_helper_mixin.py +17 -2
  10. robotcode/language_server/robotframework/parts/code_action_quick_fixes.py +6 -25
  11. robotcode/language_server/robotframework/parts/code_action_refactor.py +8 -6
  12. robotcode/language_server/robotframework/parts/code_lens.py +3 -4
  13. robotcode/language_server/robotframework/parts/completion.py +193 -21
  14. robotcode/language_server/robotframework/parts/debugging_utils.py +75 -6
  15. robotcode/language_server/robotframework/parts/diagnostics.py +15 -3
  16. robotcode/language_server/robotframework/parts/documentation_viewer.py +127 -0
  17. robotcode/language_server/robotframework/parts/documents_cache.py +5 -1
  18. robotcode/language_server/robotframework/parts/hover.py +103 -21
  19. robotcode/language_server/robotframework/parts/http_server.py +17 -7
  20. robotcode/language_server/robotframework/parts/inline_value.py +69 -7
  21. robotcode/language_server/robotframework/parts/keywords_treeview.py +151 -53
  22. robotcode/language_server/robotframework/parts/model_variables.py +331 -0
  23. robotcode/language_server/robotframework/parts/references.py +107 -45
  24. robotcode/language_server/robotframework/parts/rename.py +1 -2
  25. robotcode/language_server/robotframework/parts/robot_workspace.py +229 -25
  26. robotcode/language_server/robotframework/parts/selection_range.py +26 -13
  27. robotcode/language_server/robotframework/parts/semantic_tokens.py +446 -113
  28. robotcode/language_server/robotframework/parts/signature_help.py +162 -70
  29. robotcode/language_server/robotframework/protocol.py +12 -1
  30. robotcode/language_server/robotframework/server.py +4 -2
  31. {robotcode_language_server-2.7.0.dist-info → robotcode_language_server-2.8.0.dev8.dist-info}/METADATA +7 -6
  32. {robotcode_language_server-2.7.0.dist-info → robotcode_language_server-2.8.0.dev8.dist-info}/RECORD +34 -32
  33. {robotcode_language_server-2.7.0.dist-info → robotcode_language_server-2.8.0.dev8.dist-info}/WHEEL +1 -1
  34. {robotcode_language_server-2.7.0.dist-info → robotcode_language_server-2.8.0.dev8.dist-info}/entry_points.txt +0 -0
@@ -48,11 +48,18 @@ from robotcode.robot.utils.ast import (
48
48
  get_tokens_at_position,
49
49
  range_from_token,
50
50
  )
51
+ from robotcode.robot.utils.markdown_docs import LinkResolver
51
52
 
52
53
  from ...common.decorators import (
53
54
  retrigger_characters,
54
55
  trigger_characters,
55
56
  )
57
+ from .code_action_documentation import (
58
+ DocumentationTarget,
59
+ documentation_link_resolver,
60
+ keyword_reference_targets,
61
+ link_documentation,
62
+ )
56
63
  from .protocol_part import RobotLanguageServerProtocolPart
57
64
 
58
65
  if TYPE_CHECKING:
@@ -90,6 +97,58 @@ def _named_arg_name(tok: SemanticToken) -> Optional[str]:
90
97
  return name_st.value if name_st is not None else None
91
98
 
92
99
 
100
+ def _signature_help(
101
+ kw_doc: KeywordDoc,
102
+ kw_arguments: List[ArgumentInfo],
103
+ argument_index: int,
104
+ links: bool,
105
+ target: Optional[DocumentationTarget],
106
+ link_resolver: Optional[LinkResolver] = None,
107
+ ) -> SignatureHelp:
108
+ """The signature of `kw_doc` with the parameter at `argument_index` active.
109
+
110
+ With `links`, the documentation links into the Documentation Viewer, to the
111
+ page of `target`, with `link_resolver` or else the resolver of the keyword's library.
112
+ """
113
+ # once for the documentation of the keyword and of every parameter
114
+ targets = keyword_reference_targets(kw_doc, links)
115
+ if links and link_resolver is None and target is not None and kw_doc.parent is not None:
116
+ link_resolver = documentation_link_resolver(target, kw_doc.parent)
117
+
118
+ def documentation(render: Callable[[Optional[LinkResolver]], str]) -> str:
119
+ if not links:
120
+ return render(None)
121
+ return link_documentation(render, target, kw_doc.parent, heading=False, link_resolver=link_resolver)
122
+
123
+ def parameter_documentation(argument: ArgumentInfo) -> Optional[MarkupContent]:
124
+ """The description of the argument followed by the documentation of its types."""
125
+ value = documentation(
126
+ lambda link_resolver: (
127
+ kw_doc.argument_to_markdown(argument, link_resolver=link_resolver, reference_targets=targets) or ""
128
+ )
129
+ )
130
+ return MarkupContent(kind=MarkupKind.MARKDOWN, value=value) if value else None
131
+
132
+ signature = SignatureInformation(
133
+ label=kw_doc.parameter_signature(),
134
+ parameters=[
135
+ ParameterInformation(label=p.signature(), documentation=parameter_documentation(p)) for p in kw_arguments
136
+ ],
137
+ active_parameter=argument_index,
138
+ documentation=MarkupContent(
139
+ kind=MarkupKind.MARKDOWN,
140
+ value=documentation(
141
+ lambda link_resolver: kw_doc.to_markdown(False, link_resolver=link_resolver, reference_targets=targets)
142
+ ),
143
+ ),
144
+ )
145
+ return SignatureHelp(
146
+ signatures=[signature],
147
+ active_signature=0,
148
+ active_parameter=argument_index,
149
+ )
150
+
151
+
93
152
  def _active_argument_from_semantic_tokens(
94
153
  arg_tokens: List[SemanticToken],
95
154
  kw_doc: KeywordDoc,
@@ -238,19 +297,20 @@ def _active_argument_from_semantic_tokens(
238
297
 
239
298
 
240
299
  def _cursor_within_line_extent(stmt: SemanticStatement, position: Position) -> bool:
241
- """Cursor is at or before the rightmost SemanticToken end on its line
242
- (with a +1 grace covering the EOL token that the SemanticModel filters
243
- out). Mirrors the legacy `get_tokens_at_position()` returning empty
244
- when the cursor is past every token of a node — signature help is
245
- suppressed in that case."""
300
+ """Cursor is at or before the rightmost SemanticToken end on its line.
301
+ Mirrors the legacy `get_tokens_at_position()` returning empty when the
302
+ cursor is past every token of a node — signature help is suppressed in
303
+ that case. The model keeps the EOL token, so `rightmost` already covers
304
+ the line break; only a final line without EOL needs the +1 grace that
305
+ the newline character provides elsewhere."""
246
306
  line1 = position.line + 1 # SemanticToken.line is 1-indexed
247
- rightmost = max(
248
- (t.range.end.character for t in stmt.tokens if t.line == line1),
249
- default=-1,
250
- )
251
- if rightmost < 0:
307
+ line_tokens = [t for t in stmt.tokens if t.line == line1]
308
+ if not line_tokens:
252
309
  return False
253
- return position.character <= rightmost + 1
310
+ rightmost = max(t.range.end.character for t in line_tokens)
311
+ if not any(t.kind is TokenKind.EOL for t in line_tokens):
312
+ rightmost += 1
313
+ return position.character <= rightmost
254
314
 
255
315
 
256
316
  def _cursor_past_keyword_name(stmt: KeywordCallStatement, position: Position) -> bool:
@@ -263,11 +323,24 @@ def _cursor_past_keyword_name(stmt: KeywordCallStatement, position: Position) ->
263
323
  return position >= keyword_tok.range.extend(end_character=2).end
264
324
 
265
325
 
326
+ def _with_name_marker(stmt: ImportStatement) -> Optional[SemanticToken]:
327
+ """The `WITH NAME` / `AS` alias marker: the SETTING_IMPORT token after the
328
+ import path (the import word itself is SETTING_IMPORT too, but precedes
329
+ the IMPORT_NAME token)."""
330
+ seen_import_name = False
331
+ for tok in stmt.tokens:
332
+ if tok.kind is TokenKind.IMPORT_NAME:
333
+ seen_import_name = True
334
+ elif seen_import_name and tok.kind is TokenKind.SETTING_IMPORT:
335
+ return tok
336
+ return None
337
+
338
+
266
339
  def _cursor_at_or_past_with_name(stmt: ImportStatement, position: Position) -> bool:
267
340
  """Cursor is at or past the WITH NAME marker on a Library import —
268
341
  past here means the user is on the alias, not on the library args,
269
342
  so signature help should be suppressed."""
270
- with_name_tok = next((t for t in stmt.tokens if t.kind is TokenKind.CONTROL_FLOW), None)
343
+ with_name_tok = _with_name_marker(stmt)
271
344
  if with_name_tok is None:
272
345
  return False
273
346
  return position >= with_name_tok.range.start
@@ -288,9 +361,10 @@ def _import_arg_tokens(stmt: ImportStatement) -> List[SemanticToken]:
288
361
  """ARGUMENT SemanticTokens of an import statement up to (but excluding)
289
362
  the optional `WITH NAME` marker. Anything past WITH NAME is the alias
290
363
  and is not part of the init signature."""
364
+ marker = _with_name_marker(stmt)
291
365
  out: List[SemanticToken] = []
292
366
  for tok in stmt.tokens:
293
- if tok.kind is TokenKind.CONTROL_FLOW:
367
+ if marker is not None and tok is marker:
294
368
  break
295
369
  if tok.kind is TokenKind.ARGUMENT:
296
370
  out.append(tok)
@@ -301,6 +375,9 @@ def _build_signature_help(
301
375
  kw_doc: KeywordDoc,
302
376
  arg_tokens: List[SemanticToken],
303
377
  position: Position,
378
+ links: bool = False,
379
+ target: Optional[DocumentationTarget] = None,
380
+ link_resolver: Optional[LinkResolver] = None,
304
381
  ) -> Optional[SignatureHelp]:
305
382
  """SemanticModel-based replacement for `_get_signature_help`.
306
383
 
@@ -312,30 +389,7 @@ def _build_signature_help(
312
389
  if not kw_arguments:
313
390
  return None
314
391
 
315
- signature = SignatureInformation(
316
- label=kw_doc.parameter_signature(),
317
- parameters=[
318
- ParameterInformation(
319
- label=p.signature(),
320
- documentation=(
321
- MarkupContent(
322
- kind=MarkupKind.MARKDOWN,
323
- value="\n\n---\n\n".join(t.to_markdown() for t in kw_doc.parent.get_types(p.types)),
324
- )
325
- if p.types and kw_doc.parent is not None
326
- else None
327
- ),
328
- )
329
- for p in kw_arguments
330
- ],
331
- active_parameter=argument_index,
332
- documentation=MarkupContent(kind=MarkupKind.MARKDOWN, value=kw_doc.to_markdown(False)),
333
- )
334
- return SignatureHelp(
335
- signatures=[signature],
336
- active_signature=0,
337
- active_parameter=argument_index,
338
- )
392
+ return _signature_help(kw_doc, kw_arguments, argument_index, links, target, link_resolver)
339
393
 
340
394
 
341
395
  class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelper):
@@ -385,6 +439,10 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
385
439
 
386
440
  return self._collect_legacy(document, position, context)
387
441
 
442
+ @property
443
+ def _links(self) -> bool:
444
+ return self.parent.robot_initialization_options.documentation_viewer_links
445
+
388
446
  def _collect_legacy(
389
447
  self,
390
448
  document: TextDocument,
@@ -426,13 +484,13 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
426
484
  return None
427
485
 
428
486
  if isinstance(stmt, KeywordCallStatement):
429
- return self._keyword_call_signature_help(stmt, position)
487
+ return self._keyword_call_signature_help(stmt, position, document, namespace)
430
488
 
431
489
  if isinstance(stmt, ImportStatement) and stmt.import_type in (
432
490
  ImportType.LIBRARY,
433
491
  ImportType.VARIABLES,
434
492
  ):
435
- return self._import_signature_help(stmt, position)
493
+ return self._import_signature_help(stmt, position, document, namespace)
436
494
 
437
495
  return None
438
496
 
@@ -448,6 +506,8 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
448
506
  self,
449
507
  stmt: KeywordCallStatement,
450
508
  position: Position,
509
+ document: TextDocument,
510
+ namespace: Namespace,
451
511
  ) -> Optional[SignatureHelp]:
452
512
  if stmt.kind not in self._SUPPORTED_KEYWORD_CALL_KINDS:
453
513
  return None
@@ -468,12 +528,21 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
468
528
  return None
469
529
 
470
530
  arg_tokens = [t for t in stmt.tokens if t.kind is TokenKind.ARGUMENT]
471
- return _build_signature_help(kw_doc, arg_tokens, position)
531
+ links = self._links
532
+ target = (
533
+ self.parent.robot_code_action_documentation.keyword_target(kw_doc, stmt.lib_entry, document, namespace)
534
+ if links
535
+ else None
536
+ )
537
+ link_resolver = self._link_resolver(document, namespace, target, kw_doc)
538
+ return _build_signature_help(kw_doc, arg_tokens, position, links, target, link_resolver)
472
539
 
473
540
  def _import_signature_help(
474
541
  self,
475
542
  stmt: ImportStatement,
476
543
  position: Position,
544
+ document: TextDocument,
545
+ namespace: Namespace,
477
546
  ) -> Optional[SignatureHelp]:
478
547
  kw_doc = stmt.init_keyword_doc
479
548
  if kw_doc is None:
@@ -490,7 +559,22 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
490
559
  if _cursor_at_or_past_with_name(stmt, position):
491
560
  return None
492
561
 
493
- return _build_signature_help(kw_doc, _import_arg_tokens(stmt), position)
562
+ arg_tokens = _import_arg_tokens(stmt)
563
+ links = self._links
564
+ # a Variables import has no page in the Documentation Viewer
565
+ target = (
566
+ self.parent.robot_code_action_documentation.import_target(
567
+ stmt.import_name or "",
568
+ [t.value for t in arg_tokens],
569
+ True,
570
+ document,
571
+ namespace,
572
+ stmt.lib_entry.library_doc if stmt.lib_entry is not None else None,
573
+ )
574
+ if links and stmt.import_type is ImportType.LIBRARY
575
+ else None
576
+ )
577
+ return _build_signature_help(kw_doc, arg_tokens, position, links, target)
494
578
 
495
579
  def _signature_help_KeywordCall_or_Fixture( # noqa: N802
496
580
  self,
@@ -549,7 +633,26 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
549
633
  # TODO
550
634
  pass
551
635
 
552
- return self._get_signature_help(keyword_doc, kw_node.tokens, token_at_position, position)
636
+ target = None
637
+ if self._links:
638
+ prefix_entry, _ = self.get_namespace_info_from_keyword_token(namespace, keyword_token)
639
+ target = self.parent.robot_code_action_documentation.keyword_target(
640
+ keyword_doc, prefix_entry, document, namespace
641
+ )
642
+ link_resolver = self._link_resolver(document, namespace, target, keyword_doc)
643
+
644
+ return self._get_signature_help(keyword_doc, kw_node.tokens, token_at_position, position, target, link_resolver)
645
+
646
+ def _link_resolver(
647
+ self,
648
+ document: TextDocument,
649
+ namespace: Namespace,
650
+ target: Optional[DocumentationTarget],
651
+ kw_doc: KeywordDoc,
652
+ ) -> Optional[LinkResolver]:
653
+ if target is None or kw_doc.parent is None:
654
+ return None
655
+ return self.parent.robot_code_action_documentation.link_resolver(document, namespace, target, kw_doc.parent)
553
656
 
554
657
  def _get_signature_help(
555
658
  self,
@@ -557,6 +660,8 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
557
660
  tokens: Sequence[Token],
558
661
  token_at_position: Token,
559
662
  position: Position,
663
+ target: Optional[DocumentationTarget],
664
+ link_resolver: Optional[LinkResolver] = None,
560
665
  ) -> Optional[SignatureHelp]:
561
666
  argument_index, kw_arguments, _ = self.get_argument_info_at_position(
562
667
  keyword_doc, tokens, token_at_position, position
@@ -564,31 +669,7 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
564
669
  if kw_arguments is None:
565
670
  return None
566
671
 
567
- signature = SignatureInformation(
568
- label=keyword_doc.parameter_signature(),
569
- parameters=[
570
- ParameterInformation(
571
- label=p.signature(),
572
- documentation=(
573
- MarkupContent(
574
- kind=MarkupKind.MARKDOWN,
575
- value="\n\n---\n\n".join([t.to_markdown() for t in keyword_doc.parent.get_types(p.types)]),
576
- )
577
- if p.types and keyword_doc.parent is not None
578
- else None
579
- ),
580
- )
581
- for i, p in enumerate(kw_arguments)
582
- ],
583
- active_parameter=argument_index,
584
- documentation=MarkupContent(kind=MarkupKind.MARKDOWN, value=keyword_doc.to_markdown(False)),
585
- )
586
-
587
- return SignatureHelp(
588
- signatures=[signature],
589
- active_signature=0,
590
- active_parameter=argument_index,
591
- )
672
+ return _signature_help(keyword_doc, kw_arguments, argument_index, self._links, target, link_resolver)
592
673
 
593
674
  def signature_help_KeywordCall( # noqa: N802
594
675
  self,
@@ -636,10 +717,13 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
636
717
  return None
637
718
 
638
719
  lib_doc: Optional[LibraryDoc] = None
720
+ import_doc: Optional[LibraryDoc] = None
639
721
  try:
640
722
  namespace = self.parent.documents_cache.get_namespace(document)
641
723
 
642
- lib_doc = namespace.get_imported_library_libdoc(library_node.name, library_node.args, library_node.alias)
724
+ lib_doc = import_doc = namespace.get_imported_library_libdoc(
725
+ library_node.name, library_node.args, library_node.alias
726
+ )
643
727
 
644
728
  if lib_doc is None or lib_doc.errors:
645
729
  lib_doc = namespace.imports_manager.get_libdoc_for_library_import(
@@ -679,8 +763,15 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
679
763
  if with_name_token is None
680
764
  else library_node.tokens[: library_node.tokens.index(with_name_token)]
681
765
  )
766
+ target = (
767
+ self.parent.robot_code_action_documentation.import_target(
768
+ library_node.name, library_node.args, True, document, namespace, import_doc
769
+ )
770
+ if self._links
771
+ else None
772
+ )
682
773
  for kw_doc in lib_doc.inits:
683
- return self._get_signature_help(kw_doc, tokens, token_at_position, position)
774
+ return self._get_signature_help(kw_doc, tokens, token_at_position, position, target)
684
775
 
685
776
  return None
686
777
 
@@ -738,7 +829,8 @@ class RobotSignatureHelpProtocolPart(RobotLanguageServerProtocolPart, ModelHelpe
738
829
  if not lib_doc.inits:
739
830
  return None
740
831
 
832
+ # a Variables import has no page in the Documentation Viewer
741
833
  for kw_doc in lib_doc.inits:
742
- return self._get_signature_help(kw_doc, variables_node.tokens, token_at_position, position)
834
+ return self._get_signature_help(kw_doc, variables_node.tokens, token_at_position, position, None)
743
835
 
744
836
  return None
@@ -15,7 +15,7 @@ from typing import (
15
15
 
16
16
  from robotcode.core.event import event
17
17
  from robotcode.core.language import LanguageDefinition
18
- from robotcode.core.lsp.types import InitializeError
18
+ from robotcode.core.lsp.types import InitializeError, MessageType
19
19
  from robotcode.core.utils.dataclasses import CamelSnakeMixin, from_dict
20
20
  from robotcode.core.utils.logging import LoggingDescriptor
21
21
  from robotcode.jsonrpc2.protocol import JsonRPCErrorException, JsonRPCErrors, ProtocolPartDescriptor
@@ -35,6 +35,7 @@ from .parts.debugging_utils import RobotDebuggingUtilsProtocolPart
35
35
  from .parts.diagnostics import RobotDiagnosticsProtocolPart
36
36
  from .parts.document_highlight import RobotDocumentHighlightProtocolPart
37
37
  from .parts.document_symbols import RobotDocumentSymbolsProtocolPart
38
+ from .parts.documentation_viewer import RobotDocumentationViewerPart
38
39
  from .parts.documents_cache import DocumentsCachePart
39
40
  from .parts.folding_range import RobotFoldingRangeProtocolPart
40
41
  from .parts.formatting import RobotFormattingProtocolPart
@@ -89,6 +90,7 @@ class RobotInitializationOptions(CamelSnakeMixin):
89
90
  global_storage_uri: Optional[str] = None
90
91
  python_path: List[str] = field(default_factory=list)
91
92
  env: Dict[str, str] = field(default_factory=dict)
93
+ documentation_viewer_links: bool = False
92
94
 
93
95
 
94
96
  @symbol_information_label("robotframework")
@@ -120,6 +122,7 @@ class RobotLanguageServerProtocol(LanguageServerProtocol):
120
122
 
121
123
  robot_debugging_utils = ProtocolPartDescriptor(RobotDebuggingUtilsProtocolPart)
122
124
  robot_keywords_treeview = ProtocolPartDescriptor(RobotKeywordsTreeViewPart)
125
+ robot_documentation_viewer = ProtocolPartDescriptor(RobotDocumentationViewerPart)
123
126
  robot_project_info = ProtocolPartDescriptor(ProjectInfoPart)
124
127
  robot_workspace_symbols = ProtocolPartDescriptor(RobotWorkspaceSymbolsProtocolPart)
125
128
 
@@ -158,13 +161,16 @@ class RobotLanguageServerProtocol(LanguageServerProtocol):
158
161
  server: "RobotLanguageServer",
159
162
  profile: Optional[RobotBaseProfile] = None,
160
163
  analysis_config: Optional[WorkspaceAnalysisConfig] = None,
164
+ configuration_errors: Optional[List[str]] = None,
161
165
  ):
162
166
  super().__init__(server)
163
167
  self.robot_profile = profile if profile is not None else RobotBaseProfile()
164
168
  self.analysis_config = analysis_config if analysis_config is not None else WorkspaceAnalysisConfig()
169
+ self.configuration_errors = configuration_errors if configuration_errors is not None else []
165
170
  self.robot_initialization_options = RobotInitializationOptions()
166
171
  self.on_initialize.add(self._on_initialize)
167
172
  self.on_initialized.add(self.server_initialized)
173
+ self.on_initialized.add(self.show_configuration_errors)
168
174
  self._documents_cache: Optional[DocumentsCachePart] = None
169
175
 
170
176
  @_logger.call
@@ -222,6 +228,11 @@ class RobotLanguageServerProtocol(LanguageServerProtocol):
222
228
  @event
223
229
  def on_robot_initialized(sender) -> None: ...
224
230
 
231
+ # the errors of the configuration that the start loaded, which the editors otherwise show only in the server's log
232
+ def show_configuration_errors(self, sender: Any) -> None:
233
+ for message in self.configuration_errors:
234
+ self.window.show_message(message, MessageType.ERROR)
235
+
225
236
  def server_initialized(self, sender: Any) -> None:
226
237
  for folder in self.workspace.workspace_folders:
227
238
  for p in self.robot_profile.python_path or []:
@@ -1,4 +1,4 @@
1
- from typing import Optional
1
+ from typing import List, Optional
2
2
 
3
3
  from robotcode.core.types import ServerMode, TcpParams
4
4
  from robotcode.language_server.common.server import (
@@ -19,10 +19,12 @@ class RobotLanguageServer(LanguageServerBase[RobotLanguageServerProtocol]):
19
19
  pipe_name: Optional[str] = None,
20
20
  profile: Optional[RobotBaseProfile] = None,
21
21
  analysis_config: Optional[WorkspaceAnalysisConfig] = None,
22
+ configuration_errors: Optional[List[str]] = None,
22
23
  ):
23
24
  super().__init__(mode, tcp_params, pipe_name)
24
25
  self.profile = profile
25
26
  self.analysis_config = analysis_config
27
+ self.configuration_errors = configuration_errors
26
28
 
27
29
  def create_protocol(self) -> RobotLanguageServerProtocol:
28
- return RobotLanguageServerProtocol(self, self.profile, self.analysis_config)
30
+ return RobotLanguageServerProtocol(self, self.profile, self.analysis_config, self.configuration_errors)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: robotcode-language-server
3
- Version: 2.7.0
3
+ Version: 2.8.0-dev.8
4
4
  Summary: RobotCode Language Server for Robot Framework
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -20,15 +20,16 @@ Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Programming Language :: Python :: 3.15
23
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
25
  Classifier: Programming Language :: Python :: Implementation :: PyPy
25
26
  Classifier: Topic :: Utilities
26
27
  Classifier: Typing :: Typed
27
28
  Requires-Python: >=3.10
28
- Requires-Dist: robotcode-analyze==2.7.0
29
- Requires-Dist: robotcode-jsonrpc2==2.7.0
30
- Requires-Dist: robotcode-robot==2.7.0
31
- Requires-Dist: robotcode==2.7.0
29
+ Requires-Dist: robotcode-analyze==2.8.0-dev.8
30
+ Requires-Dist: robotcode-jsonrpc2==2.8.0-dev.8
31
+ Requires-Dist: robotcode-robot==2.8.0-dev.8
32
+ Requires-Dist: robotcode==2.8.0-dev.8
32
33
  Requires-Dist: robotframework>=5.0.0
33
34
  Description-Content-Type: text/markdown
34
35
 
@@ -1,11 +1,11 @@
1
1
  robotcode/language_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- robotcode/language_server/__version__.py,sha256=EtKWW0Hnl5oWglRNH0HZigvcDT2FEs58ek8buJdwW1E,22
3
- robotcode/language_server/cli.py,sha256=FsutR2FF8YjCMRtq2c_i0wYSktP8KkhGnnfEy4fcpww,4136
2
+ robotcode/language_server/__version__.py,sha256=JvoVcYcO_7K_aZkOPOeHH31iT5EQpvrGTx1sNBjoeYU,28
3
+ robotcode/language_server/cli.py,sha256=bzzEMB7L8hKK0gF9nhEOf-ABOZTgKdgbZ6xDleqdCF0,5420
4
4
  robotcode/language_server/hooks.py,sha256=wahxowTEo9Q16q5VK7AmhKDMdbtxcvqg9242-_L9tTA,204
5
5
  robotcode/language_server/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
6
6
  robotcode/language_server/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  robotcode/language_server/common/decorators.py,sha256=woj4gyjaG-ZlqmFgUKFIZM9LMWJvATa8yvss-A4oMRU,2173
8
- robotcode/language_server/common/protocol.py,sha256=vlL0xYH-xLVTgj7mtl5vKfp_FYV5MjitJUNHgzcU9aI,14940
8
+ robotcode/language_server/common/protocol.py,sha256=ShnpaUAPBHTU_HUn1cTNvsnd5ZdFySnAdjSfX0uuxwY,15100
9
9
  robotcode/language_server/common/server.py,sha256=n8VREs2Vmh1tmoDWqGhHwcQf0q1yJij_XcbMIAq2uBE,781
10
10
  robotcode/language_server/common/parts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  robotcode/language_server/common/parts/code_action.py,sha256=GolhrW9DyEYHFF4-o-soWImjLf5SjwsZb8wG7rHo7sE,4316
@@ -14,10 +14,10 @@ robotcode/language_server/common/parts/commands.py,sha256=ZAJLLZlt3pKDiRR4yt7H_N
14
14
  robotcode/language_server/common/parts/completion.py,sha256=IDBeTcTAdNzUEYarEFVjypK63Y_abA4jnGTAUT748AA,7440
15
15
  robotcode/language_server/common/parts/declaration.py,sha256=y-KIrU9tpdVO8cCAJMIiH9GaGljps4_W-5Sn0Wax5Sk,4553
16
16
  robotcode/language_server/common/parts/definition.py,sha256=lrlwpSd-C_6Gy8cR1lVOJ-WxkLHe4OUNB0lZbda-bTE,4586
17
- robotcode/language_server/common/parts/diagnostics.py,sha256=UEIrMuSAtcyTmwbDkf7glIzrq94dutxBDJpUbu77Za0,30986
17
+ robotcode/language_server/common/parts/diagnostics.py,sha256=WbnKO6HRa2UOU3ylTrNJCF6Co9Jz6M9OM-F1-WGlnaA,32779
18
18
  robotcode/language_server/common/parts/document_highlight.py,sha256=X_0g2L3Z0d-RU2uceZlHUjxHFmn_q5wWpeZ7tlvmKvk,2573
19
19
  robotcode/language_server/common/parts/document_symbols.py,sha256=u0fT9Fi9QCwgIar8tV6dhrSIPa7CRiJfwNBYALwcPH4,5773
20
- robotcode/language_server/common/parts/documents.py,sha256=EY-WFsvymjM8ypLaUs9dyDbCnH4hXjqPBRlcvYL8ol0,9326
20
+ robotcode/language_server/common/parts/documents.py,sha256=M9mOiuYthpGo7yxx0biLy6eMtAB8fy8Xt6YNr9JoEv8,9869
21
21
  robotcode/language_server/common/parts/folding_range.py,sha256=e3iRLXUS7VKLBqyMdhyRNpatJG6suak6qNxkFzEM9ek,2431
22
22
  robotcode/language_server/common/parts/formatting.py,sha256=bDI7YVotFjiESgn3nDVQW1RiBtYBVgK7Ltk_ddwshBM,4227
23
23
  robotcode/language_server/common/parts/hover.py,sha256=c70fR-xxmQ6AR5ogd3748Is6U6vzBz8RDPIaTnd1EFg,2519
@@ -32,44 +32,46 @@ robotcode/language_server/common/parts/selection_range.py,sha256=zJukby4_fE5o6il
32
32
  robotcode/language_server/common/parts/semantic_tokens.py,sha256=Jxk3GbnnC8Hu-uUHcnToH5VsnnM4oqzeCRr7pueHyrY,7681
33
33
  robotcode/language_server/common/parts/signature_help.py,sha256=mlYaqSrv9KG32l47s7EoLK9Q1Xp4KTyW7jSYLfMhSGE,3634
34
34
  robotcode/language_server/common/parts/window.py,sha256=8yDdMR2gsYW0e__8ZcgVEqK0Hn69N96Xi91EuJOFH-E,9515
35
- robotcode/language_server/common/parts/workspace.py,sha256=qGECgntiOqsAdIwaJ9Ysik1Y9TG1kv6Bg9MnVdQ2TRY,18197
35
+ robotcode/language_server/common/parts/workspace.py,sha256=woERGxUIxV2F8JLcW72iqTEd0vXqntApQX_ogj8XGS4,18610
36
36
  robotcode/language_server/common/parts/workspace_symbols.py,sha256=z8tgGPj7JFvJTf2D086eZnjAdS4Mo8dEs4QISFNPMrM,4842
37
37
  robotcode/language_server/robotframework/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- robotcode/language_server/robotframework/configuration.py,sha256=6bRSef1GqBFoSyZXSGOLAdV5xTVdZcxsIyZhh3li8Fc,2684
39
- robotcode/language_server/robotframework/protocol.py,sha256=ED4fWJBYTgpE4HHPVg3J1BNzQhco8Lpa8PSVzfmat0k,10786
40
- robotcode/language_server/robotframework/server.py,sha256=-1EQ1zGyLAS1LM6aMa6IRT2KqYiLWWVr6GOhiQZ8Ncw,1045
38
+ robotcode/language_server/robotframework/configuration.py,sha256=G6jchWIawSKiqKTdObBmzer_W7k3Pwx3i7_9eno6OAs,2799
39
+ robotcode/language_server/robotframework/protocol.py,sha256=tuGxshn0CEDKzyG37SmOo_mUiCwqaxOB6jAnLt5eAc8,11519
40
+ robotcode/language_server/robotframework/server.py,sha256=ctzPDPWOecjxcS9VOUNOEdpRo56c1Qa17IfD06c7Slk,1193
41
41
  robotcode/language_server/robotframework/parts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- robotcode/language_server/robotframework/parts/code_action_documentation.py,sha256=B7nv_05H-HEQRE7ZjSKLWSEue0SRC8a3MUZwoCgTGpY,13944
43
- robotcode/language_server/robotframework/parts/code_action_helper_mixin.py,sha256=rcHe5H66kWSN2jfqgLSjl2bw00-rCWJNBRjSTezzOjY,3807
44
- robotcode/language_server/robotframework/parts/code_action_quick_fixes.py,sha256=_Lvr4_nOJrvBOL_mrgq4xyO_S3F8hyQobBjIIPUzkwc,34478
45
- robotcode/language_server/robotframework/parts/code_action_refactor.py,sha256=25yQ8Bd-3XwkO1u5KcgKBkqQqWmKiZuKNcKm_Shbgr4,27267
46
- robotcode/language_server/robotframework/parts/code_lens.py,sha256=Y2700k59G4VnNowpwyJCrN61PPV5nFYeHnx3qO6CA0w,6825
47
- robotcode/language_server/robotframework/parts/completion.py,sha256=-FTcuQ6P8hoBNPRhpS-jxk7LOU5_EBZSrOzrHeiO_iM,102463
48
- robotcode/language_server/robotframework/parts/debugging_utils.py,sha256=zLqYwxLJFZdZE8EZ7oBmMyXzCd8PLLiqRkH9_5F5JPs,3173
49
- robotcode/language_server/robotframework/parts/diagnostics.py,sha256=-oLEDV_dFk2pqd6i4frhaUwae4EzWG8nGxabsXS8Rh8,12392
42
+ robotcode/language_server/robotframework/parts/code_action_documentation.py,sha256=TFztfmk_nZDGJ6nNPHXTDyqL5zx3ZIa4O-DcGCYQVks,27583
43
+ robotcode/language_server/robotframework/parts/code_action_helper_mixin.py,sha256=hAd3e5hMnpqi8vGReHQCI6bS8cwNggr6RA7F_knFL1o,4553
44
+ robotcode/language_server/robotframework/parts/code_action_quick_fixes.py,sha256=wIJduFlNwvzZY371VaaTchXm8GgivSbQyPWQ30DpNOY,33770
45
+ robotcode/language_server/robotframework/parts/code_action_refactor.py,sha256=t9QVp3zZ9VRvv1PSACegdGUiIgHzvE9vvCisIAtqcO8,27419
46
+ robotcode/language_server/robotframework/parts/code_lens.py,sha256=XA2jPSMqIBAVWzactQJjXnlto6n82NbA50IctUa6Sgg,6813
47
+ robotcode/language_server/robotframework/parts/completion.py,sha256=Udk8RebhvPTlxyNc416W2yJikz5BCi1ZWFcYibNSE78,111725
48
+ robotcode/language_server/robotframework/parts/debugging_utils.py,sha256=eplSG_3NTm66hirUv6wNA7Gjl6dzhi6DdFO5-7xNMDs,6207
49
+ robotcode/language_server/robotframework/parts/diagnostics.py,sha256=MmTQ7_jRRTVldzZEhr00qpS0eDe_hg0U5av2HClhAVo,13393
50
50
  robotcode/language_server/robotframework/parts/document_highlight.py,sha256=BrQC_MNmUoiJPSOLcQLdwVPhS4ffCuD5NVLialZNdjk,5401
51
51
  robotcode/language_server/robotframework/parts/document_symbols.py,sha256=M-zBTNWTGwBOAvVH5dIT4qnRnEM4VE2-3W8Ju2FBiS8,10534
52
- robotcode/language_server/robotframework/parts/documents_cache.py,sha256=5UESW0hdDJV8Y7CpKOLJcemd9EtxIFyZ03XSIZp-PEI,2069
52
+ robotcode/language_server/robotframework/parts/documentation_viewer.py,sha256=vWNzJLJ1TihV0C59trQwXoyrpbpfpKm6E-TdTIczdcE,5595
53
+ robotcode/language_server/robotframework/parts/documents_cache.py,sha256=WH1BeUeubW6oL71ZtMylonAba1PnvQBO5aEUxb5j1lw,2265
53
54
  robotcode/language_server/robotframework/parts/folding_range.py,sha256=vIEYSrwRbZ_P08he4y1wIW3rBP_i8VTnSFumfsqwplY,5583
54
55
  robotcode/language_server/robotframework/parts/formatting.py,sha256=xDwC_bURtE9YSZY9r1n4vhlNed-YMVWQxh1QMAZb6vw,4392
55
56
  robotcode/language_server/robotframework/parts/goto.py,sha256=jS60Sy4Uc-Vp7CJnWg7Lwtuc3zhiU3xowqfuhGLD4sw,6806
56
- robotcode/language_server/robotframework/parts/hover.py,sha256=ErOAoK9JFecYa9nWr9PdU86JlV6SdRnakKBGxsPOR84,10564
57
- robotcode/language_server/robotframework/parts/http_server.py,sha256=LsadjtAf9CFHLHv9pNnGl_yjbChts9WJ5Y-Pu_ZbXOk,7855
57
+ robotcode/language_server/robotframework/parts/hover.py,sha256=OJn7xp-8t3WRfIoNQ_WHsw2r5Ppm7i1ok3RH9ZVBJvc,14585
58
+ robotcode/language_server/robotframework/parts/http_server.py,sha256=0OutNCWXhcKj0pOSsj-l0yn2UbqyZCK-YWSSNae0S7g,8163
58
59
  robotcode/language_server/robotframework/parts/inlay_hint.py,sha256=LytpE8IpD6oTPuCtaev9KvHq0TpWEKRCh-Wn4KZ6RkM,22266
59
- robotcode/language_server/robotframework/parts/inline_value.py,sha256=4w5xzQb643fuwzJF-lbxUuWJBEjhn2X_2OmL-m8luL8,3043
60
- robotcode/language_server/robotframework/parts/keywords_treeview.py,sha256=6Xw8-JYpNWl6V-PPSqfQhEGo79_5lSYByVInz2eavMk,9502
60
+ robotcode/language_server/robotframework/parts/inline_value.py,sha256=KbTO1hyNGKZ0rT0Lop0qGMccLkZ6G3x5GLw9m0Zat5M,5920
61
+ robotcode/language_server/robotframework/parts/keywords_treeview.py,sha256=kSfVRqMAHIKsOCIYxywv7YvE7ZvwMhZk4b1f5HGqb7Y,13468
62
+ robotcode/language_server/robotframework/parts/model_variables.py,sha256=F4u_Nua4a_Tga3cVV1pD-hE9xZsxcWITN8umck58Kn0,14137
61
63
  robotcode/language_server/robotframework/parts/project_info.py,sha256=5v_livYd7G-x5ZV5SbCt7R7kri0-qfZuqOrFgtd2KaY,1631
62
64
  robotcode/language_server/robotframework/parts/protocol_part.py,sha256=4LHac_eBg18Df6J9dJCMtvmR_Y1F6lYMVlghK1Ne8m8,413
63
- robotcode/language_server/robotframework/parts/references.py,sha256=O1PFqBMz-osYoNZl_8B2cvEkLFHau355CMsLy8xcY2o,21174
64
- robotcode/language_server/robotframework/parts/rename.py,sha256=vbbb-RvpFvOnQnGEwCfGcs5wBV8ROdo98jWSU92X9Jg,9545
65
+ robotcode/language_server/robotframework/parts/references.py,sha256=UPTs2kvn4r0xZMTCzDlXZE0eoBp18ScMeyxGgNt0btY,24471
66
+ robotcode/language_server/robotframework/parts/rename.py,sha256=fynUSzMy5tZ_URjPKyY_6DW42MBj0LagZjchKIzkXAE,9467
65
67
  robotcode/language_server/robotframework/parts/robocop_diagnostics.py,sha256=Z94zXFoqDTdGl3hJOrw__wFcLY6sTnNrhDr7QiSOBrQ,10643
66
68
  robotcode/language_server/robotframework/parts/robocop_helper.py,sha256=SRmcAq4pRVzT_oP4R8FUB2oACeLcds9rYZqgFNWsmI0,3592
67
- robotcode/language_server/robotframework/parts/robot_workspace.py,sha256=icZbdN_vdGkNr3Bh_U_jysIR1e3VEJyNhv04ouss0ms,6118
68
- robotcode/language_server/robotframework/parts/selection_range.py,sha256=0m8TWkLoTYL9Dx14iYyPsMnVfP8HgrDRrENtxS373EY,2684
69
- robotcode/language_server/robotframework/parts/semantic_tokens.py,sha256=ekXYYo69XKWkiA85UHL9l7BB1ZGfUlhuNrBOPKCYe_0,68543
70
- robotcode/language_server/robotframework/parts/signature_help.py,sha256=SEv809FYz4iahCf924pKNcxwGEyjCxQCsUPhgt_DMAY,27207
69
+ robotcode/language_server/robotframework/parts/robot_workspace.py,sha256=0IrBgUWs1oed11GeVLwZR_G44vXZmmn27AD29wjM59I,14790
70
+ robotcode/language_server/robotframework/parts/selection_range.py,sha256=ye0PkchedHgkrVJ7IthkAVTVstH7LEcmAcBQPw8t2mQ,3504
71
+ robotcode/language_server/robotframework/parts/semantic_tokens.py,sha256=pbRpMMdV5XeVfhozYf6uUZG_XmMCN9MYwylBUBqFkPI,84553
72
+ robotcode/language_server/robotframework/parts/signature_help.py,sha256=CJnG8LH21O60kZQLFltb0PzSsN745pYrmtASdE1d2Nw,31306
71
73
  robotcode/language_server/robotframework/parts/workspace_symbols.py,sha256=eywbtK56TTLbwuTwoUvNtlhIyAX-2l1BcZntYODuhPQ,3688
72
- robotcode_language_server-2.7.0.dist-info/METADATA,sha256=U3-SFH2WpZ3i3_tv2xhXbiWSy6oG6JIo1akZoHGHnaA,3233
73
- robotcode_language_server-2.7.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
74
- robotcode_language_server-2.7.0.dist-info/entry_points.txt,sha256=Mz2JImlHxd6aYE41Z2r8KaoCnbOcXlR5Zm9Qw_G9Ff0,57
75
- robotcode_language_server-2.7.0.dist-info/RECORD,,
74
+ robotcode_language_server-2.8.0.dev8.dist-info/METADATA,sha256=JP_vmDw4_8p53_f8gTmzzlaBXZQPHeyivnjQ0IEl2Sw,3314
75
+ robotcode_language_server-2.8.0.dev8.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
76
+ robotcode_language_server-2.8.0.dev8.dist-info/entry_points.txt,sha256=Mz2JImlHxd6aYE41Z2r8KaoCnbOcXlR5Zm9Qw_G9Ff0,57
77
+ robotcode_language_server-2.8.0.dev8.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.31.0
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any