summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-08-10 23:29:49 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-08-10 23:29:49 +0200
commit93d2454af4564bcc9168317cea3d19abfafa644f (patch)
tree455021c637e829840011fbd024bb3334505501f8 /.config/nvim
parent540268d618627079c9b958a955b586e1888b46a8 (diff)
Add linter and formatter for python, json, lua
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/README.md5
-rw-r--r--.config/nvim/config.lua33
2 files changed, 34 insertions, 4 deletions
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",