Skip to content

Commit

Permalink
adding goto preview
Browse files Browse the repository at this point in the history
  • Loading branch information
epi-ahulswitt committed Mar 1, 2024
1 parent d581b34 commit 4848edd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
11 changes: 3 additions & 8 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" },
"ale": { "branch": "master", "commit": "5e8904cd3da4565130c09b77179ae7dddd07358f" },
"asyncomplete.vim": { "branch": "master", "commit": "016590d2ca73cefe45712430e319a0ef004e2215" },
"cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
Expand All @@ -10,20 +8,17 @@
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" },
"fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
"fzf": { "branch": "master", "commit": "99a7beba575bf50170dada5b4681ccaad40263d1" },
"fzf.vim": { "branch": "master", "commit": "8ea9574b3ebdc44fbe3dc6381a13f9ce0c290e2f" },
"goto-preview": { "branch": "main", "commit": "527fd81a827234e26ca47891abe90497215db2a6" },
"harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" },
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "fe4cce44dec93c69be17dad79b21de867dde118a" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" },
"nvim-lspconfig": { "branch": "master", "commit": "d1bab4cf4b69e49d6058028fd933d8ef5e74e680" },
"nvim-treesitter": { "branch": "master", "commit": "504fe1043298c468f56a6ef6dc61f35b2d69495a" },
"omnisharp-vim": { "branch": "master", "commit": "f9c5d3e3375e8b5688a4506e813cb21bdc7329b1" },
"nvim-treesitter": { "branch": "master", "commit": "e04ce8bcec4dec3551d7ec4fa6d737d183433bfd" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"rose-pine": { "branch": "main", "commit": "f977eeba34b030b37f93ece2fbd792477606203b" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" },
"vim-sharpenup": { "branch": "master", "commit": "1c309e0fade7e3049a730a88b89ff722b993b6c3" }
"tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }
}
11 changes: 11 additions & 0 deletions lua/kameleon/lazy/goto.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
return {
'rmagatti/goto-preview',
config = function()
require('goto-preview').setup {}
vim.keymap.set('n', '<leader>gd','<cmd>lua require("goto-preview").goto_preview_definition()<CR>', {noremap=true})
vim.keymap.set('n', '<leader>gt','<cmd>lua require("goto-preview").goto_preview_type_definition()<CR>',{noremap=true})
vim.keymap.set('n', '<leader>gi','<cmd>lua require("goto-preview").goto_preview_implementation()<CR>',{noremap=true})
vim.keymap.set('n', '<leader>gD','<cmd>lua require("goto-preview").goto_preview_declaration()<CR>', {noremap=true})
vim.keymap.set('n', '<leader>gc','<cmd>lua require("goto-preview").close_all_win()<CR>',{noremap=true})
end
}
2 changes: 1 addition & 1 deletion lua/kameleon/lazy/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ return
mapping = cmp.mapping.preset.insert({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
['<CR>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
}),
sources = cmp.config.sources({
Expand Down

0 comments on commit 4848edd

Please sign in to comment.