Open Zeioth opened 2 months ago
If I loop over everything registered in none-ls.ACTION.SOURCE
, it should suffice? Will need to add de-duplication logic such that sources in both do not overlap
I am out of town for the next 2 weeks, if you have time to test this out before then, that would be great. If not, I will take a stab at it when I am back
That solution would achieve for external sources what we currently achieve for builtins right? Yes I had the same in mind.
I've tried
print(vim.inspect(require("none-ls.formatting")))
The problem is none-ls
doesn't seem to be exposing it and it is not possible to iterate it. I'm gonna see if I can find a solution for that.
Enjoy your trip Jay. Let's see if I can manage some kind of PR.
EDIT: I just noticed none-ls.formatting
is just the root directory name of none-ls-extras.nvim
, so formatting
would be just the directory containing all the sources.
Knowing that we would just have to iterate and require all files in every directory.
EDIT 2: Another challenge I've found is there are several repositories with external sources, and each repository has a different project structure.
Maybe we could:
As you mentioned above we should:
Related:
I'd say it's done. You can check the fork here: https://github.com/Zeioth/none-ls-autoload.nvim
Please feel free to take it as reference and grab anything you want.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
I'd say it's done. You can check the fork here: https://github.com/Zeioth/none-ls-autoload.nvim
Please feel free to take it as reference and grab anything you want.
I would like to incorporate this into here. I just haven't been following anything none-ls has been doing. I've also switched using conform.nvim and nvim-lint which are so much nicer and faster hence I don't have an urge to figure out how this works. I looked at your repo and it just seems like one function to look copy over?
@jay-babu Yeah its just basically the function https://github.com/Zeioth/none-ls-autoload.nvim/blob/7b6358f1f03d95297d737c6ff141895845bc847c/lua/none-ls-autoload/utils.lua#L24 and the point we call it https://github.com/Zeioth/none-ls-autoload.nvim/blob/7b6358f1f03d95297d737c6ff141895845bc847c/lua/none-ls-autoload/utils.lua#L103
Also in case you are interested there is a project like mason-null for conform in case you'd like to contribute: https://github.com/frostplexx/mason-bridge.nvim
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
Problem
source
innone-ls
. Look at the next example.Example
asmfmt
because it is a builtin and mason-null-ls correctly auto load all builtins.reformat_gherkin
is a external source, mason-null-ls is not able to load it, as it currently only look for builtins.Expected behavior
mason-null-ls should also detect sources from
none-ls.formatting.my_source
none-ls.diagnostics.my_source
none-ls.code_actions.my_source
none-ls.completion.my_source
none-ls.hover.my_source