Vitest for coc.nvim

Overview

coc-vitest

Vitest for coc.nvim

coc-vitest-demo

Install

vim-plug:

Plug 'yaegassy/coc-vitest', {'do': 'yarn install --frozen-lockfile'}

CocInstall:

Not supported at this time.

Configuration options

  • vitest.enable: Enable coc-vitest extension, default: true
  • vitest.codelens.enable: Enable codelens, default: true
  • vitest.codelens.title: CodeLens title. Can be changed to any display, default: ">> [Run Vitest]"

Commands

:CocCommand [CommandName]

e.g.: :CocCommand vitest.projectTest

  • vitest.projectTest: Run Vitest for current project
  • vitest.fileTest: Run Vitest for current file
  • vitest.singleTest: Run Vitest for single (nearest) test

Example of Vim command and key mapping:

Vim commands can be defined and executed or key mappings can be set and used.

te :call CocAction('runCommand', 'vitest.singleTest') ">
" Run Vitest for current project
command! -nargs=0 Vitest :call CocAction('runCommand', 'vitest.projectTest')

" Run Vitest for current file
command! -nargs=0 VitestCurrent :call  CocAction('runCommand', 'vitest.fileTest', ['%'])

" Run Vitest for single (nearest) test
nnoremap 
    te :call CocAction('runCommand', 'vitest.singleTest')
    

CodeLens (Neovim only)

Feature:

CodeLens appears above the test name in the *.test.ts and *.spec.ts files. Currently, import.meta.vitest is not supported.

coc-settings.json:

By default, codeLens.enable is set to false, which disables it.

Change the setting to true to enable it.

{
  "codeLens.enable": true
}

Example key mapping (CodeLens related):

nmap 
    gl 
   (coc-codelens-action)

Misc:

"CodeLens" does not work with "Vim8" due to coc.nvim specifications.

vitest.singleTest commands are available, so please use them.

Similar coc.nvim extension

Thanks

License

MIT


This extension is built with create-coc-extension

You might also like...

🚀 A boilerplate with generic configurations to a Nextjs project with bun, vitest, cicd and etc

👕 Next.JS Template with Linter 🔨 Tools: NextJS Typescript ESLint (Code Pattern) Prettier (Formatter) Husky (Pre-commit) Vitest (Unit/Integration Tes

Dec 18, 2022

🔥 TypeScript type assertion plugin for vitest

🔥 TypeScript type assertion plugin for vitest

TypeScript type assertion plugin for vitest. 📌 This plugin is in alpha version, and will probably stay that way for a long time, it lacks tests (a bi

Nov 23, 2022

Nuxt3 template with Windicss + Pinia + Vitest + Playwright

Nuxt3 template with Windicss + Pinia + Vitest + Playwright

Nuxt 3 Template Nuxt 3 template repository Look at the nuxt 3 documentation to learn more. Used Technologies Usage Setup Make sure to install the depe

Dec 14, 2022

A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Prisma ORM. Deploys to Fly.io

A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Prisma ORM. Deploys to Fly.io

Live Demo · Twitter A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Pris

Oct 31, 2022

Nuxt.js 3 x Histoire x Vitest x VitePress x Turbo (pnpm)

Turborepo nuxt starter This is a monorepo with Nuxt, Histoire, Vitest & VitePress as a starter for any project that can be easily extended. You can al

Dec 19, 2022

This coc.nvim extension provides feature split from coc-volar

coc-volar-tools What' coc-volar-tools? This coc.nvim extension provides feature split from coc-volar. split into a separate coc-extension due to the l

Dec 14, 2022

Vitest for coc.nvim

Vitest for coc.nvim

coc-vitest Vitest for coc.nvim Install vim-plug: Plug 'yaegassy/coc-vitest', {'do': 'yarn install --frozen-lockfile'} CocInstall: Not supported at thi

Sep 4, 2022

GraphQL extension for coc.nvim

GraphQL extension for coc.nvim

Sep 4, 2022

Solidity language server for coc.nvim

Solidity language server for coc.nvim

coc-solidity coc.nvim extension for solidity. Language server provided by solidity-ls. solidity-ls has no tolerance. Means that some features will onl

Dec 5, 2022

Intelligent Tailwind CSS tooling for coc.nvim

Intelligent Tailwind CSS tooling for coc.nvim

coc-tailwindcss3 fork from a vscode-tailwindcss Intelligent Tailwind CSS tooling for coc.nvim. Motivation There are two coc.nvim extensions to "tailwi

Jan 1, 2023

Typos integration with coc.nvim

coc-typos Typos integration with coc.nvim. It checks typos with opened buffer automatically. Install Install typos by: cargo install typos-cli Make s

Aug 22, 2022

Marksman (Markdown LSP server) extension for coc.nvim

coc-marksman fork from a marksman-vscode Integrates Marksman language server into coc.nvim for delightful Markdown note taking experience. coc-marksma

Nov 18, 2022

Alpine.js Language Features (Volar) extension for coc.nvim

[Experimental] coc-volar-alpinejs fork from vscode-alpine-language-features Alpine Language Features extension for coc.nvim Note @volar/alpine-languag

Oct 12, 2022

Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

May 18, 2022

Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

May 3, 2022

Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

Jan 3, 2023

Fastify boilerplate with Vite & Vitest

Fastify boilerplate with Vite & Vitest Enhance your Fastify DX with the power of Vite & Vitest. Features âš¡ All the power of Vite (Next Generation Fron

Dec 13, 2022

Automatically configure Vitest from your SvelteKit configuration.

vitest-svelte-kit Automatically configure Vitest from your SvelteKit configuration. Getting Started Installing In an existing SvelteKit project, run t

Dec 30, 2022

Remix + Cloudflare Workers + Wrangler2 + Tailwind + ESLint + Prettier + Vitest + Playwright

Welcome to Remix! Remix Docs Development You will be running two processes during development: The Miniflare server (miniflare is a local environment

Dec 19, 2022
Comments
  • Watch mode

    Watch mode

    Thanks for this plugin, it's already useful as it is. However, I'm used to watching for changes as I'm writing tests. Could this be implemented in this project?

    opened by h0adp0re 2
Owner
yaegassy
yaegassy
Solidity language server for coc.nvim

coc-solidity coc.nvim extension for solidity. Language server provided by solidity-ls. solidity-ls has no tolerance. Means that some features will onl

7c00 40 Dec 5, 2022
Intelligent Tailwind CSS tooling for coc.nvim

coc-tailwindcss3 fork from a vscode-tailwindcss Intelligent Tailwind CSS tooling for coc.nvim. Motivation There are two coc.nvim extensions to "tailwi

yaegassy 110 Jan 1, 2023
Typos integration with coc.nvim

coc-typos Typos integration with coc.nvim. It checks typos with opened buffer automatically. Install Install typos by: cargo install typos-cli Make s

Neoclide 31 Aug 22, 2022
Marksman (Markdown LSP server) extension for coc.nvim

coc-marksman fork from a marksman-vscode Integrates Marksman language server into coc.nvim for delightful Markdown note taking experience. coc-marksma

yaegassy 17 Nov 18, 2022
Alpine.js Language Features (Volar) extension for coc.nvim

[Experimental] coc-volar-alpinejs fork from vscode-alpine-language-features Alpine Language Features extension for coc.nvim Note @volar/alpine-languag

yaegassy 6 Oct 12, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Remix + Cloudflare Workers + Wrangler2 + Tailwind + ESLint + Prettier + Vitest + Playwright

Welcome to Remix! Remix Docs Development You will be running two processes during development: The Miniflare server (miniflare is a local environment

null 48 Dec 19, 2022
Custom Vitest matchers to test the state of the DOM, forked from jest-dom.

vitest-dom Custom Vitest matchers to test the state of the DOM This library is a fork of @testing-library/jest-dom. It shares that library's implement

Chance Strickland 14 Dec 16, 2022