mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:30:05 +08:00
perf(stl): add input_method function
This commit is contained in:
parent
2d9fb315bb
commit
2fea2697e6
@ -163,7 +163,16 @@ local function buffer_name()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function input_method() end
|
local function input_method()
|
||||||
|
if vim.fn.executable('fcitx-remote') == 1 then
|
||||||
|
if vim.fn.system('fcitx-remote') == 1 then
|
||||||
|
return ' cn '
|
||||||
|
else
|
||||||
|
return ' en '
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ''
|
||||||
|
end
|
||||||
|
|
||||||
local function syntax_checking() end
|
local function syntax_checking() end
|
||||||
|
|
||||||
@ -287,14 +296,17 @@ local function current_tag()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M._current_tag()
|
function M._current_tag()
|
||||||
|
|
||||||
local tag = ''
|
local tag = ''
|
||||||
pcall(function()
|
pcall(function()
|
||||||
-- current tag should be show only after vimenter
|
-- current tag should be show only after vimenter
|
||||||
-- @fixme this make sure tagbar has been loaded
|
-- @fixme this make sure tagbar has been loaded
|
||||||
-- because when first run tagbar, it needs long time.
|
-- because when first run tagbar, it needs long time.
|
||||||
-- and also there no syntax highlight when first time open file.
|
-- and also there no syntax highlight when first time open file.
|
||||||
if vim.g._spacevim_after_vimenter == 1 and vim.g.spacevim_enable_statusline_tag == 1 and vim.g.loaded_tagbar == 1 then
|
if
|
||||||
|
vim.g._spacevim_after_vimenter == 1
|
||||||
|
and vim.g.spacevim_enable_statusline_tag == 1
|
||||||
|
and vim.g.loaded_tagbar == 1
|
||||||
|
then
|
||||||
tag = vim.fn['tagbar#currenttag']('%s ', '')
|
tag = vim.fn['tagbar#currenttag']('%s ', '')
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user