Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-07-22 Thread Nick Treleaven
Closed #1581 via #2186.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#event-2499544180

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-20 Thread diebuntu08
> > You can add support by yourself, I made a tutorial for this. See the video 
> > at
> > https://www.youtube.com/watch?v=C0eWBMTu4LU
> 
> I mean that's great that you did this, but why wouldn't you just make a text 
> comment here instead of a 14min video? It seems like you just want view 
> counts on your YT video. I don't have time to watch a 14min video. Text is 
> much faster to follow IMO.

The video is just to show that everything works and to make it look more 
clearly, I do not gain anything with the views of my video, it was just to 
help. It took me several hours to find the correct way to configure the files, 
14 minutes is not much compared to what it took me

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-504249654

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-13 Thread Nick Treleaven
@esotericpig I've added a few things for Groovy and made a WIP pull: #2188. 
Please test it and advise on what the build commands should be.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-501792227

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-13 Thread Nick Treleaven
> I tried to make one, but it's a bit more difficult

Thanks, I've made a start using the C lexer with properties set for dollar 
identifiers and triple quoted `"""strings"""`:
https://github.com/ntrel/geany/commits/groovy-ft

The other strings aren't supported by Scintilla's LexCPP AFAIK.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-501776130

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-13 Thread Jonathan Bradley Whited
> @esotericpig Thanks, I've made a pull to add this: #2186.
> 
> > I'd like to also add Groovy.
> 
> I'm happy to merge that if done as a custom filetype.

Thank you.

I tried to make one, but it's a bit more difficult. Specifically stuff like 
this:

```Groovy
println "${string_interop}"
println '''My
  String'''
println """My
  String"""
println $/My
  String
/$
double money = 12_345_132.12
```
http://docs.groovy-lang.org/docs/next/html/documentation/#_groovy_language_specification

For now, I just use this in filetype_extensions.conf:

```
Java=*.java;*.jsp;*.groovy;*.gradle;
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-501736199

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-13 Thread Nick Treleaven
@esotericpig Thanks, I've made a pull to add this: #2186.

> I'd like to also add Groovy.

I'm happy to merge that if done as a custom filetype.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-501676803

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-12 Thread Jonathan Bradley Whited
> You can add support by yourself, I made a tutorial for this. See the video at
> 
> https://www.youtube.com/watch?v=C0eWBMTu4LU

I mean that's great that you did this, but why wouldn't you just make a text 
comment here instead of a 14min video? It seems like you just want view counts 
on your YT video. I don't have time to watch a 14min video. Text is much faster 
to follow IMO.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-501297158

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-12 Thread Jonathan Bradley Whited
> > filetypes.Kotlin.conf
> 
> @esotericpig Is this custom filetype good enough to distribute with Geany, 
> have you or others tested it with much Kotlin code?

It's not perfect, but it's better than nothing I think. I use it in my projects 
fine.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-501295959

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-06-11 Thread diebuntu08
You can add support by yourself, I made a tutorial for this. See the video in

https://www.youtube.com/watch?v=C0eWBMTu4LU

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-500698833

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2019-05-31 Thread Nick Treleaven
> filetypes.Kotlin.conf

@esotericpig Is this custom filetype good enough to distribute with Geany, have 
you or others tested it with much Kotlin code?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-497684802

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-09-07 Thread elextr
> What the status of this feature? has it made its way into a release yet?

AFAIK nobody has made a pull request so its unlikely to be in any release.

> and would love support for my new favourite language in my favourite editor :)

Feel free to contribute it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-419537444

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-09-07 Thread Adam Howard
What the status of this feature? has it made its way into a release yet?

I've used Scintilla-based editors for years, 
and would love support for my new favourite language in my favourite editor :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-419414349

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread Jonathan Bradley Whited
Okay, I got it working. File name has to be `filetypes.Kotlin.conf`.

`~/.config/geany/filedefs/filetypes.Kotlin.conf`:
```INI
[styling=C]

[keywords]
# https://kotlinlang.org/docs/reference/keyword-reference.html
primary=abstract assert break case catch class const continue default do else 
enum extends final finally for goto if implements import instanceof interface 
native new package private protected public return static strictfp super switch 
synchronized this throw throws transient try volatile while true false null as 
fun in object typealias val var when by constructor delegate dynamic field file 
get init param property receiver set setparam where actual annotation companion 
const crossinline data expect external infix inline inner internal lateinit 
noinline open operator out reified sealed suspend tailrec vararg field it
# https://kotlinlang.org/docs/reference/basic-types.html
secondary=Double Float Long Int Short Byte NaN Void
# documentation keywords for javadoc
doccomment=author deprecated exception param return see serial serialData 
serialField since throws todo version
typedefs=

[lexer_properties=C]

[settings]
lexer_filetype=C
tag_parser=C
extension=kt
mime_type=text/x-kotlin

[build-menu]
FT_00_LB=_Compile Kotlin Class
FT_00_CM=kotlinc "%f"
FT_00_WD=

EX_00_LB=_Execute Kotlin Class
EX_00_CM=kotlin "%eKt"
EX_00_WD=

EX_01_LB=Execute Kotlin _Script
EX_01_CM=kotlinc -script "%f"
EX_01_WD=
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405233764

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread elextr
> I assume I need to do something more?

