Updated Recipes (markdown)

Max Del Canto 2024-01-28 16:24:10 -03:00
commit f1e945e2b2

@ -18,14 +18,14 @@ require("rose-pine").setup({
## Rose-pine custom statusline
![Captura de tela de 2024-01-28 16-21-39](https://github.com/rose-pine/neovim/assets/50273941/7cd3a342-80b1-4454-8884-8e019b0daa32)
### dependencies
- [gitsigns](lewis6991/gitsigns.nvim)
- [lsp](neovim/nvim-lspconfig)
- [nerd-font](https://www.nerdfonts.com/)
![Captura de tela de 2024-01-28 16-08-02](https://github.com/rose-pine/neovim/assets/50273941/b7f2b7e5-121c-4b75-8f1e-5448f1e5c722)
<details>
<summary>source code</summary>
@ -80,8 +80,8 @@ local function set_highlight()
hl(0, group .. 'DiagnosticWarn', { fg = colors.gold, reverse = true })
hl(0, group .. 'DiagnosticHint', { fg = colors.iris, reverse = true })
hl(0, group .. 'DiagnosticInfo', { fg = colors.foam, reverse = true })
hl(0, group .. 'Lsp', { fg = colors.gold, bg = colors.base })
hl(0, group .. 'LspReverse', { fg = colors.gold, reverse = true })
hl(0, group .. 'Lsp', { fg = colors.foam, bg = colors.base })
hl(0, group .. 'LspReverse', { fg = colors.foam, reverse = true })
hl(0, group .. 'Info', { fg = colors.foam, bg = colors.base })
hl(0, group .. 'InfoReverse', { fg = colors.foam, reverse = true })
end
@ -176,9 +176,10 @@ local function layout_d()
local bufnr = vim.api.nvim_get_current_buf()
local clients = vim.lsp.get_active_clients { bufnr = bufnr }
local client_name = ''
local default_msg = icons.diagnostic.Ok .. ' No Active Client'
if clients and vim.tbl_isempty(clients) then
return icons.diagnostic.Ok .. ' No Active Client'
return default_msg
end
for _, client in pairs(clients) do
@ -187,6 +188,10 @@ local function layout_d()
end
end
if client_name == '' then
return default_msg
end
local errors = #vim.diagnostic.get(bufnr, { severity = vim.diagnostic.severity.ERROR })
local warnings = #vim.diagnostic.get(bufnr, { severity = vim.diagnostic.severity.WARN })
local hints = #vim.diagnostic.get(bufnr, { severity = vim.diagnostic.severity.HINT })