Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvim-Dap and :DIInstall #2430

Closed
TheEccentricDuck opened this issue Apr 6, 2022 · 22 comments
Closed

Nvim-Dap and :DIInstall #2430

TheEccentricDuck opened this issue Apr 6, 2022 · 22 comments
Labels
invalid This doesn't seem right

Comments

@TheEccentricDuck
Copy link

Problem description

After you start up LunarVim, type :DIInstall cpppr_vsc, and LunarVim reports that :DIInstall isn't a valid editor command. This is unexpected because the LunarVim docs say that this command can be used to install the CPP debugger, and debuggers for quite a lot of other languages. Checkout this link: https://www.lunarvim.org/languages/c_cpp.html#debugger. Also, when I check the Packer status, it doesn't list nvim-dap as one of the installed packages, even though it is listed in plugins.lua. Can anyone explain this? Thank you very much.
image
image
image
image
image

LunarVim version

master-46b8aee

Neovim version (>= 0.6.1)

NVIM v0.6.1

Operating system/version

5.15.28-1-MANJARO

Relevant log output

No relevant log output.

Screenshots

No response

@TheEccentricDuck TheEccentricDuck added the bug Something isn't working label Apr 6, 2022
@abzcoding
Copy link
Member

abzcoding commented Apr 6, 2022

DIInstall is from DAPInstall and not nvim-dap

first off this plugin has been deprecated -> https://github.com/Pocco81/DAPInstall.nvim
and we will remove it from lunarvim pretty soon,

also you need to enable dap first

lvim.builtin.dap.active = true

@abzcoding abzcoding added invalid This doesn't seem right and removed bug Something isn't working labels Apr 6, 2022
@TheEccentricDuck
Copy link
Author

I’m really sorry, I’m new to nvim and lvim so I just didn’t know how to fix it, thank you very much.

@abzcoding
Copy link
Member

I’m really sorry, I’m new to nvim and lvim so I just didn’t know how to fix it, thank you very much.

no worries mate, feel free to ask your questions there is nothing wrong with that <3

@TheEccentricDuck
Copy link
Author

Alright, thank you so much for your help! :) I managed to get it working.

@endlesscpp
Copy link

endlesscpp commented May 14, 2022

Alright, thank you so much for your help! :) I managed to get it working.

Hi, I have enabled dap and DAPInstall, nvim-dap plugins are installed.
However, LunarVim still report ":DIInstall isn't a valid editor command", could you please help on this? (neovim 0.7.0)

@MyraBaba
Copy link

Hi, @abzcoding

I have the same problem. We loved lunarvim and want to use our C++ and python development projects. What we missed is the debugger.

We cant find a straight way to install debugger step by step.

:DIInstall ccppr_vsc certainly not working.

Best

@abzcoding
Copy link
Member

@MyraBaba @endlesscpp this issue should be fixed on the rolling branch, since we are using the dev branch of dap-buddy in there

can you guys check if that fixes your issues?

@MyraBaba
Copy link

Hi,
@abzcoding I installed rolling branch and still no DIInstall command in editor.

FYI

@abzcoding
Copy link
Member

Hi, @abzcoding I installed rolling branch and still no DIInstall command in editor.

FYI

did you ran :PackerSync or :LvimSyncCorePlugins as well?
I'm on the rolling branch and I have the :DIInstall command
Screen Shot 2022-05-16 at 5 44 21 PM

@abzcoding
Copy link
Member

please check the output of these commands

git -C ~/.local/share/lunarvim/lvim rev-parse HEAD
ls -l ~/.local/share/lunarvim/site/pack/packer/start/dap-buddy.nvim

Screen Shot 2022-05-16 at 5 45 50 PM

@MyraBaba
Copy link

Yes after sync there is DBInstall.

now I am trying to make working c++ debugging...

@MyraBaba
Copy link

git -C ~/.local/share/lunarvim/lvim rev-parse HEAD
l│aa4c9930d9131c60d7a6f2e9bec8a2f3ba6c4055

ls -l ~/.local/share/lunarvim/site/pack/packer/start/dap-buddy.nvim
no such file

@abzcoding
Copy link
Member

Yes after sync there is DBInstall.

now I am trying to make working c++ debugging...

you can check my config or the nvim-dap documentation


btw you are not on the rolling branch, it seems like you are on the master branch

git -C ~/.local/share/lunarvim/lvim status

@abzcoding
Copy link
Member

you are on this commit of the master branch -> aa4c993

@MyraBaba
Copy link

@abzcoding I installed with
LV_BRANCH=rolling bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/rolling/utils/installer/install.sh)

@abzcoding
Copy link
Member

@abzcoding I installed with
LV_BRANCH=rolling bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/rolling/utils/installer/install.sh)

you need to first uninstall the previous one

bash ~/.local/share/lunarvim/lvim/utils/installer/uninstall.sh
# or
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/uninstall.sh)

and then install the new one

LV_BRANCH=rolling bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/rolling/utils/installer/install.sh)

@MyraBaba
Copy link

git -C ~/.local/share/lunarvim/lvim status
On branch rolling
Your branch is up to date with 'origin/rolling'.

nothing to commit, working tree clean

now on the rolling..

Lets see how much we can roll :)

@MyraBaba
Copy link

@abzcoding vimspector vs nvim-dap according to your experience which is learned in the field.?

@abzcoding
Copy link
Member

abzcoding commented May 16, 2022

@abzcoding vimspector vs nvim-dap according to your experience which is learned in the field.?

usually people ( at least with neovim ) use nvim-dap alongside nvim-dap-ui

@MyraBaba
Copy link

@abzcoding I dont knof if its due to I am almost beginner to nvim/lunarvim or nvim-dap things complicated and assuming that everybody has some background for configuration .

where I need to put the dap.configuration. ?
there is numerous dap.lua:

/home/alp2080/.local/share/lunarvim/lvim/lua/lvim/core/dap.lua
/home/alp2080/.local/share/lunarvim/site/pack/packer/start/nvim-dap/lua/dap.lua
/home/alp2080/.local/share/lunarvim/site/pack/packer/start/nvim-dap/plugin/dap.lua

is assuming to put there :

dap.configurations.cpp = {
{
name = "Launch file",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
end,
cwd = "${workspaceFolder}",
stopOnEntry = true,
},
}
dap.configurations.c = dap.configurations.cpp

or where.

If I can successfully use neo/lunarvim for c++ /python I will transfer all the dev to the lunarvim. I hope its not and utopia that I believe all dev team more productive if all we transfer to the terminal based work.

Best
thx for your help

@abzcoding
Copy link
Member

please do not touch any files under ~/.local/share/lunarvim
just put your configurations in ~/.config/lvim/config.lua

for example, put this in your ~/.config/lvim/config.lua

local dap = require("dap")
  dap.configurations.cpp = {
    {
      name = "Launch file",
      type = "codelldb",
      request = "launch",
      program = function()
        return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
      end,
      cwd = "${workspaceFolder}",
      stopOnEntry = true,
    },
  }
  dap.configurations.c = dap.configurations.cpp

@MyraBaba
Copy link

@abzcoding

Is there any tutorial for newbies for lvim to setup full c++ lunarvim including to debugging ? Best practices .

We are almost giving up due to struggling to setup debugging environment..

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants