add flutter plugin and config

This commit is contained in:
Vladan Popovic 2024-03-27 02:41:32 +01:00
parent a35b743b62
commit 727a6bcfbc
3 changed files with 85 additions and 8 deletions

66
lua/plugins/flutter.lua Normal file
View file

@ -0,0 +1,66 @@
require("flutter-tools").setup {
ui = {
border = "rounded",
notification_style = 'native'
},
decorations = {
statusline = {
app_version = false,
device = false,
project_config = false,
}
},
debugger = {
enabled = false,
run_via_dap = false,
exception_breakpoints = {},
--register_configurations = function(paths)
-- require("dap").configurations.dart = {
-- <put here config that you would find in .vscode/launch.json>
-- }
--end,
},
flutter_path = "/usr/bin/flutter",
flutter_lookup_cmd = nil,
root_patterns = { ".git", "pubspec.yaml" },
fvm = false,
widget_guides = {
enabled = false,
},
closing_tags = {
highlight = "Comment",
prefix = "/ ",
enabled = true,
},
dev_log = {
enabled = true,
notify_errors = false,
open_cmd = "tabedit",
},
dev_tools = {
autostart = false,
auto_open_browser = false,
},
outline = {
open_cmd = "30vnew",
auto_open = false,
},
lsp = {
color = {
enabled = false,
background = false,
background_color = nil,
foreground = false,
virtual_text = false,
virtual_text_str = "",
},
settings = {
showTodos = true,
completeFunctionCalls = true,
-- analysisExcludedFolders = { "<path-to-flutter-sdk-packages>" },
renameFilesWithClasses = "prompt",
enableSnippets = true,
updateImportsOnRename = true,
}
}
}

View file

@ -81,6 +81,13 @@ require('packer').startup(function()
-- Misc
use { 'jbyuki/venn.nvim' } -- ascii diagrams
use { 'hashivim/vim-terraform' }
use {
'akinsho/flutter-tools.nvim',
requires = {
'nvim-lua/plenary.nvim',
'stevearc/dressing.nvim', -- optional for vim.ui.select
},
}
end)
require('plugins.cmp')
@ -89,3 +96,4 @@ require('plugins.neogit')
require('plugins.oil')
require('plugins.telescope')
require('plugins.venn')
require("plugins.flutter")