add codecompanin and change theme
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
require("bufferline").setup({
|
||||
options = {},
|
||||
})
|
@ -1,14 +1,14 @@
|
||||
-- 显示lsp_name
|
||||
local function lsp_name()
|
||||
local msg = "No Active Lsp"
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
local buf_ft = vim.api.nvim_get_option_value("filetype", { buf = 0 })
|
||||
local clients = vim.lsp.get_clients({ bufnr = 0 })
|
||||
if #clients == 0 then
|
||||
return msg
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
if filetypes and vim.tbl_contains(filetypes, buf_ft) then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user