Skip to content

plugins/treesitter-playground: move removal notice to plugins/depression.nix #2184

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
Sep 7, 2024

Conversation

MattSturgeon
Copy link
Member

I noticed in #2164 that treesitter-playground exists as a plugin module, but is just a removal notice.

That's fine and great, however it doesn't make sense in the context of plugins/by-name IMO.

I think it makes logical sense to keep it in the treesitter plugin? However, it may be useful to have a "top-level" plugins deprecations file where removed plugins can be listed in a common location. I could revise this PR to do that, if desired.

I'm thinking something like plugins/deprecation.nix:

{ lib, ... }:
let
  removed = {
    treesitter-playground = ''
      The `treesitter-playground` plugin has been deprecated since the functionality is included in Neovim.
      Use:
      - `:Inspect` to show the highlight groups under the cursor
      - `:InspectTree` to show the parsed syntax tree ("TSPlayground")
      - `:PreviewQuery` to open the Query Editor (Nvim 0.10+)
    ''
  };
in
{
  imports = mapAttrsToList (name: lib.mkRemovedOptionModule [ "plugins" name ]) removed;
}

khaneliman
khaneliman previously approved these changes Sep 6, 2024
@MattSturgeon
Copy link
Member Author

MattSturgeon commented Sep 7, 2024

As discussed in PMs, we'll end up needing something like this for nvim-osc52 soon, as #1736 will need upgrading to a removal notice.

So I've amended the PR to use the alternate approach proposed above. This fits nicely with the spirit of #2183.

- Initialize it with the `treesitter-playground` removal
Copy link
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

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

LGTM, as noted, we can utilize this for future top-level deprecations for plugins that become unmaintainable or get removed.

@MattSturgeon
Copy link
Member Author

@Mergifyio queue

Copy link
Contributor

mergify bot commented Sep 7, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 86a4021

@mergify mergify bot merged commit 86a4021 into nix-community:main Sep 7, 2024
4 checks passed
@MattSturgeon MattSturgeon deleted the treesitter-playground branch September 7, 2024 00:55
@MattSturgeon MattSturgeon changed the title plugins/treesitter-playground: move removal notice to treesitter plugin plugins/treesitter-playground: move removal notice to plugins/depression.nix Sep 7, 2024
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