From 8123c157bc36cbcaa52b7116b5b96a51c31bd481 Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Wed, 21 May 2025 10:48:22 +0100 Subject: Refactor none-ls config, add djlint to linter/formatter definition --- neovim/.config/nvim/lua/plugins/cspell.lua | 23 ----------------------- neovim/.config/nvim/lua/plugins/none_ls.lua | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 23 deletions(-) delete mode 100644 neovim/.config/nvim/lua/plugins/cspell.lua create mode 100644 neovim/.config/nvim/lua/plugins/none_ls.lua (limited to 'neovim/.config') diff --git a/neovim/.config/nvim/lua/plugins/cspell.lua b/neovim/.config/nvim/lua/plugins/cspell.lua deleted file mode 100644 index 33931b5..0000000 --- a/neovim/.config/nvim/lua/plugins/cspell.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - { - 'nvimtools/none-ls.nvim', - dependencies = { - { - 'davidmh/cspell.nvim', - }, - }, - config = function () - local cspell = require('cspell') - require('null-ls').setup { - sources = { - cspell.diagnostics, - cspell.code_actions, - }, - should_attach = function(bufnr) - local bufname = vim.api.nvim_buf_get_name(bufnr) - return not bufname == 'gen.nvim' - end, - } - end, - } -} diff --git a/neovim/.config/nvim/lua/plugins/none_ls.lua b/neovim/.config/nvim/lua/plugins/none_ls.lua new file mode 100644 index 0000000..020febf --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/none_ls.lua @@ -0,0 +1,27 @@ +return { + { + 'nvimtools/none-ls.nvim', + dependencies = { + { + 'davidmh/cspell.nvim', + }, + }, + config = function () + local cspell = require('cspell') + local null_ls = require('null-ls') + + null_ls.setup { + sources = { + cspell.diagnostics, + cspell.code_actions, + null_ls.builtins.diagnostics.djlint, + null_ls.builtins.formatting.djlint, + }, + should_attach = function(bufnr) + local bufname = vim.api.nvim_buf_get_name(bufnr) + return not bufname == 'gen.nvim' + end, + } + end, + } +} -- cgit v1.2.3