-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nim Tooling Roadmap #544
Comments
Nice |
🔥 |
I wanted to emphasize the LSP should be more stable. It crashes pretty frequently. Please prioritize LSP features & stability over VSCode extension features (I am biased, I don't use VSCode). Here are some questions/feedback:
How is this going to be achieved? Is this my RFC proposal (#540)? If not & you remove mangling then how will overloaded symbols get resolved?
The list of features here looks more like a build system, which would be a great addition. Here are some suggestions:
|
Fantastic!
I started toying with the LLDB / GDB debugger support issue. Folks already provide some scripts for both GDB and LLDB. However, AFAICT, neither debugger appears provide the ability to affect name mangling directly. You can do some custom frame stack printing, etc this SO still seems to be the current state of things. Perhaps the best route for full demangling while debugging would be to provide a debug-adapter-protocol proxy. Essentially connect to the LLDB/GDB DAP api's then demangle the names and pass it on. |
That's one way, but that approach is "in the middle" and wouldn't allow for using A better solution IMO is to follow my suggested changes within the LLDB source itself in #540 (I am biased of course) - GDB appears to be similar (based on @ire4ever1190's comment). LLDB would also be better if it had direct Language support via its language plugin (see links in my RFC), which would tie into Nim's 2024 roadmap for its planned feature: the REPL (i.e. we could have direct REPL support in LLDB). Adding demangling support in debuggers's source directly is the approach other languages take such as D & Rust. Unfortunately, you cannot add demangling support via LLDB's plugin system. |
@miguelmartin75 we have a few ideas to approach the debugging situations but we dont know yet how we are going to tackle as the initial focus is in the nimlangserver/vscode extension. But your RFC is a good starting point |
@jmgomez I have several questions if you do not mind :)
|
I'm guessing my LSP server isn't considered in this roadmap, since Status seems to be solely focused on the nimlangserver implementation. I would however really like if they properly documented and implemented changes in the nimsuggest module though. Previously I had an issue where changes they made for nimlangserver ended up sending NimLSP into an infinite loop because it entered a codepath they hadn't tested. And the new V3 mode is only available to the external tool and not in the library version of nimsuggest. I tried to have a look at implementing the V3 mode for the library version, but lacking any documentation I couldn't get it to work. So yeah, if anything NimLSP should in theory benefit from all improvements in nimsuggest, but in practice the QC on what is added to nimsuggest has been a bit lackluster and changes are typically only added to the tool version and not the library version which is a real shame. I really hope that this can change though with this added focus on tooling! |
@Clonkk the idea is to be as extension agnostics as possible. Obviously some features need to be implemented at the extension level. We are going to do everything in our hands to make NimSuggest better but it's hard to tell how far we can get it. IC is supposed to help a ton here, we will see. As far a NimLSP vs nimlangserver goes, I cant say much about it. I would love to see all efforts converging into one tool though. @PMunch Im sorry to hear that changes on the compiler broke NimLSP I know how it feels because that happened to me personally in NimForUE. Anyways, all I can say is that I will document the PR that I do regarding NimSuggest features, cant speak for others. |
Total newcomer to nim so please ignore my input if it's not useful. That being said, I'm interested in using nim to write shared code that I can run on any platform. Since I primarily use react-native at the moment that includes web (js), Android (native) and iOS (native). Looking into nim on iOS/Android I found little other than the brief entries in the compiler guide and a few old experiments. This (at least from the perspective of a newcomer) seems to boil down to "nim compiles to c, and you can use c anywhere, but it's up to you to figure out how to bind to it", or rather you technically could use nim on those platforms but there's no tooling to help with it beyond generating usable c. Maybe it would be useful to add some tooling that makes it easier for nim to be more seamlessly cross platform such as generating the necessary boilerplate to consume a nim program on mobile platforms? Another example would be typescript. If tooling could generate .d.ts files for nim compiled to js (or generate typescript code instead of js) it might make using nim in the js ecosystem a whole lot easier. In general tooling to automatically generate types/bindings to/from the standards of other platforms such as the (seemingly unfinished/abandoned) dts2nim might also make it a lot easier to use nim in more contexts. |
I would like to see the Nim lang file from Aporia updated and merged into GtkSourceView, so that maybe Owlkettle and/or Gintro can support GtkSourceView and people can make gtk-based editors easier. and here is a GtkSourceView issue that explains the process. |
@ITwrx You need to update this file as user defined literals and maybe some keywords have been added since then. |
@Araq Thanks. I do realize it needs to be updated, but i'm not sure how yet (thanks for the clues on what might have changed). That's why i just added it here. |
One improvement I'd like to see in nimsuggest is having end line/column info for diagnostic messages so that NimLSP and nimlangserver can better display where a hint/warning/error corresponds to |
Four Nim extensions pop up when searching for Nim in the VSCode marketplace: The first has not been updated in years. The second is saem's Nim rewrite, and has been the recommended extension for quite some time. I don't know what the third is. The fourth is your fork of saem's extension? I don't know what the relation between nim-lang/vscode-nim and saem/vscode-nim is, but what strikes me as bad is the old TypeScript extension being first in results and overwhelmingly so - that thing's ancient. I worry that those new to Nim are liable to install it and have a bad time. The authors appear inactive, but judging from rust-lang/vscode-rust#927 there's a chance we can contact Microsoft staff directly and have it be marked deprecated? |
As a new comer, I like to install the official one and in your lineup I would choose the fourth, nim-lang.org |
I would also add a
I'll also copy the state of non-VSCode editors from my comment in the old RFC #300 (comment) here:
|
@heysokam Have you tried nph? https://github.com/arnetheduck/nph Works great IMO, though not configurable (similar ideology as black for python, but I like it that way). |
@auxym nph is a great improvement over nimpretty. Still, just as hardcoded or even more. |
|
Anti-bike-shedding, one-size-fits-none formatters is the current local-maximum in many communities. |
But community prevalence does not make a decision good, it just makes it prevalent. And lets be real, force-formatting is valued as a standard just because its the simplest/laziest solution to implement. But prevalence is not quality. Prevalence is just prevalence. |
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. |
|
This is now fixed. |
Fixed in v1.2.0.
Crash is fixed in v1.2.0 and an improved fix is committed in the master branch that takes into account rootPath, instead of rootUri (helix sends rootPath only, without rootUri). |
Did anyone ping @isidorn about the issue of ancient misleading versions of vscode extensions that are no longer maintained? Maybe they can deprecate at least the first one which has no update for 4 years as well... 😅 I don't know about @saem's extension (at least that one is still useful as I see from other users) but the first one should definitely be deprecated, IMHO. |
VSCode Extension:
[x] Unify overloading. Consider, proc add(x: Foo, a:int) and proc add(x: Foo, a:string) when hitting x. it should appear as one navigable entry.
[ ] Be able to run tests directly
[ ] Preview template/macro expansion
[ ] Suggested quick fixes (add missing module, etc)
nim
panel that shows the nimlangserver status and notificationsnimble
task runnernimlangserver
error reportingchronos
migrationDebugger support
Package manager
Code formatter
The text was updated successfully, but these errors were encountered: