@ -26,11 +27,17 @@ local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
localrubocop=null_ls.builtins.formatting.rubocop
localrubocop=null_ls.builtins.formatting.rubocop
null_ls.setup({
null_ls.setup({
debug=true,
debug=false,
sources={
sources={
formatting.prettier,
formatting.prettier,
formatting.stylua,
formatting.stylua,
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.code_actions.gitsigns,
-- setting eslint_d only if we have a ".eslintrc.js" file in the project
diagnostics.eslint_d.with({
condition=function(utils)
returnutils.root_has_file({'.eslintrc.js'})
end
}),
-- Here we set a conditional to call the rubocop formatter. If we have a Gemfile in the project, we call "bundle exec rubocop", if not we only call "rubocop".
-- Here we set a conditional to call the rubocop formatter. If we have a Gemfile in the project, we call "bundle exec rubocop", if not we only call "rubocop".