# HG changeset patch # User zegervdv # Date 1617008724 -7200 # Node ID f0a89299e85412b4d9aab6cef55f63c5cb11eb43 # Parent 42bc7d63537e1e76f847ce9da815b9f5ba41d588 Enable EFM only on selected filetypes diff -r 42bc7d63537e -r f0a89299e854 dot_config/nvim/config.lua --- a/dot_config/nvim/config.lua Mon Mar 29 10:59:20 2021 +0200 +++ b/dot_config/nvim/config.lua Mon Mar 29 11:05:24 2021 +0200 @@ -487,14 +487,20 @@ local language_cfg = require'efm/languages' + local filetypes = {} + for lang, _ in pairs(language_cfg) do + table.insert(filetypes, lang) + end + lsp.efm.setup{ - on_attach = on_attach; - init_options = {documentFormatting = true}; - root_dir = lsputil.root_pattern('.git', '.hg'); + on_attach = on_attach, + filetypes = filetypes, + init_options = {documentFormatting = true}, + root_dir = lsputil.root_pattern('.git', '.hg'), settings = { rootMarkers = {".git/", ".hg/"}, languages = language_cfg - }; + }, } end