Creating Language Plugin not used for new language
Roland Plüss
roland at rptd.ch
Thu Jul 12 17:57:24 BST 2018
Hi Friedrich,
That helped. The create method is now called. Went on to deal with the
kdev-qt-pg stuff. Still fighting with it since the doc is lacking and
I'm more guessing around trying to figure out how this thing works.
Something still doesn't compile yet but I think it's getting there.
Adding at least some minimalistic documentation would help.
- Roland
On 07/11/2018 05:12 PM, Friedrich W. H. Kossebau wrote:
> Hi Roland,
>
> Am Mittwoch, 11. Juli 2018, 16:54:44 CEST schrieb Roland Pluess:
>> I'm trying to make a language plugin for my own language I used in projects
> I applaud such efforts :)
>
>> What else do I need to to to get my language plugin being used for source
>> files with the right extension? There exists no mime-type for this language
>> in the system obviously so can this be done by using file extensions?
> IIRC no, the related code relies on QMimeDatabase having the related MIME type
> definition (which at least on Linux/*BSD uses xdg's sharedmimeinfo).
>
> But compare the things done for initial CUDA/OpenCL support by installing
> matching custom MIME type definitions at the end of
> https://cgit.kde.org/kdevelop.git/tree/plugins/clang/CMakeLists.txt
> --- 8< ---
> install(FILES kdevclang.xml DESTINATION ${KDE_INSTALL_MIMEDIR})
> update_xdg_mimetypes(${KDE_INSTALL_MIMEDIR})
> --- 8< ---
>
> with the MIME type definitions being
> https://cgit.kde.org/kdevelop.git/tree/plugins/clang/kdevclang.xml
>
> See
> https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html for more info about how to write your own MIME type
> definitions as usable with xdg's sharedmimeinfo.
>
> For that custom type definition installation to work, you will need
> SharedMimeInfo macros included, so have this in the toplevel CMakeLists.txt:
> --- 8< ---
> find_package(SharedMimeInfo REQUIRED)
> --- 8< ---
>
> That should get you started hopefully. Such definition should also allow
> having proper things elsewhere, like matching icons in the file manager/dialog
> (once added) :)
>
> Cheers
> Friedrich
>
>
--
Mit freundlichen Grüssen
Plüss Roland
Leader und Head Programmer
- Game: Epsylon ( http://www.indiedb.com/games/epsylon )
- Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine
, http://dragengine.rptd.ch/wiki )
- Sowie verschiedene Blender Export-Skripts und Game-Tools
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180712/3250c4dd/attachment.sig>
More information about the KDevelop-devel
mailing list