7.5.3 (x64) Where is the 'default' autocompletion dictionary? Can I copy, modify and use?
Gack! english.xml has nothing to do with autocomplete! o.O but, ironically, I think I’m learning some .xml :-)
Many thanks to Claudia Frank!
aha, I see… I think… “functionList.xml”, and there’s none for .lua, or specifically in my case, perhaps a .lua_WoW…
Brain hurts a lot… but, would need to learn and add here… (sigh) it’s a start. There appears to be no .lua function completion .xml. In the english.xml - a “Here be dragons” warning… with a “Keep out!” which I’ll heed… but basic .lua stuff here.
But, I see I have a long way to go; still, exploration has started, seeing what’s up here with various aspects of notepad++, and perhaps, whatever I do here will be a work in progress for quite some time… at least until I could contribute anything useful. :-(
@ 63yrs of age, I can still (gratefully) handle a pretty steep learning curve… but, yes… slowing down just a bit… got some handy links now, to make progress. At least your responses actually encouraged me to take a peek under the hood. I always say, when it comes to programming and languages… I’ve forgotten more than I know; but, what I do have embedded is a pretty comprehensive concept of structures in languages. This can and does go a long ways… and xml is not that hard to read…, and I see the .xml scintilla structures (I think)… and function parsers (I know)… and how this is implemented… just a wee bit with my head peeking at the surface of what pokes out… under the hood.
Claudia Frank last edited by Claudia Frank
no no, the functionlist.xml isn’t what you are looking for, at least I assume.
You are looking for the API xml files which are stored under
There is no default one for lua you either have to download one from the web
or create it yourself. (I was under the impression you already have downloaded one)
The functionlist.xml is for showing the functions defined in the current program.
Basically you declare regex to search your current code and display the matches in the
function list window in a tree form.
this is what functionlist offers
Claudia Frank last edited by Claudia Frank
and this is, what I assume, you are looking for - auto-completion
On windows it is looking much nicer - this is one of the quirks when running npp on linux.
I see what you’re saying @Claudia-Frank… so please wrap me up here (please… and thank you of course)
Ah, I see… yes the first would be very helpful… So, the lang.xml & functionList.xml go hand in hand. (in this case) lua.xml (which I’d have to make) in the ./plugins/APIs/ and functionList.xml to parse the list and selection. Does this also require a PlugIn .dll or would that only be if I need more than a parse and lookup. Or would the alone provide the list… I guess it’s still not completely clear.
So, to have parsing the language functions the components are: (for lua)
lua.xml which is the list of functions and descriptions
modify functionList .xml which is used to display and parse the list of functions
?? PlugIn.dll if I need more, or to interpret or parse the whole line… or display something else, or… or…
lang.xml (Python) in action… using both lang.xml and functionList.xml?
I’m seeing what the lang.xml does
chcg last edited by
As a starting point you might checkout this: http://ageekandhisblog.com/notepad-plugin-lua-corona-api-autocompletion/
langs.xml is provided to scintilla, the edit control notepad++ uses, which does all the coloring an folding.
If, for example, lua is evolving to version X and introduces new keywords then one has to edit this file
an add the keywords to let scintilla know that those new words need to be colored as well. But I would
avoid editing this file directly, use the StyleConfigurator instead.
functionlist.xml is used by npp. By defining languages specific regular expressions, npp is able
to scan the current document open and outline the matches from the regular expression in a tree-view like manner.
One would edit functionlist.xml when the programming language used hasn’t the needed regular expression yet or
when an already supported programming language needs to be enhanced by new functionality.
Let’s say you want to see the pythons doc strings in the functionlist window as well.
API.xml (API needs to be replaced by the language specific word) is used by npp to provide language dependent
auto completion and hints. Like you can also fade in a window explaining the syntax of a command which, of course,
has to be added to the API.xml beforehand. A good starting point, also not maintained anymore, to find
some api files is http://docs.notepad-plus-plus.org/index.php/User_Defined_Language_Files
stylers.xml is used by npp to get the information how to style certain words, like keyword open should
be colored in blue use bold font with size 10… This can be set as an general rule or per language but,
again, don’t edit this file directly but use StyleConfigurator instead.
I hope I was able to clarify the usage of the different xml files a little bit more.
Those files, when available, are used by npp automatically. No additional plugins needed but
this doesn’t mean a language specific plugin doesn’t provide additional features you might
want to have.
By George, I think I’ve got it! Yes, I’ll look for a language specific API.xml first. The code seems straight forward, and my xml is improving daily. Clear on the Scintilla langs.xml (I was confusing programming languages with native languages we speak) Naturally I’ll stay out of files marked, do not change, or even “Here be Dragons”, though it didn’t keep me out of Microsoft’s registry. lol
Yes, I’m already using the Style Configurator… And I just realized that some of the things I was looking for are under the Global Styles, for changing color… (no wonder I couldn’t find them under the language). Here though, I’d worry about conflicting colors with a global change.
I like the idea of a plugin. It’s been a while since I wrote a .dll. I was once proficient in C, C++ (no C#) Nothing a good ‘dictionary’ and 'syntax" reference can’t solve. Of course, a savvy IDE wouldn’t hurt either… but don’t get me wrong… I love my Notepad++, been a fan for years… Best (more than basic) editor around, IMHO. I’ve been using it for since I can remember, it’s about time I poked under the hood… it’s fairly friendly that way IMO, awesome!.
That does clarify it pretty much. I can’t Thank you enough for all the help, much appreciated. I may be a newbie here; but, I’m anything but when it comes to… well… a lot. I hope for many more productive years… Somehow I’ve managed to make programming and development a hobby, as well as a profession…
Jason Clark last edited by
@Chip-Cooper Thank you, this finally answered my question about autocomplete! I wish it were documented better. Thanks!