feat(nvim): use lsp anticonceal inlay hints

Lets fucking gooooooo!
This commit is contained in:
Price Hiller 2023-05-22 13:37:11 -05:00
parent 70ec13162c
commit 983f85647d
No known key found for this signature in database
3 changed files with 28 additions and 1 deletions

View File

@ -131,6 +131,7 @@ require("kanagawa").setup({
DiffviewFilePanelTitle = { fg = colors.crystalBlue }, DiffviewFilePanelTitle = { fg = colors.crystalBlue },
Headline = { bg = colors.sumiInk2 }, Headline = { bg = colors.sumiInk2 },
HeadlineReversed = { bg = colors.sumiInk1 }, HeadlineReversed = { bg = colors.sumiInk1 },
LspInlayHint = { fg = colors.lotusViolet1, bg = colors.sumiInk5, italic = true },
} }
return overrides return overrides

View File

@ -40,7 +40,7 @@ local rustopts = {
inlay_hints = { inlay_hints = {
-- automatically set inlay hints (type hints) -- automatically set inlay hints (type hints)
-- default: true -- default: true
auto = true, auto = false,
-- Only show inlay hints for the current line -- Only show inlay hints for the current line
only_current_line = false, only_current_line = false,
-- whether to show parameter hints with the inlay hints or not -- whether to show parameter hints with the inlay hints or not

View File

@ -168,6 +168,32 @@ lazy.setup({
end, end,
}, },
-- Inlay hints for LSP
{
"lvimuser/lsp-inlayhints.nvim",
branch = "anticonceal",
config = function()
require("lsp-inlayhints").setup({
inlay_hints = {
highlight = "LspInlayHint"
}
})
vim.api.nvim_create_augroup("LspAttach_inlayhints", {})
vim.api.nvim_create_autocmd("LspAttach", {
group = "LspAttach_inlayhints",
callback = function(args)
if not (args.data and args.data.client_id) then
return
end
local bufnr = args.buf
local client = vim.lsp.get_client_by_id(args.data.client_id)
require("lsp-inlayhints").on_attach(client, bufnr)
end,
})
end,
},
-- Show code actions -- Show code actions
{ {
"kosayoda/nvim-lightbulb", "kosayoda/nvim-lightbulb",