aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-06-23 11:59:03 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2023-06-23 12:25:55 +0200
commit072d828d763940d3f12e1fa621eef1bcbf9bd288 (patch)
tree22cc04d83f82adcb433fe6c129f947622cb9358c /wee_slack.py
parent290eecac062db139dd17ebce5cd6b19ac53f5c18 (diff)
downloadwee-slack-072d828d763940d3f12e1fa621eef1bcbf9bd288.tar.gz
Automatically enable emoji/usergroups completion
Automatically set completion_default_template on wee-slack buffers, so emojis and usergroups can be tab completed without having to set weechat.completion.default_template manually.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 6dae8af..1d18126 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1694,6 +1694,11 @@ class SlackTeam(object):
w.buffer_set(self.channel_buffer, "localvar_set_slack_type", self.type)
w.buffer_set(self.channel_buffer, "localvar_set_nick", self.nick)
w.buffer_set(self.channel_buffer, "localvar_set_server", self.name)
+ w.buffer_set(
+ self.channel_buffer,
+ "localvar_set_completion_default_template",
+ "${weechat.completion.default_template}|%(usergroups)|%(emoji)",
+ )
self.buffer_merge()
def buffer_merge(self, config_value=None):
@@ -2421,6 +2426,11 @@ class SlackChannel(SlackChannelCommon):
self.channel_buffer, "localvar_set_channel", self.formatted_name()
)
w.buffer_set(self.channel_buffer, "localvar_set_nick", self.team.nick)
+ w.buffer_set(
+ self.channel_buffer,
+ "localvar_set_completion_default_template",
+ "${weechat.completion.default_template}|%(usergroups)|%(emoji)",
+ )
self.buffer_rename_in_progress = True
w.buffer_set(
self.channel_buffer, "short_name", self.formatted_name(style="sidebar")
@@ -3212,6 +3222,11 @@ class SlackThreadChannel(SlackChannelCommon):
self.channel_buffer, "localvar_set_channel", self.formatted_name()
)
w.buffer_set(self.channel_buffer, "localvar_set_server", self.team.name)
+ w.buffer_set(
+ self.channel_buffer,
+ "localvar_set_completion_default_template",
+ "${weechat.completion.default_template}|%(usergroups)|%(emoji)",
+ )
self.buffer_rename_in_progress = True
w.buffer_set(
self.channel_buffer, "short_name", self.formatted_name(style="sidebar")