Configure NeoVim for Web, and specially WordPress, development.
This is a permanent Work In Progress.
If you are interested in the rest of my setup, you can visit my dotfiles repo.
Look at the keymaps and commands files to find out which commands and key maps are available.
- NeoVim at least version 0.8
- Git
- (Optional) Stylua for linting of
.lua
files - (Optional) PHPCS and PHPCBF for PHP linting and formatting
- (Optional) eslint_d for faster JavaScript linting and diagnostics
- (Optional) markdownlint-cli for markdown formatting and linting
If you are on a Mac:
brew install stylua composer node
export PATH=~/.composer/vendor/bin:$PATH # You should make this permanent somehow
composer global require squizlabs/php_codesniffer
npm install -g markdownlint-cli eslint_d
There is a pacakge.json file with commands for linting and formtting the code. It's not actually required.
npm run lint
will show any linting errors on the markdown and lua filesnpm run format
will reformat the markdown and lua filesnpm run setup
will open up NeoVim and install all the plugins
The current setup will try to install some LSP servers for you: bash
, intelephenese
(for PHP), tsserver
(for JavaScript), etc. You can add/remove which languages will get installed by default by changing the vim.g.lsp_servers
variable in init.lua
. You can figure out which servers are available by visitint the Nvim LSP Installer page.
- Configure language server using json instead of lua (allows you to have config per-project)
- Format does not work with Guttenberg