flutter-tools.nvim
flutter-tools.nvim copied to clipboard
[BUG] lsp code actions not loading in nvim 0.10
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
after I install neovim 0.10 code actions do not work anymore (textDocument/codeAction
capability check in LSP client returns false, as in not supported)
Expected Behavior
code actions should work
Steps To Reproduce
- get a working setup on neovim 0.9
- install neovim 0.10
Environment
- OS: arch 6.6.26-1-lts
- Flutter version:Flutter 3.19.5
- Is flutter in $PATH: yes
- neovim version: NVIM v0.10.0-dev-2942+g96d0c709b6
Anything else?
the workaround I found:
require("flutter-tools").setup {
-- ...
lsp = {
-- ...
capabilities = function(config)
config.textDocument.codeAction = {
dynamicRegistration = false,
codeActionLiteralSupport = {
codeActionKind = {
valueSet = {
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports",
},
},
},
}
return config
end,
}
}
credits: https://gist.github.com/PatOConnor43/88156409b03794f5e05280dbfb42faa6