fix: fix config and command name
This commit is contained in:
parent
324fd23010
commit
724d37b1c2
@ -46,7 +46,7 @@
|
|||||||
```lua
|
```lua
|
||||||
use {
|
use {
|
||||||
'JuanZoran/Trans.nvim'
|
'JuanZoran/Trans.nvim'
|
||||||
run = 'install.sh',
|
run = 'bash ./install.sh',
|
||||||
requires = 'kharji/sqlite.lua',
|
requires = 'kharji/sqlite.lua',
|
||||||
-- 如果你不需要任何配置的话, 可以直接按照下面的方式启动
|
-- 如果你不需要任何配置的话, 可以直接按照下面的方式启动
|
||||||
config = require'Trans'.setup{}
|
config = require'Trans'.setup{}
|
||||||
@ -114,7 +114,7 @@ require'Trans'.setup{
|
|||||||
> 示例中展示, 将`mm`映射成快捷键
|
> 示例中展示, 将`mm`映射成快捷键
|
||||||
```lua
|
```lua
|
||||||
-- normal-mode
|
-- normal-mode
|
||||||
vim.keymap.set('n', 'mm', '<Cmd>TranslateCurosorWord<CR>')
|
vim.keymap.set('n', 'mm', '<Cmd>TranslateCursorWord<CR>')
|
||||||
|
|
||||||
-- visual-mode
|
-- visual-mode
|
||||||
vim.keymap.set('v', 'mm', '<Esc><Cmd>TranslateSelectWord<CR>')
|
vim.keymap.set('v', 'mm', '<Esc><Cmd>TranslateSelectWord<CR>')
|
||||||
|
@ -2,7 +2,7 @@ local db = require("Trans").db
|
|||||||
-- local conf = require("Trans").conf
|
-- 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, {})
|
vim.api.nvim_create_user_command('TranslateSelectWord', require("Trans.display").query_select, {})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user