To read the docs more closely I'm afraid :)

You have the filename wrong, you havn't specified the lexer_filetype and you 
havn't specified the tags parser, see for example 
[Cython](https://github.com/geany/geany/blob/master/data/filedefs/filetypes.Cython.conf)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405222587

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread Jonathan Bradley Whited
Thanks, that's probably the best way.

I made `~/.config/geany/filedefs/filetypes.kotlin`:
```INI
[styling=Java]

[keywords=Java]
# https://kotlinlang.org/docs/reference/keyword-reference.html
primary=as as? fun in !in object typealias val var when by constructor delegate 
dynamic field file get init param property receiver set setparam where actual 
annotation companion const crossinline data expect external infix inline inner 
internal lateinit noinline open operator out reified sealed suspend tailrec 
vararg field it
# https://kotlinlang.org/docs/reference/basic-types.html
secondary=Double Float Long Int Short Byte NaN
# documentation keywords for javadoc
doccomment=
typedefs=

[lexer_properties=Java]

[settings=Java]
extension=kt
mime_type=text/x-kotlin

[build_settings]
# For this to work, the main class should be the same name as the file
compiler=kotlinc "%f"
run_cmd=kotlin "%e"

# If you usually use Kotlin as a scripting lang, use this instead
#compiler=
#run_cmd=kotlin -script "%f"
```

Then, in `filetype_extensions.conf` I added:

```INI
Kotlin=*.kt;*.kts;

[Groups]
Programming=Arduino;Clojure;CUDA;Cython;Genie;Scala;Kotlin
```

I assume I need to do something more? Where should I specify filetypes.kotlin?
Thanks

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405221149

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread elextr
@esotericpig while you are waiting for Scintilla and Uctags, did you actually 
try making a custom filetype using an existing lexer and parser?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405208708

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread Colomban Wendling
@esotericpig from what you mention it sounds like it'd be easy to create a 
[custom filetype](https://www.geany.org/manual/#custom-filetypes) just adding a 
few keywords, at least for the highlighting part, if the syntax is basically 
C++.

For extracting symbols (the [Universal-CTags](/universal-ctags/ctags/) part) it 
might actually require some extra work if there is different syntax for 
defining classes or such, as then it's not merely tokenizing but parsing.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405206425

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread elextr
> I opened up a feature request:

Yes, you are better off engaging directly with Scintilla.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405204329

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread Jonathan Bradley Whited
I opened up a feature request:

https://sourceforge.net/p/scintilla/feature-requests/1224/

So maybe someone with more knowledge of Scintilla will do it properly, or at 
least help guide how to do it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405184534

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-16 Thread Jonathan Bradley Whited
I forked the project on SourceForge, but seems like a lot of work, don't know 
if I will get around to doing it (as I have other projects I'm working on).

I found this:
https://www.scintilla.org/Lexer.txt

Basically, you would need to copy this file as LexKotlin.cxx:
https://github.com/geany/geany/blob/master/scintilla/lexers/LexCPP.cxx
https://sourceforge.net/p/scintilla/code/ci/default/tree/lexers/LexCPP.cxx

Then add the new keywords and syntax that Kotlin has, such as `object` 
(lower-case), `data class`, `sealed class`, `fun`, `then`, etc. I think you'd 
probably also want to remove parsing of the ternary operator `a ? b : c` and 
add parsing for the elvis operator `a ?: b`.

You can also look at this project that is adding the Rust language:
https://sourceforge.net/u/dobkeratops/scintilla/ci/default/tree/

Here are other open source projects that have added Kotlin support for help as 
well:
https://github.com/vkostyukov/kotlin-sublime-package
https://github.com/nishtahir/language-kotlin

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405182480

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-15 Thread elextr
@esotericpig I'm not aware of any better docs than those projects own 
resources, maybe you could ask there (they are both totally separate projects 
from Geany, we just use their products).

Maybe its not clear from the post above, but you can (actually must) use the 
lexer of an existing filetype and the parser of a possibly different existing 
filetype with a custom filetype.  Thats probably the first thing to try, you 
may find existing ones are "good enough".  I suggested Java, but I don't know 
how close Kotlin is, you could try any of the built-in languages.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405121999

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-15 Thread Jonathan Bradley Whited
I went to the Scintilla website, but the documentation is pretty bad (IMO) for 
adding a new language. Is there an example or documentation available for how 
to add a new language? And also for making a pull request? (Wish it was on 
GitHub.)

I'd like to also add Groovy.

I also don't know what to do for UCtags. Grateful for any help. Thanks.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-405103238

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-13 Thread elextr
Feel free to post a pull request with a custom filetype file, maybe based on 
Java.  

Note that if Kotlin needs specific highlighting and symbols support those need 
to be added to the [Scintilla](https://www.scintilla.org/) and 
[UCtags](https://github.com/universal-ctags/ctags) first before the integration 
into Geany.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-404963792

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-13 Thread Mustafa Ozhan
I wanna move back the Geany again :pray: 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-404940871

Re: [Github-comments] [geany/geany] Kotlin Language Support (#1581)

2018-07-13 Thread Jonathan Bradley Whited
+1 I'd like this feature as well :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1581#issuecomment-404926409