-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
41 lines (38 loc) · 1.01 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
-- clear previous autocommands
vim.cmd [[autocmd! ]]
local set = vim.opt
-- Show line numbers
set.number = true
-- true color
vim.cmd [[ set termguicolors]]
-- Case-insensitive searching
set.ignorecase = true
-- Faster completion
set.updatetime = 300
-- Show cursor position
set.ruler = true
-- Highlight matches as you go
set.incsearch = true
-- Display lines as one long line
set.wrap = false
set.hidden = true
-- Global tab width
set.tabstop = 2
-- And again, related
set.shiftwidth = 2
-- Converts, tabs to spaces
set.expandtab = true
-- Set number column width to 2 (default 4)
set.numberwidth = 4
-- Filetypes
------------------------------------
-- Javascript
vim.cmd [[au BufNewFile,BufRead *.es6 setf javascript]]
-- Typescript
vim.cmd [[au BufNewFile,BufRead *.tsx setf typescriptreact]]
-- Markdown
vim.cmd [[au BufNewFile,BufRead *.md set filetype=markdown]]
vim.cmd [[au BufNewFile,BufRead *.mdx set filetype=markdown]]
-- YAML
vim.cmd [[autocmd FileType yaml setlocal shiftwidth=2 tabstop=2]]
require('config.main')