Crowdfunding world domination

(Steven Van Impe) #105

Can you add a syntax highlighting grammar to that? LSP is only part of the issue. Editors that use LSP tend to rely on regular expressions for syntax highlighting. All editors I've tried so far have the same syntax highlighting issues, because no-one ever writes a proper one and just clones what's out there (and outdated). Having an official grammar that is updated when the language is updated would go a long way towards better syntax highlighting for Swift.


It looks like LSP is working towards including syntax highlighting, which would be convenient.

(Steven Van Impe) #107

If SourceKit could be used to implement that part, that would be awesome indeed.

(Pierpaolo Frasa) #108

I'll admit to being slightly disappointed by that post.

The idea that the problems with Swift currently are not well-known seems weird to me. The problems are being discussed on this forum each and every day.

The way I interpret this thread and a lot of discussion that happened here is that there was an awareness of the problems but also the recognition that the amount of resources that are currently being invested in cross-platform Swift are not nearly enough. For example, the SPM seems to have basically a single contributor. In addition, the big problems that Swift currently has are often not things that are interesting to implement, but "boring" stuff like improving the Linux installation story, making it easier to compile the Swift toolchain, making the REPL more fully featured, etc., which is not something that many people like doing in their spare time (even less so if getting the Swift toolchain compiled is so hard in the first place).

Obviously, I'm in no place to make demands, Swift is free and everything, but as @svanimpe already pointed out: Swift is losing the fight for cross-platform developers. There is almost zero incentive for your run-of-the-mill webdev to choose Swift for their backend application, unless:
a) they're moving an existing mobile app onto the server,
b) they only know Swift and refuse to learn anything new

Maybe Apple is ok with Swift being iOS/macOS-only, that's fine, but if the stated goal is for Swift to be cross-platform, it's doing a bad job at this.

(Ted Kremenek) #109

I agree 100% that the current investment of resources in cross-platform Swift are not sufficient to achieve the goals of Swift as a great cross-platform language. My post was not intended to belie that reality, and perhaps I should have said more to acknowledge that particular point. Your candid feedback and skepticism is very much appreciated. My intent is to do more here. The post is just a start.

(Pierpaolo Frasa) #110

Fair enough, then I might have misunderstood. Thanks for clarifying.

(^) #111

LSP doesn’t handle syntax highlighting, it’s a separate thing. LSP handles things like code completion and symbol lookup. I created atomic-blonde for Atom to solve the regex highlighting issue, though installing it is v problematic and probably won’t be resolved until Swift is in an official Ubuntu package repo (because it depends on the SourceKit .so lib that comes with the swift compiler, which can’t be reliably located). In theory SourceKit could be distributed with the highlighter, but the binary is well over 80 MB and exposes you to the problem where the highlighter might be highlighting for a different version of Swift than you are compiling with.

(Jeffrey Macko) #112

Hi @taylorswift and @svanimpe,

Owensd had already made some work related to this topic.

With your we might already have all the basic pieces needed in order to move forward on this since most of libSyntax seems to be implemented .

(Ted Kremenek) #113

@akyrtzi, @blangmuir and I have also been recently discussing offline LSP and evaluating potential strategies. We'll start a thread soon once we've put those thoughts in order; should be soon.

(Jeffrey Macko) #114

I forgot to add.

It could be great if was on a repository on its own and be available in SPM in order to simplify and broaden its usage.

(Argyrios Kyrtzidis) #115

Yes, this is the direction we want to go, see my comments here: Supporting SwiftSyntax on more targets

(Ru Sshy) #116

Jetbrains just announced support for the swift package manager in CLion

They are moving faster than Apple


And still with Linux support! only Windows is missing, come on Apple !!!!!

(Lars Sonchocky-Helldorf) #117

Kotlin has such a Foundation now:

(Pierpaolo Frasa) #118

I'm so excited about this. I've been using AppCode all the while and will consider switching to CLion (hopefully they'll be able to migrate my subscription) if I find that the support works well.

Looks like a game changer to me.

(Steven Van Impe) #119

For some of us, it will be. I've been playing around with the Swift plugin for quite a while now, and the recent update is really big. There's a lot more improvements in there than just SPM support. There's a few issues remaining, but I'm hopeful.

I look forward to being able to teach Swift to my colleagues and students now that we have a proper IDE on Linux.

(Pierpaolo Frasa) #120

I just tried it out a little. I noticed two issues:

a. if you have imported the project into AppCode before, it won't build and behave weirdly, see Deleting the .idea folder didn't help, so I just checked out the repo again and set it up newly for CLion, now it builds fine.
b. XCTest integration is a bit rudimentary. The output is just the standard swift test output, whereas it was much nicer in AppCode. Also, it doesn't seem like there is a way currently to run single tests.

But otherwise, I'm really excited about it. :slight_smile:

(Steven Van Impe) #121

Has there been any progress on this?

(Argyrios Kyrtzidis) #122

Hey, see my related post here: New LSP language service supporting Swift and C-family languages for any editor and platform

(Ted Kremenek) #123

Sorry, took longer to put our plans together than expected.

(Steven Van Impe) #124

Better late than never!

I'm very excited to see this happening. Looks like 2019 will be the year I will finally be able to teach Swift as a cross-platform language :+1: