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/README.md | 5 +---- .config/nvim/config.lua | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/README.md b/.config/nvim/README.md index 0baaa09..d524a20 100644 --- a/.config/nvim/README.md +++ b/.config/nvim/README.md @@ -36,7 +36,4 @@ flake8 TODO: - [] FIX ftplugin -- [x] fix numb log -- [x] update with new logger -- [x] add/mv user plugins -- [x] add lsp-install + - [ ] fix formatters and linters! 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