mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
Updated Recipes (markdown)
parent
c3665b1b66
commit
f1e945e2b2
1 changed files with 10 additions and 5 deletions
15
Recipes.md
15
Recipes.md
|
|
@ -18,14 +18,14 @@ require("rose-pine").setup({
|
|||
|
||||
## Rose-pine custom statusline
|
||||
|
||||

|
||||
|
||||
### dependencies
|
||||
|
||||
- [gitsigns](lewis6991/gitsigns.nvim)
|
||||
- [lsp](neovim/nvim-lspconfig)
|
||||
- [nerd-font](https://www.nerdfonts.com/)
|
||||
|
||||

|
||||
|
||||
<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 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue