Skip to content
0:00 / 0:00

#haskelllanguageserver#cabal#lsp

MuniHac 2024 - Fr, Oct. 11 - H. Siebenhandl: Exploring Haskell Language Server via the Cabal Plugin

TNG Technology Consulting GmbH

5K subscribers • 17 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by H. Siebenhandl

Intermediate. Assumes working knowledge.

463 views2 years ago1 recommendation

Tools and practiceProgramming languagesHaskellVim, Emacs and editorsBuild systems and packaging

H. Siebenhandl explores the integration of the cabal-plugin into the Haskell Language Server architecture and the Language Server Protocol.

The .cabal file defines what encompasses a package in the Haskell ecosystem. It is strictly required if you want to upload your package to Hackage. As such, almost anyone has to write or modify .cabal files at some point in their Haskell career, but due to its unique syntax, this often proves harder than necessary. Recently, Haskell Language Server started to close the gap between support for Haskell and cabal source files, by introducing the cabal-plugin. In this talk, we are going to take a closer look at the integration of the cabal-plugin into the architecture of the Haskell Language Server and explore its key concepts for providing a snappy, interactive developer experience. We are going to discuss the Language Server Protocol, and the plugin architecture, which allows us to extend HLS with a minimal amount of effort. These features will be explained by doing a deep-dive into the "cabal-plugin", which allows HLS to check .cabal files for syntax errors, provide completions, and even more features that help to read, write and modify .cabal files.

Why it's here

1 person recommends this

What people say. Recommended for understanding the internals of Haskell Language Server and its Cabal integration.

u/TechnoEmpressin r/haskell • Recommends

H. Siebenhandl: Exploring Haskell Language Server via the Cabal Plugin (MuniHac 2024)

u/kosmikusin r/haskell • Mentions

On “Haskell records in 2025 (Haskell Unfolder #45)”

Not sure if I understand the question. If the question is specifically whether it can be implemented as a \*plugin\*, then the answer is "yes". HLS is basically built completely on plugins, even core functionality is part of a plugin. See for example this MuniHac talk by Hannes Siebenhandl that explains HLS architecture quite a bit: [video or this older MuniHac workshop by Pepe Iborra on how to write a plugin yourself: [video If, however, the question is whether this particular task of improving record completions is \*easy\*, then I dare not say. I think there are multiple levels of ambition possible here, which probably range from moderately easy to relatively complex. But I'd definit…