diff --git a/lazy-lock.json b/lazy-lock.json index 54bc0c5..85dbbae 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,16 +1,16 @@ { - "ale": { "branch": "master", "commit": "baaca9a5d7016c52466c3b4cd2d161b317d801ed" }, + "ale": { "branch": "master", "commit": "1aaeb2cdae9f031a8621415c3fbb29dc722a29d5" }, "autoclose.nvim": { "branch": "main", "commit": "b2077aa2c83df7ebc19b2a20a3a0654b24ae9c8f" }, - "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" }, - "conform.nvim": { "branch": "master", "commit": "6632e7d788a85bf8405ea0c812d343fc308b7b8c" }, - "gruvbox.nvim": { "branch": "main", "commit": "a933d8666dad9363dc6908ae72cfc832299c2f59" }, - "indentmini.nvim": { "branch": "main", "commit": "59c2be5387e3a3308bb43f07e7e39fde0628bd4d" }, + "blink.cmp": { "branch": "main", "commit": "4f38ce99a472932d5776337f08f7a8180f1f571a" }, + "conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" }, + "gruvbox.nvim": { "branch": "main", "commit": "91a0f8e460197a521d42a2e84a7a2a4010be4bbb" }, + "hover.nvim": { "branch": "main", "commit": "1a8282fe3933c0c6f2769d7d6a9b7bab49984aee" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lualine.nvim": { "branch": "master", "commit": "86fe39534b7da729a1ac56c0466e76f2c663dc42" }, + "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "nvim-cursorline": { "branch": "main", "commit": "804f0023692653b2b2368462d67d2a87056947f9" }, - "nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" }, + "nvim-treesitter": { "branch": "master", "commit": "94ea4f436d2b59c80f02e293466c374584f03b8c" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" }, + "nvim-web-devicons": { "branch": "master", "commit": "2c2b4eafce6cdd0cb165036faa17396eff18f847" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" } } diff --git a/lua/plugins/hover.lua b/lua/plugins/hover.lua new file mode 100644 index 0000000..8324e80 --- /dev/null +++ b/lua/plugins/hover.lua @@ -0,0 +1,38 @@ +return { + { + "lewis6991/hover.nvim", + config = function() + require("hover").setup({ + init = function() + require("hover.providers.lsp") + require("hover.providers.fold_preview") + require("hover.providers.diagnostic") + require("hover.providers.man") + require("hover.providers.dictionary") + require("hover.providers.highlight") + end, + preview_opts = { + border = "single", + }, + -- Whether the contents of a currently open hover window should be moved + -- to a :h preview-window when pressing the hover keymap. + preview_window = false, + title = true, + mouse_providers = { + "LSP", + }, + mouse_delay = 1000, + }) + + -- Setup keymaps + vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"}) + vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"}) + vim.keymap.set("n", "", function() require("hover").hover_switch("previous") end, {desc = "hover.nvim (previous source)"}) + vim.keymap.set("n", "", function() require("hover").hover_switch("next") end, {desc = "hover.nvim (next source)"}) + + -- Mouse support + vim.keymap.set("n", "", require("hover").hover_mouse, { desc = "hover.nvim (mouse)" }) + vim.o.mousemoveevent = true + end, + }, +}