-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose config
for other devs to make integrations with your plugin?
#167
Comments
Sorry for taking a while to reply. I'd like to expose the config, I've just been struggling to think how to do this nicely. Ideally I'd to expose it as For the meantime we can expose it as |
Hello again. Yes, it would be nice to have it exposed as a field for now, which is the simplest solution. However, having I haven't played around with it much because I just saw your message, but I can confirm that this API call is working: local gs = require("gitsigns")
local gs_config = gs._get_config()
cmd("echo 'GS signcolumn = "..tostring(gs_config.signcolumn).."'") Congrats! I'll update you if something isn't working as it should. |
Unrelated to the issue but... this was for an integration between your plugin and mine. You can go and check it out if you want! |
@pocco81 btw there's now a stable way of getting the config: local gs_config = require('gitsigns.config').config I plan to remove |
Is your feature request related to a problem? Please describe.
I'm working on an integration for my plugin with yours. For the integration, I need to check the state of some stuff your plug-in can do (e.g. config.sings, config.numhl, config.linehl)
Describe the solution you'd like
Simply expose the instance of
Config
namedconfig
from here by returning it. In this way I can access each on of its fields (like this one) to determine the state of each one of the elements/features your plugin provides.Describe alternatives you've considered
The solution above is pretty simple a self explanatory. However, you can also create a new table (e.g.
state
) and add all the variables the variables as keys and their values as values, and in the end, return it.Additional context
Need this for an integration. In the end it'll be possible for me to simply access each field. For instance:
The text was updated successfully, but these errors were encountered: