npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mosetta/ide-plugin-completion

v0.0.14

Published

The completion list: the language server, the file's own words and postfix templates, ranked by what you actually pick.

Readme

Completion

@mosetta/ide-plugin-completion · The completion list: the language server, the file's own words and postfix templates, ranked by what you actually pick.

What it does

The list opens by itself on the first letter of a word and after a dot, or on a key. It merges several sources into one ranking:

  • the language server — members, variables, imports, with their types and documentation on the side;
  • the words of the open file — a safety net where the language server has nothing to say, as in comments, strings and plain text;
  • postfix templates — write the expression first, then what to do with it: user.name.log becomes console.log(user.name), and there are .if, .not, .return, .const, .for, .await and more.

Choices are remembered: an item you pick often floats up the next time, across projects. Enter inserts, Tab replaces the word under the caret.

Keys

| Command | macOS | Windows and Linux | |---|---|---| | completion.show | Cmd+Space | Ctrl+Space | | completion.accept / completion.replace | Enter / Tab | Enter / Tab |

Arrows and Page Up/Down move, Escape closes.

Settings

Section completion in settings.json:

| Key | Default | What it does | |---|---|---| | auto | true | Open the list by itself. Off means by key only. | | words | true | Offer the open file's words. | | postfix | true | Offer postfix templates. |

Screenshots and demos

The completion list with types and documentation

A postfix template turning an expression into a log line

Watch the video · Try it in the browser

Using it from another plugin

Sources are entries in the completion.source key, which this plugin declares. The three built-in ones are registered the same way, so a new source — snippets, an AI model — arrives as an entry, without a change here.

| Field | What it is | |---|---| | id | The source's name; items carry it, so the ranking can tell sources apart. | | weight | Its standing in the ranking: the language server is 10, postfix -4, the file's words -20. | | items(ask) | The items for this spot, sync or async. ask has the path, the text, the caret pos, the from of the word being typed, line, character, the trigger character (a dot, or null) and whether the list was asked for explicitly. |

An item needs a label, a kind (function, variable, snippet, …) and its source; optionally insert (what goes in, if not the label), caret (where the caret lands inside it), detail, and resolve() for documentation fetched only when the item is selected.

import type { Ask, Answer, Source } from '@mosetta/ide-plugin-completion';

const snippets: Source = {
  id: 'snippets',
  weight: 0,
  items: (ask: Ask): Answer => {
    if (ask.trigger !== null || !ask.path.endsWith('.test.ts')) return { items: [] };
    return {
      items: [
        { label: 'it', kind: 'snippet', source: 'snippets', insert: "it('', () => {\n  \n});", caret: 4, detail: 'a test' },
      ],
    };
  },
};

this.ide.registry('completion.source').add(snippets);