Coder Social home page Coder Social logo

Comments (4)

MattSturgeon avatar MattSturgeon commented on August 29, 2024 1

I'd appreciate a pointer on how post-setup lua code tends to be run for plugins that have setup for that.

Generally speaking, I think we normally do pre/post setup code by calling setup manually.

Plugins implemented with mkNeovimPlugin tend to automatically generate code to call setup, but mkNeovimPlugin could easily be extended to accept pre/postExtraConfigLua arguments if needed.

In a normal neovim setting, those should be set after calling setup(). Which I think is the reason for why [it] does not work in my nix configuration

I don't think we ever call a DAP setup function, however we do do some "setup config" by adding lines to plugins.dap.extensionConfigLua (internal option) and here:

extraConfigLua =
(optionalString (cfg.adapters != null) ''
require("dap").adapters = ${helpers.toLuaObject options.adapters}
'')
+ (optionalString (options.configurations != null) ''
require("dap").configurations = ${helpers.toLuaObject options.configurations}
'')
+ (optionalString (cfg.signs != null) ''
local __dap_signs = ${helpers.toLuaObject options.signs}
for sign_name, sign in pairs(__dap_signs) do
vim.fn.sign_define(sign_name, sign)
end
'')
+ cfg.extensionConfigLua;

Maybe someone more familiar with our DAP module could help better here.

Maybe, you'd even want to generalize by always making it so that in nixvim, options that aren't accepted by the setup are then attempted to be added to the plugin's table.

I'm not sure what you mean by this, since the plugin settings table is what is passed to the setup function.

As for options unknown to nixvim, these are included in the table passed to setup (as-per RFC42) for any module that has been written/refactored recently.

from nixvim.

JJJHolscher avatar JJJHolscher commented on August 29, 2024

oops, sorry for that "bug" label, that's inaccurate

from nixvim.

JJJHolscher avatar JJJHolscher commented on August 29, 2024

The chances of me implementing this myself dropped since I'm more fine interspersing lua code throughout my nixvim config.
Even though this feature is too my knowledge, still unimplemented, I'm fine with closing it.

from nixvim.

MattSturgeon avatar MattSturgeon commented on August 29, 2024

Even though this feature is too my knowledge, still unimplemented, I'm fine with closing it.

If you think others may find it useful, you're welcome to leave it open and "unsubscribe" if you're not interested in notificatione. Otherwise if you think it has no value, closing is fine.

from nixvim.

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.