Commit a07065e7 authored by Franjo Lukezic's avatar Franjo Lukezic
Browse files

add nvim config

parents
# Read Me
" -------------------------------------------------------------------------------------
" Plugins
"
" Plugins need to come first so that they are available for the rest of the
" config.
" -------------------------------------------------------------------------------------
call plug#begin('~/.vim/plugged')
" telescope
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzy-native.nvim'
" treesitter
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update
" lsp
Plug 'neovim/nvim-lspconfig'
" prettier
Plug 'sbdchd/neoformat'
" Color schemes
Plug 'gruvbox-community/gruvbox'
" Markdown
Plug 'ixru/nvim-markdown'
" Dim paragraph above and below active paragraph
Plug 'junegunn/limelight.vim'
call plug#end()
" -------------------------------------------------------------------------------------
" Color Scheme
" -------------------------------------------------------------------------------------
set background=dark
colo gruvbox
set cursorline
" -------------------------------------------------------------------------------------
" Config
" -------------------------------------------------------------------------------------
let mapleader = " "
" telescope
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
" Using Lua functions
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
" -------------------------------------------------------------------------------------
" Default
" -------------------------------------------------------------------------------------
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
" when ever one does `vim .` then it looks for a custom vimrc in that
" directory
set exrc
" displays numbers above and below current line for easier jumping like
" `line#j` for downwards and `line#k` for upwards
set relativenumber
" overwrites the relativenumber 0 with the actuall line number
set nu
" keeps the file you are working in the background, so that data is not lost
" when you forget to save
set hidden
set noerrorbells
" helps with searching
set smartcase
set ignorecase
set incsearch
" deals with history
" swap files usually cause issues
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile
" starts scrolling when you are x lines away
set scrolloff=8
" creates an extra column which is great for linting
set signcolumn=yes
set colorcolumn=120
" Enables use of mouse for all modes
set mouse=a
" Splits views certically
set splitright
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment