mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Fix lua_ls diagnostic warnings
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local totalLines = vim.api.nvim_buf_line_count(0)
|
||||
local foldedLines = endLnum - lnum
|
||||
local suffix = (" %d"):format(foldedLines)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
|
||||
@@ -127,6 +127,7 @@ local get_active_lsp = function()
|
||||
end
|
||||
|
||||
for _, client in ipairs(clients) do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
@@ -149,7 +150,7 @@ require("lualine").setup {
|
||||
lualine_b = {
|
||||
{
|
||||
"branch",
|
||||
fmt = function(name, context)
|
||||
fmt = function(name, _)
|
||||
-- truncate branch name in case the name is too long
|
||||
return string.sub(name, 1, 20)
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user