Skip to content

How to use plugins.null-ls.extraOptions to add sources? #460

Closed Answered by garaiza-93
garaiza-93 asked this question in Q&A
Discussion options

You must be logged in to vote

Got an answer from the Matrix channel. you can use the mkRaw helper function to insert raw Lua code.

Here's what that looks like:

{ pkgs, helpers, ... }:
{
  plugins.null-ls = {
    enable = true;
    extraOptions = {
      sources = helpers.mkRaw ''
        { require("null-ls").builtins.formatting.eslint_d,
          require("null-ls").builtins.formatting.prettier_d_slim,
          require("null-ls").builtins.code_actions.eslint_d,
          require("null-ls").builtins.diagnostics.eslint_d
        }
      '';
    };
  };
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GaetanLepage
Comment options

Answer selected by garaiza-93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants