Add conform for foramtting and mason back for lsp installation but nothing more
This commit is contained in:
15
lua/plugins/conform.lua
Normal file
15
lua/plugins/conform.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "black" }
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback"
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
4
lua/plugins/fidget.lua
Normal file
4
lua/plugins/fidget.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
opts = {}
|
||||
}
|
||||
@@ -2,20 +2,5 @@ return {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
vim.lsp.enable({ "lua_ls", "basedpyright", "gopls", "html", "yamlls", "svelte-language-server", "clangd", "ansiblels" })
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("lsp", { clear = true }),
|
||||
callback = function(args)
|
||||
-- 2
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
-- 3
|
||||
buffer = args.buf,
|
||||
callback = function()
|
||||
-- 4 + 5
|
||||
vim.lsp.buf.format { async = false, id = args.data.client_id }
|
||||
end,
|
||||
})
|
||||
end
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
4
lua/plugins/mason.lua
Normal file
4
lua/plugins/mason.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"mason-org/mason.nvim",
|
||||
opts = {}
|
||||
}
|
||||
Reference in New Issue
Block a user