{"id":13617016,"url":"https://github.com/neovimhaskell/nvim-hs","last_synced_at":"2025-04-04T05:09:04.329Z","repository":{"id":23630422,"uuid":"27000146","full_name":"neovimhaskell/nvim-hs","owner":"neovimhaskell","description":"Neovim API for Haskell plugins as well as the plugin provider","archived":false,"fork":false,"pushed_at":"2023-12-28T11:02:05.000Z","size":787,"stargazers_count":267,"open_issues_count":9,"forks_count":18,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-10-30T00:33:28.553Z","etag":null,"topics":["haskell","haskell-plugins","neovim","neovim-api","nvim","nvim-hs"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neovimhaskell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-11-22T13:46:38.000Z","updated_at":"2024-09-16T06:18:24.000Z","dependencies_parsed_at":"2023-11-12T16:27:21.447Z","dependency_job_id":"878fdd2b-4af4-4095-847d-d4c44ae302c6","html_url":"https://github.com/neovimhaskell/nvim-hs","commit_stats":{"total_commits":424,"total_committers":11,"mean_commits":38.54545454545455,"dds":0.08490566037735847,"last_synced_commit":"eaf826d4156b0281ef7ce9dec35ba720b5c45f09"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neovimhaskell%2Fnvim-hs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neovimhaskell%2Fnvim-hs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neovimhaskell%2Fnvim-hs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neovimhaskell%2Fnvim-hs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neovimhaskell","download_url":"https://codeload.github.com/neovimhaskell/nvim-hs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123107,"owners_count":20887261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["haskell","haskell-plugins","neovim","neovim-api","nvim","nvim-hs"],"created_at":"2024-08-01T20:01:35.908Z","updated_at":"2025-04-04T05:09:04.296Z","avatar_url":"https://github.com/neovimhaskell.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"# nvim-hs\n\nNeovim API for Haskell plugins as well as a plugin provider.\nThis library and executable should provide a basis for developing\nplugins. This package should only contain broadly useful interfaces\nto write plugins for Neovim in haskell. The design goal is to create\nan easy to use API that avoids most of the boilerplate while still retaining\nsome sense of reliability and type safety. Since Template Haskell is used\nto generate the neovim bindings and to avoid some of the boilerplate\nhandy work, some exotic operating systems and architectures may not work.\n\n[![Hackage version](https://img.shields.io/hackage/v/nvim-hs.svg?style=flat)](https://hackage.haskell.org/package/nvim-hs)\n[![nvim-hs on latest Stackage LTS](http://stackage.org/package/nvim-hs/badge/lts)](http://stackage.org/lts/package/nvim-hs)\n[![nvim-hs on Stackage Nightly](http://stackage.org/package/nvim-hs/badge/nightly)](http://stackage.org/nightly/package/nvim-hs)\n\n# What do I have to expect if I were to use it now?\n\nCheck the issue list here on github.\n\n## For Windows users\n\nNamed pipes are not supported at the momend #103. You therefore have to start\n`nvim-hs` instances by connecting to STDIN and STDOUT or TCP. By default `nvim-hs`\nconnects to the listen socket pointed to by the `NVIM` environment variable and \nthe functions in the module `Neovim.Debug` rely on that. If you want to be able to \nrun these functions, start Neovim with `nvim --listen localhost:` or similar\n(This example command starts neovim with a socket listening on `localhost` and \nrandom a random TCP port.)\n\n# How do I start using this?\n\nYou need to install `nvim-hs.vim`, a plugin that manages starting of `nvim-hs` plugins.\nTo do that, just follow the instructions outlined [here](https://github.com/neovimhaskell/nvim-hs.vim).\n\nOnce you have installed `nvim-hs.vim`, you can use `nvim-hs` plugins as you would\nnormal vim plugins. Note that every plugin you install is started as a separate process,\nwhich should be fine unless you have a lot of them.\n\n# Scripting with Haskell\n\nThe entry point for all Haskell-based scripts is a plugin.\nAn `nvim-hs` plugin is a plain Haskell project with two conventions:\n\n1. You need an executable that starts a `msgpack-rpc` compatible client.\n\n2. You need a tiny bit of `vimL` in your runtime path that starts the plugin.\n\nThe simplest way to get started is using the stack template from this\nrepository/package inside your Neovim configuration folder, but you can also\nmanually create a project by doing everything that is explained in `:help nvim-hs.txt` \n(which should be available if you installed `nvim-hs.vim` as mentioned in the previous section).\n\nTo use that template, you'll first need to [install stack](https://docs.haskellstack.org/en/stable/README/)\nand have the Neovim executable on the path (the API code generation calls `nvim --api-info` so it needs access to `nvim`).\n\nAfter you've done that, you can run these commands to setup the template (assuming your Neovim configuration folder\nis in `$XDG_CONFIG_HOME/nvim`):\n\n```\n$ cd $XDG_CONFIG_HOME/nvim\n$ stack new my-nvim-hs \\\nhttps://raw.githubusercontent.com/neovimhaskell/nvim-hs/master/stack-template.hsfiles \\\n--bare --omit-packages --ignore-subdirs\n```\n\nIf you start Neovim now, it will compile the example plugins which may take a\nfew minutes. Once it is started you can use the predefined functions from the\ntemplate, for example by running `:echo NextRandom()`, which should print a random number.\n\nTo start writing your own functions and plugins, read through the files\ngenerated by the template and also check out the\n[library documentation on hackage](http://hackage.haskell.org/package/nvim-hs).\n\n# Contributing\n\nDocumentation, typo fixes, and the like will almost always be merged.\n\nIf you want to bring forward new features or convenience libraries\nfor interacting with Neovim, you should create an issue first. The features\nof this (cabal) project should be kept small as this helps\nreduce the development time. (For some tests it is\nnecessary to issue `cabal install`, so any change to to a module can\nsignificantly increase the compilation time.)\nIf your idea solves a general problem, feel free to open an issue in the\nlibrary project of `nvim-hs`, \n[`nvim-hs-contrib`](https://github.com/neovimhaskell/nvim-hs-contrib).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneovimhaskell%2Fnvim-hs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneovimhaskell%2Fnvim-hs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneovimhaskell%2Fnvim-hs/lists"}