There is currently no rich language support on Mac and Linux.
Please upvote this enhancement when you want it to be implemented.
Just for clarification: Rich language is about
- code completion
- finding definitions of symbols
- outlining source files
- displaying semantic errors and warnings while coding (e.g. duplicate entry in uses clause)
Juan Francisco Cantero Hurtado
This feature request has more than one year and there is not (at least public) progress. You're doing a great work with the extension but the wait is a little frustrating. The hard part of the work (i guess) was to add support for Free Pascal on Windows. I don't know why it is taking so long. The biggest difference from my point of view would be the paths. Please don't take my comment as something rude, I really appreciate your work here :)
Please don't take my comment as something rude
Of course, I do not. I'm glad you're asking about the current state.
The hard part of the work (i guess) was to add support for Free Pascal on Windows. I don't know why it is taking so long. The biggest difference from my point of view would be the paths.
There are several reasons that prevent me (for now) from making versions for Linux and Mac:
Focus on supporting the most languge features first
My initial idea was to implement support for the most important language features before porting OmniPascal to other platforms. There are already a lot of language features implemented but some other features are still missing, e.g. With statements, correct resolving for calls to overloaded methods or methods with generic parameters.
I guess I will always find other important features to look at. So it's not a good thing to wait for finishing OmniPascal before porting it.
Today it's easy for me to build and test new versions. The OmniPascalServer is entirely written in VSCode and OmniPascal itself. I love the idea of eating my own dogfood. Before I release a new version I use it for several hours/days in different projects and see what's working and what's not.
If there was a Linux version and a Mac version then I wouldn't be able to test each one as much as I do now.
Luckily I have unit tests for almost everything so I can be sure the most parts of the software will be running fine.
However, I'll need an automatic build system that creates and tests OmniPascal for all supported platforms. Setting up a system like that will take a couple of days.
Platform specific API
The OmniPascalServer uses some Windows API calls. The most important Windows specific module is the file system watcher that receives events whenever a file in the search path has been created, edited or deleted. Each OS has its own functions that you need to call in order to implement a file system watcher. AFAIK in Linux there are different APIs depending on the distribution you are using.
It's a huge task to port that module to different platforms. I consider creating an open source project for this.
I can't tell when I'll finally start to port OmniPascal to Linux and Mac but I guess I shouldn't wait too much. I see people waiting for it. That's a good thing. I will let people know when I start working on it.
The OmniPascalServer uses some Windows API calls. The most important Windows specific module is the file system watcher that receives events whenever a file in the search path has been created, edited or deleted. Each OS has its own functions that you need to call in order to implement a file system watcher. AFAIK in Linux there are different APIs depending on the distribution you are using. It's a huge task to port that module to different platforms. I consider creating an open source project for this.
Use inotify for Linux. Every modern Linux distro supports it. In fact, inotify is required by VSCode.
Run a search during the start of omnipascal, then keep one inotify "watcher" per path listed in the omnipascal config (not per directory). The kernel will launch an event when detects a modification in the directory which you can use to run a search for changes in the tree. If you only parse the new files, the lookup will be fast.
I open sourced the directory watcher in the meanwhile. There's a Windows only version on GitHub. As soon as OmniPascal is running without the directory watcher on Mac and Linux I will implement it for the other platforms.
If you or anybody else wants to contribute then feel free to implement a directory watcher for Linux or Mac. The test project should indicate if everything is working as expected: https://github.com/Wosi/DirectoryWatcher
i really love your work .
and here's my implementation for "directory watcher" on Mac
@Coldzer0x0 That's awesome! I'll take a look at it. When it's working I'd like to add a directory watcher for Mac OS based on your work to my repository and release it under the MIT license. Is it OK for you?
and yes it's ok for me you can use it in whenever you like .
and right now i'm working on updating it cuz the system notify Flags are crazy to determine the rename or delete or move .
cuz if you gonna Rename file or move it
it's the same on Mac or Unix Systems ,
right now i'm rewriting the code to make it more usable and multithreaded .
i'll push the update today .
and sorry for my bad english :D
@Coldzer0x0 Great, I'd love to take your work as the basis for the DirectoryWatcher implementation on MacOS. How is it going with the update? Do you need help?
Everything going well
I updated it but forget to push the updates
Sorry about that