Closed MahdiNazemi closed 1 year ago
Hi, thanks for opening this issue. Could you try running echo 'abcde{}' | ${XDG_DATA_HOME:-${HOME}/.local/share}/firenvim/firenvim
in your shell and let me know what happens?
Thank you! Here is the output I get:
{"messages": [], "version": "0.2.14", "settings": {"localSettings": {".*": {"priority": 0, "cmdline": "neovim", "takeover": "always", "selector": "textarea", "content": "text"}}, "globalSettings": {"ignoreKeys": {"all": ["<D-r>", "<S-D-r>", "<D-v>", "<S-D-a>"]}}}}%
I added the globalSettings
and localSettings
recently, and I was facing this issue before that too.
Generally, I get the expected output in all troubleshooting steps mentioned here.
Okay, so if the script works fine, we can rule out runtime/init.vim configuration issues.
The other two possibilities are: 1) The neovim binary disappears from your $PATH. The neovim binary path you showed above contains a version number, I would guess that upgrading Neovim could result in the path becoming invalid. 2) The textareas Firenvim does not work on aren't actually textareas but fancy JS editors. 3) Your neovim takes more than 10 seconds to start and runs into the timeout limit.
I've opened https://github.com/glacambre/firenvim/issues/1526 for 1).
For 2), I'd need you to point me to the textareas in question in order to figure out what's really going on.
For 3), I'd suggest trying to fix your config (you can run neovim with its --startuptime
argument in order to figure out what's taking time.
Thank you for your detailed response.
I was experiencing this issue on Slack, but have not run into it in the past few minutes.
The startup time is around 265 ms.
Oh, yeah, Slack really falls in the category of fancy JS editors. There could be two reasons for Firenvim failing to trigger itself on slack's editor: 1) Firenvim doesn't detect that the input box is an editable text element 2) Slack focuses the input box before Firenvim is able to create its event listeners
For 1), you can help Firenvim figure out what element it should trigger itself on with the 'selector'
setting, e.g.:
let g:firenvim_config = {
\ 'localSettings': {
\ 'slack.com': {
\ 'selector': 'div.ql-editor.ql-blank[role=textbox]'
\ }
\ }
For 2), you selecting another element in the UI (e.g. slack's search bar) and then re-selecting the chat input box should trigger Firenvim.
Closing this issue because
Thank you!
What I tried to do
Firenvim sometimes fails to activate when editing a
textarea
.What happened
While trying to debug the issue, I realized I get the follwing output when I run
ps aux | grep nvim
:where I assume the important part is
I get this output even during the times when Firenvim works as expected (like now that I am writing this issue).
My
init.vim
is a bit unusual because I share the same runtime path between vim and neovim as explained in neovim docs:Could this be the cause of the issue? If not, what else can I do to ensure Firenvim works properly all the time?