nvimdots icon indicating copy to clipboard operation
nvimdots copied to clipboard

[RFC] Smarter package management

Open Jint-lzxy opened this issue 1 year ago • 7 comments

Feature description

As briefly discussed in #1252, there are several cases where Mason is simply dead and can't be used at all. My specific situation is that most of the pre-built binaries can't run on FreeBSD ~~(of course)~~, and Linux-emulation mode doesn't really help either. I need to constantly symlink the "correct" executables to Mason's bin directory to make things work, but that's laborious, and I really don't wanna do that anymore. imo we need a way to either bypass Mason completely or make it optional for OSs like NixOS and the BSDs.

Additional information

No response

Jint-lzxy avatar Jun 17 '24 07:06 Jint-lzxy

The LSP servers, linters and formatters can actually be installed in system-wide on most systems, which means they are executable everywhere and maybe we just don't need mason at all?

vollowx avatar Jun 18 '24 22:06 vollowx

The LSP servers, linters and formatters can actually be installed in system-wide on most systems, which means they are executable everywhere and maybe we just don't need mason at all?

Exactly! Initially, I was thinking of completely removing Mason, but without it, we'd lose the ability to automatically install those dependencies on a freshly installed system, which is kinda like the two sides of the same coin lol

Jint-lzxy avatar Jun 19 '24 05:06 Jint-lzxy

Maybe ask user whether to install stuffs manually or by mason, store the choice and enable mason if that is true ?

vollowx avatar Jun 19 '24 12:06 vollowx

Maybe ask user whether to install stuffs manually or by mason, store the choice and enable mason if that is true?

Yeah that's what I meant by "optional," but ideally, I'd like to find a way to automatically bypass Mason without any user interaction. In my case, I'd love Mason to be available on my Mac, but to be automatically disabled on my FreeBSD workstation. Especially in jails when I'm doing certain experimentation, I certainly don't wanna specify that option manually lmao

Jint-lzxy avatar Jun 19 '24 13:06 Jint-lzxy

In my case, I'd love Mason to be available on my Mac, but to be automatically disabled on my FreeBSD workstation.

Maybe we can add an option as "platform" in our custom lazy.nvim loader and utilized the enabled flag in lazy.nvim? If platform = {"XXX OS" = false} is not set, then it will default to install the plugin on whatever OS it's on. I personally would like to disable sniprun on windows since it could not be installed on windows lol

https://github.com/folke/lazy.nvim?tab=readme-ov-file#-plugin-spec

charliie-dev avatar Jun 19 '24 14:06 charliie-dev

Maybe we can add an option as "platform" in our custom lazy.nvim loader and utilized the enabled flag in lazy.nvim? If platform = {"XXX OS" = false} is not set, then it will default to install the plugin on whatever OS it's on. I personally would like to disable sniprun on windows since it could not be installed on windows lol

lol that's a great idea! Tho we'll need a way to automatically register those sources with lspconfig/none-ls/dap then.

Jint-lzxy avatar Jun 20 '24 06:06 Jint-lzxy

After some consideration, I've decided to create a plugin that automates the control of those "bridging plugins" (like mason-null-ls.nvim). I'll share the link to the Reddit post here once it's completed lol

Jint-lzxy avatar Jun 30 '24 05:06 Jint-lzxy