-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
83 lines (79 loc) · 2.69 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
-- Neovim init.lua
-- Load Packer.nvim plugins.
require('packer-plugins')
-- Enable Spell Checking
vim.opt.spell = true
-- Set default Spelling Language
vim.opt.spelllang = 'en_us'
-- Show line numbers.
vim.opt.number = true
-- Show the number relative to the cursor.
vim.opt.relativenumber = true
-- Horizontal Splits go below
vim.opt.splitbelow = true
-- Vertical Splits go to the right
vim.opt.splitright = true
-- stop vi compatibility.
vim.cmd([[set nocompatible]])
-- Set the ruler at 80 characters.
vim.opt.colorcolumn = {80}
-- When pressing tab, default to 2 presses of either tab or space.
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
-- Make tabs spaces.
vim.opt.expandtab = true
-- When moving or shifting lines, how far to shift them in spaces.
vim.opt.shiftwidth = 2
-- Netrw configuration. Use menu style 3.
vim.cmd([[let g:netrw_liststyle = 3]])
vim.cmd([[filetype indent plugin on]])
-- Enable Syntax Highlighting
vim.opt.syntax = "on"
-- Show the Vim Commands in the bottom statusline
vim.opt.showcmd = true
-- Highlight the currently line the cursor is on.
vim.opt.cursorline = true
-- Set the colortheme.
vim.cmd([[colorscheme deus]])
-- make vim-deus' background none or transparent.
vim.cmd([[hi Normal cterm=NONE ctermbg=NONE]]) -- Transparent Background.
-- Enable folding. Just don't set the foldmethod
vim.opt.foldenable = true
-- When a line is broken, follow indent.
vim.opt.breakindent = true
-- Show matching characters, like () and [] for example.
vim.opt.showmatch = true
-- Perform increment searches.
vim.opt.incsearch = true
-- Highlight the searches.
vim.opt.hlsearch = true
-- Ignore case when searching.
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- This enables the menu when issuing a Neovim command.
vim.opt.wildmenu = true
-- ALE must be installed. I'll figure out some sort of logic for this so it
-- doesn't fail.
-- Press \aj to go to the next issue ALE has detected.
vim.api.nvim_set_keymap('n', '<leader>aj', ':ALENext<cr>', {noremap = true, silent = true})
-- Press \ak to go to the previous issue ALE has detected.
vim.api.nvim_set_keymap('n', '<leader>ak', ':ALEPrevious<cr>', {noremap = true, silent = true})
-- Goyo's max width.
vim.cmd([[let g:goyo_width = 90]])
--[[ Configure vim-airline
vim.cmd([[
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
--]]
--)
-- Remove any trailing spaces before writing a file.
vim.api.nvim_exec([[
autocmd BufWritePre * %s/\s\+$//e
]], true)
require('telescope-configs')
require('lsp-configs')
require('lsp-installer-configs')
require('nvim-cmp-configs')
require('lualine-configs')
require'nvim-web-devicons'.get_icons()
vim.api.nvim_set_keymap('n', '<Leader>cd', ':cd %:p:h<CR>:pwd<CR>', { noremap = true })