Mercurial > dotfiles
changeset 367:f0a89299e854
Enable EFM only on selected filetypes
author | zegervdv <zegervdv@me.com> |
---|---|
date | Mon, 29 Mar 2021 11:05:24 +0200 |
parents | 42bc7d63537e |
children | 72e8dd5a4ab5 |
files | dot_config/nvim/config.lua |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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