Replace <space> usage with <leader>
This commit is contained in:
parent
26003661da
commit
f72bb73b77
|
@ -1,10 +1,10 @@
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
local opts = { noremap=true, silent=true }
|
local opts = { noremap=true, silent=true }
|
||||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts)
|
||||||
|
|
||||||
-- Setup aerial
|
-- Setup aerial
|
||||||
require('aerial').setup{
|
require('aerial').setup{
|
||||||
|
@ -35,16 +35,16 @@ local on_attach = function(client, bufnr)
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||||
-- vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
-- vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||||
vim.keymap.set('n', '<space>wl', function()
|
vim.keymap.set('n', '<leader>wl', function()
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
end, bufopts)
|
end, bufopts)
|
||||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
|
||||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
|
||||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
|
||||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, bufopts)
|
vim.keymap.set('n', '<leader>f', vim.lsp.buf.formatting, bufopts)
|
||||||
-- Enable aerial support
|
-- Enable aerial support
|
||||||
require("aerial").on_attach(client, bufnr)
|
require("aerial").on_attach(client, bufnr)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue