From c9e2adbbc8fd7a5398c8c66d21f0e02dc7b60203 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 8 Nov 2021 23:13:05 +0100 Subject: Add new lunarvin updates --- .config/nvim/ftplugin/json.lua | 7 ++----- .config/nvim/ftplugin/lua.lua | 7 ++----- .config/nvim/ftplugin/python.lua | 15 ++++----------- .config/nvim/ftplugin/sh.lua | 5 ++++- 4 files changed, 12 insertions(+), 22 deletions(-) (limited to '.config/nvim/ftplugin') diff --git a/.config/nvim/ftplugin/json.lua b/.config/nvim/ftplugin/json.lua index 53a6790..a2047cd 100644 --- a/.config/nvim/ftplugin/json.lua +++ b/.config/nvim/ftplugin/json.lua @@ -1,5 +1,2 @@ -options.lang.json.formatters = { - { - exe = "prettier", - }, -} +local formatters = require "lsp.null-ls.formatters" +formatters.setup { { exe = "prettier", filetypes = { "json" } } } diff --git a/.config/nvim/ftplugin/lua.lua b/.config/nvim/ftplugin/lua.lua index d0408a1..6e10a53 100644 --- a/.config/nvim/ftplugin/lua.lua +++ b/.config/nvim/ftplugin/lua.lua @@ -1,5 +1,2 @@ -options.lang.lua.formatters = { - { - exe = "stylua", - }, -} +local formatters = require "lsp.null-ls.formatters" +formatters.setup { { exe = "stylua", filetypes = { "lua" } } } diff --git a/.config/nvim/ftplugin/python.lua b/.config/nvim/ftplugin/python.lua index 2ec643d..f1e9a50 100644 --- a/.config/nvim/ftplugin/python.lua +++ b/.config/nvim/ftplugin/python.lua @@ -1,11 +1,4 @@ -options.lang.python.formatters = { - { - exe = "black", - }, -} - -options.lang.python.linters = { - { - exe = "flake8", - }, -} +local formatters = require "lsp.null-ls.formatters" +local linters = require "lsp.null-ls.linters" +formatters.setup { { exe = "black", filetypes = { "python" } } } +formatters.setup { { exe = "flake8", filetypes = { "python" } } } diff --git a/.config/nvim/ftplugin/sh.lua b/.config/nvim/ftplugin/sh.lua index 442273a..6fcc649 100644 --- a/.config/nvim/ftplugin/sh.lua +++ b/.config/nvim/ftplugin/sh.lua @@ -1 +1,4 @@ -options.lang.sh.linters = { { exe = "shellcheck", args = { "--sverity", "error" } } } +local formatters = require "lsp.null-ls.formatters" +formatters.setup { + { exe = "shellcheck", args = { "--sverity", "error" }, filetypes = { "sh" } }, +} -- cgit v1.2.3-70-g09d2