panicinc / icarus Goto Github PK
View Code? Open in Web Editor NEWSwift, C, C++, and Objective-C Support for Nova
License: MIT License
Swift, C, C++, and Objective-C Support for Nova
License: MIT License
Xcode can show the generated code that a macro creates by right clicking and choosing "Expand Macro". I'm not sure if this is possible through the LSP or not but I found some discussion of it here and it looks like it might be?
I'm using the Swift OpenAPI generator and I've followed the basic tutorial they present (https://swiftpackageindex.com/apple/swift-openapi-generator/1.2.1/tutorials/swift-openapi-generator) and it builds successfully, but in Nova it shows a bunch of errors - all claiming the auto-generated types don't exist.
Please advise
edit: Note, the source code I attached is missing a dependency declaration (.target(name: "ThemeParksSchema")
) however resolving this error does not resolve the reported problem.
Hello,
There is a bug (maybe two see below) with the extension that crashes after renaming a file.
To replicate:
test.cpp
.cpp
file with just in main()
in it. (no header files)std::cout
the <iostream>
is not added automatically<stdlib.h>
try again and you see it finds the std
but the auto import is unpredictable unless you manually import the iostream
iostream
manually. You can remove and give it a shot and you will see as soon as you type std::cout
it just imports them for you.I've read the Readme and the plugin description but I'm none the wiser. Is it possible to use icarus in lieu of Xcode for doing iOS development (given that the iOS project is a pure SPM project)? Or can Icarus only be used with Swift non-app Swift SPM projects?
The token preview on hover is a great feature, especially for looking up function prototypes. However some times it cannot autoscale appropriately.
Consider these :
const
, char
, restrict
all three on different lines. Also couldn't completely display restrict in arguments.
This one is somewhat of extreme case due to parameter names, but displaying each parameter with it's (complete) type line-by-line would make it more readable.
These might look very minute details but it ultimately makes the code much less comprehensive.
REQUEST: Additionally, if possible, make the windows resizable using cursor, so worst case scenario users are able to read even if autoscaling fails.
When using build tool plugins in Swift packages, it's possible to generate code that is then available to the project. Some examples of projects that do this are:
When the build tools run, they generate their output in .build/plugins/outputs
Since this is in a hidden root folder which is generally in .gitignore
I think that by default Nova will not index them. I was able to get things working with these project settings:
I'm not sure if a plugin can influence the indexing allow/block list, but it would be great to have this "just work" somehow.
I noticed that, when writing unit tests using XCTest, the LSP will crash whenever I call XCTAssertTrue
before I finish writing the condition:
final class MyTestCase: XCTestCase {
func testExample() throws {
XCTAssertTrue(|) // | is my cursor
}
}
A workaround I've found was writing the condition first and wrapping it in parens, then add XCTAssertTrue
before the wrapped expression.
I have sometimes experienced that clangd LSP server hangs up. Autosuggestions, code analysis, everything stops working and only syntax highlighting works.
The quick workaround for this has been disabling and re-enabling the Icarus extension. But it would be great to have this simple option to "Restart Language Server" in command pallet or something easily accessible.
I unfortunately don't have any logs of any kind to demonstrate or reproduce this, so if you could assist me how I could get some logs to post here, I'd be more than happy.
I'm working with Objective-C in Nova and I'm not seeing issues like I do in Xcode. If I open my .m file in Xcode I see issues like "Unused variable" warnings for example, popping up at the edge of the editor. But I see no such warnings in Nova. I keep switching back over to Xcode while editing so I can see the issues.
Is this supposed to be a feature of Icarus or no? Is there something else I need to do to get it working? I have Xcode and its command line tools installed.
When I create a new file and define a new class, referencing the new class in another file will produce a cannot find <object> in scope
error. It persists through builds (which work fine). The menu option to clear issues from previous builds doesn't remove it.
The only way I know to clear this error is to toggle off the Icarus extension and then toggle it on again.
I reproduced this from a fresh launch and watched the extension console, but nothing was emitted there as I added the file and referenced it.
I also noticed that the LSP will crash with a notification if I delete a file, in case that's relevant.
I'm not seeing support for remote debugging with LLDB (use case 1: from Nova on my Mac to a Docker container on the same Mac running Linux and bound to a folder on the Mac that has the source code so Nova can edit it but it can be built and run inside the docker container).
Looking inside Icarus UI and source I don't see any specific support for remote debugging with LLDB but the Readme file says:
If you are Swift or C-family language developer, Icarus can provide you with first-class support for building client- and server-side applications and frameworks.
and the "server-side applications" part made me think it might.
I was able to use a generic task (not the LLDB) task and get Nova editing and able to invoke a remote build and run command via Run Script Tasks like docker exec -i -w /app {ContainerID} swift build
and docker exec -i -w /app {ContainerID} swift run
but that doesn't give you debugging inside Nova via LLDB.
I started looking at what it would take to add support for this to Icarus and I'd have a lot to learn before I could do it. I'm working though that as time permits, but it seemed worth asking if:
TIA
I see that // MARK:
comments have basic support, in that they show in the symbol list.
It would be awesome if marker comments containing hyphens showed a horizontal divider line, as in Xcode (and, in fact, as they already do in the minimap). Over the years I’ve come to completely rely on this feature for organising and scanning code, and I find my Swift code hard to browse without it.
Although outside the scope of this extension, it would also be great to see support for marker comments as a global app feature for all languages. I was excited when I discovered Nova’s 'type and function separators' preference, but it’s not the same as being able to give your own titles.
Dear Panic team, thanks for this extension which is very useful for me, thanks a lot!
Unfortunately the syntax highlighting is not working at all for C++ files (e.g. .h
and .cpp
files). If I switch the language to C
the highlighting works. Please note that previously I had this C++ extension installed which I have uninstalled now. I also tried to reinstall Icarus but it did not help. What else can I do?
I have a C code :
printf("What's your First Name?");
in = fgets(you.first_name, MAX_DATA - 1,stdin);
When I launch the dubber, and hit this line, the bulit-in dubbger wait for me to give input (still not hitting break point yet, so the process is still running), as seen here:
But when I type something the built-in dubbger shell is not responding when I type in and thing and hit "Enter",
Do I need to hit some shortcut or I' missing something?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.