How to use the pygls.types.basic_structures.WorkDoneProgressOptions function in pygls

To help you get started, we’ve selected a few pygls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openlawlibrary / pygls / pygls / types / language_features / document_color.py View on Github external
ProgressToken,
    Range,
    StaticRegistrationOptions,
    TextDocumentIdentifier,
    TextDocumentRegistrationOptions,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)


class DocumentColorClientCapabilities:
    def __init__(self, dynamic_registration: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration


class DocumentColorOptions(WorkDoneProgressOptions):
    def __init__(self, work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)


class DocumentColorRegistrationOptions(DocumentColorOptions,
                                       TextDocumentRegistrationOptions,
                                       StaticRegistrationOptions):
    def __init__(self,
                 id: Optional[str] = None,
                 document_selector: Optional[DocumentSelector] = None,
                 work_done_progress: Optional[ProgressToken] = None):
        DocumentColorOptions.__init__(self, work_done_progress)
        TextDocumentRegistrationOptions.__init__(self, document_selector)
        StaticRegistrationOptions.__init__(self, id)
github openlawlibrary / pygls / pygls / types / language_features / hover.py View on Github external
TextDocumentIdentifier,
    TextDocumentPositionParams,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)


class HoverClientCapabilities:
    def __init__(self,
                 dynamic_registration: Optional[bool] = False,
                 content_format: Optional[List[MarkupKind]] = None):
        self.dynamicRegistration = dynamic_registration
        self.contentFormat = content_format


class HoverOptions(WorkDoneProgressOptions):
    def __init__(self, work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)


class HoverParams(TextDocumentPositionParams, WorkDoneProgressParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 position: Position,
                 work_done_token: Optional[bool] = None):
        TextDocumentPositionParams.__init__(self, text_document, position)
        WorkDoneProgressParams.__init__(self, work_done_token)


class Hover:
    def __init__(self,
                 contents: Union['MarkedString', List['MarkedString'], MarkupContent],
github openlawlibrary / pygls / pygls / types / language_features / formatting.py View on Github external
from typing import Optional

from pygls.types.basic_structures import (
    ProgressToken,
    TextDocumentIdentifier,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)


class DocumentFormattingClientCapabilities:
    def __init__(self, dynamic_registration: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration


class DocumentFormattingOptions(WorkDoneProgressOptions):
    def __init__(self, work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)


class DocumentFormattingParams(WorkDoneProgressParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 options: 'FormattingOptions',
                 work_done_token: Optional[bool] = None):
        WorkDoneProgressParams.__init__(self, work_done_token)
        self.textDocument = text_document
        self.options = options


class FormattingOptions:
    def __init__(self,
github openlawlibrary / pygls / pygls / types / language_features / range_formatting.py View on Github external
from pygls.types.basic_structures import (
    ProgressToken,
    Range,
    TextDocumentIdentifier,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)
from pygls.types.language_features.formatting import FormattingOptions


class DocumentRangeFormattingClientCapabilities:
    def __init__(self, dynamic_registration: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration


class DocumentRangeFormattingOptions(WorkDoneProgressOptions):
    def __init__(self, work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)


class DocumentRangeFormattingParams(WorkDoneProgressParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 range: Range,
                 options: FormattingOptions,
                 work_done_token: Optional[bool] = None):
        WorkDoneProgressParams.__init__(self, work_done_token)
        self.textDocument = text_document
        self.range = range
        self.options = options
github openlawlibrary / pygls / pygls / types / language_features / declaration.py View on Github external
TextDocumentPositionParams,
    TextDocumentRegistrationOptions,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)


class DeclarationClientCapabilities:
    def __init__(self,
                 dynamic_registration: Optional[bool] = False,
                 link_support: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration
        self.linkSupport = link_support


class DeclarationOptions(WorkDoneProgressOptions):
    def __init__(self, work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)


class DeclarationRegistrationOptions(DeclarationOptions,
                                     TextDocumentRegistrationOptions,
                                     StaticRegistrationOptions):
    def __init__(self,
                 id: Optional[str] = None,
                 document_selector: Optional[DocumentSelector] = None,
                 work_done_progress: Optional[ProgressToken] = None):
        DeclarationOptions.__init__(self, work_done_progress)
        TextDocumentRegistrationOptions.__init__(self, document_selector)
        StaticRegistrationOptions.__init__(self, id)
github openlawlibrary / pygls / pygls / types / language_features / code_lens.py View on Github external
Command,
    PartialResultParams,
    ProgressToken,
    Range,
    TextDocumentIdentifier,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)


class CodeLensClientCapabilities:
    def __init__(self, dynamic_registration: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration


class CodeLensOptions(WorkDoneProgressOptions):
    def __init__(self,
                 resolve_provider: Optional[bool] = False,
                 work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)
        self.resolveProvider = resolve_provider


class CodeLensParams(WorkDoneProgressParams, PartialResultParams):
    def __init__(self,
                 text_document: 'TextDocumentIdentifier',
                 work_done_token: Optional[bool] = None,
                 partial_result_token: Optional[ProgressToken] = None):
        WorkDoneProgressParams.__init__(self, work_done_token)
        PartialResultParams.__init__(self, partial_result_token)
        self.textDocument = text_document
github openlawlibrary / pygls / pygls / types / language_features / references.py View on Github external
PartialResultParams,
    Position,
    ProgressToken,
    TextDocumentIdentifier,
    TextDocumentPositionParams,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)


class ReferenceClientCapabilities:
    def __init__(self, dynamic_registration: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration


class ReferenceOptions(WorkDoneProgressOptions):
    def __init__(self, work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)


class ReferenceParams(TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 position: Position,
                 context: 'ReferenceContext',
                 work_done_token: Optional[bool] = None,
                 partial_result_token: Optional[ProgressToken] = None):
        TextDocumentPositionParams.__init__(self, text_document, position)
        WorkDoneProgressParams.__init__(self, work_done_token)
        PartialResultParams.__init__(self, partial_result_token)
        self.context = context
github openlawlibrary / pygls / pygls / types / language_features / completion.py View on Github external
def __init__(self,
                 snippet_support: Optional[bool] = False,
                 commit_character_support: Optional[bool] = False,
                 documentation_format: Optional[List[MarkupKind]] = None,
                 deprecated_support: Optional[bool] = False,
                 preselected_support: Optional[bool] = False,
                 tag_support: Optional[CompletionTagSupportClientCapabilities] = None):
        self.snippetSupport = snippet_support
        self.commitCharacterSupport = commit_character_support
        self.documentationFormat = documentation_format
        self.deprecatedSupport = deprecated_support
        self.preselectedSupport = preselected_support
        self.tagSupport = tag_support


class CompletionOptions(WorkDoneProgressOptions):
    def __init__(self,
                 trigger_characters: Optional[List[str]] = None,
                 all_commit_characters: Optional[List[str]] = None,
                 resolve_provider: Optional[bool] = False,
                 work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)
        self.triggerCharacters = trigger_characters
        self.allCommitCharacters = all_commit_characters
        self.resolveProvider = resolve_provider


class CompletionParams(TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 position: Position,
                 context: Optional['CompletionContext'] = None,
github openlawlibrary / pygls / pygls / types / language_features / on_type_formatting.py View on Github external
from pygls.types.basic_structures import (
    Position,
    ProgressToken,
    TextDocumentIdentifier,
    TextDocumentPositionParams,
    WorkDoneProgressOptions
)
from pygls.types.language_features.formatting import FormattingOptions


class DocumentOnTypeFormattingClientCapabilities:
    def __init__(self, dynamic_registration: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration


class DocumentOnTypeFormattingOptions(WorkDoneProgressOptions):
    def __init__(self,
                 first_trigger_character: str,
                 more_trigger_character: Optional[List[str]] = None,
                 work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)
        self.firstTriggerCharacter = first_trigger_character
        self.moreTriggerCharacter = more_trigger_character


class DocumentOnTypeFormattingParams(TextDocumentPositionParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 position: Position,
                 ch: str,
                 options: FormattingOptions):
        TextDocumentPositionParams.__init__(self, text_document, position)
github openlawlibrary / pygls / pygls / types / language_features / document_highlight.py View on Github external
Position,
    ProgressToken,
    Range,
    TextDocumentIdentifier,
    TextDocumentPositionParams,
    WorkDoneProgressOptions,
    WorkDoneProgressParams
)


class DocumentHighlightClientCapabilities:
    def __init__(self, dynamic_registration: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration


class DocumentHighlightOptions(WorkDoneProgressOptions):
    def __init__(self, work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)


class DocumentHighlightParams(TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 position: Position,
                 work_done_token: Optional[bool] = None,
                 partial_result_token: Optional[ProgressToken] = None):
        TextDocumentPositionParams.__init__(self, text_document, position)
        WorkDoneProgressParams.__init__(self, work_done_token)
        PartialResultParams.__init__(self, partial_result_token)


class DocumentHighlightKind(enum.IntEnum):