Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ in
grep.default = "gnugrep";
gzip.default = "gzip";
imagemagick.default = "imagemagick";
inotify-tools.default = "inotify-tools";
jupytext.default = [
"python313Packages"
"jupytext"
Expand Down
4 changes: 4 additions & 0 deletions modules/lsp/servers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ in
extraPackages = lib.mkIf (packages.prefix or [ ] != [ ]) packages.prefix;
extraPackagesAfter = lib.mkIf (packages.suffix or [ ] != [ ]) packages.suffix;

dependencies.inotify-tools = lib.mkIf (enabledServers != [ ] && pkgs.stdenv.hostPlatform.isLinux) {
enable = true;
};
Comment on lines +154 to +156
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. As per plugins/lsp/language-servers/nixd: use dependencies.nixpkgs-fmt #4075 (comment) I'm unsure about continuing to spread usage of dependencies until we've ironed out how to advertise to users that a particular option/module enables a particular dependency.

  2. As per modules/lsp: add inotify-tools package when any lsp server is enabled #4150 (comment) and modules/lsp: add inotify-tools package when any lsp server is enabled #4150 (comment), I'd ideally prefer to see a way of us maintaining this on a per-LSP-server basis, too.

I'm willing to overlook pt.1 if this is considered an important enough dependency that we need a solution now, before solving the wider dependencies questions.

Currently, I suspect pt.2 would be too high a maintenance burden. In the future if we had a way to assert specific :LspInfo output with nixvim's test module, this could become easier.

Perhaps we can address pt.2 by adding a TODO comment, along the lines of:

Ideally this dependency should be enabled by the servers that depend on inotify-tools, instead of globally for all servers


lsp.luaConfig.content =
let
mkServerConfig =
Expand Down