1
0
Fork 0

nvim: statusline: display function after filename

This commit is contained in:
tastytea 2022-08-28 21:12:57 +02:00
parent 4a72940690
commit 4fb84796ca
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 7 additions and 5 deletions

View File

@ -130,10 +130,6 @@ function M.lsp_status()
end
end
local current_function = vim.b.lsp_current_function
if current_function and current_function ~= '' then
status = status .. '(' .. current_function .. ')'
end
return status
end

View File

@ -80,7 +80,13 @@ require('lualine').setup({
{ 'require("my.functions").lsp_status()', padding = 0 },
{ 'diagnostics' }
},
lualine_c = { { 'filename', path = 1 } },
lualine_c = { { 'filename', path = 1 }, { function()
local curfun = vim.b.lsp_current_function
if curfun and curfun ~= '' then
return '(' .. curfun .. ')'
end
return ''
end, padding = 0, color = 'StatusLineNC' } },
lualine_x = { { 'filetype' } },
lualine_y = { { 'progress' } },
lualine_z = { { 'location' }, { '"🍄"', padding = 0 }