An open API service indexing awesome lists of open source software.

https://github.com/mtoohey31/truth-table.nvim

A tiny lua plugin for generating truth tables in Neovim.
https://github.com/mtoohey31/truth-table.nvim

lua neovim neovim-plugin nvim plugin vim

Last synced: 7 months ago
JSON representation

A tiny lua plugin for generating truth tables in Neovim.

Awesome Lists containing this project

README

          

# `truth-table.nvim`

A tiny lua plugin for generating [truth tables](https://en.wikipedia.org/wiki/Truth_table) in Neovim.

## Usage

```vim
call plug#begin()

Plug 'mtoohey31/truth-table.nvim'

call plug#end()

" In a buffer of no specific filetype, prompt the user to input the separator
nmap t lua require('truth_table')(vim.fn.input("separator: "))
" In a markdown buffer, use ' | ' for the separator, '| ' for the left border, and ' |' for the right border
autocmd FileType markdown nmap t lua require('truth_table')(" ", " ", " ")
```

Best served with one of:

- [vim-table-mode](https://github.com/dhruvasagar/vim-table-mode)
- [coc-prettier](https://github.com/neoclide/coc-prettier)
- another lsp provider such as [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + [diagnostic-languageserver + prettier](https://github.com/iamcco/diagnostic-languageserver/wiki/Formatters#prettier)