No description
Find a file
aj da4b319d0a
Some checks failed
CI / tests (ubuntu-latest) (push) Has been cancelled
nvim type check / nvim type check (push) Has been cancelled
Auto-generate vimdocs / README.md to vimdoc (push) Has been cancelled
Update README.md
2025-06-12 08:39:36 +00:00
.github take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
lua/nvimmer-ps take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
spec take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
.busted take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
.editorconfig take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
.gitignore take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
.luarc.json take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
.markdownlint.yaml take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
.stylua.toml take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
.typos.toml take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
Dockerfile take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
Dockerfile_ take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
flake.lock take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
flake.nix take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
LICENSE take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
Makefile take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
nvim-config-test.lua take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
README.md Update README.md 2025-06-12 08:39:36 +00:00
run-tests.sh take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30
shell.nix take current nvimmer-ps sources 2025-06-12 14:07:23 +05:30

NOTE: This is a saved copy of srghma/nvimmer-ps which seems to have disappeared. Sadly I have lost the commit history as well.

nvimmer-ps

a neovim plugin for PureScript that supplements the built-in purescript-language-server

HOW TO INSTALL

-- lazy.nvim
{
  "srghma/nvimmer-ps",
  dependencies = {
    "nvim-lua/plenary.nvim",     -- Add plenary.nvim as a dependency
    "nvim-telescope/telescope.nvim", -- Add telescope.nvim as a dependency
  },
  config = function()
    -- or require("nvimmer-ps").setup({ keymaps = { ... } })
    require("nvimmer-ps").setup()
    
		local nvim_lsp = require("lspconfig")
		nvim_lsp.purescriptls.setup({
			on_attach = function(client, bufnr)
				require("nvimmer-ps").setup_on_attach(client, bufnr)
			end,
			on_init = function(client)
				require("nvimmer-ps").setup_on_init(client)
			end,
			flags = {
				debounce_text_changes = 150,
			},
			settings = {
				purescript = {
					formatter = "purs-tidy",
					addSpagoSources = true,
				},
			},
		})
  end,
}

OR check https://github.com/AstroNvim/astrocommunity/pull/1222

OR check ./nvim-config-test.lua (can be run with nvim --clean -u ./nvim-config-test.lua ~/projects/purescript-pathy-node/src/Pathy/Node/OS.purs)

Commands

Keystroke Command Function Description
<space>am add_import() Show list of available modules from spago, enter to add import
<space>ae add_explicit_import() Will get current symbol, show modules that contain it, enter to add import
<space>asi search_pursuit() Search identifier under cursor, all 3 types (declarations, packages, modules), enter to open in browser, ctrl+i to add import statement (but if package - open in browser)
<space>asm search_pursuit_modules() Search modules in Pursuit, like search_pursuit, but filters only modules, and shows different UI, same keybindings
<space>ac case_split() Case split (TODO: doesnt work in vscode too)
<space>aa add_clause() Add clause (generate function from a type of function)
<space>alb build() Build
<space>als start() Start
<space>alt stop() Stop
<space>alr restart() Restart

Intercepted

Also, it intercepts purescript.typedHole command FROM purescript-language-server:

Example: You have code leftSide _ = ?asdf, You apply code action from lsp (<leader>la in astronvim), You choose Apply typed hole suggestion - This plugin will render telescope picker with list of typed hole suggestions and you can select one to apply.

IMAGE ALT TEXT HERE

Contribute

./spec tests dont work yet