-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
7680acf
commit 9323316
Showing
11 changed files
with
203 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
return function() | ||
local null_ls = require("null-ls") | ||
local mason_null_ls = require("mason-null-ls") | ||
local btnf = null_ls.builtins.formatting | ||
local btnd = null_ls.builtins.diagnostics | ||
local null_reg = null_ls.register | ||
|
||
null_ls.setup({ | ||
debug = false, | ||
update_in_insert = false, | ||
diagnostics_format = "[#{s} #{c}] #{m}", | ||
}) | ||
|
||
mason_null_ls.setup({ | ||
ensure_installed = require("core.settings").null_ls, | ||
automatic_installation = true, | ||
automatic_setup = true, | ||
}) | ||
|
||
-- NOTE: Users don't need to specify null-ls sources if using only default config. | ||
-- "mason-null-ls" will auto-setup for users. | ||
mason_null_ls.setup_handlers({ | ||
black = function() | ||
null_reg(btnf.black.with({ extra_args = { "--fast" } })) | ||
end, | ||
markdownlint = function() | ||
null_reg(btnf.markdownlint) | ||
null_reg(btnd.markdownlint.with({ extra_args = { "--disable MD033" } })) | ||
end, | ||
-- example for changing diagnostics_format | ||
-- shellcheck = function() | ||
-- null_reg(btnd.shellcheck.with({ diagnostics_format = "#{m} [#{s} #{c}]" })) | ||
-- end, | ||
}) | ||
|
||
require("completion.formatting").configure_format_on_save() | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.