ThePrimeagen / ThePrimeagen/init.lua
Nill value when try to get vim undo directory
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4k
- Forks
- 680
- PR merge metrics
- No merged PRs in 30d
Description
I try to copy Prime's config from YT tutorial, When I try to :so the set.lua file, it gives me the following error on windows:
Error detected while processing :source (no file):
E5108: Error executing lua [string ":source (no file)"]:17: attempt to concatenate a nil value
stack traceback:
[string ":source (no file)"]:17: in main chunk
Line number 17 is:
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
Also I have a question: why Prime doesn't have autosave enabled as some one coming from vscode, it has autosave, so I am wondering if there is some kind of advantage to that?! If so what is it?
If not, why Prime doesn't talk about autosave, what's the easiest way to enable autosave without going into plugins, I explored options like autowrite and autowritedelay but couldn't get them to work!
Will I lose all my work if I forget to save it without autosave, I understand buffers keep your text but even after machine restart?
Sorry for asking too many question! I am just a newbie!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with set.lua line 17 and reproduce :so on Windows, checking the reported failure around HOME and the undo directory. Treat the autosave questions as separate scope; done should address the reported Windows behavior and clearly define which configuration or documentation is being changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100