38 lines
1.6 KiB
Nix
38 lines
1.6 KiB
Nix
|
{ pkgs, ... }:
|
||
|
{
|
||
|
programs.neovim = {
|
||
|
plugins = with pkgs.vimPlugins; [
|
||
|
{
|
||
|
plugin = telescope-nvim;
|
||
|
type = "lua";
|
||
|
config = ''
|
||
|
local telescope = require('telescope')
|
||
|
telescope.setup {
|
||
|
extensions = {
|
||
|
coc = {
|
||
|
theme = 'ivy',
|
||
|
prefer_locations = true, -- always use Telescope locations to preview definitions/declarations/implementations etc
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
telescope.load_extension('hoogle')
|
||
|
telescope.load_extension('coc')
|
||
|
function map (mode, shortcut, command)
|
||
|
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
|
||
|
end
|
||
|
map('n', "<leader>ff", ":Telescope find_files<cr>")
|
||
|
map('n', "<leader>fg", ":Telescope live_grep<cr>")
|
||
|
map('n', "<leader>fb", ":Telescope buffers<cr>")
|
||
|
map('n', "<leader>fH", ":Telescope help_tags<cr>")
|
||
|
map('n', "<leader>fd", ":Telescope lsp_definitions<cr>")
|
||
|
map('n', "<leader>fs", ":Telescope lsp_document_symbols<cr>")
|
||
|
map('n', "<leader>fS", ":Telescope lsp_workspace_symbols<cr>")
|
||
|
map('n', "<leader>fh", ":Telescope hoogle<cr>")
|
||
|
'';
|
||
|
}
|
||
|
telescope-coc-nvim
|
||
|
telescope_hoogle
|
||
|
plenary-nvim
|
||
|
];
|
||
|
};
|
||
|
}
|