-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed null ls sources and added global autocmd
- Loading branch information
Axel
committed
Nov 3, 2022
1 parent
8e832d2
commit 33ced16
Showing
2 changed files
with
7 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
vim.cmd([[colorscheme gruvbox]]) | ||
vim.cmd([[hi Normal guibg=NONE ctermbg=NONE]]) | ||
vim.cmd([[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]) |
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 |
---|---|---|
@@ -1,16 +1,11 @@ | ||
local _, null_ls = pcall(require, "null-ls") | ||
|
||
local sources = { | ||
null_ls.builtins.formatting.prettierd, | ||
null_ls.builtins.formatting.eslint_d, | ||
null_ls.builtins.formatting.autopep8, | ||
--null_ls.builtins.formatting.prettierd, | ||
null_ls.builtins.formatting.stylua, | ||
null_ls.builtins.formatting.eslint_d, | ||
null_ls.builtins.formatting.autopep8, | ||
null_ls.builtins.formatting.tidy, | ||
} | ||
|
||
null_ls.setup({ | ||
sources = sources, | ||
on_attach = function(client) | ||
if client.server_capabilities.document_formatting then | ||
vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()") | ||
end | ||
end, | ||
}) | ||
null_ls.setup({ sources = sources }) |