I made a drupal.api for many drupal functions, and also made a corresponding drupal.xml. but it doesnt pick up in the Language list.
i copy the ruby.api file from the website and that works. so im wondering are custom languages allowed to have the .xml format that specifies params/return values in tooltips etc. i saw in the autocompletition wiki that it seems so and i beleive i followed the xml format correctly, but its not working. just having a drupal.api/drupal.xml should work right?
anyone have any knowledge on creating custom autocomplete language files that might want to help out?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Silly question maybe, but have you enabled the Auto-Completion and Function Paramater hint on imput using Settings -> Preferences -> Backup/Auto-completion. I had exactly the same problem when I generated our Universe language definition and auto-completion
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i am not sure if i am right, but i think there is a chance u need to use the file extension for your language as xml file name.
i tried to do an autocomplete for AutoIT and au3.xml did work for me. but in case of other languages i am not sure how the binding is done between the language and the api / xml file is customised. i couldnt find it , would be pleased to see someone explain it.
also, if ur xml isnt working, just open it up in notepad ++ itself and see if all the folds are correct , the xml file u have created may have some syntax errors in one or two lines which would render the file invalid and hence may not work. notepad++'s color coding feature does help a lot in detecting xml coding errors for api autocomplete file created.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
also, for the language list, did u define the language's filename extension in the new language stuff u created ? viz., if i create a hightling feature set for the language autoIT, i need to define its extension as au3 sothat everytime i open an au3 file, the default language is automaticaly detected..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
are you sure Rajesh?
i saw the other language files just used .xml and .api.
i wonder if i need to add the lang also to the lang.xml/lang.model.xml files or just set to open .module types in the Settings.
>Now you should do the same for the highlighting part, declaring a new user-defined language
do i need to do this for my user created language. is so how?
if you can get it to work with my below files let me know...,
This is what i have so far and want to see if someone can see why it isnt valid...
in this directory are the files i put into C:\Program Files\Notepad++\plugins\APIs dir: http://www.arianhojat.com/files/drupal/notepad_plus_plus/
i assumed when i restart notepad++, the value DRUPAL would be in the languages list at least.
ps my return type is the same 'drupal' for all functions, since cant extract return type from all drupal functions. also i didnt put the type for the parameters (like [bool isNode = FALSE], i would just do [isNode = FALSE]), since wiki indicated it is optional.
thanks for any help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From what I understand, the .xml and .api files are merely a set of items to be used for autocompletion, but don't define a language.
You should do some more research (in these forums, and on the Notepad++ website) about what all is needed for defining a new language in Notepad++.
In short, in order to create a new language definition in Notepad++, you need to first define the syntax. To define the syntax you can either use the User Define Language dialog, or you can delve into the scintilla lexer code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this userDefineLang.xml found in my web directory can be placed in user's AppData folder, i.e C:\Documents and Settings\arian121\Application Data\Notepad++ (or c:/Program Files/Notepad++) http://www.arianhojat.com/files/drupal/notepad_plus_plus/
AND also the drupal.xml also placed in c:/Program Files/Notepad++/plugins/APIs
and get the styling of the user defined language, and the code assist/autocomplete keywords.
i put php keywords in this as well since php/drupal are mixed together, i might add css and jquery keywords in there too if people like.
still having minor issues, like sorting. i think the xml functions have to be sorted, like timer_set at the top and timer at the bottom doesnt sort right. also cant get block commenting to work. i put /* and */ and the open/close tags for comments.
also need to work on getting default colors to work good. like
$string = 'string';
string should be black and 'string' should be grey. cant target tokens like that so well unless i am missing something
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made a drupal.api for many drupal functions, and also made a corresponding drupal.xml. but it doesnt pick up in the Language list.
i copy the ruby.api file from the website and that works. so im wondering are custom languages allowed to have the .xml format that specifies params/return values in tooltips etc. i saw in the autocompletition wiki that it seems so and i beleive i followed the xml format correctly, but its not working. just having a drupal.api/drupal.xml should work right?
anyone have any knowledge on creating custom autocomplete language files that might want to help out?
Silly question maybe, but have you enabled the Auto-Completion and Function Paramater hint on imput using Settings -> Preferences -> Backup/Auto-completion. I had exactly the same problem when I generated our Universe language definition and auto-completion
I think what you did goes for autocomplete
Now you should do the same for the highlighting part, declaring a new user-defined language
i am not sure if i am right, but i think there is a chance u need to use the file extension for your language as xml file name.
i tried to do an autocomplete for AutoIT and au3.xml did work for me. but in case of other languages i am not sure how the binding is done between the language and the api / xml file is customised. i couldnt find it , would be pleased to see someone explain it.
also, if ur xml isnt working, just open it up in notepad ++ itself and see if all the folds are correct , the xml file u have created may have some syntax errors in one or two lines which would render the file invalid and hence may not work. notepad++'s color coding feature does help a lot in detecting xml coding errors for api autocomplete file created.
also, for the language list, did u define the language's filename extension in the new language stuff u created ? viz., if i create a hightling feature set for the language autoIT, i need to define its extension as au3 sothat everytime i open an au3 file, the default language is automaticaly detected..
are you sure Rajesh?
i saw the other language files just used .xml and .api.
i wonder if i need to add the lang also to the lang.xml/lang.model.xml files or just set to open .module types in the Settings.
>Now you should do the same for the highlighting part, declaring a new user-defined language
do i need to do this for my user created language. is so how?
if you can get it to work with my below files let me know...,
This is what i have so far and want to see if someone can see why it isnt valid...
in this directory are the files i put into C:\Program Files\Notepad++\plugins\APIs dir:
http://www.arianhojat.com/files/drupal/notepad_plus_plus/
i assumed when i restart notepad++, the value DRUPAL would be in the languages list at least.
ps my return type is the same 'drupal' for all functions, since cant extract return type from all drupal functions. also i didnt put the type for the parameters (like [bool isNode = FALSE], i would just do [isNode = FALSE]), since wiki indicated it is optional.
thanks for any help!
From what I understand, the .xml and .api files are merely a set of items to be used for autocompletion, but don't define a language.
You should do some more research (in these forums, and on the Notepad++ website) about what all is needed for defining a new language in Notepad++.
In short, in order to create a new language definition in Notepad++, you need to first define the syntax. To define the syntax you can either use the User Define Language dialog, or you can delve into the scintilla lexer code.
i figured out how to get user defined language by going here:
http://notepad-plus.sourceforge.net/uk/UserLanguageDefineSystem-HOWTO.php
this userDefineLang.xml found in my web directory can be placed in user's AppData folder, i.e C:\Documents and Settings\arian121\Application Data\Notepad++ (or c:/Program Files/Notepad++)
http://www.arianhojat.com/files/drupal/notepad_plus_plus/
AND also the drupal.xml also placed in c:/Program Files/Notepad++/plugins/APIs
and get the styling of the user defined language, and the code assist/autocomplete keywords.
i put php keywords in this as well since php/drupal are mixed together, i might add css and jquery keywords in there too if people like.
still having minor issues, like sorting. i think the xml functions have to be sorted, like timer_set at the top and timer at the bottom doesnt sort right. also cant get block commenting to work. i put /* and */ and the open/close tags for comments.
also need to work on getting default colors to work good. like
$string = 'string';
string should be black and 'string' should be grey. cant target tokens like that so well unless i am missing something