mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Full path should be used to load viml config, otherwise, when we open nvim in other directories, we see errors that the viml config can not be found.
34 lines
1.3 KiB
Lua
34 lines
1.3 KiB
Lua
-- This is my personal Nvim configuration supporting Mac, Linux and Windows, with various plugins configured.
|
|
-- This configuration evolves as I learn more about Nvim and become more proficient in using Nvim.
|
|
-- Since it is very long (more than 1000 lines!), you should read it carefully and take only the settings that suit you.
|
|
-- I would not recommend cloning this repo and replace your own config. Good configurations are personal,
|
|
-- built over time with a lot of polish.
|
|
--
|
|
-- Author: Jiedong Hao
|
|
-- Email: jdhao@hotmail.com
|
|
-- Blog: https://jdhao.github.io/
|
|
-- GitHub: https://github.com/jdhao
|
|
-- StackOverflow: https://stackoverflow.com/users/6064933/jdhao
|
|
vim.loader.enable()
|
|
|
|
local utils = require("utils")
|
|
|
|
local expected_version = "0.10.1"
|
|
utils.is_compatible_version(expected_version)
|
|
|
|
local config_dir = vim.fn.stdpath("config")
|
|
---@cast config_dir string
|
|
|
|
-- some global settings
|
|
require("globals")
|
|
-- setting options in nvim
|
|
vim.cmd("source " .. vim.fs.joinpath(config_dir, "viml_conf/options.vim"))
|
|
-- various autocommands
|
|
require("custom-autocmd")
|
|
-- all the user-defined mappings
|
|
require("mappings")
|
|
-- all the plugins installed and their configurations
|
|
vim.cmd("source ".. vim.fs.joinpath(config_dir, "viml_conf/plugins.vim"))
|
|
-- colorscheme settings
|
|
require("colorschemes")
|