Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Prettier default settings #1389

Answered by fitrh
Callumk7 asked this question in Q&A
Feb 8, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You can try something like this

null_ls.builtins.formatting.prettier.with({
    extra_args = function(params)
        if vim.fs.dirname(vim.fs.find({ '.prettierrc', '.prettierrc.js' }, { upward = true })[1]) then
            return nil
        end

        return {} -- your extra args       
    end,
}),

Replies: 1 comment 1 reply

Comment options

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

Answer selected by Callumk7
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