Closed romainfrancois closed 7 years ago
I've already added the emo::ji_completion function:
emo::ji_completion
> emo::ji_completion("cat") πΊ πΈ πΉ π» πΌ π½ π πΏ πΎ π± π πΈ βοΈ
given part of the alias , e.g. pull( emo::jis, aliases) or names( emo::ji_name ) it sends back the emojis to complete it.
pull( emo::jis, aliases)
names( emo::ji_name )
Now we need to figure out how to call ji_completion from rstudio. I've been playing with this on my fork: https://github.com/romainfrancois/rstudio/tree/emoji_completion
ji_completion
.original.rs.getCompletionsFile <- .rs.getCompletionsFile assign( ".rs.getCompletionsFile", function (token, path = getwd(), quote = FALSE, directoriesOnly = FALSE) { if( grepl( ".*[:]", token ) ){ tok <- sub( ".*[:]", "", token) start <- sub( "[:].*", "", token) .rs.makeCompletions( token = token , results = paste0( start, emo::ji_completion(tok) ) , excludeOtherCompletions = TRUE, type= .rs.acCompletionTypes$STRING, quote = FALSE ) } else { .original.rs.getCompletionsFile( token, path, quote, directoriesOnly ) } }, as.environment("tools:rstudio") )
Thing is, rstudio is huge, and I don't get everything in the code base π±
places where we might like completions:
This is not really an emo issue, but that's easier to track this here.
emo
PR sent to rstudio. https://github.com/rstudio/rstudio/pull/1462
I've already added the
emo::ji_completion
function:given part of the alias , e.g.
pull( emo::jis, aliases)
ornames( emo::ji_name )
it sends back the emojis to complete it.Now we need to figure out how to call
ji_completion
from rstudio. I've been playing with this on my fork: https://github.com/romainfrancois/rstudio/tree/emoji_completionThing is, rstudio is huge, and I don't get everything in the code base π±
places where we might like completions:
This is not really an
emo
issue, but that's easier to track this here.