diff --git a/lua/core/lspconfig.lua b/lua/core/lspconfig.lua index 8363306..1cefba3 100644 --- a/lua/core/lspconfig.lua +++ b/lua/core/lspconfig.lua @@ -3,7 +3,6 @@ local found_mason_lspconfig, mason_lspconfig = pcall(require, "mason-lspconfig") local found_nvim_lsp, nvim_lsp = pcall(require, "lspconfig") local found_mason_dap, mason_dap = pcall(require, "mason-nvim-dap") local found_lsp_file, lsp_file = pcall(require, "lsp-file-operations") -local found_dartls = pcall(nvim_lsp.dartls) if found_mason and found_mason_lspconfig and found_nvim_lsp then -- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers.. @@ -106,28 +105,6 @@ if found_mason and found_mason_lspconfig and found_nvim_lsp then root_dir = nvim_lsp.util.find_git_ancestor, single_file_support = true, }) - - -- dart lsp config - if found_dartls then - nvim_lsp.dartls.setup({ - cmd = { "dart", "language-server", "--protocol=lsp" }, - filetypes = { "dart" }, - init_options = { - closingLabels = true, - flutterOutline = true, - onlyAnalyzeProjectsWithOpenFiles = true, - outline = true, - suggestFromUnimportedLibraries = true, - }, - root_dir = nvim_lsp.util.root_pattern("pubspec.yaml"), - settings = { - dart = { - completeFunctionCalls = true, - showTodos = true, - }, - }, - }) - end end -- vim.lsp.set_log_level("debug") diff --git a/lua/plugins.lua b/lua/plugins.lua index 81a2b7f..ba6149e 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -120,7 +120,14 @@ else require("packages.rust-tools") end, }) - + -- dart and flutter code tools + use({ + "akinsho/flutter-tools.nvim", + requires = "nvim-lua/plenary.nvim", + config = function() + require("flutter-tools").setup({}) + end, + }) -- Debugging System use("nvim-lua/plenary.nvim")