repos / neovimcraft

website that makes it easy to find neovim plugins
git clone https://github.com/neurosnap/neovimcraft.git

commit
68b23ca
parent
f39f940
author
Eric Bower
date
2021-07-19 04:51:42 +0000 UTC
only show plugin install if plugin
1 files changed,  +3, -0
M src/lib/plugin.svelte
+3, -0
 1@@ -10,6 +10,7 @@
 2   export let plugin: Plugin;
 3   export let tags: Tag[];
 4   export let html: string = '<div>readme not found</div>';
 5+  const isPlugin = tags.find((t) => t.id === 'plugin');
 6 
 7   function onSearch(curSearch: string) {
 8     const query = qs.parseUrl(window.location.search);
 9@@ -39,6 +40,7 @@
10       <div class="metric"><Icon icon="git-branch" /> <span>{plugin.forks}</span></div>
11     </Tooltip>
12   </div>
13+  {#if isPlugin}
14   <div class="install">
15     <h3>packer</h3>
16     <pre><code>require('packer').startup(function()
17@@ -51,6 +53,7 @@ end)</code></pre>
18   '{plugin.id}'
19 &rcub;</code></pre>
20   </div>
21+  {/if}
22   <hr />
23 </div>
24 {@html html}