diff --git a/dots/.config/nvim/lua/plugins/configs/kanagawa.lua b/dots/.config/nvim/lua/plugins/configs/kanagawa.lua index 241e8343..9077d9c1 100644 --- a/dots/.config/nvim/lua/plugins/configs/kanagawa.lua +++ b/dots/.config/nvim/lua/plugins/configs/kanagawa.lua @@ -131,6 +131,7 @@ require("kanagawa").setup({ DiffviewFilePanelTitle = { fg = colors.crystalBlue }, Headline = { bg = colors.sumiInk2 }, HeadlineReversed = { bg = colors.sumiInk1 }, + LspInlayHint = { fg = colors.lotusViolet1, bg = colors.sumiInk5, italic = true }, } return overrides diff --git a/dots/.config/nvim/lua/plugins/configs/lsp.lua b/dots/.config/nvim/lua/plugins/configs/lsp.lua index 962a8bac..eae24b12 100755 --- a/dots/.config/nvim/lua/plugins/configs/lsp.lua +++ b/dots/.config/nvim/lua/plugins/configs/lsp.lua @@ -40,7 +40,7 @@ local rustopts = { inlay_hints = { -- automatically set inlay hints (type hints) -- default: true - auto = true, + auto = false, -- Only show inlay hints for the current line only_current_line = false, -- whether to show parameter hints with the inlay hints or not diff --git a/dots/.config/nvim/lua/plugins/plugins.lua b/dots/.config/nvim/lua/plugins/plugins.lua index dff5d666..38878354 100755 --- a/dots/.config/nvim/lua/plugins/plugins.lua +++ b/dots/.config/nvim/lua/plugins/plugins.lua @@ -168,6 +168,32 @@ lazy.setup({ 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 { "kosayoda/nvim-lightbulb",