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

Improve glossaries-extra and bib2gls support #3073

Open
gssfaw opened this issue Jan 11, 2025 · 0 comments
Open

Improve glossaries-extra and bib2gls support #3073

gssfaw opened this issue Jan 11, 2025 · 0 comments

Comments

@gssfaw
Copy link

gssfaw commented Jan 11, 2025

Hello, first of all I'd like to give you my gratitude for developing and maintaining this plugin. I've been using it for almost 4 years and have created hundreds of documents using it.

Is your feature request related to a problem? Please describe it.
Currently bib2gls and glossaries lack some features:

  1. You can't use the context menu on gls entries to preview or edit bib entries like you can do with normal bib files with the \cite command.
  2. spellchecking inconsistent for some commands:
  • \gls{entry_name} is not highlighted as a misspelled word and the _ symbol is not highlighted.
  • \Gls{entry_name} is highlighted as a misspelled word and also the _ symbol is highlighted as an illegal symbol.
    Spellcheck demonstation
    illegal symbol demonstration

I have disabled all plugins (so no treesitter) and set vimtex_syntax_enabled = 1.
If I disable syntax the gls command argument is also highlighted as wrong.

Describe the solution you'd like

  1. It would be really good to have an ability to easily preview and edit bib2gls entries (for some reason, ctags also do not work with these bib files either, not sure why).

  2. The highlighting of illegal symbols is a nice feature, so it would be great if it worked consistently.

Describe alternatives you've considered
I've tried using vimtex_syntax_custom_cmds to manually set the argspell (like here #2960 (comment)) and it is working:

g.vimtex_syntax_custom_cmds = {
    { name = 'glsdesc', argspell = 0, argstyle = 'bold', hlgroup = 'texCmd', nextgroup = 'texGlsArg'}
}

I've added also the argstyle argument to visually confirm that I've set it right
20250111_15h02m17s_grim

As you can see, the argspell parameter disables spell checking. The illegal symbol highlighting is disabled by adding the nextgroup parameter.

It's good as a temporary solution, but I am not sure if it is the right way to do it, because I need to add about 100 commands.

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

No branches or pull requests

1 participant