GithubHelp home page GithubHelp logo

Comments (5)

jbyuki avatar jbyuki commented on August 24, 2024

If you can run your script using the embedded lua debugger ( luajit 2.1 ) just go ahead and invoke run_this() with the script open. If you want to use an external lua interpreter I'm afraid it's currently not possible. Have you looked at lua-debug?

from one-small-step-for-vimkind.

jbyuki avatar jbyuki commented on August 24, 2024

It would perfectly possible for me to implement debugging for non-Neovim code, it's just that I never use it outside Neovim so I didn't build any.

from one-small-step-for-vimkind.

vatosarmat avatar vatosarmat commented on August 24, 2024

Ok, thanks. Could you hint what are the diffs between .lua.t files and just .lua? and where @annotations in .lua.t come from?

from one-small-step-for-vimkind.

jbyuki avatar jbyuki commented on August 24, 2024

Sure, I'm coding in the lua.t files which in turn generate the lua files using a literate programming plugin called ntangle.nvim. I've coded the past year with it and sticky with it for the moment.

If you want you can install the plugin and it should be ready to use. The docs also explain about the syntax. I would be happy to review any PR.

from one-small-step-for-vimkind.

SerhatTeker avatar SerhatTeker commented on August 24, 2024

If you can run your script using the embedded lua debugger ( luajit 2.1 ) just go ahead and invoke run_this() with the script open. If you want to use an external lua interpreter I'm afraid it's currently not possible. Have you looked at lua-debug?

Hi,
I have luajit 2.1 on my OS, however running run_this() in any non-neovim file gives module 'osv' not found error.

Error Log
E5108: Error executing lua Vim:Error invoking 'nvim_exec_lua' on channel 6:
Error executing lua: [string "<nvim>"]:1: module 'osv' not found:
        no field package.preload['osv']
        no file './osv.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/osv.lua'
        no file '/usr/local/share/lua/5.1/osv.lua'
        no file '/usr/local/share/lua/5.1/osv/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/osv.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/osv/init.lua'
        no file './osv.so'
        no file '/usr/local/lib/lua/5.1/osv.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/osv.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        [string "<nvim>"]:1: in main chunk
stack traceback:
        [C]: in function 'rpcrequest'
        ...packer/start/one-small-step-for-vimkind/lua/osv/init.lua:706: in function 'run_this'
        [string ":lua"]:1: in main chunk

It seems this error is similar to #11 , however I'm using default config, not nvim -u ${CONFIG_FILE}.

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.