Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Prevent null ls from attaching to buffer #85

Discussion options

You must be logged in to vote

We have an option, eslint_enable_code_actions, which is set to true by default. If that option, eslint_enable_diagnostics, and enable_formatting are all set to false, then no null-ls integrations will be registered and the client won't attach:

local lspconfig = require("lspconfig")
lspconfig.tsserver.setup({
    on_attach = function()
        require("nvim-lsp-ts-utils").setup({ eslint_enable_code_actions = false })
    end,
})

require("null-ls").config({})
lspconfig["null-ls"].setup({})

If it's attaching, it's either something else in your null-ls config (e.g. a source that's active for all filetypes) or a bug. Could you try the minimal config above? We could add an option to explicitly…

Replies: 1 comment 1 reply

Comment options

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

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