From 54f8e49a5c320504eabb2d1cd253475052eb9368 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sat, 29 Jul 2023 21:33:28 +0200 Subject: [PATCH] Added prettier --- .config/nvim/lua/config/lazy.lua | 1 - .config/nvim/lua/plugins/mason.lua | 9 --------- .config/nvim/lua/plugins/prettier.lua | 15 +++++++++++++++ 3 files changed, 15 insertions(+), 10 deletions(-) delete mode 100644 .config/nvim/lua/plugins/mason.lua create mode 100644 .config/nvim/lua/plugins/prettier.lua diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua index 9ad2694..aac01af 100644 --- a/.config/nvim/lua/config/lazy.lua +++ b/.config/nvim/lua/config/lazy.lua @@ -11,7 +11,6 @@ require("lazy").setup({ -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- import any extras modules here - { import = "lazyvim.plugins.extras.formatting.prettier" }, -- { import = "lazyvim.plugins.extras.lang.typescript" }, -- { import = "lazyvim.plugins.extras.lang.json" }, -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, diff --git a/.config/nvim/lua/plugins/mason.lua b/.config/nvim/lua/plugins/mason.lua deleted file mode 100644 index b75dc8a..0000000 --- a/.config/nvim/lua/plugins/mason.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "williamboman/mason.nvim", - opts = { - ensure_installed = { - "gofumpt", - "prettierd", - }, - }, -} diff --git a/.config/nvim/lua/plugins/prettier.lua b/.config/nvim/lua/plugins/prettier.lua new file mode 100644 index 0000000..6227ef6 --- /dev/null +++ b/.config/nvim/lua/plugins/prettier.lua @@ -0,0 +1,15 @@ +return { + { + "williamboman/mason.nvim", + opts = function(_, opts) + table.insert(opts.ensure_installed, "prettierd") + end, + }, + { + "jose-elias-alvarez/null-ls.nvim", + opts = function(_, opts) + local nls = require("null-ls") + table.insert(opts.sources, nls.builtins.formatting.prettierd) + end, + }, +}