You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the predefined "Source Action" option with LazyVim, I get the message "No code actions available".
Normally, this binding will surface code actions that can be applied to the entire file/buffer. This includes actions like adding missing imports, sorting imports, removing unused imports, removing unused variables, etc. The default binding for this is "<leader>cA" and it implements a custom function. I'm assuming that I need to modify this binding, but I'm not sure to what exactly. Any help is appreciated and thank you in advance!
The text was updated successfully, but these errors were encountered:
@rubiin thank you for sharing! Just to confirm, does your config map these actions to separate key bindings? I was hoping to restore the same behavior as using the language server where it shows a window allowing you to select from a list of these actions. This way, you only need a single binding. Do you know if this is possible?
I added the following to my config and now the actions show up with the other line specific actions.
-- array of strings("fix_all"|"add_missing_imports"|"remove_unused"|-- "remove_unused_imports"|"organize_imports") -- or string "all"-- to include all supported code actions-- specify commands exposed as code_actionsexpose_as_code_action="all",
It's not exactly what I want (separate dialogues for file vs. line actions), but at least I can access these actions now.
I was going to make a similar post around lazy vims source action and where the suggestions show up - hope its okay to add this here!
Running Source Action, I don't typically see any options from typescript-tools, is there a way to include the user commands here?
Specifically I'm thinking ones like TSToolsRemoveUnusedImports
When I use the predefined
"Source Action"
option with LazyVim, I get the message"No code actions available"
.Normally, this binding will surface code actions that can be applied to the entire file/buffer. This includes actions like adding missing imports, sorting imports, removing unused imports, removing unused variables, etc. The default binding for this is "<leader>cA" and it implements a custom function. I'm assuming that I need to modify this binding, but I'm not sure to what exactly. Any help is appreciated and thank you in advance!
The text was updated successfully, but these errors were encountered: