Skip to content
forked from dmmulroy/tsc.nvim

A Neovim plugin for seamless, asynchronous project-wide TypeScript type-checking using the TypeScript compiler (tsc)

License

Notifications You must be signed in to change notification settings

mawkler/tsc.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tsc.nvim

GitHub Workflow Status Lua

image

This Neovim plugin provides an asynchronous interface to run project-wide TypeScript type-checking using the TypeScript compiler (tsc). It displays the type-checking results in a quickfix list and provides visual notifications about the progress and completion of type-checking.

Features

  • Project-wide type checking
  • Asynchronous execution of the TypeScript compiler to prevent lock ups and input lag
  • Progress notifications with spinner animation
  • Quickfix list for navigating errors
  • Automatic opening of the quickfix list if there are errors
  • User-friendly command :TSC

Demo Videos

Type-checking with Errors

tsc-errors.mov

Type-checking without Errors

tsc-no-errors.mov

Usage without nvim-notify

Screen.Recording.2023-04-23.at.9.50.43.AM.mov

Installation

To install the plugin, use your preferred Neovim plugin manager.

Packer

To install the plugin using packer.nvim, add the following to your plugin configuration:

use('dmmulroy/tsc.nvim')

Vim-Plug

To install the plugin using vim-plug, add the following to your plugin configuration:

Plug 'dmmulroy/tsc.nvim'

Then run :PlugInstall to install the plugin.

Notify

For an enhanced UI/UX experience, it is recommended to install the nvim_notify plugin as well. This plugin is optional, and the plugin will work without it.

Setup

To set up the plugin, add the following line to your init.vim or init.lua file:

require('tsc').setup()

Usage

To run TypeScript type-checking, execute the :TSC command in Neovim. The plugin will display a progress notification while the type-checking is in progress. When the type-checking is complete, it will show a notification with the results and open a quickfix list if there are any errors.

Configuration

Currently, there are no configuration options for this plugin. It uses the default tsc command with the --noEmit flag to avoid generating output files during type-checking. If you need to customize the behavior, consider forking the plugin and modifying it to suit your needs.

Contributing

Feel free to open issues or submit pull requests if you encounter any bugs or have suggestions for improvements. Your contributions are welcome!

License

This plugin is released under the MIT License. See the LICENSE file for details.

About

A Neovim plugin for seamless, asynchronous project-wide TypeScript type-checking using the TypeScript compiler (tsc)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 100.0%