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.
- Host: GitHub
- URL: https://github.com/mtoohey31/truth-table.nvim
- Owner: mtoohey31
- Created: 2021-09-28T00:41:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-30T06:34:31.000Z (over 4 years ago)
- Last Synced: 2025-02-26T17:15:47.764Z (about 1 year ago)
- Topics: lua, neovim, neovim-plugin, nvim, plugin, vim
- Language: Lua
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)