…es and makes them accessible on the sidebar.
https://www.mail-archive.com/devel@lists.geany.org/msg03221.html You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2212
-- Commit Summary --
* added a bibtex parser that extracts identifiers of entries in bib-files and makes them accessible on the sidebar
-- File Changes --
M ctags/Makefile.am (1) M ctags/main/parsers.h (1) A ctags/parsers/bibtex.c (180) A data/filedefs/filetypes.bibtex (51) M data/filetype_extensions.conf (3) M src/filetypes.c (1) M src/filetypes.h (1) M src/symbols.c (11) M src/tagmanager/tm_parser.c (8) M src/tagmanager/tm_parser.h (1)
-- Patch Links --
https://github.com/geany/geany/pull/2212.patch https://github.com/geany/geany/pull/2212.diff
universal-ctags/ctags#2137
You must add `filetypes.bibtex` to the `filetypes` list (see `data/Makefile.am`), otherwise `make install` will not copy this file.
If without BibTeX lexer then maybe add `lexer_filetype=LaTeX` in section `[settings]`? In this case Geany will highlight comments and LaTeX keywords. Instead naked text...
@TwlyY29 pushed 1 commit.
e652dd909d1b2858ae699656aa5c8ac89924faaf added filetypes.bibtex to relevant Makefile plus made lookup of bibtex keywords case insensitive
Thanks - I added the filetypes-file to the relevant Makefile. I am not sure though if Latex keywords should be highlighted. Maybe it would be better to add a bibtex lexer in the future?
I am not sure though if Latex keywords should be highlighted.
I did not check how it works (if it works) :) But I think highlighting commented lines can be useful.
Maybe it would be better to add a bibtex lexer in the future?
Maybe.
@TwlyY29 pushed 1 commit.
dc6c58c86b41cb9bb10a02c656bf518971264d80 Merge remote-tracking branch 'upstream/master' into bibtex-parser
@TwlyY29 pushed 1 commit.
67456e0cc3b801121c00ac4853d65d4dfb946e34 Copied BibTeX-parser from https://github.com/universal-ctags/ctags/pull/2137
@TwlyY29 pushed 1 commit.
6e3aa9cf791afba66bc513334f8a351e305c8d6d added lexer-settings for comments to be highlighted
Hi,
I added highlighting of comments by adding the above-mentioned lexer to the Bibtex-filetype-settings. Also, I copied the Bibtex-Parser from the ctags-repository which was merged there recently: universal-ctags/ctags#2137
Best Mirco
codebrainz requested changes on this pull request.
Aside from the enumerator order, this looks like it's relatively safe and clean change.
If nobody objects, I'll try and get this merged in a few weeks.
@@ -74,6 +74,7 @@ typedef enum
GEANY_FILETYPES_VALA, GEANY_FILETYPES_PASCAL, GEANY_FILETYPES_LATEX, + GEANY_FILETYPES_BIBTEX,
This needs to move to the end where it says `/* ^ append items here */` to preserve the ABI.
@@ -67,6 +67,7 @@ enum
TM_PARSER_PHP, TM_PARSER_PYTHON, TM_PARSER_LATEX, + TM_PARSER_BIBTEX,
Not sure this is in the plugin API, but it might be better to put at end before `TM_PARSER_COUNT` anyway.
@TwlyY29 pushed 1 commit.
1d94ba2c32f2b57a059dcf7eff3cbeb5ea5003c5 moved bibtex definition to the end of filetypes and parser definitions
TwlyY29 commented on this pull request.
@@ -67,6 +67,7 @@ enum
TM_PARSER_PHP, TM_PARSER_PYTHON, TM_PARSER_LATEX, + TM_PARSER_BIBTEX,
I've moved `TM_PARSER_BIBTEX`to the end and updated the ctags/parsers.h accordingly
codebrainz approved this pull request.
Looks good to me. After the next release I'll merge this, remind me if I forget.
Here comes your reminder :-)
Merged #2212 into master.
github-comments@lists.geany.org