/none-ls-external-sources.nvim

All external sources not natively supported by none-ls

Primary LanguageLuaGNU General Public License v3.0GPL-3.0

All external sources not natively supported by none-ls.

Table of contents

Why

Problem:

  • none-ls external sources are chaotic and often don't follow the directory conventions of none-ls, nor the package names provided by mason, making impossible for package loaders to load them correctly.

Solution:

  • By having all external sources in a single place, we can ensure a minimum level of quality and compatibility.

How to install

{
  "zeioth/none-ls-autoload.nvim",
  event = "BufEnter",
  dependencies = {
    "williamboman/mason.nvim"
    "zeioth/none-ls-external-sources.nvim"
  },
  opts = {},
},

While using none-ls-autoload is not mandatory, it's recommended.

How to use none-ls external sources

On this example, we are loading all available external sources.

{
  "zeioth/none-ls-autoload.nvim",
  event = "BufEnter",
  dependencies = {
    "williamboman/mason.nvim",
    "zeioth/none-ls-external-sources.nvim"
  },
  opts = {
    -- Here you can add support for sources not oficially suppored by none-ls.
    external_sources = {
      -- diagnostics
      'none-ls-external-sources.diagnostics.cpplint',
      'none-ls-external-sources.diagnostics.eslint',
      'none-ls-external-sources.diagnostics.eslint_d',
      'none-ls-external-sources.diagnostics.flake8',
      'none-ls-external-sources.diagnostics.luacheck',
      'none-ls-external-sources.diagnostics.psalm',
      'none-ls-external-sources.diagnostics.shellcheck',
      'none-ls-external-sources.diagnostics.yamllint',

      -- formatting
      'none-ls-external-sources.formatting.autopep8',
      'none-ls-external-sources.formatting.beautysh',
      'none-ls-external-sources.formatting.easy-coding-standard',
      'none-ls-external-sources.formatting.eslint',
      'none-ls-external-sources.formatting.eslint_d',
      'none-ls-external-sources.formatting.jq',
      'none-ls-external-sources.formatting.latexindent',
      'none-ls-external-sources.formatting.reformat_gherkin',
      'none-ls-external-sources.formatting.rustfmt',
      'none-ls-external-sources.formatting.standardrb',
      'none-ls-external-sources.formatting.yq',

      -- code actions
      'none-ls-external-sources.code_actions.eslint',
      'none-ls-external-sources.code_actions.eslint_d',
      'none-ls-external-sources.code_actions.shellcheck',
    },
  },
},

How to contribute

You can contribute by sending a pull request with the source you want to add. But in order to be accepted, your source will have to:

  • Be in the right directory (formatting, diagnostics, code_actions)
  • Your source file MUST have the same name as its corresponding mason package.
  • You must manually test it and ensure it works before sending the PR (sending a screenshot is encouraged).

And finally, it must not be an already supported none-ls buintin source.

🌟 Support the project

If you want to help me, please star this repository to increase the visibility of the project.

Stargazers over time

FAQ

  • Will you support this repository forever and ever? No, of course not.
  • And what can I do if this repository is ever discontinued? Fork it, and maintain it yourself. As long as you keep the directory structure, you won't break anything.
  • Will you delete old sources? Yes, once a source stop being available on mason. This contrast with none-ls, which delete any source that has not been updated in more than 1 year, leaving many mason packages without support.
  • X source from this repository is not on mason anymore: Then please open an issue and report it, or send a PR deleting it.

Related projects