mirror of
https://git.aramjonghu.dev/AramJonghu/nvim.git
synced 2026-09-02 16:03:31 +02:00
stylua added rule
This commit is contained in:
+15
-16
@@ -1,7 +1,9 @@
|
||||
local fn = vim.fn
|
||||
|
||||
local function get_coc_lsp_client()
|
||||
local clients = vim.g.coc_service_initialized and vim.fn["CocAction"] "services" or {}
|
||||
local clients = vim.g.coc_service_initialized
|
||||
and vim.fn["CocAction"] "services"
|
||||
or {}
|
||||
for _, client in pairs(clients) do
|
||||
if client["state"] == "running" then
|
||||
local client_name = client["id"]
|
||||
@@ -14,9 +16,7 @@ local function get_coc_lsp_client()
|
||||
end
|
||||
|
||||
local function spell()
|
||||
if vim.o.spell then
|
||||
return string.format "[SPELL]"
|
||||
end
|
||||
if vim.o.spell then return string.format "[SPELL]" end
|
||||
|
||||
return ""
|
||||
end
|
||||
@@ -24,11 +24,10 @@ end
|
||||
--- show indicator for Chinese IME
|
||||
local function ime_state()
|
||||
if vim.g.is_mac then
|
||||
local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
|
||||
local layout =
|
||||
fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
|
||||
local res = fn.match(layout, [[\v(Squirrel\.Rime|SCIM.ITABC)]])
|
||||
if res ~= -1 then
|
||||
return "[CN]"
|
||||
end
|
||||
if res ~= -1 then return "[CN]" end
|
||||
end
|
||||
|
||||
return ""
|
||||
@@ -36,24 +35,21 @@ end
|
||||
|
||||
local diff = function()
|
||||
local git_status = vim.b.gitsigns_status_dict
|
||||
if git_status == nil then
|
||||
return
|
||||
end
|
||||
if git_status == nil then return end
|
||||
|
||||
local modify_num = git_status.changed
|
||||
local remove_num = git_status.removed
|
||||
local add_num = git_status.added
|
||||
|
||||
local info = { added = add_num, modified = modify_num, removed = remove_num }
|
||||
local info =
|
||||
{ added = add_num, modified = modify_num, removed = remove_num }
|
||||
-- vim.print(info)
|
||||
return info
|
||||
end
|
||||
|
||||
local virtual_env = function()
|
||||
-- only show virtual env for Python
|
||||
if vim.bo.filetype ~= "python" then
|
||||
return ""
|
||||
end
|
||||
if vim.bo.filetype ~= "python" then return "" end
|
||||
|
||||
local conda_env = os.getenv "CONDA_DEFAULT_ENV"
|
||||
local venv_path = os.getenv "VIRTUAL_ENV"
|
||||
@@ -116,7 +112,10 @@ require("lualine").setup {
|
||||
},
|
||||
lualine_y = {
|
||||
{ "encoding", fmt = string.upper },
|
||||
{ "fileformat", symbols = { unix = "", dos = "", mac = "" } },
|
||||
{
|
||||
"fileformat",
|
||||
symbols = { unix = "", dos = "", mac = "" },
|
||||
},
|
||||
"filetype",
|
||||
},
|
||||
lualine_z = { "progress" },
|
||||
|
||||
Reference in New Issue
Block a user