All Projects → averms → black-nvim

averms / black-nvim

Licence: MIT License
A Neovim plugin to format your code using Black

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to black-nvim

nvim-lsp-compl
A fast and asynchronous auto-completion plugin for Neovim >= 0.5, focused on LSP.
Stars: ✭ 46 (+100%)
Mutual labels:  neovim, neovim-plugin
cmp-under-comparator
nvim-cmp comparator function for completion items that start with one or more underlines
Stars: ✭ 77 (+234.78%)
Mutual labels:  neovim, neovim-plugin
nvim context vt
Virtual text context for neovim treesitter
Stars: ✭ 193 (+739.13%)
Mutual labels:  neovim, neovim-plugin
Vim Vsnip
Snippet plugin for vim/nvim that supports LSP/VSCode's snippet format.
Stars: ✭ 224 (+873.91%)
Mutual labels:  neovim, neovim-plugin
denite-gtags
Denite source for GNU Global
Stars: ✭ 27 (+17.39%)
Mutual labels:  neovim, neovim-plugin
Vim Ghost
Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim
Stars: ✭ 245 (+965.22%)
Mutual labels:  neovim, neovim-plugin
Comment.nvim
🧠 💪 // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
Stars: ✭ 796 (+3360.87%)
Mutual labels:  neovim, neovim-plugin
Nvim Go
Go development plugin for Neovim written in pure Go
Stars: ✭ 207 (+800%)
Mutual labels:  neovim, neovim-plugin
virt-column.nvim
Display a character as the colorcolumn
Stars: ✭ 64 (+178.26%)
Mutual labels:  neovim, neovim-plugin
close-buffers.nvim
📑 Delete multiple vim buffers based on different conditions
Stars: ✭ 54 (+134.78%)
Mutual labels:  neovim, neovim-plugin
boo-colorscheme-nvim
Boo is a colorscheme for Neovim with handcrafted support for LSP, Treesitter.
Stars: ✭ 62 (+169.57%)
Mutual labels:  neovim, neovim-plugin
spellsitter.nvim
Treesitter powered spellchecker
Stars: ✭ 251 (+991.3%)
Mutual labels:  neovim, neovim-plugin
Indent Blankline.nvim
Indent guides for Neovim
Stars: ✭ 203 (+782.61%)
Mutual labels:  neovim, neovim-plugin
nvim-lsp-smag
Seamless integration of language server locations into NeoVim
Stars: ✭ 60 (+160.87%)
Mutual labels:  neovim, neovim-plugin
Lush.nvim
Define Neovim themes as a DSL in lua, with real-time feedback.
Stars: ✭ 204 (+786.96%)
Mutual labels:  neovim, neovim-plugin
nvim-jdtls
Extensions for the built-in LSP support in Neovim for eclipse.jdt.ls
Stars: ✭ 282 (+1126.09%)
Mutual labels:  neovim, neovim-plugin
Lualine.nvim
A blazing fast and easy to configure neovim statusline written in pure lua.
Stars: ✭ 198 (+760.87%)
Mutual labels:  neovim, neovim-plugin
Lsp Status.nvim
Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
Stars: ✭ 201 (+773.91%)
Mutual labels:  neovim, neovim-plugin
lir.nvim
Neovim file explorer
Stars: ✭ 194 (+743.48%)
Mutual labels:  neovim, neovim-plugin
nvim-ghost.nvim
👻 GhostText plugin for Neovim with zero dependencies 🎉 Supports neovim running inside WSL too! 🥳 Windows/Linux/macOS supported out-of-the-box! 😄 (Other OSes need python3.6+ installed)
Stars: ✭ 32 (+39.13%)
Mutual labels:  neovim, neovim-plugin

black-nvim

A port of the official black plugin to Neovim's remote Python plugin interface.

Differences:

  • It runs asynchronously, so it won't block scrolling while formatting the buffer.
  • Checks if filetype is "python" before formatting.
  • More robust error handling and better error messages.
  • Missing some features (Upgrading the black package automatically, respecting pyproject.toml).
  • Don't have to clone the entire source repo just to get the plugin.
  • Zero lines of Vimscript.

Installation

The 'master' branch is stable. You can see what is coming up by looking at 'devel' but I wouldn't recommend using it.

Plugin manager How to install
minpac call minpac#add('averms/black-nvim')
dein.vim call dein#add('averms/black-nvim')
vim-plug Plug 'averms/black-nvim', {'do': ':UpdateRemotePlugins'}

If you don't already have a system for managing python environments on your computer I would recommend the following:

  • Make sure you have at least version 3.6.
  • Set up a virtual environment for use with neovim.
    mkdir -p ~/.local/venv && cd ~/.local/venv
    python3 -m venv nvim
    cd nvim
    . ./bin/activate
    pip install pynvim black
  • Tell neovim about that environment like so:
    let g:python3_host_prog = $HOME . '/.local/venv/nvim/bin/python'
    If you're using vim-plug, this line needs to be before your Plug statement.
  • Run :checkhealth. The python3 provider section should be not-red.

Documentation

See black.md or type :h black.txt.

License

black-nvim is distributed under the MIT/Expat license. See LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].