From 60a947a8a2b63363d67fa6780df796f1c3b40c39 Mon Sep 17 00:00:00 2001 From: tiyn Date: Fri, 8 Mar 2024 04:03:56 +0100 Subject: [PATCH] nvim: added docs window plugin --- .config/nvim/lazy-lock.json | 1 + .config/nvim/lua/keymap.lua | 3 +++ .config/nvim/lua/plugins/lualine.lua | 6 ++++-- .config/nvim/lua/plugins/nvim-docs-view.lua | 8 ++++++++ .config/nvim/lua/style.lua | 3 +++ 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/lua/plugins/nvim-docs-view.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 18cf813..0bcf831 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -29,6 +29,7 @@ "nvim-autopairs": { "branch": "master", "commit": "c6139ca0d5ad7af129ea6c89cb4c56093f2c034a" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-colorizer.lua": { "branch": "master", "commit": "0b3950aed7bc35b78200bc292156aa77d2a4d342" }, + "nvim-docs-view": { "branch": "master", "commit": "78d88bca16f32a430572758677f9246f6d7f7b94" }, "nvim-hlslens": { "branch": "main", "commit": "e4c811a401b06f86a7bb042b1d64a5cba21729a9" }, "nvim-lspconfig": { "branch": "master", "commit": "e172dd599cff2ae5267871b5e33fb42934c4df43" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua index 76fed7d..5aa8d1d 100644 --- a/.config/nvim/lua/keymap.lua +++ b/.config/nvim/lua/keymap.lua @@ -68,6 +68,9 @@ m.nmap("", ':NvimTreeToggle toggle', 'File tree: toggle') -- mbbill/undotree m.nmap("", ':UndotreeToggle', 'Undo tree: toggle') +-- amrbashir/nvim-docs-view +m.nnoremap("go", ':DocsViewToggle', 'LSP: toggle documentation window') + -- numtostr/fterm.nvim m.nnoremap("tt", require("FTerm").toggle, 'Terminal: open') m.tnoremap("tt", require("FTerm").toggle, 'Terminal: open') diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 3bb2e6d..79321aa 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -19,8 +19,10 @@ return { config = function() require("action-hints").setup({ template = { - definition = { text = "D", color = "#add8e6" }, - references = { text = "R%s", color = "#ff6666" }, + -- definition = { text = "D", color = "#add8e6" }, + -- references = { text = "R%s", color = "#ff6666" }, + definition = { text = Definition_sign, color = "#add8e6" }, + references = { text = Reference_sign, color = "#ff6666" }, }, }) end, diff --git a/.config/nvim/lua/plugins/nvim-docs-view.lua b/.config/nvim/lua/plugins/nvim-docs-view.lua new file mode 100644 index 0000000..210ad1f --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-docs-view.lua @@ -0,0 +1,8 @@ +return { + "amrbashir/nvim-docs-view", + lazy = true, + cmd = "DocsViewToggle", + opts = { + position = "bottom", + }, +} diff --git a/.config/nvim/lua/style.lua b/.config/nvim/lua/style.lua index 3464435..02142f6 100644 --- a/.config/nvim/lua/style.lua +++ b/.config/nvim/lua/style.lua @@ -2,6 +2,9 @@ Return_sign = "" Space_sign = "·" +Reference_sign = "%s" +Definition_sign = "" + Error_sign = " " Hack_sign = " " Hint_sign = " "