nvim-telescope / telescope-dap.nvim

Integration for nvim-dap with telescope.nvim
MIT License
323 stars 23 forks source link

Installation #8

Open Vliro opened 3 years ago

Vliro commented 3 years ago

I tried to install this plugin by adding "nvim-telescope/telescope-dap" to packer plugins and adding require('telescope').load_extension('dap') but that did not work. I tried creating a special folder in my configs lua/telescope/_extensions (separate folder) and put the file there but it didn't work either. How would I install telescope-dap?

I am using LunarVim to separate my user configs into a separate folder for simplicity.

tosiek88 commented 3 years ago

Hi, Insert dap.lua file from this repo, in ~/.local/share/lunarvim/site/pack/packer/start/nvim-dap/lua/telescope/_extensions In your function lvim.builtin.telescope.on_config_done in LunarVim config file add:

    if lvim.builtin.dap.active then
        lvim.builtin.telescope.extensions.dap={}
        require("telescope").load_extension("dap")
    end

Peek 2021-10-10 11-02

tosiek88 commented 3 years ago

Btw I am still, not sure how that in telescope/_extensions/init.lua will know where to looking for this extensions files. For me looks like it will recursively call same file to get extensions[<name_of_extension], but probably this is my lack of knowledge in Lua

    local ok, ext = pcall(require, "telescope._extensions." .. k)
ccaprani commented 2 years ago

Just a note that I had to manually copy the dap.lua to the _extensions folder as described above to get this to work on vanilla neovim using vim-lug. Note sure if it should have auto-installed or not, but if not, be good to update instructions.

graciasc commented 1 year ago

Running into the same issue using Nvchad