comparison dot_config/nvim/config.lua @ 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
comparison
equal deleted inserted replaced
366:42bc7d63537e 367:f0a89299e854
485 pcall(require, 'efm/systemverilog') 485 pcall(require, 'efm/systemverilog')
486 pcall(require, 'efm/flp') 486 pcall(require, 'efm/flp')
487 487
488 local language_cfg = require'efm/languages' 488 local language_cfg = require'efm/languages'
489 489
490 local filetypes = {}
491 for lang, _ in pairs(language_cfg) do
492 table.insert(filetypes, lang)
493 end
494
490 lsp.efm.setup{ 495 lsp.efm.setup{
491 on_attach = on_attach; 496 on_attach = on_attach,
492 init_options = {documentFormatting = true}; 497 filetypes = filetypes,
493 root_dir = lsputil.root_pattern('.git', '.hg'); 498 init_options = {documentFormatting = true},
499 root_dir = lsputil.root_pattern('.git', '.hg'),
494 settings = { 500 settings = {
495 rootMarkers = {".git/", ".hg/"}, 501 rootMarkers = {".git/", ".hg/"},
496 languages = language_cfg 502 languages = language_cfg
497 }; 503 },
498 } 504 }
499 end 505 end
500 506
501 -- Try importing local config 507 -- Try importing local config
502 local ok, localconfig = pcall(require, 'localconfig') 508 local ok, localconfig = pcall(require, 'localconfig')