diff options
| author | pml68 <tutorialmester@gmail.com> | 2024-07-16 17:20:08 +0200 |
|---|---|---|
| committer | pml68 <tutorialmester@gmail.com> | 2024-07-16 17:20:08 +0200 |
| commit | c607278c2a9370acc8091ce0445641295d5ecb2c (patch) | |
| tree | 54f3382f12e4e270e32d3f802ec64b231d39e389 /lua/pml68 | |
| parent | feat: add termux-language-server (diff) | |
| download | nvim-c607278c2a9370acc8091ce0445641295d5ecb2c.tar.gz | |
feat: add rounded border to lsp hover, set leader gh to diagnostic.goto_next
Diffstat (limited to '')
| -rw-r--r-- | lua/pml68/configs/lspconfig.lua | 4 | ||||
| -rw-r--r-- | lua/pml68/remap.lua | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lua/pml68/configs/lspconfig.lua b/lua/pml68/configs/lspconfig.lua index 4951475..5f79687 100644 --- a/lua/pml68/configs/lspconfig.lua +++ b/lua/pml68/configs/lspconfig.lua @@ -1,6 +1,10 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require("lspconfig") +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "rounded", +}) + local servers = { "asm_lsp", "html", diff --git a/lua/pml68/remap.lua b/lua/pml68/remap.lua index be64b0c..c11bf29 100644 --- a/lua/pml68/remap.lua +++ b/lua/pml68/remap.lua @@ -61,7 +61,7 @@ vim.api.nvim_create_autocmd('LspAttach', { callback = function(event) local opts = { buffer = event.buf } - vim.keymap.set('n', '<leader>gh', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) + vim.keymap.set('n', '<leader>gh', '<cmd>lua vim.diagnostic.goto_next({ float = { border = "rounded" } })<CR>', opts) vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) |
