From b4f6f32791b4eebf3917a1ad6c76beeb7e59b3ea Mon Sep 17 00:00:00 2001 From: muneebusmani Date: Mon, 10 Jun 2024 15:56:57 +0500 Subject: [PATCH] added dart support --- lua/lazyvim/plugins/extras/lang/flutter.lua | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/flutter.lua diff --git a/lua/lazyvim/plugins/extras/lang/flutter.lua b/lua/lazyvim/plugins/extras/lang/flutter.lua new file mode 100644 index 00000000..7fbe69b0 --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/flutter.lua @@ -0,0 +1,30 @@ +-- requires dart/flutter to be installed +return { + recommended = { + ft = "dart", + root = { "pubspec.yaml" }, + }, + { + "akinsho/flutter-tools.nvim", + event = "VeryLazy", + dependencies = { + "nvim-lua/plenary.nvim", + "stevearc/dressing.nvim", + }, + config = true, + }, + + { + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "dart" } }, + }, + { + "nvimtools/none-ls.nvim", + optional = true, + opts = function(_, opts) + local nls = require("null-ls") + opts.sources = opts.sources or {} + table.insert(opts.sources, nls.builtins.formatting.dart_format) + end, + }, +}