Skip to content

How to get null-ls to automatically mount to file types #385

Answered by shaeinst
irishgreencitrus asked this question in Q&A
Discussion options

You must be logged in to vote

you have to explicitly configure each formatter/linters
for example: to setup clang_format

require("null-ls").setup({
    sources = {
        require("null-ls").builtins.formatting.clang_format.with({
            command = "clang-format",
            args = {
                "-assume-filename",
                "$FILENAME",
            },
            to_stdin = true,
        })
    },
})

readmore
more
for ref

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by irishgreencitrus
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