Update init.lua
This commit is contained in:
parent
f0cb24630a
commit
86a8e652a0
1 changed files with 9 additions and 7 deletions
|
@ -2,11 +2,9 @@ local set = vim.opt
|
||||||
local cmd = vim.api.nvim_command
|
local cmd = vim.api.nvim_command
|
||||||
local au = vim.api.nvim_create_autocmd
|
local au = vim.api.nvim_create_autocmd
|
||||||
local plug = vim.fn['plug#']
|
local plug = vim.fn['plug#']
|
||||||
|
|
||||||
vim.call('plug#begin', '~/.config/nvim/plugged')
|
vim.call('plug#begin', '~/.config/nvim/plugged')
|
||||||
-- You can use my custom melange build, un-comment here.
|
plug('jnurmine/zenburn')
|
||||||
-- plug('https://gitlab.com/rawleyIfowler/melange')
|
|
||||||
-- Yeah I use gruvbox now :L
|
|
||||||
plug('morhetz/gruvbox')
|
|
||||||
plug('ap/vim-css-color')
|
plug('ap/vim-css-color')
|
||||||
plug('ap/vim-buftabline')
|
plug('ap/vim-buftabline')
|
||||||
plug('dag/vim-fish')
|
plug('dag/vim-fish')
|
||||||
|
@ -43,12 +41,12 @@ plug('leafgarland/typescript-vim', {['for'] = 'typescript'})
|
||||||
vim.call('plug#end')
|
vim.call('plug#end')
|
||||||
pcall(require, 'nvim_utils')
|
pcall(require, 'nvim_utils')
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
|
|
||||||
-- Basic editor configurations
|
-- Basic editor configurations
|
||||||
set.tabstop = 4
|
set.tabstop = 4
|
||||||
set.shiftwidth = 4
|
set.shiftwidth = 4
|
||||||
set.expandtab = true
|
set.expandtab = true
|
||||||
set.number = true
|
set.number = true
|
||||||
set.termguicolors = true
|
|
||||||
set.autoindent = true
|
set.autoindent = true
|
||||||
set.autowrite = true
|
set.autowrite = true
|
||||||
set.ai = true
|
set.ai = true
|
||||||
|
@ -91,10 +89,12 @@ cmp.setup({
|
||||||
{ name = 'luasnip' }
|
{ name = 'luasnip' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Colors
|
-- Colors
|
||||||
vim.cmd('syntax enable')
|
vim.cmd('syntax enable')
|
||||||
vim.cmd('colo gruvbox')
|
vim.cmd('colo zenburn')
|
||||||
vim.o.background = 'light'
|
vim.o.background = 'light'
|
||||||
|
|
||||||
-- Rainbow Parens for Clojure, and Lisp
|
-- Rainbow Parens for Clojure, and Lisp
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
filetype on
|
filetype on
|
||||||
|
@ -102,6 +102,7 @@ filetype plugin on
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
autocmd Filetype clojure,clj,lisp,lsp,cl,l :RainbowToggle
|
autocmd Filetype clojure,clj,lisp,lsp,cl,l :RainbowToggle
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- Auto complete
|
-- Auto complete
|
||||||
local opts = { noremap=true, silent=true }
|
local opts = { noremap=true, silent=true }
|
||||||
map('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
|
map('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
|
||||||
|
@ -156,8 +157,9 @@ local jdtls_cfg = {
|
||||||
if vim.bo.filetype == 'java' then
|
if vim.bo.filetype == 'java' then
|
||||||
require('jdtls').start_or_attach(jdtls_cfg)
|
require('jdtls').start_or_attach(jdtls_cfg)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 2 Tab space standard languages
|
-- 2 Tab space standard languages
|
||||||
-- Clojure and Common Lisp style is 2 space indent
|
-- Clojure and Common Lisp style is 2 space indent
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
autocmd Filetype clojure,clj,lisp,lsp,cl,l,javascript,js,typescript,ts setlocal tabstop=2 shiftwidth=2
|
autocmd Filetype ruby,rb,clojure,clj,lisp,lsp,cl,l,javascript,js,typescript,ts setlocal tabstop=2 shiftwidth=2
|
||||||
]])
|
]])
|
||||||
|
|
Loading…
Reference in a new issue