Giter Site home page Giter Site logo

nvim's Introduction

Luan's Neovim distribution

This Vim distribution is a re-write of luan/vimfiles with the goal of break free from the original vim and focus on supporting Neovim. Neovim is a faster moving project that is much more approachable for contributions.

If you're familiar with luan/vimfiles and want to know what has noticeably changed, try :help vimfiles-migrating (or just :help migrating). You can view that help file online here.

Why a new repo?

The old repo may still be used by people stuck in the original vim for some reason, so breaking that compatibility could be frustrating for them.

Furthermore, I feel like some of the decisions made with regards to keybindings on the other repo need to be updated. Having a completely new fork makes it so users have to intentionally transition, giving them the change to realize that some things have changed.

Installation

This config is exclusive to Neovim, so you need to install it on your system first. You also need python and the python 3 client for Neovim installed(python 3 is important). Those are well documented processes and are platform dependent. At the moment I don't intend to provide an all-in-one installer as part of this config as we used to have on luan/vimfiles.

Dependencies: We'll need a few extra things installed in your system in order to properly setup everything:

  • curl: used to install the plugin manager.
  • npm: used to install JS tools and some language server binaries.
  • ripgrep: superfast grep replacement used by the search plugins.
  • fd: superfast fd replacement used by the file finding plugins.
  • bat: A cat(1) clone with syntax highlighting and Git integration. (optional)

Once you have that setup, all you have to do is clone this config in the right spot:

git clone https://github.com/luan/nvim ~/.config/nvim

Plugins will be automatically downloaded and setup as necessary.

Updating

The distribution checks for updates on boot and every hour when it's running. The check is non-disruptive and will only show messages passively when one of the following is true:

  • An update is available (and you should run :ConfigUpdate).
  • An error occurred fetching the remove version.
  • You have local changes on your nvim config repo (you really shouldn't unless you're preparing a PR).

:ConfigUpdate updates the local config. Since we use packer you can also use :PackerSync to update plugins separately.

Customizing

In the config directory there's a special folder that is git ignored, that is $XDG_CONFIG_HOME/nvim/lua/user, it is created on first boot based on the lua/user.defaults on in this repo. The three hooks are:

  • lua/user/before.lua: Runs before everything, useful to set globals that change plugin behavior
  • lua/user/plugins.lua: Runs during plugin setup, you can add your own choices of plugins here. More on adding plugins here
  • lua/user/after.lua: Runs at the end, useful to override and map your own key bindings and configure your custom plugins. This is also where you'd change the colorscheme

It is recommended that you track your user settings on a separate repo and symlink them in here, see my dotfiles repo for an example.

Troubleshooting

In the event things behave incorrectly or the config becomes unstable in general, regular vim debugging methods apply. Check :checkhealth for clues on what's wrong with your setup.

Make sure language servers are installed for your language; :LspInstall <language> installs it for a given language.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.