Module: ThemeCheck::LanguageServer

Defined in:
lib/theme_check/language_server.rb,
lib/theme_check/language_server/bridge.rb,
lib/theme_check/language_server/server.rb,
lib/theme_check/language_server/channel.rb,
lib/theme_check/language_server/handler.rb,
lib/theme_check/language_server/protocol.rb,
lib/theme_check/language_server/constants.rb,
lib/theme_check/language_server/messenger.rb,
lib/theme_check/language_server/diagnostic.rb,
lib/theme_check/language_server/uri_helper.rb,
lib/theme_check/language_server/type_helper.rb,
lib/theme_check/language_server/io_messenger.rb,
lib/theme_check/language_server/configuration.rb,
lib/theme_check/language_server/completion_engine.rb,
lib/theme_check/language_server/completion_helper.rb,
lib/theme_check/language_server/code_action_engine.rb,
lib/theme_check/language_server/completion_context.rb,
lib/theme_check/language_server/diagnostics_engine.rb,
lib/theme_check/language_server/client_capabilities.rb,
lib/theme_check/language_server/completion_provider.rb,
lib/theme_check/language_server/diagnostics_manager.rb,
lib/theme_check/language_server/code_action_provider.rb,
lib/theme_check/language_server/document_link_engine.rb,
lib/theme_check/language_server/document_link_provider.rb,
lib/theme_check/language_server/execute_command_engine.rb,
lib/theme_check/language_server/variable_lookup_finder.rb,
lib/theme_check/language_server/execute_command_provider.rb,
lib/theme_check/language_server/document_change_corrector.rb,
lib/theme_check/language_server/variable_lookup_traverser.rb,
lib/theme_check/language_server/variable_lookup_finder/constants.rb,
lib/theme_check/language_server/variable_lookup_finder/liquid_fixer.rb,
lib/theme_check/language_server/variable_lookup_finder/tolerant_parser.rb,
lib/theme_check/language_server/variable_lookup_finder/potential_lookup.rb,
lib/theme_check/language_server/variable_lookup_finder/assignments_finder.rb,
lib/theme_check/language_server/completion_providers/tag_completion_provider.rb,
lib/theme_check/language_server/completion_providers/filter_completion_provider.rb,
lib/theme_check/language_server/completion_providers/object_completion_provider.rb,
lib/theme_check/language_server/variable_lookup_finder/assignments_finder/scope.rb,
lib/theme_check/language_server/code_action_providers/quickfix_code_action_provider.rb,
lib/theme_check/language_server/completion_providers/assignments_completion_provider.rb,
lib/theme_check/language_server/document_link_providers/asset_document_link_provider.rb,
lib/theme_check/language_server/document_link_providers/render_document_link_provider.rb,
lib/theme_check/language_server/document_link_providers/include_document_link_provider.rb,
lib/theme_check/language_server/document_link_providers/section_document_link_provider.rb,
lib/theme_check/language_server/variable_lookup_finder/assignments_finder/node_handler.rb,
lib/theme_check/language_server/completion_providers/render_snippet_completion_provider.rb,
lib/theme_check/language_server/variable_lookup_finder/assignments_finder/scope_visitor.rb,
lib/theme_check/language_server/code_action_providers/source_fix_all_code_action_provider.rb,
lib/theme_check/language_server/completion_providers/object_attribute_completion_provider.rb,
lib/theme_check/language_server/execute_command_providers/correction_execute_command_provider.rb,
lib/theme_check/language_server/execute_command_providers/run_checks_execute_command_provider.rb

Defined Under Namespace

Modules: CompletionHelper, CompletionItemKinds, CompletionItemTag, ErrorCodes, MarkupKinds, TextDocumentSyncKind, TypeHelper, URIHelper, VariableLookupFinder, VariableLookupTraverser Classes: AssetDocumentLinkProvider, AssignmentsCompletionProvider, Bridge, Channel, ClientCapabilities, CodeActionEngine, CodeActionProvider, CompletionContext, CompletionEngine, CompletionProvider, Configuration, CorrectionExecuteCommandProvider, Diagnostic, DiagnosticsEngine, DiagnosticsManager, DocumentChangeCorrector, DocumentLinkEngine, DocumentLinkProvider, DoneStreaming, ExecuteCommandEngine, ExecuteCommandProvider, FilterCompletionProvider, Handler, IOMessenger, IncludeDocumentLinkProvider, IncompatibleStream, Messenger, ObjectAttributeCompletionProvider, ObjectCompletionProvider, QuickfixCodeActionProvider, RenderDocumentLinkProvider, RenderSnippetCompletionProvider, RunChecksExecuteCommandProvider, SectionDocumentLinkProvider, Server, SourceFixAllCodeActionProvider, TagCompletionProvider

Constant Summary collapse

PARTIAL_RENDER =
partial_tag('render')
PARTIAL_INCLUDE =
partial_tag('include')
PARTIAL_SECTION =
partial_tag('section')
ASSET_INCLUDE =
%r{
  \{\{-?\s*'(?<partial>[^']*)'\s*\|\s*asset_url|
  \{\{-?\s*"(?<partial>[^"]*)"\s*\|\s*asset_url|

  # in liquid tags the whole line is white space until the asset partial
  ^\s*(?:echo|assign[^=]*\=)\s*'(?<partial>[^']*)'\s*\|\s*asset_url|
  ^\s*(?:echo|assign[^=]*\=)\s*"(?<partial>[^"]*)"\s*\|\s*asset_url
}mix

Class Method Summary collapse

Class Method Details

.partial_tag(tag) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/theme_check/language_server/constants.rb', line 5

def self.partial_tag(tag)
  %r{
    \{\%-?\s*#{tag}\s+'(?<partial>[^']*)'|
    \{\%-?\s*#{tag}\s+"(?<partial>[^"]*)"|

    # in liquid tags the whole line is white space until the tag
    ^\s*#{tag}\s+'(?<partial>[^']*)'|
    ^\s*#{tag}\s+"(?<partial>[^"]*)"
  }mix
end

.startObject



61
62
63
# File 'lib/theme_check/language_server.rb', line 61

def self.start
  Server.new(messenger: IOMessenger.new).listen
end