From 93d2454af4564bcc9168317cea3d19abfafa644f Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 10 Aug 2021 23:29:49 +0200 Subject: Add linter and formatter for python, json, lua --- .config/nvim/config.lua | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to '.config/nvim/config.lua') diff --git a/.config/nvim/config.lua b/.config/nvim/config.lua index dd3d9b0..8d595ee 100644 --- a/.config/nvim/config.lua +++ b/.config/nvim/config.lua @@ -41,6 +41,39 @@ options.builtin.treesitter.ensure_installed = "maintained" options.builtin.treesitter.autotag.enable = true options.builtin.treesitter.playground.enable = true +-- Formatters +-- python +options.lang.python.formatters = { + { + exe = "black", + args = {}, + }, +} + +options.lang.python.linters = { + { + exe = "flake8", + args = {}, + }, +} + +-- lua +options.lang.lua.formatters = { + { + exe = "stylua", + args = {}, + }, +} + +--json +options.lang.json.formatters = { + { + exe = "prettier", + args = {}, + }, +} + + options.plugins = { { "folke/twilight.nvim", -- cgit v1.2.3-70-g09d2