Skip to content

Instantly share code, notes, and snippets.

@krobelus
Last active February 11, 2022 14:07
Show Gist options
  • Save krobelus/88221fbf1db1f08f60028dd7774c6d2b to your computer and use it in GitHub Desktop.
Save krobelus/88221fbf1db1f08f60028dd7774c6d2b to your computer and use it in GitHub Desktop.
<?php
namespace namespace1;
class sometype {
}
?>
<?php
namespace namespace2;
class sometype {
}
?>
<?php
some // Completions are:
// sometype [namespace1] Class
// sometype Class
/* kak-lsp verbose log shows that we send the completions to Kakoune:
set window lsp_completions 14.1@9
'sometype|set-option window lsp_completions_selected_item 0; info -markup -style menu -- %§namespace namespace2§|sometype {MenuInfo}Class'
'Namespace1Sometype|set-option window lsp_completions_selected_item 1; info -markup -style menu -- %§use namespace1\\\\sometype as Namespace1Sometype§|sometype [namespace1] {MenuInfo}Class'
Observe that the second one inserts Namespace1Sometype (which is the import alias chosen by intelephense).
*/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment