Neovim On Windows

2 minute read Published:

Installing Neovim on Windows

One of the things that annoys me the most is not having the right tools for a job. Vim and similar tools have helped me speed up my process and have let me use amazing addons like coc.vim with clangd.

Now as a hacker you sometimes need to use other platforms than Linux. We need to face that windows desktop and server is designed to work smoothly in a corporate environment. And apple has done some amazing work to make their os work with the media industry. And while your webserver might run Linux your employees might not.

I recently started on Step7’s Red Team Operator: Malware Development Essentials, which is a good intro to malware writing. Until now ldapsearch and impacket tools have kept me protected from the windows GUI. But now I needed to develop using windows 10.

I installed neovim using chocolatey, I used jdhao’s blog to get Plug and to find my config dir, But nothing happened.

So how do I install neovim on windows?

1. Install GIT.
   - Git needs to be available for Plug to work

2. Install node
   - To get the language servers to work I needed node

3. Install neovim
    - Obviously

4. Configure
    - The path is usually ~/AppData/Local/nvim
    - Plug has an install guide for windows.

And that’s it. One gotcha is that there are differences in how tabs, spaces, and newlines are represented. I got loads of <0a> is not a command. Also if git is not installed Plug will not work, period, and it needs git to be in PATH. The reason why nothing happened was that I had used the wrong paths. Depending on which blog or docs you read, the location of your config is said to be different, this is annoying! Jdhao was the only one, so far that has been right.

Using clangd with coc.vim also gives full autocomplete and suggestions for the win api <3

My :CocConfig

{
    "languageserver": {
          "clangd": {
              "command": "clangd",
              "args": ["--background-index"],
              "rootPatterns": ["compile_flags.txt", "compile_commands.json", ".vim/", ".git/", ".hg/"],
              "filetypes": ["h","c","hpp","cpp", "objc", "objcpp"]
            }
    }
}