add codecompanin and change theme

This commit is contained in:
gameloader
2024-11-08 15:53:41 +08:00
parent 51cd63ca77
commit 6ec596314c
10 changed files with 171 additions and 114 deletions

View File

@ -1,3 +0,0 @@
require("bufferline").setup({
options = {},
})

View File

@ -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