1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

docs(gitter): add doc for gitter_token

This commit is contained in:
wsdjeg 2022-04-30 13:28:01 +08:00
parent d3d49b2a8b
commit 4f82741d7a
2 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,7 @@ endif
let s:chat_address = '127.0.0.1'
let s:chat_port = 8080
let s:chat_client_jar = fnamemodify(expand('<sfile>:p:h:h:h:h') . '/bundle/Chatting-server/target/Chatting-1.0-SNAPSHOT.jar', ':gs?[\\/]?/?')
let s:gitter_token = ''
function! SpaceVim#layers#chat#plugins() abort
return [
@ -41,6 +42,7 @@ function! SpaceVim#layers#chat#set_variable(opt) abort
let s:chat_address = get(a:opt, 'chat_address', s:chat_address)
let s:chat_port = get(a:opt, 'chat_port', s:chat_port)
let s:chat_client_jar = get(a:opt, 'chat_client_jar', s:chat_client_jar)
let s:gitter_token = get(a:opt, 'gitter_token', s:gitter_token)
endfunction
function! SpaceVim#layers#chat#get_options() abort
@ -53,6 +55,7 @@ function! SpaceVim#layers#chat#config() abort
let g:chatting_server_ip = s:chat_address
let g:chatting_server_port = s:chat_port
let g:chatting_server_lib = s:chat_client_jar
let g:chat_gitter_token = s:gitter_token
call SpaceVim#mapping#space#def('nnoremap', ['a', 'h'], 'call chat#windows#open()', 'open-chat-window', 1)
endfunction

View File

@ -10,6 +10,7 @@ description: "SpaceVim chatting layer provides chatting with weixin in vim."
- [Description](#description)
- [Install](#install)
- [Layer options](#layer-options)
- [Key Mappings](#key-mappings)
<!-- vim-markdown-toc -->
@ -29,6 +30,10 @@ To use this configuration layer, add the following snippet to your custom config
name = "chat"
```
## Layer options
1. `gitter_token`: set the token to your gitter account.
## Key Mappings
`Alt + w` : open chatting buffer for weixin.