flutter-tools.nvim
flutter-tools.nvim copied to clipboard
[BUG] textDocument/formatting not supported on_attach
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
The call to client.supports_method("textDocument/formatting") returns false when called on_attach.
This was not the case a few days ago. Unfortunately, I don't know if it was introduced by the Neovim upgrade to v0.10 or by an upgrade of the Flutter tools (I suspect the former)
Maybe it is related to https://github.com/akinsho/flutter-tools.nvim/issues/346
Expected Behavior
The call to client.supports_method("textDocument/formatting") returns true when called on_attach
Steps To Reproduce
- Instal nvim 0.10
- Use this config
return {
'akinsho/flutter-tools.nvim',
dependencies = { 'mason-lspconfig.nvim', 'nvim-lua/plenary.nvim', 'stevearc/dressing.nvim' },
opts = {
lsp = {
on_attach = function(client, bufnr)
assert(client.supports_method("textDocument/formatting"), "flutter client must support formatting")
end,
}
}
}
- Notice that it throws an assertion
Environment
- OS: Macos 14.4.1
- Flutter version: 3.13.3
- Is flutter in $PATH: yes
- neovim version: v0.10
Anything else?
No response