Added init.lua to neovim

This commit is contained in:
Rawley 2022-04-25 21:52:08 +00:00
parent 5f7846d596
commit 42c5944a61
5 changed files with 48 additions and 2867 deletions

View file

File diff suppressed because it is too large Load diff

48
NeoVim/init.lua Normal file
View file

@ -0,0 +1,48 @@
local set = vim.opt
local Plug = vim.fn['plug#']
vim.call('plug#begin', '~/.config/nvim/plugged')
Plug('https://gitlab.com/rawleyIfowler/melange')
Plug('scrooloose/nerdtree', {on = 'NERDTreeToggle'})
Plug('tpope/vim-surround')
Plug('tpope/vim-fireplace', {['for'] = 'clojure'})
Plug('neovim/nvim-lsp')
Plug('neovim/nvim-lspconfig')
Plug('junegunn/goyo.vim', {['for'] = 'markdown'})
Plug('junegunn/fzf', {['dir'] = '~/.fzf', ['do'] = './install --all'})
Plug('junegunn/fzf.vim')
Plug('guns/vim-clojure-highlight', {['for'] = 'clojure'})
Plug('guns/vim-clojure-static', {['for'] = 'clojure'})
Plug('luochen1990/rainbow', {['for'] = 'clojure'})
Plug('docunext/closetag.vim')
vim.call('plug#end')
-- Basic editor configurations
set.tabstop = 4
set.shiftwidth = 4
set.softtabstop = 4
set.expandtab = true
set.number = true
set.termguicolors = true
set.autoindent = true
set.autowrite = true
set.ai = true
set.wildignore = {'*/cache/*', '*/tmp*'}
-- Keybindings
---- NERDTree
vim.keymap.set('n', '<S-w>', ':NERDTreeToggle<CR>')
vim.keymap.set('n', '<S-q>', ':NERDTreeClose<CR>')
---- Ripgrep
vim.keymap.set('n', '<C-f>', ':Rg<cr>')
-- Colors
vim.cmd('syntax enable')
vim.cmd('colorscheme melange')
vim.o.background = 'dark'
-- Clojure specific configurations
require('lspconfig')['clojure_lsp'].setup{}
if vim.bo.filetype == 'clojure' then
set.tabstop = 2
set.shiftwidth = 2
set.softtabstop = 2
end
-- Go specific configurations
require('lspconfig')['gopls'].setup{}
-- C/C++ specific configurations

View file

@ -1,42 +0,0 @@
"Plug"
source $HOME/.config/nvim/vim-plug/plugins.vim
"Sets"
set encoding=utf-8
set guicursor=i:block
set backupdir=~/.private/vimtmp/
set directory=~/.private/vimtmp/
set nobackup
set nowritebackup
set number
set cmdheight=2
set updatetime=200
set shortmess+=c
set signcolumn=yes
set hidden
set noerrorbells
set smartcase
set termguicolors
set background=dark
colorscheme melange
set nowrap
set tabstop=2
set ls=2
set ai
"Mappings"
nmap <F3> :NERDTreeToggle<CR>
nmap <F2> :NERDTree-CD
nmap <C-l> :bn<cr>
nmap <C-h> :bp<cr>
nmap <A-;> :Rg<cr>
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
inoremap <silent><expr> <c-space> coc#refresh()
inoremap <silet><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col-1] =~# '\s'
endfunction

View file

@ -1,23 +0,0 @@
call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'junegunn/fzf', {'do': { -> fzf#install() }}
Plug 'junegunn/fzf.vim'
Plug 'nvim-lualine/lualine.nvim'
Plug 'sbdchd/neoformat'
Plug 'romgrk/barbar.nvim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'airblade/vim-rooter'
Plug 'rktjmp/lush.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'sheerun/vim-polyglot'
Plug 'scrooloose/NERDTree'
Plug 'ap/vim-css-color'
Plug 'https://gitlab.com/rawleyIfowler/melange'
Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-fugitive'
Plug 'scrooloose/syntastic'
Plug 'leafgarland/typescript-vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
lua << END
require'lualine'.setup()
END