-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
56 lines (49 loc) · 1.76 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
-- :h lua-guide
vim.cmd([[
let data_dir = stdpath('data') . '/site'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
]])
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
vim.opt.encoding = "utf-8"
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.autowriteall = true
vim.opt.cursorline = true
vim.api.nvim_create_autocmd({"BufNewFile", "BufRead"}, {
pattern = "*.Jenkinsfile",
command = "set syntax=groovy",
})
vim.opt.foldmethod = 'syntax'
vim.opt.list = true
vim.opt.listchars:append({ space = '·' })
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
-- Switching between previous and next split.
vim.keymap.set('n', '<M-Right>', '<C-w>w', {})
vim.keymap.set('n', '<M-Left>', '<C-w>W', {})
-- Switching between previous and next buffer in current split.
vim.keymap.set('n', '<C-PageUp>', ':bp<Enter>', {})
vim.keymap.set('n', '<C-PageDown>', ':bn<Enter>', {})
-- Jumping to previous and next empty line (paragraphs).
vim.keymap.set('n', '<C-Up>', '{', {})
vim.keymap.set('n', '<C-Down>', '}', {})
local Plug = vim.fn['plug#']
vim.call('plug#begin')
Plug('nvim-lua/plenary.nvim')
Plug('nvim-telescope/telescope.nvim', { tag = '0.1.8' })
Plug('nvim-lualine/lualine.nvim')
vim.call('plug#end')
local telescope_builtin = require('telescope.builtin')
vim.keymap.set('n', '<C-p>', telescope_builtin.find_files, {})
require('lualine').setup({
options = {
theme = 'ayu_dark',
},
})