Claude Code Plugin with HLS Support

Claude Code got the ability to work with LSPs directly just recently. That means Claude can get precise type information, find usages of symbols, and all the other great things we get from HLS.

I created a plugin to take advantage of this new functionality. Check it out at GitHub - m4dc4p/claude-hls (installation instructions are available there).

Feedback & comments welcome! Enjoy!

11 Likes

How does it work? Does the plugin start the HLS server on its own? Asking because I use Nix to manage my development environment, so whenever .cabal file gets updated, a restart of Nix shell is often necessary before restarting HLS.

As an aside, I’ve been using ghcid to provide quick feedback to Claude Code.

1 Like

Claude code starts HLS but I don’t think it’s smart enough to restart it. As for nix, you have to have HLS on the path before starting claude so you’d also have to restart the nix shell yourself.

I use GHCId myself mostly. I think this plugin isn’t so great for compilation errors, but rather for precise types (“hover”) and export info (“document symbols”).

Just checked it out. Pretty cool! Noticed you pulled in dataframe for testing - what sort of tests are you running?

It’s just needed a recently maintained library to test HLS operations. Nothing specific to data frame but thanks for providing it!

opencode ( https://opencode.ai) has pretty good lsp support and its easy to configure it to use HLS and any formatter needed

Hi, I’m curious whether there’s added benefits of such a thing when the AI tooling is already integrated into the editor (e.g. Roocode in vscode, which can automatically read the “Problems” panel, which is populated by HLS). Thanks for the info!