Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]: extend selector's behavior to choose elements #1604

Open
xudyang1 opened this issue Apr 26, 2024 · 2 comments
Open

[feature]: extend selector's behavior to choose elements #1604

xudyang1 opened this issue Apr 26, 2024 · 2 comments

Comments

@xudyang1
Copy link
Contributor

xudyang1 commented Apr 26, 2024

  • OS Version: Windows 10 22H2
  • Browser Version: Chrome 120.0.6099.225
  • Browser Addon Version: 0.2.15
  • Neovim Plugin Version: commit 3363c14

What I tried to do

Type <C-e> to open firenvim in page github.com/glacambre/firenvim/issues/ISSUE_NUMBERS to edit comment / post new comment

What happened

No window was open. Then, I typed <C-e> again, a firenvim window appeared at the upper left corner of the page. The filename contains selector TEXTAREA-id-feedback.

I tried to exclude the element, but the following config did not work:

vim.g.firenvim_config = {
  globalSettings = {
    alt = "all",
    cmdlineTimeout = 3000,
  },
  localSettings = {
    [".*"] = {
      cmdline = "neovim",
      content = "text",
      priority = 0,
      selector = "textarea",
      takeover = "never",
    },
    ["github.com/.*"] = {
      filename = "{hostname%32}_{pathname%32}_{selector%32}_{timestamp%32}.md",
      selector = "textarea:not(#feedback), textarea#new_comment_field",
    },
  },
}

Current solution is to manually click at the comment textarea and then type <C-e> to trigger firenvim.

@glacambre
Copy link
Owner

This is not a bug but the intended behavior, as this enables using Firenvim on elements whose selector cannot be decided. I can see how the behavior you expected is useful though, I'll try to implement it.

@xudyang1 xudyang1 changed the title BUG: unable to exclude some element in github.com [feature]: extend selector's behavior to choose elements May 7, 2024
@xudyang1
Copy link
Contributor Author

xudyang1 commented May 7, 2024

This is not a bug but the intended behavior, as this enables using Firenvim on elements whose selector cannot be decided. I can see how the behavior you expected is useful though, I'll try to implement it.

Already changed it into a feature request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants