How to use the pygls.types.basic_structures.TextDocumentPositionParams 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 / rename.py View on Github external
def __init__(self,
                 dynamic_registration: Optional[bool] = False,
                 prepare_support: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration
        self.prepareSupport = prepare_support


class RenameOptions(WorkDoneProgressOptions):
    def __init__(self,
                 prepare_provider: Optional[bool] = False,
                 work_done_progress: Optional[ProgressToken] = None):
        super().__init__(work_done_progress)
        self.prepareProvider = prepare_provider


class RenameParams(TextDocumentPositionParams, WorkDoneProgressParams):
    def __init__(self,
                 text_document: TextDocumentIdentifier,
                 position: Position,
                 new_name: str,
                 work_done_token: Optional[bool] = None):
        TextDocumentPositionParams.__init__(self, text_document, position)
        WorkDoneProgressParams.__init__(self, work_done_token)
        self.newName = new_name
github openlawlibrary / pygls / pygls / types / language_features / hover.py View on Github external
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)
github openlawlibrary / pygls / pygls / types / language_features / declaration.py View on Github external
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)


class DeclarationParams(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)
github openlawlibrary / pygls / pygls / types / language_features / document_highlight.py View on Github external
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):
    Text = 1
    Read = 2
    Write = 3
github openlawlibrary / pygls / pygls / types / language_features / hover.py View on Github external
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],
                 range: Optional[Range] = None):
        self.contents = contents
        self.range = range
github openlawlibrary / pygls / pygls / types / language_features / signature_help.py View on Github external
def __init__(self,
                 text_document: TextDocumentIdentifier,
                 position: Position,
                 work_done_token: Optional[bool] = None,
                 context: Optional['SignatureHelpContext'] = None):
        TextDocumentPositionParams.__init__(self, text_document, position)
        WorkDoneProgressParams.__init__(self, work_done_token)
        self.context = context
github openlawlibrary / pygls / pygls / types / language_features / on_type_formatting.py View on Github external
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)
        self.ch = ch
        self.options = options
github openlawlibrary / pygls / pygls / types / language_features / definition.py View on Github external
class DefinitionClientCapabilities:
    def __init__(self,
                 dynamic_registration: Optional[bool] = False,
                 link_support: Optional[bool] = False):
        self.dynamicRegistration = dynamic_registration
        self.linkSupport = link_support


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


class DefinitionParams(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)