Improve code action invocation with no selection
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.