style: modify title style

This commit is contained in:
JuanZoran 2023-01-16 00:27:12 +08:00
parent 51313663b5
commit 2c57923f6a
3 changed files with 10 additions and 4 deletions

View File

@ -57,9 +57,11 @@ end
local function expl(c, text) local function expl(c, text)
local wrapper = c:text_wrapper() local wrapper = c:text_wrapper()
wrapper('', 'TransTitleRound') -- wrapper('', 'TransTitleRound')
wrapper('', 'TransTitleRound')
wrapper(text, 'TransTitle') wrapper(text, 'TransTitle')
wrapper('', 'TransTitleRound') -- wrapper('', 'TransTitleRound')
wrapper('', 'TransTitleRound')
end end
local indent = ' ' local indent = ' '

View File

@ -27,6 +27,7 @@ local function get_word(method)
if method == 'n' then if method == 'n' then
return vim.fn.expand('<cword>') return vim.fn.expand('<cword>')
elseif method == 'v' then elseif method == 'v' then
vim.api.nvim_input('<ESC>')
return get_select() return get_select()
elseif method == 'input' then elseif method == 'input' then
-- TODO Use Telescope with fuzzy finder -- TODO Use Telescope with fuzzy finder

View File

@ -26,7 +26,9 @@ function M.init(view)
border = conf.window.border, border = conf.window.border,
title = { title = {
{ '', 'TransTitleRound' }, { '', 'TransTitleRound' },
-- { '', 'TransTitleRound' },
{ conf.icon.title .. ' Trans', 'TransTitle' }, { conf.icon.title .. ' Trans', 'TransTitle' },
-- { '', 'TransTitleRound' },
{ '', 'TransTitleRound' }, { '', 'TransTitleRound' },
}, },
title_pos = 'center', title_pos = 'center',
@ -122,17 +124,18 @@ M.close = function()
-- Wait animation done -- Wait animation done
vim.defer_fn(function () vim.defer_fn(function ()
api.nvim_win_close(M.id, true) api.nvim_win_close(M.id, true)
end, 10) end, 15)
end end
end end
vim.defer_fn(narrow, 10)
narrow()
else else
api.nvim_win_close(M.id, true) api.nvim_win_close(M.id, true)
end end
end end
end end
M.show = function() M.show = function()
M.init(M.view or 'float') M.init(M.view or 'float')
M.load_opts() M.load_opts()