GithubHelp home page GithubHelp logo

Comments (3)

NEX-S avatar NEX-S commented on June 24, 2024

I don't know why this would happen.
I am wondering if there are any ways I can using <C-d> to call dap.continue() in all languages that I have configured.

For example:
in C, I press <C-d>, dap starting to work.
in Python, I press <C-d>, dap starting to work.
in Lua, I press <C-d>, dap starting to work too (not asking me the host or port, set it default to 127.0.0.1 and 8088)

I wish "osv" can automatic start when I press <C-d> in lua.

i have tried to using autocmd to reach that for me.

vim.api.nvim_create_autocmd({ "FileType" }, {
    pattern = "lua",
    callback = function ()
        vim.keymap.set('n', '<C-d>', require "osv".run_this, { noremap = true, silent = true })
    end
})

but i will got this messages

Couldn't connect to 127.0.0.1:8088: ECONNREFUSED

here's my config

dap.configurations.lua = {
    {
        type = 'nlua',
        request = 'attach',
        name = "Attach to running Neovim instance",
        host = '127.0.0.1',
        port = 8088,
    }
}

dap.adapters.nlua = function (callback, config)
    callback({ type = 'server', host = config.host, port = config.port })
end

from one-small-step-for-vimkind.

jbyuki avatar jbyuki commented on June 24, 2024

Hi,

So one-small-step-for-vimkind is not really meant to be used as a debugger for vanilla lua scripts. It was specifically designed to debug neovim plugins. Meaning you still need to manually start another instance + start the server with launch(). You can still have a shortcut to dap.continue() in the debugger instance, which I also do. Maybe that clears some issues.

There is WIP ways to automatically start another neovim instance, and the debugger automatically here but this only works for linux/alacritty currently.

from one-small-step-for-vimkind.

NEX-S avatar NEX-S commented on June 24, 2024

Thanks!

from one-small-step-for-vimkind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.