marioy47 / nvim-lua-config

NeoVim with lua configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NeoVim configuration for Modern Web/Mobile Development

Configure NeoVim for Web, and specially WordPress, development.

Screenshot of NeoVim

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.

Requirements

  • 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

NPM commands

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 files
  • npm run format will reformat the markdown and lua files
  • npm run setup will open up NeoVim and install all the plugins

LSP Support for additional languages

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.

TODO

  • Configure language server using json instead of lua (allows you to have config per-project)
  • Format does not work with Guttenberg

About

NeoVim with lua configuration


Languages

Language:Lua 99.1%Language:Shell 0.6%Language:JavaScript 0.3%