Class: PlatformosCheck::LanguageServer::TranslationDocumentLinkProvider
- Inherits:
-
DocumentLinkProvider
- Object
- DocumentLinkProvider
- PlatformosCheck::LanguageServer::TranslationDocumentLinkProvider
- Defined in:
- lib/platformos_check/language_server/document_link_providers/translation_document_link_provider.rb
Constant Summary
Constants included from RegexHelpers
RegexHelpers::HTML_LIQUID_PLACEHOLDER, RegexHelpers::LIQUID_TAG, RegexHelpers::LIQUID_TAG_OR_VARIABLE, RegexHelpers::LIQUID_VARIABLE, RegexHelpers::START_OR_END_QUOTE
Instance Method Summary collapse
- #end_coordinates(buffer, match) ⇒ Object
- #file_link(match, platformos_app) ⇒ Object
- #start_coordinates(buffer, match) ⇒ Object
- #translation_components_for_match(match) ⇒ Object
Methods inherited from DocumentLinkProvider
all, #app_file_type, #default_dir, #default_extension, #default_relative_path, #document_links, inherited, #initialize, #partial_regexp, #translation_file_link, #yaml
Methods included from URIHelper
Methods included from PositionHelper
#bounded, #from_index_to_row_column, #from_row_column_to_index
Methods included from RegexHelpers
Constructor Details
This class inherits a constructor from PlatformosCheck::LanguageServer::DocumentLinkProvider
Instance Method Details
#end_coordinates(buffer, match) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/platformos_check/language_server/document_link_providers/translation_document_link_provider.rb', line 28 def end_coordinates(buffer, match) from_index_to_row_column( buffer, match.end(:key) ) end |
#file_link(match, platformos_app) ⇒ Object
11 12 13 |
# File 'lib/platformos_check/language_server/document_link_providers/translation_document_link_provider.rb', line 11 def file_link(match, platformos_app) translation_file_link(match, platformos_app) end |
#start_coordinates(buffer, match) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/platformos_check/language_server/document_link_providers/translation_document_link_provider.rb', line 21 def start_coordinates(buffer, match) from_index_to_row_column( buffer, match.begin(:key) ) end |
#translation_components_for_match(match) ⇒ Object
15 16 17 18 19 |
# File 'lib/platformos_check/language_server/document_link_providers/translation_document_link_provider.rb', line 15 def translation_components_for_match(match) translation_components = match[:key].split('.') translation_components = match[:scope].split('.') + translation_components if match[:scope] [translation_components] end |