[nvim] Comment about why resolving symlinks is necessary in config/nvim/after/ftplugin/lua.lua
This commit is contained in:
parent
f392afe533
commit
970ed67788
1 changed files with 1 additions and 1 deletions
|
@ -4,9 +4,9 @@ local expand = vim.fn.expand
|
||||||
local resolve = vim.fn.resolve
|
local resolve = vim.fn.resolve
|
||||||
local stdpath = vim.fn.stdpath
|
local stdpath = vim.fn.stdpath
|
||||||
|
|
||||||
|
-- My dotfiles are usually symlinks. Resolve them so the path comparison makes sense.
|
||||||
local configPath = resolve(stdpath("config"))
|
local configPath = resolve(stdpath("config"))
|
||||||
local fullPath = resolve(expand("%:p"))
|
local fullPath = resolve(expand("%:p"))
|
||||||
|
|
||||||
if string.find(fullPath, configPath) == 1 then
|
if string.find(fullPath, configPath) == 1 then
|
||||||
vim.opt_local.path = {
|
vim.opt_local.path = {
|
||||||
".",
|
".",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue