view dot_config/nvim/lua/efm/python.lua @ 390:bfaff08e7e54

Run navigator cfg after astronauta is loaded
author Zeger Van de Vannet <zegervdv@me.com>
date Mon, 31 May 2021 16:50:30 +0200
parents 3b7ebcd563e1
children 3f2b7b399dee
line wrap: on
line source

local languages = require 'efm/languages'

languages.python = {};

if (vim.fn.executable('black') == 1) then
  table.insert(languages.python, { formatCommand = 'black -', formatStdin = true })
end

if (vim.fn.executable('flake8') == 1) then
  table.insert(languages.python, {
    lintCommand = 'flake8 --stdin-display-name ${INPUT} -',
    lintStdin = true,
    lintIgnoreExitCode = true,
    lintFormats = { '%f:%l:%c: %m' },
  })
end