Skip to content

Commit

Permalink
Merge pull request #56 from TD-Sky/v2
Browse files Browse the repository at this point in the history
fix(font): replace removed characters with valids
  • Loading branch information
JuanZoran authored Apr 21, 2024
2 parents 98507fa + dd1fe3c commit 3ebcd7b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ use {
build = function () require'Trans'.install() end,
keys = {
-- 可以换成其他你想映射的键
{ 'mm', mode = { 'n', 'x' }, '<Cmd>Translate<CR>', desc = ' Translate' },
{ 'mm', mode = { 'n', 'x' }, '<Cmd>Translate<CR>', desc = '󰊿 Translate' },
{ 'mk', mode = { 'n', 'x' }, '<Cmd>TransPlay<CR>', desc = ' Auto Play' },
-- 目前这个功能的视窗还没有做好,可以在配置里将view.i改成hover
{ 'mi', '<Cmd>TranslateInput<CR>', desc = ' Translate From Input' },
{ 'mi', '<Cmd>TranslateInput<CR>', desc = '󰊿 Translate From Input' },
},
dependencies = { 'kkharji/sqlite.lua', },
opts = {
Expand Down Expand Up @@ -259,7 +259,7 @@ default_conf = {
border = 'rounded',
title = vim.fn.has 'nvim-0.9' == 1 and {
{ '', 'TransTitleRound' },
{ ' Trans', 'TransTitle' },
{ '󰊿 Trans', 'TransTitle' },
{ '', 'TransTitleRound' },
} or nil, -- need nvim-0.9+
auto_play = true,
Expand Down Expand Up @@ -326,7 +326,7 @@ default_conf = {
-- or use emoji
list = '', -- ● | ○ | ◉ | ◯ | ◇ | ◆ | ▪ | ▫ | ⬤ | 🟢 | 🟡 | 🟣 | 🟤 | 🟠| 🟦 | 🟨 | 🟧 | 🟥 | 🟪 | 🟫 | 🟩 | 🟦
star = '', -- ⭐ | ✴ | ✳ | ✲ | ✱ | ✰ | ★ | ☆ | 🌟 | 🌠 | 🌙 | 🌛 | 🌜 | 🌟 | 🌠 | 🌌 | 🌙 |
notfound = ' ', --❔ | ❓ | ❗ | ❕|
notfound = '󰆆 ', --❔ | ❓ | ❗ | ❕|
yes = '', -- ✅ | ✔️ | ☑
no = '', -- ❌ | ❎ | ✖ | ✘ | ✗ |
cell = '', -- ■ | □ | ▇ | ▏ ▎ ▍ ▌ ▋ ▊ ▉
Expand Down
8 changes: 4 additions & 4 deletions doc/Trans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Packer.nvim ~
requires = { 'kkharji/sqlite.lua', },
config = function()
require("Trans").setup {} -- 启动Trans
vim.keymap.set({"n", 'x'}, "mm", '<Cmd>Translate<CR>', { desc = ' Translate' }) -- 自动判断virtual 还是 normal 模式
vim.keymap.set({"n", 'x'}, "mm", '<Cmd>Translate<CR>', { desc = '󰊿 Translate' }) -- 自动判断virtual 还是 normal 模式
vim.keymap.set({'n', 'x'}, 'mk', '<Cmd>TransPlay<CR>', {desc = ' 自动发音'}) -- 自动发音选中或者光标下的单词
end
}
Expand All @@ -142,11 +142,11 @@ Lazy.nvim ~
"JuanZoran/Trans.nvim",
keys = {
-- 可以换成其他你想映射的键
{ 'mm', mode = { 'n', 'x' }, '<Cmd>Translate<CR>', desc = ' Translate' },
{ 'mm', mode = { 'n', 'x' }, '<Cmd>Translate<CR>', desc = '󰊿 Translate' },
{ 'mk', mode = { 'n', 'x' }, '<Cmd>TransPlay<CR>', desc = ' 自动发音' },

-- 目前这个功能的视窗还没有做好,可以在配置里将view.i改成hover
{ 'mi', '<Cmd>TranslateInput<CR>', desc = ' Translate From Input' },
{ 'mi', '<Cmd>TranslateInput<CR>', desc = '󰊿 Translate From Input' },
},
dependencies = { 'kkharji/sqlite.lua', },
opts = {
Expand Down Expand Up @@ -301,7 +301,7 @@ Festival配置(仅针对linux用户) ~
-- or use emoji
list = '●', -- ● ||||||||| 🟢 | 🟡 | 🟣 | 🟤 | 🟦 | 🟨 | 🟧 | 🟥 | 🟪 | 🟫 | 🟩 | 🟠 | 🟦 | 🟨 | 🟧 | 🟥 | 🟪 | 🟫 | 🟩 | 🟠
star = '', -- ⭐ |||||||| 🌟 | 🌠 | 🌙 | 🌛 | 🌜 | 🌟 | 🌠 | 🌌 | 🌙 |
notfound = ' ', --❔ ||||
notfound = '󰆆 ', --❔ ||||
yes = '✔', -- ✅ | ✔️ |
no = '', -- ❌ |||| ✗ |
cell = '■', -- ■ || ▇ | ▏ ▎ ▍ ▌ ▋ ▊ ▉ █
Expand Down
4 changes: 2 additions & 2 deletions lua/Trans/core/conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ return {
border = 'rounded',
title = vim.fn.has 'nvim-0.9' == 1 and {
{ '', 'TransTitleRound' },
{ ' Trans', 'TransTitle' },
{ '󰊿 Trans', 'TransTitle' },
{ '', 'TransTitleRound' },
} or nil, -- need nvim-0.9+
auto_play = true,
Expand Down Expand Up @@ -91,7 +91,7 @@ return {
-- or use emoji
list = '', -- ● | ○ | ◉ | ◯ | ◇ | ◆ | ▪ | ▫ | ⬤ | 🟢 | 🟡 | 🟣 | 🟤 | 🟠| 🟦 | 🟨 | 🟧 | 🟥 | 🟪 | 🟫 | 🟩 | 🟦
star = '', -- ⭐ | ✴ | ✳ | ✲ | ✱ | ✰ | ★ | ☆ | 🌟 | 🌠 | 🌙 | 🌛 | 🌜 | 🌟 | 🌠 | 🌌 | 🌙 |
notfound = ' ', --❔ | ❓ | ❗ | ❕|
notfound = '󰆆 ', --❔ | ❓ | ❗ | ❕|
yes = '', -- ✅ | ✔️ | ☑
no = '', -- ❌ | ❎ | ✖ | ✘ | ✗ |
cell = '', -- ■ | □ | ▇ | ▏ ▎ ▍ ▌ ▋ ▊ ▉
Expand Down
4 changes: 2 additions & 2 deletions plugin/Trans.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ local Trans = require 'Trans'
local command = api.nvim_create_user_command

command('Translate', function() Trans.translate() end,
{ desc = ' Translate cursor word' })
{ desc = '󰊿 Translate cursor word' })


command('TranslateInput', function() Trans.translate { mode = 'i' } end,
{ desc = ' Translate input word' })
{ desc = '󰊿 Translate input word' })

command('TransPlay', function()
local util = Trans.util
Expand Down

0 comments on commit 3ebcd7b

Please sign in to comment.