Mercurial > dotfiles
comparison dot_config/nvim/lua/efm/python.lua @ 380:3b7ebcd563e1
Format config with lua-format
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sat, 10 Apr 2021 11:26:56 +0200 |
parents | 3b25f3aa7014 |
children | 3f2b7b399dee |
comparison
equal
deleted
inserted
replaced
379:2a8195e14cad | 380:3b7ebcd563e1 |
---|---|
1 local languages = require'efm/languages' | 1 local languages = require 'efm/languages' |
2 | 2 |
3 languages.python = {}; | 3 languages.python = {}; |
4 | 4 |
5 if (vim.fn.executable('black') == 1) then | 5 if (vim.fn.executable('black') == 1) then |
6 table.insert(languages.python, { | 6 table.insert(languages.python, { formatCommand = 'black -', formatStdin = true }) |
7 formatCommand = "black -", | |
8 formatStdin = true | |
9 }) | |
10 end | 7 end |
11 | 8 |
12 if (vim.fn.executable('flake8') == 1) then | 9 if (vim.fn.executable('flake8') == 1) then |
13 table.insert(languages.python, { | 10 table.insert(languages.python, { |
14 lintCommand = "flake8 --stdin-display-name ${INPUT} -", | 11 lintCommand = 'flake8 --stdin-display-name ${INPUT} -', |
15 lintStdin = true, | 12 lintStdin = true, |
16 lintIgnoreExitCode = true, | 13 lintIgnoreExitCode = true, |
17 lintFormats = {"%f:%l:%c: %m"} | 14 lintFormats = { '%f:%l:%c: %m' }, |
18 }) | 15 }) |
19 end | 16 end |
20 | 17 |