init: Asynchronously load filetype and syntax
lots of improvement for startup time Co-authored-by: Vhyrro <vhyrro@gmail.com>
This commit is contained in:
parent
0023233eef
commit
6b507c3368
2 changed files with 14 additions and 0 deletions
|
@ -1,6 +1,13 @@
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
|
|
||||||
|
-- Turn these off at startup, will be enabled later just before loading the theme
|
||||||
|
vim.cmd([[
|
||||||
|
syntax off
|
||||||
|
filetype off
|
||||||
|
filetype plugin indent off
|
||||||
|
]])
|
||||||
|
|
||||||
opt.ruler = false
|
opt.ruler = false
|
||||||
opt.hidden = true
|
opt.hidden = true
|
||||||
opt.ignorecase = true
|
opt.ignorecase = true
|
||||||
|
|
|
@ -3,6 +3,13 @@ vim.g.nvchad_theme = "onedark"
|
||||||
local present, base16 = pcall(require, "base16")
|
local present, base16 = pcall(require, "base16")
|
||||||
|
|
||||||
if present then
|
if present then
|
||||||
|
-- enabled these options, was disabled in options.lua
|
||||||
|
vim.cmd([[
|
||||||
|
syntax on
|
||||||
|
filetype on
|
||||||
|
filetype plugin indent on
|
||||||
|
]])
|
||||||
|
|
||||||
base16(base16.themes["onedark"], true)
|
base16(base16.themes["onedark"], true)
|
||||||
require "highlights"
|
require "highlights"
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue