From 3580cc7c88dc2a84161d7025301f42f994792125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Mu=C3=B1oz=20Paredes?= Date: Tue, 14 May 2024 16:55:33 +0200 Subject: [PATCH] Add flutter config --- init.lua | 1 + lua/custom/plugins/flutter.lua | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 lua/custom/plugins/flutter.lua diff --git a/init.lua b/init.lua index 834f4d18..555c0543 100644 --- a/init.lua +++ b/init.lua @@ -562,6 +562,7 @@ require('lazy').setup({ ruff = {}, taplo = {}, -- LSP for toml files debugpy = {}, + -- dart-debug-adapter = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- diff --git a/lua/custom/plugins/flutter.lua b/lua/custom/plugins/flutter.lua new file mode 100644 index 00000000..cc8a8069 --- /dev/null +++ b/lua/custom/plugins/flutter.lua @@ -0,0 +1,39 @@ +return { + 'akinsho/flutter-tools.nvim', + lazy = false, + dependencies = { + 'nvim-lua/plenary.nvim', + 'stevearc/dressing.nvim', -- optional for vim.ui.select + }, + config = function() + require('flutter-tools').setup { + debugger = { + enabled = true, + exception_breakpoints = {}, + run_via_dap = true, + register_configurations = function(paths) + require("dap").configurations.dart = { + require("dap.ext.vscode").load_launchjs() + } + end, + }, + widget_guides = { + enabled = true, + debug = true + }, + lsp = { + color = { -- show the derived colours for dart variables + enabled = true, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10 + background = false, -- highlight the background + virtual_text = true, -- show the highlight using virtual text + }, + }, + settings = { + showTodos = true, + completeFunctionCalls = true, + analysisExcludedFolders = { ".dart_tool", }, + }, + fvm = true + } + end +} \ No newline at end of file