Closed krassowski closed 8 months ago
This sounds like a good idea, but do you know any non-hacky way to get that value from codemirror? The only solution i know so far is to do drawSelection()[0].facet
ignoring the typing errors, which is not very good.
I think it should be available from cm.view.state.facet(selectionConfig)
but selectionConfig
is not currently exported. I asked on the forum: https://discuss.codemirror.net/t/how-to-get-cursor-blinking-rate-in-another-extension/7077
It should be possible to use getDrawSelectionConfig
function in future versions, see https://discuss.codemirror.net/t/how-to-get-cursor-blinking-rate-in-another-extension/7077/5
Currently the cursor blinking rate is hard-coded:
https://github.com/replit/codemirror-vim/blob/2f871797743a46628155477bae18f2f3f88a3c44/src/block-cursor.ts#L65-L67
Would it be a good idea to try matching the current setting as configured in
drawSelection
extension?