From adec84ec3d0b7d867a28b3545013bc7da2946db5 Mon Sep 17 00:00:00 2001 From: Samuel K <62254492+ExtinctAxolotl@users.noreply.github.com> Date: Fri, 17 Dec 2021 20:38:22 +0100 Subject: [PATCH] Support for LspSaga (#48) * lspsaga: update readme add lspsaga to the readme * feat: code actions and diagnostics hl-groups Highlight groups for: - code actions - diagnostics * feat(nvim): add some more colors Adding some more lspsaga colors. * feat(lspsaga): finishing touches Add the finihing touches and add the last needed highlightgroups Disclaimer: Preview Definitions still don't work * style(lspsaga): remove comments and rearrange Remove uneeded comments and rearrange some code * fix(lspsaga): preview definitions Preview Definitions now get highlighted! Why? Because it's *Definitions* not *Defintions* * feat(lspsaga): add one new highlight Add LspSagaBorderTitle highlight * fix(lspsaga): remove lspsaga.norg * style(lspsaga): rearrange diagnostic highlights Rearrange `DiagnosticInformation` and `DiagnosticWarning` to their respective spots * Revert "Merge branch 'main' into main" This reverts commit 5d26b3da8b64630543de126e8557900330b629a9, reversing changes made to 79c84ef6d430a317bc9a5d52dad2e05bcc9573b9. * lspsaga: update readme add lspsaga to the readme * feat: code actions and diagnostics hl-groups Highlight groups for: - code actions - diagnostics * style(lspsaga): remove comments and rearrange Remove uneeded comments and rearrange some code * style(lspsaga): rearrange diagnostic highlights Rearrange `DiagnosticInformation` and `DiagnosticWarning` to their respective spots * Revert "Merge branch 'main' into main" This reverts commit 5d26b3da8b64630543de126e8557900330b629a9, reversing changes made to 79c84ef6d430a317bc9a5d52dad2e05bcc9573b9. * fix(lspsaga): add missing diagnostc groups * style(lspsaga): format with stylua * chore: format Co-authored-by: mvllow --- lua/rose-pine/theme.lua | 40 ++++++++++++++++++++++++++++++++++++++++ readme.md | 1 + 2 files changed, 41 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 815fcfb..3337bb9 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -176,7 +176,9 @@ local theme = { DiagnosticHint = { fg = config.colors.hint }, DiagnosticInfo = { fg = config.colors.info }, + DiagnosticInformation = { link = 'DiagnosticInfo' }, DiagnosticWarn = { fg = config.colors.warn }, + DiagnosticWarning = { link = 'DiagnosticWarn' }, DiagnosticError = { fg = config.colors.error }, DiagnosticDefaultHint = { fg = config.colors.hint }, DiagnosticDefaultInfo = { fg = config.colors.info }, @@ -428,6 +430,44 @@ local theme = { NeorgHeading6Title = { fg = config.colors.headings.h6, style = 'bold' }, NeorgMarkerTitle = { fg = p.text, style = 'bold' }, + -- LspSaga + -- https://github.com/tami5/lspsaga.nvim (fork of https://github.com/glepnir/lspsaga.nvim) + LspSagaCodeActionTitle = { + fg = p.gold, + style = 'bold', + }, + LspSagaCodeActionBorder = { fg = p.subtle }, + LspSagaCodeActionTruncateLine = { link = 'LspSagaCodeActionBorder' }, + LspSagaCodeActionContent = { fg = p.foam }, + LspSagaDiagnosticBorder = { fg = p.subtle }, + LspSagaDiagnosticHeader = { + fg = p.gold, + style = 'bold', + }, + LspSagaDiagnosticTruncateLine = { link = 'LspSagaDiagnosticBorder' }, + LspSagaFinderSelection = { fg = p.gold }, + LspSagaLspFinderBorder = { fg = p.subtle }, + LspSagaAutoPreview = { fg = p.subtle }, + LspSagaDefPreviewBorder = { fg = p.subtle }, + DefinitionIcon = { fg = p.rose }, + DefinitionCount = { fg = p.rose }, + ReferencesCount = { fg = p.rose }, + ReferencesIcon = { fg = p.rose }, + DefintionPreviewTitle = { + fg = p.rose, + style = 'bold', + }, + LspSagaRenamePromptPrefix = { fg = p.love }, + LspSagaRenameBorder = { fg = p.pine }, + LspFloatWinNormal = { bg = p.base }, + LspFloatWinBorder = { fg = p.subtle }, + LspSagaDocTruncateLine = { link = 'LspSagaHoverBorder' }, + LspSagaHoverBorder = { fg = p.subtle }, + LspSagaSignatureHelpBorder = { fg = p.pine }, + LspSagaShTruncateLine = { link = 'LspSagaSignatureHelpBorder' }, + TargetWord = { fg = p.iris }, + + SagaShadow = { bg = p.overlay }, } vim.g.terminal_color_0 = p.overlay -- black diff --git a/readme.md b/readme.md index 5b7d666..1fad0f7 100644 --- a/readme.md +++ b/readme.md @@ -38,6 +38,7 @@ use({ - **[Indent-Blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim)** - **[Neogit](https://github.com/TimUntersberger/neogit)** - **[Neorg](https://github.com/nvim-neorg/neorg)** +- **[Lspsaga](https://github.com/tami5/lspsaga.nvim)** - **[Lualine](https://github.com/hoob3rt/lualine.nvim)** ```lua require('lualine').setup({