Skip to content

Commit

Permalink
Use absolute path for viml config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jdhao committed Sep 2, 2024
1 parent db380ca commit 81f64ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ 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 viml_conf/options.vim")
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 viml_conf/plugins.vim")
vim.cmd("source ".. vim.fs.joinpath(config_dir, "viml_conf/plugins.vim"))
-- colorscheme settings
require("colorschemes")

0 comments on commit 81f64ed

Please sign in to comment.