Skip to content
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

Generate language server primitives in helix-cogs Nix output #17

Open
wants to merge 1 commit into
base: steel-event-system
Choose a base branch
from

Conversation

clo4
Copy link

@clo4 clo4 commented Jan 22, 2025

This PR exposes the generated primitives for the language server to Nix users. As far as I can tell, this wasn't possible using the flake before - please let me know if I'm wong about that!

The original cogs directory remains unchanged, but a new steel-language-server directory is added to the helix-cogs output. Using Home Manager, a user could symlink that to STEEL_LSP_HOME, or even do something like this with a nested LSP home.

{ inputs, config, ... }:
{
  xdg.dataFile.steel.source = inputs.helix.packages.${system}.helix-cogs;
  home.sessionVariables.STEEL_HOME = "${config.xdg.dataHome}/steel";
  home.sessionVariables.STEEL_LSP_HOME = "${config.xdg.dataHome}/steel/steel-language-server";

  # Uncommenting the following line also allows other scm files to be added since
  # the files are copied recursively instead of symlinking the directory itself.
  # xdg.dataFile.steel.recursive = true;
}

I'm open to changing this. I considered splitting this into two outputs, but found the simplicity of this much nicer since the output of the helix-cogs derivation is just files. Please let me know if you'd prefer a different structure or some renaming. As it is, I'm happy with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant