nix-config/roles/neovim/files/lua/opdavies/lsp/null-ls.lua
Oliver Davies 776772a952 chore(nvim): disable auto-formatting
This is tricky when working on projects that use different formatting
and coding styles (e.g. Drupal and Symfony), and on projects that
haven't had code formatting run on them before and making a small change
causes a large number of changes to be staged.

I'll experiment with formatting code within a range, or toggling
auto-formatting per project. Maybe something similar to what @wincent
showed in https://youtu.be/ifA8iw42vwI.
2022-01-20 15:50:52 +00:00

23 lines
460 B
Lua

local status_ok, null_ls = pcall(require, "null-ls")
if not status_ok then
return
end
local completion = null_ls.builtins.completion
local diagnostics = null_ls.builtins.diagnostics
local formatting = null_ls.builtins.formatting
null_ls.setup {
sources = {
formatting.prettier,
formatting.rustywind,
formatting.stylua,
diagnostics.eslint,
diagnostics.php,
diagnostics.phpcs,
diagnostics.phpstan,
completion.spell,
}
}