Fuxx
This commit is contained in:
parent
8268fba83d
commit
7ed2a6e110
9565 changed files with 1315332 additions and 90 deletions
22
home/.config/nvim/lua/lsp-config/null-ls.lua
Normal file
22
home/.config/nvim/lua/lsp-config/null-ls.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
local null_ls = require("null-ls")
|
||||
|
||||
local formatting = null_ls.builtins.formatting
|
||||
|
||||
local sources = {
|
||||
formatting.eslint,
|
||||
formatting.autopep8,
|
||||
formatting.stylua,
|
||||
formatting.clang_format,
|
||||
-- formatting.prettier,
|
||||
-- formatting.latexindent,
|
||||
}
|
||||
|
||||
null_ls.setup({
|
||||
sources = sources,
|
||||
|
||||
on_attach = function(client)
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting()")
|
||||
end
|
||||
end,
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue