jEdit Community - Resources for users of the jEdit Text Editor
code-completion using yacc parser
Submitted by captainhunt on Wednesday, 10 November, 2010 - 07:57
Hi there,

I am trying to add syntax highlighting and code-completion for a quite idiosyncratic command file syntax to jedit.

While I managed pretty well to use jedit's xml edit-mode description for syntax highlighting, I cannot find a good starting point to add code-completion.

I currently see two possibilities:
a) use the xml edit-mode description to get the KEYWORDS somehow into a suggestion list
b) somehow connect the lex/yacc parser with jedit.

b) would be my prefered way as, it would perfectly sync up with any code development of the program and its parser.

Any hints, tips outlines which way to go, any getting started or simple example for code completion would be highly appreciated.

Thanks in advance,
Gergoe
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
a) All TOKENS, defined in the
by Robert Schwenn on Fri, 12/11/2010 - 12:41
a) All TOKENS, defined in the mode definition file of the current edit mode, appear (in bold) in the completion list, which You get when You do "Edit -> Complete Word". This is automatic - You have nothing to do in order to get this working.

b) If You want better completion support, You could write a plugin which acts as a parser for the SideKick plugin. For related questions, please ask at the jedit Developers Mailing List ( https://lists.sourceforge.net/lists/listinfo/jedit-devel ).
BTW: There's an actual discussion about a new plugin to simplify the completion infrastructure in jEdit ( http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTi%3D7DrWgBqvaMnLDynRyQq7rtAwh77DQoigjvvPL%40mail.gmail.com&forum_name=jedit-devel ).

Robert
User login
Browse archives
« April 2024  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293