Update
This commit is contained in:
parent
6c8d2048e2
commit
5f25fb511f
8 changed files with 334 additions and 60 deletions
28
options.lua
28
options.lua
|
|
@ -1,3 +1,5 @@
|
|||
local vim = _G["vim"]
|
||||
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
|
|
@ -31,19 +33,27 @@ vim.opt.swapfile = false
|
|||
vim.opt.cmdheight = 2
|
||||
vim.opt.updatetime = 300
|
||||
vim.opt.mouse = ""
|
||||
vim.opt.showtabline = 2
|
||||
|
||||
vim.opt.viminfo:append("f1")
|
||||
|
||||
vim.cmd([[
|
||||
autocmd BufRead,BufNewFile * set autoindent noexpandtab tabstop=4 shiftwidth=4
|
||||
autocmd BufRead,BufNewFile * if &filetype !=# 'TelescopePrompt' && &filetype !=# 'TelescopeResults' | set autoindent noexpandtab tabstop=4 shiftwidth=4
|
||||
|
||||
augroup remember_folds
|
||||
autocmd!
|
||||
autocmd BufWinLeave * if &filetype !=# 'TelescopePrompt' && &filetype !=# 'TelescopeResults' && bufname('%') != '' | mkview
|
||||
autocmd BufWinEnter * if &filetype !=# 'TelescopePrompt' && &filetype !=# 'TelescopeResults' && bufname('%') != '' | silent! loadview
|
||||
augroup END
|
||||
]])
|
||||
|
||||
vim.api.nvim_create_augroup("CaddyFileType", { clear = true })
|
||||
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||
pattern = "/etc/caddy/conf.d/*",
|
||||
callback = function()
|
||||
vim.opt_local.filetype = "caddyfile"
|
||||
end,
|
||||
group = "CaddyFileType",
|
||||
})
|
||||
-- vim.api.nvim_create_augroup("CaddyFileType", { clear = true })
|
||||
-- vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||
-- pattern = "/etc/caddy/conf.d/*",
|
||||
-- callback = function()
|
||||
-- vim.opt_local.filetype = "caddyfile"
|
||||
-- end,
|
||||
-- group = "CaddyFileType",
|
||||
-- })
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue