Skip to content

Improve code action invocation with no selection

Waqar Ahmed requested to merge work/fix-codeaction-range into master

When we don't have a selection, prefer word range over the current position instead of the full line range which doesn't result in anything useful with at least two servers: clangd and dart-analyzer.

clangd can provide code action for example if the word under cursor is a macro or 'auto'.

dart-analyzer similarly provides useful actions for word under cursor.

Merge request reports