diff options
| author | William Boman <william@redwill.se> | 2023-03-19 08:36:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-19 08:36:30 +0100 |
| commit | cc0582694e3a665a3e41450d8c9e6c6071dd882b (patch) | |
| tree | 818826364eef060576ee230ae0b449aef8cbdeb7 /CONTRIBUTING.md | |
| parent | feat: add openedge-language-server (#1108) (diff) | |
| download | mason-cc0582694e3a665a3e41450d8c9e6c6071dd882b.tar mason-cc0582694e3a665a3e41450d8c9e6c6071dd882b.tar.gz mason-cc0582694e3a665a3e41450d8c9e6c6071dd882b.tar.bz2 mason-cc0582694e3a665a3e41450d8c9e6c6071dd882b.tar.lz mason-cc0582694e3a665a3e41450d8c9e6c6071dd882b.tar.xz mason-cc0582694e3a665a3e41450d8c9e6c6071dd882b.tar.zst mason-cc0582694e3a665a3e41450d8c9e6c6071dd882b.zip | |
feat: add github:mason-org/mason-registry as the secondary default registry (#1111)
The current, and henceforth deprecated, Lua-based package registry bundled with `mason.nvim` is still the primary
registry. The [new registry](https://github.com/mason-org/mason-registry/) is being added now as a secondary registry to
ensure a smooth roll-out. Over time, the Lua-based packages in `mason.nvim` will gradually be removed and replaced by
packages provided by the new registry. This migration will be entirely seamless.
Diffstat (limited to 'CONTRIBUTING.md')
| -rw-r--r-- | CONTRIBUTING.md | 66 |
1 files changed, 3 insertions, 63 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 227de6c7..4163cfde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,5 @@ - [Contribution policy](#contribution-policy) - [Adding a new package](#adding-a-new-package) - - [The anatomy of a package](#the-anatomy-of-a-package) - - [Package name](#package-name) - - [Package homepage](#package-homepage) - - [Package categories](#package-categories) - - [Package languages](#package-languages) - - [Package installer](#package-installer) - [Code style](#code-style) - [Generated code](#generated-code) - [Tests](#tests) @@ -25,63 +19,9 @@ RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as de # Adding a new package -Package definitions reside within the `lua/mason-registry` directory. Each package MUST reside in its own directory with -a main entrypoint file `init.lua`. The name of the directory MUST be the same as the package name. The `init.lua` file -MUST return a `Package` (`mason-core.package`) instance. - -## The anatomy of a package - -Each package consists of a specification ([`PackageSpec`](https://github.com/williamboman/mason.nvim/blob/main/doc/reference.md#packagespec)), describing metadata about -the package as well as its installation instructions. The [`Package`](https://github.com/williamboman/mason.nvim/blob/main/doc/reference.md#package) class encapsulates a -specification and provides utility methods such as `Package:install()` and `Package:check_new_version({callback})`. - -### Package name - -The name of a package MUST follow the following naming scheme: - -1. If the upstream package name is sufficiently unambiguous, or otherwise widely recognized, that name MUST be used -1. If the upstream package provides a single executable with a name that is sufficiently unambiguous, or otherwise - widely recognized, the name of the executable MUST be used -1. If either the package or executable name is ambiguous, a name where a clarifying prefix or suffix is added SHOULD be - used -1. As a last resort, the name of the package should be constructed to best convey its target language and scope, e.g. - `json-lsp` for a JSON language server. - -### Package homepage - -A package MUST have a homepage associated with it. The homepage SHOULD be a URL to the landing page of a public website. -If no public website exists, the homepage MUST be a URL to the source code of the package (e.g. a GitHub repository). - -### Package categories - -See: [`Package.Cat`](https://github.com/williamboman/mason.nvim/blob/main/doc/reference.md#packagecat) - -A package SHOULD belong to one or more categories. Should no category apply, it is a sign that the package's scope -exceeds that of mason.nvim. - -### Package languages - -See: [`Package.Lang`](https://github.com/williamboman/mason.nvim/blob/main/doc/reference.md#packagelang) - -A package SHOULD belong to one or more languages. There are however situations where no languages apply, in which case -no languages should be applied. - -### Package installer - -A package installer MUST be a function. It MAY be an asynchronous function that MUST use the `mason-core.async` -implementation. The installer function will be invoked by mason when the package is requested to be installed. It will -be invoked with a single argument of type -[`InstallContext`](https://github.com/williamboman/mason.nvim/blob/main/doc/reference.md#installcontext). The parameter -name of the function MUST be `ctx` (abbreviation of context). - -Package installers SHOULD make use of the [built-in -managers](https://github.com/williamboman/mason.nvim/tree/main/lua/mason-core/managers), which provide a high-level API -for common installation instructions. - -A package installer MUST provide a "primary source" describing how, and where, the package was installed from. This is -done via the `InstallContext` API (`ctx.receipt:with_primary_source({source})`) or via some other API provided by a -manager. The provided `{source}` MUST be a table with a field `type` that MUST be supported by mason (e.g. `"npm"`, -`"pip3"`). +Core `mason.nvim` package definitions reside within the [`github:mason-org/mason-registry` +registry](https://github.com/mason-org/mason-registry/). Contributions to add new packages MUST be done there (refer to +the README and existing package definitions). # Code style |
