-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolish.lua
52 lines (47 loc) · 1.19 KB
/
polish.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
return function()
-- maximize help and show in buffer list
vim.api.nvim_create_autocmd("BufWinEnter", {
pattern = "*",
callback = function(event)
if vim.bo[event.buf].filetype == "help" then
vim.cmd.only()
vim.bo.buflisted = true
end
end,
})
-- disable numbers for terminals
vim.api.nvim_create_autocmd("TermOpen", {
pattern = "*",
callback = function()
vim.cmd "set nornu nonu"
vim.cmd "startinsert"
end,
})
-- disable diagnostics for YAML
vim.api.nvim_create_autocmd("BufEnter", {
desc = "Disable YAML diagnostics",
pattern = "*.yaml,*.tftpl",
callback = function(args)
vim.diagnostic.disable(args.buf)
end,
})
-- set text width for markdown to 100 chars
vim.api.nvim_create_autocmd("BufEnter", {
desc = "Markdown text width",
pattern = "*.md",
callback = function()
vim.cmd "set textwidth=100"
end,
})
vim.filetype.add {
pattern = {
[".*yaml.tftpl"] = "yaml",
},
extension = {
tf = "terraform",
}
}
vim.on_key(nil, vim.api.nvim_get_namespaces()["auto_hlsearch"])
-- vim.cmd("colorscheme " .. vim.g.colors_name)
vim.lsp.set_log_level("off")
end