Skip to content

lapce: add module #5752

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

Merged
merged 1 commit into from
Feb 1, 2025
Merged

lapce: add module #5752

merged 1 commit into from
Feb 1, 2025

Conversation

timon-schelling
Copy link
Contributor

Description

Adds the 'programs.lapce' module for configuring lapce text editor.
Options for settings, plugins and keymaps are available. Idea #4541

Using the module would look something like this:

...
programs.lapce = {
  enable = true;
  package = pkgs.lapce;
  settings = {
    core = {
      custom-titlebar = false;
      color-theme = "Custom";
      icon-theme = "Material Icons";
    };
    editor = {
      font-family = "FiraCode Nerd Bold Font, monospace";
      font-size = 22;
      tab-width = 2;
      cursor-surrounding-lines = 4;
      render-whitespace = "all";
      bracket-pair-colorization = true;
      highlight-matching-brackets = true;
    };
    ui = {
      font-size = 20;
      open-editors-visible = false;
    };
    nushell-lsp = {
      path = "${pkgs.nushell}/bin/nu";
      args = [ "--lsp" ];
    };
    lapce-nix.lsp-path = "${pkgs.nil}/bin/nil";
  };
  plugins = [
    {
      author = "timon-schelling";
      name = "nushell-lsp";
      version = "0.1.0-rc2";
      hash = "sha256-/s982zGl85kxRoibwSpRiXxXD1Dgq6OUVvMXIUPP//4=";
    }
    {
      author = "MrFoxPro";
      name = "lapce-nix";
      version = "0.0.1";
      hash = "sha256-n+j8p6sB/Bxdp0iY6Gty9Zkpv9Rg34HjKsT1gUuGDzQ=";
    }
  ];
  keymaps = [
    {
      command = "open_log_file";
      key = "Ctrl+Shift+L";
    }
  ];
};
...

I'am allready using this in my nixos config via my fork. See this location.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@timon-schelling
Copy link
Contributor Author

any feedback on this?

Copy link

stale bot commented Jan 27, 2025

Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting.

If you are the original author of the PR

  • GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. If you have addressed the reviews you can officially ask for a review from those who commented to you or anyone else.
  • If it is unfinished but you plan to finish it, please mark it as a draft.
  • If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
  • To get things rolling again, rebase the PR against the target branch and address valid comments.

If you are not the original author of the PR

  • If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

@stale stale bot added the status: stale label Jan 27, 2025
@timon-schelling
Copy link
Contributor Author

I'm still interested in getting this into home manager. But before I rebase etc. I would like to know what other people think about my approach.

@stale stale bot removed the status: stale label Jan 28, 2025
@timon-schelling
Copy link
Contributor Author

@rycee I'm not sure where to ask for a review. matrix channel seems to be down.

Adds the 'programs.lapce' module for configuring lapce text editor.
Options for settings, plugins and keymaps are available.
@teto teto merged commit 8544cd0 into nix-community:master Feb 1, 2025
3 checks passed
tetov pushed a commit to tetov/home-manager that referenced this pull request Feb 16, 2025
Adds the 'programs.lapce' module for configuring lapce text editor.
Options for settings, plugins and keymaps are available.
347Online pushed a commit to 347Online/home-manager that referenced this pull request Mar 1, 2025
Adds the 'programs.lapce' module for configuring lapce text editor.
Options for settings, plugins and keymaps are available.
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.

2 participants