Skip to content

languages/http: init#1672

Draft
snoweuph wants to merge 1 commit into
NotAShelf:mainfrom
snoweuph:http
Draft

languages/http: init#1672
snoweuph wants to merge 1 commit into
NotAShelf:mainfrom
snoweuph:http

Conversation

@snoweuph

Copy link
Copy Markdown
Collaborator

Adds support for the JetBrains HTTP Language/Format

Closes: #1663
Closes: #1641

Sanity Checking

  • I have updated the changelog as per my changes
  • I have tested, and self-reviewed my code
  • My changes fit guidelines found in hacking nvf
  • Style and consistency
    • I ran Alejandra to format my code (nix fmt)
    • My code conforms to the editorconfig configuration of the project
    • My changes are consistent with the rest of the codebase
  • If new changes are particularly complex:
    • My code includes comments in particularly complex areas
    • I have added a section in the manual
    • (For breaking changes) I have included a migration guide
  • Package(s) built:
    • .#nix (default package)
    • .#maximal
    • .#docs-html (manual, must build)
    • .#docs-linkcheck (optional, please build if adding links)
  • Tested on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin

Add a 👍 reaction to pull requests you find important.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

🚀 Live preview deployed from 058a41f

View it here:

Debug Information

Triggered by: snoweuph

HEAD at: http

Reruns: 3370

@snoweuph snoweuph enabled auto-merge June 26, 2026 21:19
Comment thread modules/plugins/languages/http.nix
@snoweuph snoweuph requested a review from horriblename June 26, 2026 21:58
Comment thread modules/plugins/languages/http.nix Outdated
github-actions Bot pushed a commit that referenced this pull request Jun 27, 2026
@snoweuph snoweuph marked this pull request as draft June 27, 2026 08:53
auto-merge was automatically disabled June 27, 2026 08:53

Pull request was converted to draft

@snoweuph

Copy link
Copy Markdown
Collaborator Author

Currently doesn't work, due to missing CLI deps from PATH.
opened an Upstream Feature Request for the new config options.
mistweaverco/kulala.nvim#961

Adds support for the JetBrains HTTP Language/Format

Closes: NotAShelf#1663
Closes: NotAShelf#1641
@snoweuph

Copy link
Copy Markdown
Collaborator Author

Required Compat was added Upstream, works as expected :3

@snoweuph snoweuph marked this pull request as ready for review June 27, 2026 09:25
@snoweuph snoweuph requested a review from horriblename June 27, 2026 09:25
@gorillamoe

gorillamoe commented Jun 27, 2026

Copy link
Copy Markdown

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.

@snoweuph

snoweuph commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

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.
So a user can just enable the formatter but not the plugin.

thanks to the way linking works in nix, there is no kind of conflict between formatter and extensions.

and you use the same version (of kulala-core) in kulala.nvim and kulala-fmt

We dont use the same. kulala-fmt from nixpkgs, is activly linked against its version of core,
and for the plugin we currently rely on the download mechanism.

@gorillamoe

gorillamoe commented Jun 27, 2026

Copy link
Copy Markdown

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 .my-platforms-cache-dir/kulala-fmt/bin/kulala-core/. They put a version.txt and the binary there. If the version.txt contents don't match the actual requirements and you don't force a core path via env var KULALA_CORE_PATH or something like setup opts in kulala.nvim they'll try to update.

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.

@snoweuph

Copy link
Copy Markdown
Collaborator Author

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 🤔

@snoweuph

Copy link
Copy Markdown
Collaborator Author

Noticed another problem,
By updating to Npins isntead of outdate plugin version from nixpkgs, I see that the LSP now also needs to be packaged separately.

@snoweuph snoweuph marked this pull request as draft June 27, 2026 10:03
defaultFormat = ["kulala-fmt"];
formats = {
kulala-fmt = {
command = getExe pkgs.kulala-fmt;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: package myself

path = mkOption {
type = nullOr str;
# TODO: set default, when kulala-core is package in nixpkgs some day
default = null;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: drop this, and disable, in favor of NVF lsp.presets

@snoweuph

Copy link
Copy Markdown
Collaborator Author

Or my definition of immutable is different than what nix offers. Downloading a dependency during runtime isn't immutable to me.

Or my definition of immutable is different than what nix offers. Downloading a dependency during runtime isn't immutable to me.

the base config we generate is immutable, what happens at nvim runtime of course isnt,
so generaly we prefer doing stuff at build time,
but sometimes you cant, and we have to live with runtime workarounds.

In this case though, I feel like is hould package the whole thing from scratch

@gorillamoe

Copy link
Copy Markdown

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".

@gorillamoe

gorillamoe commented Jun 27, 2026

Copy link
Copy Markdown

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

@snoweuph

Copy link
Copy Markdown
Collaborator Author

Okay, looked at it, looks like on nixpkgs unstable its at 3.1.0

@snoweuph

snoweuph commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jetbrains Http Language Support kulala support

3 participants