Fixing lsp mapping to use leader instead of space

Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
This commit is contained in:
Freyskeyd 2022-05-02 15:33:17 +02:00 committed by siduck
parent 1c4a202d00
commit e557dc3af9

View file

@ -129,15 +129,15 @@ M.lspconfig = function()
vim.lsp.buf.signature_help() vim.lsp.buf.signature_help()
end) end)
map("n", "<space>D", function() map("n", "<leader>D", function()
vim.lsp.buf.type_definition() vim.lsp.buf.type_definition()
end) end)
map("n", "<space>ra", function() map("n", "<leader>ra", function()
vim.lsp.buf.rename() vim.lsp.buf.rename()
end) end)
map("n", "<space>ca", function() map("n", "<leader>ca", function()
vim.lsp.buf.code_action() vim.lsp.buf.code_action()
end) end)
@ -145,7 +145,7 @@ M.lspconfig = function()
vim.lsp.buf.references() vim.lsp.buf.references()
end) end)
map("n", "<space>f", function() map("n", "<leader>f", function()
vim.diagnostic.open_float() vim.diagnostic.open_float()
end) end)
@ -157,23 +157,23 @@ M.lspconfig = function()
vim.diagnostic.goto_next() vim.diagnostic.goto_next()
end) end)
map("n", "<space>q", function() map("n", "<leader>q", function()
vim.diagnostic.setloclist() vim.diagnostic.setloclist()
end) end)
map("n", "<space>fm", function() map("n", "<leader>fm", function()
vim.lsp.buf.formatting() vim.lsp.buf.formatting()
end) end)
map("n", "<space>wa", function() map("n", "<leader>wa", function()
vim.lsp.buf.add_workspace_folder() vim.lsp.buf.add_workspace_folder()
end) end)
map("n", "<space>wr", function() map("n", "<leader>wr", function()
vim.lsp.buf.remove_workspace_folder() vim.lsp.buf.remove_workspace_folder()
end) end)
map("n", "<space>wl", function() map("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end) end)
end end