-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(completion): don't suggest <?php on > characer
closes #372
- Loading branch information
1 parent
1ec8d8d
commit 3cf3401
Showing
6 changed files
with
112 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace LanguageServer\Protocol; | ||
|
||
/** | ||
* Contains additional information about the context in which a completion request is triggered. | ||
*/ | ||
class CompletionContext | ||
{ | ||
/** | ||
* How the completion was triggered. | ||
* | ||
* @var int | ||
*/ | ||
public $triggerKind; | ||
|
||
/** | ||
* The trigger character (a single character) that has trigger code complete. | ||
* Is null if `triggerKind !== CompletionTriggerKind::TRIGGER_CHARACTER` | ||
* | ||
* @var string|null | ||
*/ | ||
public $triggerCharacter; | ||
|
||
public function __construct(int $triggerKind, string $triggerCharacter = null) | ||
{ | ||
$this->triggerKind = $triggerKind; | ||
$this->triggerCharacter = $triggerCharacter; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace LanguageServer\Protocol; | ||
|
||
class CompletionTriggerKind | ||
{ | ||
/** | ||
* Completion was triggered by invoking it manuall or using API. | ||
*/ | ||
const INVOKED = 1; | ||
|
||
/** | ||
* Completion was triggered by a trigger character. | ||
*/ | ||
const TRIGGER_CHARACTER = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters