From 3394d5bed5705a05ebf6baa20f4f6d671b30af15 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 23 Apr 2025 17:01:31 -0300 Subject: [PATCH] feat(neovim): enable signature help, inlay hints and virtual lines Signature help messages will be shown automatically, for example, in the context of you calling a method it will show a floating window above with the signature of that specific method, i.e. `SomeClass.SomeMethod(string firstParameter)`. Inlay hints are extra information that the LSP may provide; in C# for example, methods and classes will have an inlay hint showing the amount of references that particular method/class has. Finally, virtual lines are exactly what they sound - fake lines added onto your editor, which are used to display diagnostics. I've also added the community recipe that makes so virtual lines are only shown when the active line has a diagnostic. --- modules/neovim/lua/community.lua | 2 ++ modules/neovim/lua/plugins/astrocore.lua | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/neovim/lua/community.lua b/modules/neovim/lua/community.lua index 06bbb5c..0f3cda3 100644 --- a/modules/neovim/lua/community.lua +++ b/modules/neovim/lua/community.lua @@ -15,6 +15,8 @@ return { { import = "astrocommunity.motion.mini-ai" }, { import = "astrocommunity.motion.mini-surround" }, + { import = "astrocommunity.recipes.diagnostic-virtual-lines-current-line" }, + { import = "astrocommunity.test.neotest" }, { import = "astrocommunity.pack.cmake" }, diff --git a/modules/neovim/lua/plugins/astrocore.lua b/modules/neovim/lua/plugins/astrocore.lua index 9e5eb13..98c6891 100644 --- a/modules/neovim/lua/plugins/astrocore.lua +++ b/modules/neovim/lua/plugins/astrocore.lua @@ -16,11 +16,13 @@ return { diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on) highlighturl = true, -- highlight URLs at start notifications = true, -- enable notifications at start + signature_help = true, -- enable automatically showing signature help + inlay_hints = true, -- enable inlay hints globally }, -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on diagnostics = { virtual_text = true, - virtual_lines = false, + virtual_lines = { current_line = true }, }, -- vim options can be configured here options = {