This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolish.lua
56 lines (51 loc) · 1.68 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
53
54
55
56
local utils = require "user.utils"
-- A function run last by AstroNvim
-- Polish my neovim setup with these last pieces
return function()
-- Custom filetypes
vim.filetype.add {
extension = {
yml = utils.yaml_ft,
yaml = utils.yaml_ft,
hurl = "hurl",
},
pattern = {
-- Chezmoi dotfiles
["dot_bash.*"] = "bash",
["dot.*.sh"] = "bash",
["dot_functions.*"] = "bash",
["env.*"] = "bash",
[".env.*"] = "bash",
},
}
-- https://www.reddit.com/r/neovim/comments/12gvms4/this_is_why_your_higlights_look_different_in_90/
local links = {
["@lsp.type.namespace"] = "@namespace",
["@lsp.type.type"] = "@type",
["@lsp.type.class"] = "@type",
["@lsp.type.enum"] = "@type",
["@lsp.type.interface"] = "@type",
["@lsp.type.struct"] = "@structure",
["@lsp.type.parameter"] = "@parameter",
["@lsp.type.variable"] = "@variable",
["@lsp.type.property"] = "@property",
["@lsp.type.enumMember"] = "@constant",
["@lsp.type.function"] = "@function",
["@lsp.type.method"] = "@method",
["@lsp.type.macro"] = "@macro",
["@lsp.type.decorator"] = "@function",
}
for newgroup, oldgroup in pairs(links) do
vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true })
end
-- Disable somethings for terminal
vim.api.nvim_create_augroup("TerminalSetup", { clear = true })
vim.api.nvim_create_autocmd("TermEnter", {
group = "TerminalSetup",
command = "setl nonumber norelativenumber signcolumn=no statuscolumn=",
})
-- Switch between light ans dark themes depending on daytime
utils.schedule_background_switch()
-- VimScript
vim.cmd "source ~/.config/nvim3/lua/user/init.vim"
end