Skip to content

Commit f47a6d6

Browse files
authored
Merge pull request #31 from yeger00/fix_preselect
CompletionItem: change presented to preselect
2 parents 82c174c + 8a72c64 commit f47a6d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pylspclient/lsp_structs.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,15 @@ class InsertTextFormat(object):
428428
class CompletionItem(object):
429429
"""
430430
"""
431-
def __init__(self, label, kind=None, detail=None, documentation=None, deprecated=None, presented=None, sortText=None, filterText=None, insertText=None, insertTextFormat=None, textEdit=None, additionalTextEdits=None, commitCharacters=None, command=None, data=None, score=0.0):
431+
def __init__(self, label, kind=None, detail=None, documentation=None, deprecated=None, preselect=None, sortText=None, filterText=None, insertText=None, insertTextFormat=None, textEdit=None, additionalTextEdits=None, commitCharacters=None, command=None, data=None, score=0.0):
432432
"""
433433
:param str label: The label of this completion item. By default also the text that is inserted when selecting
434434
this completion.
435435
:param int kind: The kind of this completion item. Based of the kind an icon is chosen by the editor.
436436
:param str detail: A human-readable string with additional information about this item, like type or symbol information.
437437
:param tr ocumentation: A human-readable string that represents a doc-comment.
438438
:param bool deprecated: Indicates if this item is deprecated.
439-
:param bool presented: Select this item when showing. Note: that only one completion item can be selected and that the
439+
:param bool preselect: Select this item when showing. Note: that only one completion item can be selected and that the
440440
tool / client decides which item that is. The rule is that the first item of those that match best is selected.
441441
:param str sortText: A string that should be used when comparing this item with other items. When `falsy` the label is used.
442442
:param str filterText: A string that should be used when filtering a set of completion items. When `falsy` the label is used.
@@ -468,7 +468,7 @@ def __init__(self, label, kind=None, detail=None, documentation=None, deprecated
468468
self.detail = detail
469469
self.documentation = documentation
470470
self.deprecated = deprecated
471-
self.presented = presented
471+
self.preselect = preselect
472472
self.sortText = sortText
473473
self.filterText = filterText
474474
self.insertText = insertText

0 commit comments

Comments
 (0)