nvf icon indicating copy to clipboard operation
nvf copied to clipboard

Optional installation of more tools

Open LilleAila opened this issue 1 year ago • 1 comments

⚠️ Please verify that this feature request has NOT been suggested before.

  • [X] I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

It would be useful to have a global option to decide whether to install extra dependencies such as LSPs or not. #134 does this for individual LSPs, but it would be good to have similar options for formatters and debuggers.

✔️ Solution

Adding options under vim.languages to choose whether or not to install the various packages.

vim.languages = {
  enableLSP = true;
  installLSP = false;
  enableFormat = true;
  installFormat = false;
  enableExtraDiagnostics = true;
  installExtraDiagnostics = true;
  enableDAP = true;
  installDAP = true;
};

These options could do something like just ignoring all package = definitions under languages.

❓ Alternatives

It would be possible to manually write all the commands for the LSPs, but that wouldn't be as easy as using the defaults but not installing the dependencies.

📝 Additional Context

This would be useful for using devshells to locally install development tools, rather than installing them globally. It would also help in keeping the size of the config smaller, to reduce the time required to build it.

LilleAila avatar Jan 09 '25 08:01 LilleAila

A bit unsure if this is the way to go.

Lately I have been looking to get rid of top-level toggles due to how confusing they are. The priority in the module system becomes ambigious, and sometimes users face unexpected behaviour. Though we do intend to rework all language modules (+ diagnostics) sometime soon, I'll try to see if there is a logical "compromise" between the two.

NotAShelf avatar Jan 09 '25 08:01 NotAShelf