Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

hirotasoshu/.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My simple nvim config

image image image

Simple neovim config, based on nvim-basic-ide with attempt to lazy-load most of plugins (startup time ~40ms on my machine)

Install Neovim 0.8

You can install Neovim with your package manager e.g. brew, apt, pacman etc.. but remember that when you update your packages Neovim may be upgraded to a newer version.

If you would like to make sure Neovim only updates when you want it to than I recommend installing from source:

NOTE Verify the required build prerequisites for your system.

git clone https://github.com/neovim/neovim.git
cd neovim
git checkout release-0.8
make CMAKE_BUILD_TYPE=Release
sudo make install

Install the config

Make sure to remove or move your current nvim directory

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

Run nvim and wait for the plugins to be installed

NOTE First time you will get an error just ignore them and press enter, it will say nvim-ts-context-commentstring is not installed but that is fine just close and reopen nvim and everything should be fine

NOTE (You will notice treesitter pulling in a bunch of parsers the next time you open Neovim)

NOTE Checkout this file for some predefined keymaps: keymaps

Get healthy

Open nvim and enter the following:

:checkhealth

You'll probably notice you don't have support for copy/paste also that python and node haven't been setup

So let's fix that

First we'll fix copy/paste

  • On mac pbcopy should be builtin

  • On Ubuntu

    sudo apt install xsel # for X11
    sudo apt install wl-clipboard # for wayland

Next we need to install python support (node is optional)

  • Neovim python support

    pip install pynvim
  • Neovim node support

    npm i -g neovim

We will also need ripgrep for Telescope to work:

  • Ripgrep

    sudo apt install ripgrep

NOTE make sure you have node installed, I recommend a node manager like fnm.

Fonts

I recommend using the following repo to get a "Nerd Font" (Font that supports icons)

getnf

Configuration

LSP

To add a new LSP

First Enter:

:Mason

and press i on the Language Server you wish to install

Next you will need to add the server to this list: servers

Note: Builtin LSP doesn't contain all lsps from nvim-lspconfig.

If you want to install any from there, for example terraform_lsp(which adds more functionality than terraformls, like complete resource listing),

  1. You can add the lsp name in mason lsp block
-- lua/usr/lsp/mason.lua
local servers = {
 "sumneko_lua",
 "cssls",
 "html",
 "tsserver",
 "pyright",
 "bashls",
 "jsonls",
 "yamlls",
  "terraform_lsp" -- New LSP
}
  1. Manually install the binary of the lsp and put it in your path by downloading the binary or through your package manager. For terraform_lsp example

Formatters and linters

Make sure the formatter or linter is installed and add it to this setup function: null-ls

NOTE Some are already setup as examples, remove them if you want

Plugins

You can install new plugins here: plugins


Plugins


The computing scientist's main challenge is not to get confused by the complexities of his own making.

- Edsger W. Dijkstra

About

My personal nvim config

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages