Add cspell to null-ls again
Use limited filetypes to not make it annoying this time
This commit is contained in:
parent
07c9a227d7
commit
99ce5c68d8
|
@ -65,8 +65,14 @@ local config = function()
|
|||
end
|
||||
|
||||
local builtins = require "null-ls.builtins"
|
||||
local cspell = require "cspell"
|
||||
local cspell_filetypes = { "json", "yaml", "html", "markdown", "norg", "gitcommit" }
|
||||
local cspell_config = { config_file_preferred_name = ".cspell.json" }
|
||||
require("null-ls").setup {
|
||||
sources = {
|
||||
cspell.diagnostics.with { filetypes = cspell_filetypes, config = cspell_config },
|
||||
cspell.code_actions.with { filetypes = cspell_filetypes, config = cspell_config },
|
||||
|
||||
builtins.code_actions.gitsigns,
|
||||
builtins.formatting.alejandra,
|
||||
builtins.formatting.beautysh,
|
||||
|
@ -88,6 +94,11 @@ return {
|
|||
"neovim/nvim-lspconfig",
|
||||
cond = not vim.g.vscode,
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = { "cmp-nvim-lsp", "folke/trouble.nvim", "folke/neodev.nvim", "jose-elias-alvarez/null-ls.nvim" },
|
||||
dependencies = {
|
||||
"cmp-nvim-lsp",
|
||||
"folke/trouble.nvim",
|
||||
"folke/neodev.nvim",
|
||||
{ "jose-elias-alvarez/null-ls.nvim", dependencies = "davidmh/cspell.nvim" },
|
||||
},
|
||||
config = config,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue