とりあえずflutter3

This commit is contained in:
Rikuoh Tsujitani 2024-07-13 09:34:40 +09:00
parent 76efd69b99
commit a2ef05296b
Signed by: riq0h
GPG key ID: 010F09DEA298C717

View file

@ -327,6 +327,7 @@ vim.keymap.set("n", "<leader>n", "<cmd>Telescope lsp_references<CR>")
vim.keymap.set("n", "<leader>m", "<cmd>Telescope diagnostics<CR>")
vim.keymap.set("n", "<leader>x", "<cmd>Telescope lsp_document_symbols<CR>")
vim.keymap.set("n", "<leader>f", "<cmd>Telescope file_browser<CR>")
vim.keymap.set("n", "<leader>0", require("telescope").extensions.flutter.commands, { desc = "Open command Flutter" })
local fb_actions = require("telescope").extensions.file_browser.actions
local previewers = require("telescope.previewers")
@ -394,19 +395,6 @@ require("lspconfig").sourcekit.setup({
cmd = { "/usr/bin/sourcekit-lsp" },
filetypes = { "swift" },
})
require("lspconfig").dartls.setup({
cmd = { "dart", "language-server", "--protocol=lsp" },
filetypes = { "dart" },
init_options = {
closingLabels = true,
flutterOutline = true,
onlyAnalyzeProjectsWithOpenFiles = true,
outline = true,
suggestFromUnimportedLibraries = true,
},
on_attach = function(client, bufnr)
end,
})
require("mason-lspconfig").setup()
require("mason-lspconfig").setup_handlers({
function(server_name)
@ -585,7 +573,25 @@ require("dap-go").setup({
require("dap-python").setup(vim.fn.stdpath("data") .. "/mason/packages/debugpy/venv/bin/python")
--flutter-tools
require("flutter-tools").setup()
require("flutter-tools").setup({
ui = {
border = "none",
},
dev_log = {
enabled = false,
},
debugger = {
enabled = false,
run_via_dap = false,
register_configurations = function(_)
require("dap").adapters.dart = {
type = "executable",
command = vim.fn.stdpath("data") .. "/mason/bin/dart-debug-adapter",
args = { "flutter" },
}
end,
},
})
---jaq-nvim
require("jaq-nvim").setup({
@ -602,7 +608,7 @@ require("jaq-nvim").setup({
java = "java %",
javascript = "node %",
swift = "swift %",
dart = "dart %"
dart = "dart %",
},
},