Skip to content

Commit

Permalink
fix: Modify get_lsp_info function
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalDevil committed Nov 5, 2023
1 parent c95843f commit 7d6d2bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lua/devil/configs/plugin/lualine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,11 @@ local fileformat = {

local lsp_info = {
utils.get_lsp_info,
icon = " LSP:",
color = { fg = colors.yellow, gui = "bold" },
icon = "󰒋 LSP:",
color = {
fg = colors.green,
gui = "bold",
},
}

ins_section("mode", "lualine_a")
Expand Down
7 changes: 6 additions & 1 deletion lua/devil/utils/lsp_tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ function M.async_formatting(bufnr)
end)
end

local proxy_lsps = {
["null-ls"] = true,
["efm"] = true,
["emmet_ls"] = true,
}
-- Determine whether the obtained LSP is a proxy LSP
---@param name string
---@return boolean
local function not_proxy_lsp(name)
return name ~= "null-ls" and name ~= "efm"
return not proxy_lsps[name]
end

-- Format getted LSP name
Expand Down

0 comments on commit 7d6d2bf

Please sign in to comment.