AstroNvim / astrocommunity

A community repository of common plugin specifications
https://astronvim.github.io/astrocommunity/
GNU General Public License v3.0
1.22k stars 243 forks source link

DAP pack in astrocommunity.pack.typescript is missing typescript dap support #148

Open citosid opened 1 year ago

citosid commented 1 year ago

I have this error with the typescript pack:

Error executing luv callback:
.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1187: adapter.port is required for server adapter
stack traceback:
    [C]: in function 'assert'
    .../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1187: in function <.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1179>

I already deleted ~/.cache/nvim and ~/.local/nvim and performed a very clean installation and the same error happens.

The adapter is being executed:

image

Due to this, if I try again after executing the debug the first time, it fails with another error saying there is already another process running (which makes sense...)

Any ideas what could be wrong?

luxus commented 1 year ago

please provide a :checkhealth in a gist

citosid commented 1 year ago

Thanks for the reply @luxus

https://gist.github.com/citosid/a335aa8a4dfa9d5b860189c87a36d922

citosid commented 1 year ago

@luxus I did an installation from scratch installing only the example_user repo and only this pack and is the same error. These are the steps I followed:

git clone git@github.com:/AstroNvim/AstroNvim ~/.config/Test
git clone https://github.com/AstroNvim/user_example ~/.config/Test/lua/user
# Modify the file ~/.config/Test/lua/user/plugins/community.lua and add the typescript pack
NVIM_APPNAME=Test nvim

Open a very basic typescript file, add a break point, start the debugger, and the same error happens

citosid commented 1 year ago

@luxus more information:

I decided to try and make work the main nvim-dap-vscode-js by itself, and found this: https://github.com/mxsdev/nvim-dap-vscode-js/issues/14#issuecomment-1514656823

Based on that, I think the issue in this pack is the same. It is trying to use js-debug-adapter which is the default adapter provided by Microsoft. However, I read somewhere the author of nvim-dap-vscode-js found the one provided by Microsoft is not really dap compatible, due to some things having to be asynchronous (I can't find the comment now, maybe @mxsdev can comment?).

So, the solution would be changing the pack to some configuration similar to the one I have in that other issue. However, I'm not sure if I'm the only one with this issue or if you (or @mehalter) as the original creators of the pack have more comments about it...

luxus commented 1 year ago

@owittek @Uzaaft help

owittek commented 1 year ago

I can confirm that I've also been having issues with the DAP starting and ignoring breakpoints, I've just assumed that it's been a misconfiguration on my part.

Uzaaft commented 1 year ago

@luxus We should take a look at abz's stuff, it worked perfectly fine.

luxus commented 1 year ago

Feel free :)

Uzaaft commented 1 year ago

Feel free :)

Can masta give dobby a sock? Jk, looking into it

Uzaaft commented 1 year ago

I've got DAP working with JS. It's not ignoring breakpoints here for me. TS is another story...

Uzaaft commented 1 year ago

160 Should fix this. Could you test that PR? @citosid

owittek commented 1 year ago

I have removed the DAP configuration from the TypeScript pack while we're working on a solution.

citosid commented 1 year ago

160 Should fix this. Could you test that PR? @citosid

Sorry. Was in the middle of a release.

I have the configuration I linked previously and works flawlessly.

Is the other PR ready?

Uzaaft commented 1 year ago

@citosid I'll have to test that one. cc @owittek

Uzaaft commented 1 year ago

Just a heads up. I'll take a look at this after 15th of May

luxus commented 1 year ago

@Uzaaft just a heads up. the 15th of May is nearly a year away

Uzaaft commented 1 year ago

@luxus Thanks for the reminder! I should plan the PR so that I don't miss forget the date!

Uzaaft commented 1 year ago

Deno TS + JS and node JS daps are implemented.

Uzaaft commented 1 year ago

JS dap has been released. Deno dap support will be released during this week. TS + node is a WIP but I'm also on it.

jharlow commented 1 year ago

Super keen to see the TS + node one!

Uzaaft commented 10 months ago

@jharlow @citosid I believe we got a fix for this. I'll roll it a seperate branch if you guys would like to try it out :)

luxus commented 10 months ago

looks like it will be really after 15. of may :D

citosid commented 10 months ago

Thanks @Uzaaft! Unfortunately I ended up creating my own integration and actually moved out of AstroNvim. Now I have my own configuration without any distribution.

Thanks for all your work though! I'm sure all the devs that use AstroNvim will love to try this out!

Uzaaft commented 10 months ago

@citosid No worries, good luck with your own config :) Do you have a link to your integration? 👀

citosid commented 10 months ago

@Uzaaft, is the same that I posted above. Right now I'm in the process of migrating to a more simpler neovim configuration. You can see the dot files here: https://github.com/citosid/vim although it does not have the dap configuration yet.

jharlow commented 9 months ago

@Uzaaft Yeah I'd be keen to try it if you have a branch to link me! Thank you!