add util function for local and global definitions

This commit is contained in:
2022-02-23 11:43:00 +03:00
parent 7b6ff5e796
commit 1f34fc02f3
2 changed files with 45 additions and 1 deletions

View File

@@ -51,7 +51,8 @@ nmap("<leader>f", ":Telescope find_files<CR>")
nmap("<leader>p", ":Telescope<CR>")
-- LSP
nmap("gd", ":lua vim.lsp.buf.definition()<CR>")
nmap("gd", ":lua require('user.utils').goto_local_definition()<CR>")
nmap("gD", ":lua require('user.utils').goto_global_definition()<CR>")
nmap("gr", ":lua vim.lsp.buf.references()<CR>")
nmap("K", ":lua vim.lsp.buf.hover()<CR>")
nmap("<F2>", ":lua vim.lsp.buf.rename()<CR>")