languages/http: init#1672
Conversation
Pull request was converted to draft
|
Currently doesn't work, due to missing CLI deps from |
Adds support for the JetBrains HTTP Language/Format Closes: NotAShelf#1663 Closes: NotAShelf#1641
|
Required Compat was added Upstream, works as expected :3 |
|
DISCLAIMER: As I'm not familiar with nix, I could be totally wrong reading what this PR does. I just wanted to mention that if it's true that nix ships with kulala-fmt (+ the required kulala-core version by kulala-fmt) and you use the same version (of kulala-core) in kulala.nvim and kulala-fmt, that is probably going to break things. The whole reason I made it this modular, is that not every update needs to exist in all tools. Some things that we fix (like the oauth browser flow) in Core, don't need to be pushed to the formatter. The formatter never touches anything oauth related. So the formatter is sometimes quite a bit behind when it comes to the core version it requires. But we also already had it the other way around, there were things added to core to support certain features in kulala-fmt and then kulala-fmt had a newer kulala-core dependency than kulala-cli, kulala.vscode and kulala.nvim and kulala for desktop 🤷🏾 So: There is no guarantee that version xy of core will work in all tools at the same time. That's why all tools have a specific version constrained attached to them. |
The Formatter (which is handeled by conform) is independent of the plugin. thanks to the way linking works in nix, there is no kind of conflict between formatter and extensions.
We dont use the same. |
|
Yes, could be still me not knowing nix but all kulala tools have a core dependency (Kulala-Core). They don't ship with it, but download it on demand. This version differs per tool. They download the dependency in the platforms cache location though in a structure like I'm not sure how that is handled by nix, since I heard that nix says it's immutable. With tools like kulala that isn't the case anymore, if you don't download the core yourself build it and then set at least the env var. Sorry, if this is totally wrong and already covered by nix. Or my definition of immutable is different than what nix offers. Downloading a dependency during runtime isn't immutable to me. |
|
the kulala fmt in nixpkgts is actually pretty old, its at 1.4.0, so it still has everything bundled lmfao. I feel like we should package the whole thing from scratch for NVF 🤔 |
|
Noticed another problem, |
| defaultFormat = ["kulala-fmt"]; | ||
| formats = { | ||
| kulala-fmt = { | ||
| command = getExe pkgs.kulala-fmt; |
There was a problem hiding this comment.
TODO: package myself
| path = mkOption { | ||
| type = nullOr str; | ||
| # TODO: set default, when kulala-core is package in nixpkgs some day | ||
| default = null; |
There was a problem hiding this comment.
TODO: package myself for fmt, so making it a reproducible default here makes sense
| description = "`curl` or `wget` or full path to `curl` or `wget` executable."; | ||
| }; | ||
| }; | ||
| lsp = { |
There was a problem hiding this comment.
TODO: drop this, and disable, in favor of NVF lsp.presets
the base config we generate is immutable, what happens at nvim runtime of course isnt, In this case though, I feel like is hould package the whole thing from scratch |
|
Okay, I mean you guys can do whatever you want, but the formatter in this version is pretty useless. You need to downgrade to kulala.nvim v4 something for it to work for you, but then you're missing a lot of features. If you use the latest version of kulala.nvim the formatter in this version will actually destroy your files, because it's completely incompatible and throws away valid "code". |
|
I mean, I saw some things about nix package files or something. Because I know the ins and outs of the kulala tools, I could offer to assist in making it truly immutable at build time for nix without breaking a things for users like me or nix users. But maybe someone can point me to a getting started guide or another plugin that does this already |
|
Okay, looked at it, looks like on nixpkgs unstable its at 3.1.0 |
|
and unstable actually packaged the core 3 weeks ago.... I guess this will have to wait as a draft till we do the 26.07 release, and join unstable on main again. OR we vendor from nixpkgs unstable temporary... @horriblename whats your opinion on this? |
Adds support for the JetBrains HTTP Language/Format
Closes: #1663
Closes: #1641
Sanity Checking
nix fmt).#nix(default package).#maximal.#docs-html(manual, must build).#docs-linkcheck(optional, please build if adding links)x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwinAdd a 👍 reaction to pull requests you find important.