From d1381d574b828eb4a63fe6cdaa900690c65e2af0 Mon Sep 17 00:00:00 2001 From: Andrea C from The App <3269984+gacallea@users.noreply.github.com> Date: Sat, 30 Mar 2024 08:41:14 +0100 Subject: [PATCH] Create toml.lua adding toml support to PR on LazyVim --- lua/lazyvim/plugins/extras/lang/toml.lua | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/toml.lua diff --git a/lua/lazyvim/plugins/extras/lang/toml.lua b/lua/lazyvim/plugins/extras/lang/toml.lua new file mode 100644 index 00000000..0f164bdb --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/toml.lua @@ -0,0 +1,34 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "toml" }) + end + end, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "taplo" }) + end, + }, + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + toml = { "taplo" }, + }, + }, + }, + { + "neovim/nvim-lspconfig", + ft = { "toml" }, + opts = { + servers = { + taplo = {}, + }, + }, + }, +}