all repos

init.lua @ c6d1e0415aade2b6576725a09fccaca85b68d95f

my nvim config
3 files changed, 22 insertions(+), 2 deletions(-)
feat(plugins): add hover.nvim
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2023-07-24 23:36:06 +0300
Parent: d802bac
M lua/core/utils.lua

@@ -15,7 +15,7 @@ end,

---@param module string ---@param method string - ---@param args string|nil + ---@param args? string ---@return string smap = function(module, method, args) args = args or ""
A lua/plugins/hover.lua

@@ -0,0 +1,21 @@

+local map = require("core.utils").smap +return { + "lewis6991/hover.nvim", + keys = { + { "K", map("hover", "hover") }, + { "gK", map("hover", "hover_select") }, + }, + opts = { + init = function() + require "hover.providers.lsp" + require "hover.providers.gh" + require "hover.providers.gh_user" + -- require('hover.providers.jira') + require "hover.providers.man" + require "hover.providers.dictionary" + end, + preview_window = false, + preview_opts = { border = require("plugins.lsp.diagnostic").border }, + title = false, + }, +}
M lua/plugins/lsp/attach.lua

@@ -21,7 +21,6 @@ if client.server_capabilities.inlayHintProvider then

vim.lsp.inlay_hint(bufnr, true) end - map("K", vim.lsp.buf.hover) map("gd", "<cmd>Telescope lsp_definitions<cr>") map("gD", vim.lsp.buf.declaration) map("gr", "<cmd>Telescope lsp_references<cr>")