Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat(native_lsp): add ability to disable background for inlay hints" #524

Merged
merged 1 commit into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ coc_nvim = true,

In the inners tables you can set the style for the diagnostics, both `virtual_text` (what you see on the side) and `underlines` (what points directly at the thing (e.g. an error)).

```lua
```
native_lsp = {
enabled = true,
virtual_text = {
Expand All @@ -424,9 +424,6 @@ native_lsp = {
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
```

Expand Down Expand Up @@ -934,9 +931,6 @@ native_lsp = {
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
```

Expand Down
8 changes: 1 addition & 7 deletions doc/catppuccin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ In the inners tables you can set the style for the diagnostics, both
`virtual_text` (what you see on the side) and `underlines` (what points
directly at the thing (e.g. an error)).

>lua
>
native_lsp = {
enabled = true,
virtual_text = {
Expand All @@ -354,9 +354,6 @@ directly at the thing (e.g. an error)).
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
<

Expand Down Expand Up @@ -633,9 +630,6 @@ nvim-lspconfig>lua
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
<

Expand Down
4 changes: 1 addition & 3 deletions lua/catppuccin/groups/integrations/native_lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ local M = {}
function M.get()
local virtual_text = O.integrations.native_lsp.virtual_text
local underlines = O.integrations.native_lsp.underlines
local inlay_hints = O.integrations.native_lsp.inlay_hints

local error = C.red
local warning = C.yellow
Expand Down Expand Up @@ -89,8 +88,7 @@ function M.get()
-- fg of `Comment`
fg = C.overlay0,
-- bg of `CursorLine`
bg = O.transparent_background
or not inlay_hints.background and C.none
bg = O.transparent_background and C.none
or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)),
}, -- virtual text of the inlay hints
LspInfoBorder = { link = "FloatBorder" }, -- LspInfo border
Expand Down
3 changes: 0 additions & 3 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ local M = {
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
navic = {
enabled = false,
Expand Down
4 changes: 0 additions & 4 deletions lua/catppuccin/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
---@field warnings CtpHighlightArgs[] Change the style of LSP warnings.
---@field information CtpHighlightArgs[] Change the style of LSP information.

---@class CtpNativeLspInlayHints
---@field background boolean Toggle the background of inlay hints.

---@class CtpIntegrations
---@field alpha boolean
---@field barbecue CtpIntegrationBarbecue
Expand Down Expand Up @@ -84,7 +81,6 @@
---@field enabled boolean? Whether to enable the Native LSP integration.
---@field virtual_text CtpNativeLspStyles? Styles to apply to virtual text.
---@field underlines CtpNativeLspStyles? Styles to apply to underlines.
---@field inlay_hints CtpNativeLspInlayHints? Inlay hints options.

---@class CtpIntegrationNavic
---@field enabled boolean? Whether to enable the navic integration.
Expand Down
4 changes: 0 additions & 4 deletions vim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@ globals:
type: string
property: read-only

O.integrations.native_lsp.inlay_hints.background:
type: bool
property: read-only

O.integrations.navic:
type: table
property: full-write
Expand Down