Giter VIP home page Giter VIP logo

neovim-config's Introduction

Neovim configuration

A minimal Neovim configuration written in lua

GitHub license GitHub stars Neovim version


Table of contents

1. Introduction

Neovim is a pretty cool successor to Vim, focusing on compatibility while adding asynchronous plugin functionality and trying to clean up the code base. Having been fed up at various times with both Sublime Text (2 and 3) and Atom, and after realizing how much development I do over SSH, it seemed reasonable to check out using vim (or nvim, in this case) as my IDE. The advantages essentially boil down to:

  • Consistent IDE over SSH or locally,
  • No need to ever use the mouse while coding (takes longer to learn, but is faster; this is aided by vim-easymotion and Ctrl-Space),
  • It’s been around forever, and frankly, probably always will be.

Therefore, I decided to create this repository. There are several versions:

As I mentioned, this config is meant as a starting point, it is not a complete Neovim/Vim config distribution, if you're looking for a one, check out here.

2. Installation

  • Requirements:
  • Backup your current neovim config, if necessary:
mv ~/.config/nvim ~/.config/nvim.bak
  • Get your configuration:
git clone https://github.com/ntk148v/neovim-config.git
cd neovim-config/
cp -Rv nvim ~/.config/
  • Start Neovim, Lazy should be installed automatically, then it will install plugins.

3. File structure

The files under config will be automatically loaded at the appropriate time, so you don't need to require those files manually.

tree ~/.config/nvim
├── init.lua
├── lazy-lock.json
└── lua
    ├── config
    │   ├── autocmds.lua
    │   ├── custom
    │   │   └── init.lua
    │   ├── init.lua
    │   ├── keymaps.lua
    │   └── options.lua
    └── plugins
        ├── autopairs.lua
        ├── colorizer.lua
        ├── colorscheme.lua
        ├── comment.lua
        ├── custom
        │   ├── colorscheme.lua
        │   └── lush.lua
        ├── gitsigns.lua
        ├── lsp.lua
        ├── lualine.lua
        ├── neoterm.lua
        ├── telescope.lua
        ├── tree.lua
        └── treesitter.lua

4. Plugins & LSP

4.1. Plugins

Plugin Description
lazy.nvim A modern plugin manager for Neovim
mason.nvim Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
nvim-lspconfig A collection of common configurations for Neovim's built-in language server client
gitsigns Super fast git decorations implemented purely in lua/teal
nvim-treesitter Nvim Treesitter configurations and abstraction layer
nvim-cmp Auto completion plugin
LuaSnip Snippet Engine for Neovim written in Lua
nvim-tree.lua - A File Explorer written In Lua
nvim-autopairs A super powerful autopairs for Neovim
nvim-web-devicons Lua fork of vim-web-devicons for neovim
lualine.nvim A blazing fast and easy to configure neovim statusline plugin written in pure lua.
Comment.nvim Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
norcalli/nvim-colorizer.lua The fastest Neovim colorizer.
nvim-telescope/telescope.nvim Find, Filter, Preview, Pick. All lua, all the time.
itmecho/neoterm.nvim Neovim lua plugin for managing a floating terminal window
rosé-pine Soho vibes for Neovim
folke/tokyonight.nvim A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
projekt0n/github-nvim-theme Github's Neovim themes
null-ls Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.

4.2. LSP

This configuration provides Python and Golang dev environment. The programming language server is current supported:

Furthermore, it integrates with nvim-treesitter to provide rich syntax highlighting and other language parsing magic.

If your language is not supported, please follow this:

  • Check if LSP support is available in the lspconfig repo. To install a supported language server with mason:
:LspInstall `<your_language_server>`
  • Check if your syntax is supported in the treesitter repo. To install a language syntax highlight, run:
:TSInstall `<language_to_install>`

5. Keymaps

These are the default keymaps, in the following shortcuts, the <leader>+` key is set up to `` (space) character, check: keymaps.lua.

Shortcut Mode Description
kk Insert Esc with kk
<leader>+r Normal Reload configuration file
<leader>+s Normal Save file
<leader>+q Normal Save (close all windows) and exit from Neovim
<leader>+tt Normal Open floating terminal
Esc Terminal Exit terminal
<leader>+n Normal Open NvimTree
<leader>+nr Normal Refresh NvimTree
<leader>+nf Normal Find file in NvimTree
<leader>+ff Normal Open Telescope to find files
<leader>+fg Normal Open Telescope to do live grep
<leader>+fb Normal Open Telescope to list buffers
<leader>+fh Normal Open Telescope to show help
<leader>+wh/j/k/l Normal Move around splits
mm Normal Comment/Uncomment line
mbm Normal Comment/Uncomment block
m Visual Comment/Uncomment line
mb Visual Comment/Uncomment block

There are many default keymaps, you can check it using :map command. There are also other variants:

  • :nmap for normal mode mappings
  • :vmap for visual mode mappings
  • :imap for insert mode mappings

The above list is not complete. Typing :help map in Vim will give you more info.

6. Customization

  • You can add your custom plugin specs under lua/plugins/custom. All files will be automatically loaded by lazy.nvim.
  • You can also add your custom keymaps/options under lua/config/custom.

7. Screenshots

dark dark
dark dark
dark dark

8. Contribution

Feel free to file an issue or open a pull request. You're welcome!

9. Guide and resources

neovim-config's People

Contributors

brailyguzman avatar ntk148v avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

neovim-config's Issues

Issue in readme installation code

There is this issue in the installation section in the readme file
"cd neovim-config.git/"
the "neovim-config.git" is a wrong directory here.
it should be "neovim-config" only.

Code completion do not work

Hi @ntk148v ,
I find that for me code completion does not work having taken as inspiration your LSP configuration with Lazy package manager.
Would you have some hints?
Regards

Error message after installing

Describe the bug
Errors message shows up after fresh install

To Reproduce
Steps to reproduce the behavior:

  1. yay -S neovim
  2. install using the given instructions
  3. nvim
  4. Error detected while processing /home/user/.config/nvim/init.lua:
    E5113: Error while calling lua chunk: /home/user/.config/nvim/init.lua:19: rg is not installed
    stack traceback:
    [C]: in function 'error'
    /home/user/.config/nvim/init.lua:19: in main chunk
    Press ENTER or type command to continue

Expected behavior
Neovim works

Desktop (please complete the following information):

  • OS: Endeavor os

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.