-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Configuration to auto install missing tools #103
Comments
Hi @alanjjenkins , you can try https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim which does exactly this. I wrote it for the very use-case you mention. |
Fantastic thanks @WhoIsSethDaniel. Is it worth us putting this in the extensions area of the README for Mason to save someone else putting a duplicate issue in for this? |
Created PR: #104 for this. |
I think I'll open up a Wiki page for these things! I will likely also extract the So to answer the original topic; I have been wanting to incorporate something like this into mason core, but before doing so I'd like to make sure it's solid and well thought out. Some concerns I have are:
|
A thought on this... maybe have the plugin upgrade / install to a temp dir on the same filesystem first and then move the result on completion. That way it can be atomic as moves are atomic within the same file system. |
This is already done actually! However, there are some tools that will encode full paths into build artifacts (pip does this with the shebangs in the executables it creates for example). These installations has to run in their final installation directory because moving their location after installation/build will break them - for example here's when the pip manager "promotes" the temporary installation directory. Homebrew works around this by doing a search and replace 😬. |
For this specific case wouldn't it make sense to replace the shbangs and preserve the behavior? That is fairly easy using awk and specifically targeting files ending in .py. I haven't yet looked under the covers on the code base but if I get time I will take a look and see if I can find a sane way to do this and put in a PR for your consideration. |
…lspconfig when it supports auto-installation of all tools (williamboman/mason.nvim#103). Also removed null-ls as mason adds support for formatters and linters.
Perhaps instead of using a heuristic to determine whether NeoVim will be open long enough for Mason to install tools, Mason should print a message at the bottom of the screen: |
ah sorry I see it was factored into a separate module — wicked! |
Is your feature request related to a problem? Please describe.
Not a problem
Describe the solution you'd like
If possible I would like a configuration option to allow passing a table of tools that I would like Mason to automatically install so that when I copy my config to a new machine that it will automatically install all the required tools for my configuration rather than me having to manually install each via the UI.
Describe potential alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: