Skip to content

Latest commit

 

History

History
490 lines (297 loc) · 14.9 KB

README.md

File metadata and controls

490 lines (297 loc) · 14.9 KB

My neovim set up

This is all my neovim set up files, including the .vimrc which was renamed to index.vim, a file for plugins called plugins.vim, a file for maps called maps.vim and a file for the sets called sets.vim.

.vimrc and index.vim

In order to move my vim configuration to this repository I had to move all my files to another folder. The .vimrc file which is the default file loaded, only contains one line sourcing the index.vim file, which has all the .vimrc configuration.

source <sfile>:h/my-nvim/index.vim

plugins.vim

This vim configuration uses vim-plug to install plugins.

This file has all the plugins installed in my vim config file. When adding a new plugin, just copy the following code and replace with your values. Some plugins require a diferent code, so be aware of that.

Plug 'repo_user/repo_name'

After doing that, use the following commands:

:so ~/.vimrc
:PlugInstall

I recommend running :PlugUpdate regularly to keep all the plugins up to date.

sets.vim

This file has all the sets of the default neovim. You can configure this file as you like, adding or removing some lines, or just changed their values.

maps.vim

This file has custom key maps and keyboard shortcuts. Most of the shortcuts are to run a specific action of a plugin. You can add your own shortcuts here.

⚠️ After opening making changes in any of these files, use :so ~/.vimrc to make those changes valid.

Plugins and their configuration

This project has mostly plugins for javascript development, including React, check the plugins file to see the list in the file and what plugin manager the project uses.

Make sure you habe vim-plug installed and if you are only using .vimrc that you have correctly set up vim-plug.


Theming Plugin/s

Gruvbox theme

💻 Repository: https://github.com/morhetz/gruvbox

ℹ️ About: This plugin sets the most vim classic theme, the popular gruvbox.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'morhetz/gruvbox'
colorscheme gruvbox

Notes: If you're using airline plugin, check the info below.

Airline & airline themes

💻 Repository 1: https://github.com/vim-airline/vim-airline

💻 Repository 2: https://github.com/vim-airline/vim-airline-themes

ℹ️ About: This plugins make the bottom tab in vim, a lot cooler, you can even use the gruvbox theme mentioned above.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = ':t'
" This loads Powerline font and symbols
let g:airline_powerline_fonts = 0
let g:airline_theme='bubblegum' " Here you can use gruvbox

Notes: Check the official repositories for more information about this configuration.

Plugins by language

LaTeX

💻 Repository: https://github.com/lervag/vimtex

ℹ️ About: This is a syntax plugin for latex.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'lervag/vimtex'
let g:tex_flavor = 'latex'
let g:coc_global_extensions = [
    \ 'coc-vimtex',
    \ ]

Notes: Make sure to include the coc extension for this plugin.

HTML

💻 Repository: https://github.com/othree/html5.vim

ℹ️ About: This is a syntax plugin for html5.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'othree/html5.vim'

Notes: See official repository for more information.

XML

💻 Repository: https://github.com/othree/xml.vim

ℹ️ About: This is a syntax plugin for xml.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'othree/xml.vim'

Notes: This plugin, doesn't not require extra configuration, but I'm not sure if it should be added to the coc extension list in order to work.

Markdown

💻 Repository: https://github.com/lervag/vimtex

ℹ️ About: This is a markdown preview plugin.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install'  }

Notes: See official repository for more information.

CSS

💻 Repository: https://github.com/ap/vim-css-color

ℹ️ About: This is a plugin that shows you the colors in your css file.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'ap/vim-css-color'

Notes: See official repository for more information.

GraphQL

💻 Repository: https://github.com/jparise/vim-graphql

ℹ️ About: This is a syntax plugin for graphql.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'jparise/vim-graphql'

Notes: This plugin also supports graphql in js files. See official repository for more information.

**Notes:** See official repository for more information.--> **Notes:** See official repository for more information.-->

Haskell

💻 Repository: https://github.com/neovimhaskell/haskell-vim

ℹ️ About: This is a syntax plugin for haskell.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'neovimhaskell/haskell-vim'

Notes: See official repository for more information.

Typescript

💻 Repository: https://github.com/peitalin/vim-jsx-typescript

ℹ️ About: This is a syntax plugin for typescript in jsx files.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'peitalin/vim-jsx-typescript'
let g:coc_global_extensions = [
    \ 'coc-tsserver',
    \ ]

Notes: Make sure to include the coc extension for this plugin. See official repository for more information.

Javascript

💻 Repository: https://github.com/maxmellon/vim-jsx-pretty

