diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-09-12 23:33:16 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-09-12 23:33:16 +0200 |
commit | 78d2f88b3207f00cac1d5cbe21e00286dec417e8 (patch) | |
tree | 7dc06adbc96bf2cbc7627e5f83a1a5fe9783aa97 /.config/nvim/after/plugin/lsp.lua | |
parent | 30543e85eeae846b83146279e18d00da6c8473a4 (diff) |
nvim: Move ‘remap()’ to mango.lib
Diffstat (limited to '.config/nvim/after/plugin/lsp.lua')
-rw-r--r-- | .config/nvim/after/plugin/lsp.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index 6891256..27703fa 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -1,4 +1,5 @@ local lsp = require('lsp-zero') +local lib = require('mango.lib') lsp.preset('recommended') lsp.ensure_installed({ @@ -30,11 +31,10 @@ lsp.setup_nvim_cmp({ lsp.on_attach(function(_, bufnr) local opts = {buffer = bufnr, remap = false} - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', '<leader>la', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', '<leader>lr', vim.lsp.buf.rename, opts) - vim.keymap.set('n', '<leader>l=', vim.lsp.buf.format, opts) - vim.keymap.set('i', '<C-h>', vim.lsp.buf.signature_help, opts) + lib.remap('n', 'gd', vim.lsp.buf.definition, opts) + lib.remap('n', '<leader>la', vim.lsp.buf.code_action, opts) + lib.remap('n', '<leader>lr', vim.lsp.buf.rename, opts) + lib.remap('n', '<leader>l=', vim.lsp.buf.format, opts) end) lsp.setup() |