mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Use absolute path for viml config
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.
This commit is contained in:
parent
db380ca7a7
commit
81f64ed32e
7
init.lua
7
init.lua
@ -16,15 +16,18 @@ local utils = require("utils")
|
|||||||
local expected_version = "0.10.1"
|
local expected_version = "0.10.1"
|
||||||
utils.is_compatible_version(expected_version)
|
utils.is_compatible_version(expected_version)
|
||||||
|
|
||||||
|
local config_dir = vim.fn.stdpath("config")
|
||||||
|
---@cast config_dir string
|
||||||
|
|
||||||
-- some global settings
|
-- some global settings
|
||||||
require("globals")
|
require("globals")
|
||||||
-- setting options in nvim
|
-- setting options in nvim
|
||||||
vim.cmd("source viml_conf/options.vim")
|
vim.cmd("source " .. vim.fs.joinpath(config_dir, "viml_conf/options.vim"))
|
||||||
-- various autocommands
|
-- various autocommands
|
||||||
require("custom-autocmd")
|
require("custom-autocmd")
|
||||||
-- all the user-defined mappings
|
-- all the user-defined mappings
|
||||||
require("mappings")
|
require("mappings")
|
||||||
-- all the plugins installed and their configurations
|
-- all the plugins installed and their configurations
|
||||||
vim.cmd("source viml_conf/plugins.vim")
|
vim.cmd("source ".. vim.fs.joinpath(config_dir, "viml_conf/plugins.vim"))
|
||||||
-- colorscheme settings
|
-- colorscheme settings
|
||||||
require("colorschemes")
|
require("colorschemes")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user