ℹ️ About: This is a syntax plugin for javascript, including jsx files.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'maxmellon/vim-jsx-pretty'
let g:coc_global_extensions = [
    \ 'coc-tsserver',
    \ ]

Notes: Make sure to include the coc extension for this plugin. See official repository for more information.

Svelte

💻 Repository: https://github.com/evanleck/vim-svelte

ℹ️ About: This is a plugin that enables syntax highliting for svelte files.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'evanleck/vim-svelte', {'branch': 'main'}

Notes: See official repository for more information.

IDE plugins

Vim Surround

💻 Repository: https://github.com/tpope/vim-surround

ℹ️ About: This is a plugin that helps your surround a line or word faster.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'tpope/vim-surround'

Notes: See official repository for more information.

Icons

💻 Repository: https://github.com/ryanoasis/vim-devicons

ℹ️ About: This is a plugin that adds icons to many other plugins.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'ryanoasis/vim-devicons'

Notes: See official repository for more information.

Easymotion

💻 Repository: https://github.com/easymotion/vim-easymotion

ℹ️ About: This is a plugin that helps you move quickly in your files.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'easymotion/vim-easymotion'

Notes: See official repository for more information.

Nerdtree

💻 Repository: https://github.com/scrooloose/nerdtree

ℹ️ About: This is a plugin that shows files in your current project.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'scrooloose/nerdtree'

Notes: See official repository for more information.

Nerdtree Git

💻 Repository: https://github.com/xuyuanp/nerdtree-git-plugin

ℹ️ About: This is a plugin that shows git status on nerdtree.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'xuyuanp/nerdtree-git-plugin'

Notes: See official repository for more information.

Vim tmux navigator

💻 Repository: https://github.com/christoomey/vim-tmux-navigator

ℹ️ About: This is a plugin that allows you to move between your buffers.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'christoomey/vim-tmux-navigator'

Notes: See official repository for more information.

IndentLine

💻 Repository: https://github.com/Yggdroot/indentLine

ℹ️ About: This is a plugin that displays smooth lines to show identation.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'Yggdroot/indentLine'
let g:indentLine_char_list = ['|', '¦', '┆', '┊']
" Not show in certain buffers and files
let g:indentLine_fileTypeExclude = ['text', 'sh', 'help', 'terminal']
let g:indentLine_bufNameExclude = ['NERD_tree.', 'term:.']

Notes: See official repository for more information.

Echodoc

💻 Repository: https://github.com/Shougo/echodoc.vim

ℹ️ About: This is a plugin that shows the signature of the functions.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'Shougo/echodoc.vim'
let g:echodoc_enable_at_startup = 1

Notes: See official repository for more information.

Vim-fugitive

💻 Repository: https://github.com/tpope/vim-fugitive

ℹ️ About: This is a plugin that provides git commands.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'tpope/vim-fugitive'

Notes: See official repository for more information.

Vim-gitgutter

💻 Repository: https://github.com/airblade/vim-gitgutter

ℹ️ About: This is a plugin that shows changes on the file in the signs colum.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'airblade/vim-gitgutter'

Notes: See official repository for more information.

Nerdcommenter

💻 Repository: https://github.com/preservim/nerdcommenter

ℹ️ About: This is a plugin that helps you easily comment your code.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim.

Plug 'preservim/nerdcommenter'

Notes: See official repository for more information.

Coc.nvim

💻 Repository: https://github.com/neoclide/coc.nvim

ℹ️ About: This is a plugin that provides completion pop up and support for many other extensions.

🔧 Configuration Just paste the following codes in the .vimrc. If using this project, paste on plugins.vim and index.vim respectively.

Plug 'neoclide/coc.nvim', { 'branch': 'release' }
let g:coc_snippet_next = '<tab>'
" You can add a list of extensions that will be installed if they're not when you open a new file.
" Or you can just use the :CocInstall name-plugin to install any plugin
let g:coc_global_extensions = [
    \ 'coc-marketplace',
    " More extensions here...
    \ ]

Notes: See official repository for more information. See the first extension marketplace allows you to manage all your coc extensions.

" IDE Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'mattn/emmet-vim' Plug 'mhinz/vim-startify' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets'


License

You can use this repository as you like, as longs as the purpose is not something negative or harmful.

Contribuing

This is a personal project, just to keep my nvim organized and to have it as a backup in case I replace my computer. However, I you want to fix something or update something feel free and welcome to do so.

Future Changes

  • Add an brief explanation or list of all the plugins that are activated in this configuration.
  • Document the maps.vim file and add a list of those maps in the README.