fix: fix config and command name

This commit is contained in:
JuanZoran 2022-12-21 17:17:00 +08:00
parent 324fd23010
commit 724d37b1c2
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@
```lua
use {
'JuanZoran/Trans.nvim'
run = 'install.sh',
run = 'bash ./install.sh',
requires = 'kharji/sqlite.lua',
-- 如果你不需要任何配置的话, 可以直接按照下面的方式启动
config = require'Trans'.setup{}
@ -114,7 +114,7 @@ require'Trans'.setup{
> 示例中展示, 将`mm`映射成快捷键
```lua
-- normal-mode
vim.keymap.set('n', 'mm', '<Cmd>TranslateCurosorWord<CR>')
vim.keymap.set('n', 'mm', '<Cmd>TranslateCursorWord<CR>')
-- visual-mode
vim.keymap.set('v', 'mm', '<Esc><Cmd>TranslateSelectWord<CR>')

View File

@ -2,7 +2,7 @@ local db = require("Trans").db
-- local conf = require("Trans").conf
vim.api.nvim_create_user_command('TranslateCurosorWord', require("Trans.display").query_cursor, {})
vim.api.nvim_create_user_command('TranslateCursorWord', require("Trans.display").query_cursor, {})
vim.api.nvim_create_user_command('TranslateSelectWord', require("Trans.display").query_select, {})