Coder Social home page Coder Social logo

haskell-setup's Introduction

My Haskell IDE Setup with cabal and nix

An inteligent IDE makes development a child's play. In a strongly typed environment, being able infer types while coding makes life haven!

I use vscode for most of the development and somtimes nvim. Projects I work on are usually build with nix + cabal, so I needed plugins which will extract the capabilities of nix as well.

Plugins

Follwing are the plugins list for vscode for haskell projects.

It let us load and unload environment variables depending on the current directory. After installing bot direnv executable and vscode plugin, follow this instructions to add use_nix function in ~/.direnvrc. Then under your projects root folder create a .envrc file which will only have

use_nix -s shell.nix

Here is how my ~/.direnvrc looks like. Next time you open your project, vscode will automatically load nix environment for you.

It provides all the necessary functionality that we need. It displays type, dignostics, jump to definition and quick fixes features. After installing executable and plugin you will be able to see type and definition.

It highlights hlint warnings and errors inline and provides a code-action to accept hlint suggestions. You need to install hlint for this plugin. You can also add .hlint.yaml in your projects root directory.

Integrates vscode with ghcid

This will help you format your code. Will make more readable and preety.

Another code formatter for Haskell.

Support for the Haskell programming language in visual studio code.

It indexes your whole project and provides useful suggestions.

Makes hoogle search easier.

highlight trailing spaces.

Fonts

Monospaced font with programming ligatures

Aditional

  • If you use zsh then you can add this plugin zsh-nix-shell which will lets you use zsh in nix-shell shell

  • Here is my .nvimrc and .nvimrc.plug with haskell plugins.

Screenshots

Code Code

haskell-setup's People

Contributors

shivamashtikar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

haskell-setup's Issues

Provide config

Please provide the relevant configuration for vscode, the various extensions, the haskell utils, etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.