nvim-dap-python icon indicating copy to clipboard operation
nvim-dap-python copied to clipboard

Run django and celery.

Open PedroVSCoimbra opened this issue 3 years ago • 2 comments

Hello guys. Is there a way to launch two processes at once? In this case Django server and the celery application. I've seen it been done in vscode but could not configure my nvim to work that way.

PedroVSCoimbra avatar May 17 '22 00:05 PedroVSCoimbra

Can you share the vscode configuration to do that?

mfussenegger avatar May 21 '22 19:05 mfussenegger

Sure!

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/petrofoam/manage.py",
            "args": [
                "runserver"
            ],
            "django": true,
            "cwd": "${workspaceRoot}/petrofoam",
            "justMyCode": false
        },
        {
            "name": "Celery",
            "type": "python",
            "request": "launch",
            "cwd": "${workspaceFolder}/petrofoam",
            "program": "${workspaceFolder}/env/bin/celery",
            // "connect": {
            //   "host": "localhost",
            //   "port": 6379
            // },
            "args": [
                "-A",
                "petrofoam",
                "worker",
                "-l",
                "debug",
                "-B"
            ],
            "django": true,
            "env": {
                "DJANGO_SETTINGS_MODULE": "petrofoam.settings",
            },
            "justMyCode": false
        }
    ]
}

It does not seem to be a very complex code. But vscode seems to do a nice of using to terminals to launch them.

PedroVSCoimbra avatar May 21 '22 19:05 PedroVSCoimbra

I see. I thought they'd do something special but this is just about multi-session support. There's an issue in nvim-dap for that: https://github.com/mfussenegger/nvim-dap/issues/586

mfussenegger avatar Aug 18 '22 08:08 mfussenegger