feat(nvim): use lsp anticonceal inlay hints
Lets fucking gooooooo!
This commit is contained in:
parent
70ec13162c
commit
983f85647d
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user