All Projects → subnut → nvim-ghost.nvim

subnut / nvim-ghost.nvim

Licence: MIT License
👻 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)

Programming Languages

python
139335 projects - #7 most used programming language
Vim Script
2826 projects
shell
77523 projects
powershell
5483 projects
VBScript
123 projects

Projects that are alternatives of or similar to nvim-ghost.nvim

Lualine.nvim
A blazing fast and easy to configure neovim statusline written in pure lua.
Stars: ✭ 198 (+518.75%)
Mutual labels:  neovim, nvim, neovim-plugin
better-escape.nvim
Escape from insert mode without delay when typing
Stars: ✭ 166 (+418.75%)
Mutual labels:  neovim, nvim, nvim-plugin
Lsp Status.nvim
Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
Stars: ✭ 201 (+528.13%)
Mutual labels:  neovim, nvim, neovim-plugin
lspcontainers.nvim
Neovim plugin for lspcontainers.
Stars: ✭ 157 (+390.63%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
lir.nvim
Neovim file explorer
Stars: ✭ 194 (+506.25%)
Mutual labels:  neovim, nvim, neovim-plugin
Nvim Bqf
Better quickfix window in Neovim, polish old quickfix window.
Stars: ✭ 120 (+275%)
Mutual labels:  neovim, nvim, neovim-plugin
substitute.nvim
Neovim plugin introducing a new operators motions to quickly replace and exchange text.
Stars: ✭ 82 (+156.25%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
Nvim Compe
Auto completion plugin for nvim that written in Lua.
Stars: ✭ 433 (+1253.13%)
Mutual labels:  neovim, nvim, neovim-plugin
cutlass.nvim
Plugin that adds a 'cut' operation separate from 'delete'
Stars: ✭ 78 (+143.75%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
nvim-highlite
A colorscheme template that is "lite" on logic for the developer.
Stars: ✭ 163 (+409.38%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
Nvim Hlslens
Hlsearch Lens for Neovim
Stars: ✭ 55 (+71.88%)
Mutual labels:  neovim, nvim, 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 (+2387.5%)
Mutual labels:  neovim, nvim, neovim-plugin
Semshi
🌈 Semantic Highlighting for Python in Neovim
Stars: ✭ 758 (+2268.75%)
Mutual labels:  neovim, nvim, neovim-plugin
Acid.nvim
Asynchronous Clojure Interactive Development
Stars: ✭ 147 (+359.38%)
Mutual labels:  neovim, nvim, neovim-plugin
Chadtree
File manager for Neovim. Better than NERDTree.
Stars: ✭ 653 (+1940.63%)
Mutual labels:  neovim, nvim, neovim-plugin
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (+118.75%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
Iron.nvim
Interactive Repl Over Neovim
Stars: ✭ 265 (+728.13%)
Mutual labels:  neovim, nvim, neovim-plugin
Packer.nvim
A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
Stars: ✭ 418 (+1206.25%)
Mutual labels:  neovim, nvim, neovim-plugin
code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+631.25%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+1415.63%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin

nvim-ghost.nvim

This is a neovim-only plugin for GhostText

Installation

Install it using your favourite plugin manager, and execute :call nvim_ghost#installer#install()
E.g. for vim-plug -

Plug 'subnut/nvim-ghost.nvim', {'do': ':call nvim_ghost#installer#install()'}

⚠️ NOTE: After installing for the first time, you need to restart neovim for the plugin to start properly

Usage

  • Open neovim
  • Use GhostText

Really, it's that simple!

Features

  • Zero dependencies! Does not even need python installed!
  • Supports neovim running inside WSL (Windows Subsystem for Linux)
  • Supports Linux, macOS, Windows out-of-the-box (for other OSes, please see below)

Customization

Specifying a different port

The default is 4001, which corresponds to the default value set in the browser extension. If you want to use a different value, simply add the following line to your init.vim -

let $GHOSTTEXT_SERVER_PORT = 4001

Replace 4001 with the port number you have set in the browser extension

Custom settings according to website

When you trigger GhostText, nvim-ghost triggers an User autocommand. You can listen for that autocommand and run your own commands (e.g. setting filetype)

NOTE: All the autocommands should be in the nvim_ghost_user_autocommands augroup

Some examples -

" Autocommand for a single website (i.e. stackoverflow.com)
au nvim_ghost_user_autocommands User www.stackoverflow.com set filetype=markdown

" Autocommand for a multiple websites
au nvim_ghost_user_autocommands User www.reddit.com,www.github.com set filetype=markdown

" Autocommand for a domain (i.e. github.com)
au nvim_ghost_user_autocommands User *github.com set filetype=markdown

" Multiple autocommands can be specified like so -
augroup nvim_ghost_user_autocommands
  au User www.reddit.com,www.stackoverflow.com set filetype=markdown
  au User www.reddit.com,www.github.com set filetype=markdown
  au User *github.com set filetype=markdown
augroup END

Suppressing all messages

If you want to suppress all messages from nvim-ghost, then add the following to your init.vim -

let g:nvim_ghost_super_quiet = 1

Other Operating Systems

Please understand my situation. This plugin primarily uses a binary with it's own packaged version of python3 and comes with the required packages pre-installed, but the binary itself needs to be made on a machine running the same OS as the target machine. (i.e. the Linux binary needs to be built on a Linux machine, macOS binary on macOS, etc.)

The binaries are made using GitHub Actions, which only provides Linux, Windows and macOS containers. So, it is impossible for me to distribute binaries for other OSes.

So, to use this plugin, you shall need to install python3 (with pip) in your system. Then, head off to this plugin's directory, and run -

python -m pip install -r requirements.txt

This needs to be done only once. This command installs the required packages from pip.

Next, add the following two lines to your init.vim -

let g:nvim_ghost_use_script = 1
let g:nvim_ghost_python_executable = '/usr/bin/python'

Replace /usr/bin/python with the absolute path of the python executable installed in your system. Now, restart neovim, and the plugin should work.

If you face any problems, please open an issue. I will try my best to work out a solution for you.

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].