Comments (4)
local home = os.getenv("USERPROFILE") -- this works for me
Does it works for Window10 too? I'm sorry because I have also upgraded to Windows11 but I use neovim in WSL2 on Windows.
from nvimdots.
Does it works for Window10 too? I'm sorry because I have also upgraded to Windows11 but I use neovim in WSL2 on Windows.
Yes. It also works for Windows 10. (Although not all the plugins are compatible with Windows)
When executing from PowerShell, the default behavior of the lua script
os.getenv("VAR")
seems to be searching in $env:
for "VAR", i.e., $env:VAR
instead of $VAR
/$variable:VAR
Assuming that my home directory is C:\Users\user_name
, the values of the mentioned variables are as follows:
$env:HOMEDRIVE # C:
$env:HOMEPATH # \Users\user_name
$env:USERPROFILE # C:\Users\user_name
$env:HOME # non-exist
$HOME # C:\Users\user_name
$variable:HOME # same as $HOME
As a result, os.getenv("HOME")
will return nil
.
from nvimdots.
it just a path var,maybe you can setting,or let home = your path string
from nvimdots.
Does it works for Window10 too? I'm sorry because I have also upgraded to Windows11 but I use neovim in WSL2 on Windows.
Yes. It also works for Windows 10. (Although not all the plugins are compatible with Windows)
When executing from PowerShell, the default behavior of the lua script
os.getenv("VAR")seems to be searching in
$env:
for "VAR", i.e.,$env:VAR
instead of$VAR
/$variable:VAR
Assuming that my home directory is
C:\Users\user_name
, the values of the mentioned variables are as follows:$env:HOMEDRIVE # C: $env:HOMEPATH # \Users\user_name $env:USERPROFILE # C:\Users\user_name $env:HOME # non-exist $HOME # C:\Users\user_name $variable:HOME # same as $HOMEAs a result,
os.getenv("HOME")
will returnnil
.
Thanks, I will fix this.
from nvimdots.
Related Issues (20)
- Questions (Thoughts) regarding recent changes HOT 4
- Update catppuccin version (Huge performance issue on nightly) HOT 3
- How to modify keymap for Vim plugin HOT 13
- How to configure plugins for neovim to support Rust-DAP and smart tips for variable types in Rust HOT 5
- maybe load_extension fzf bug HOT 2
- Can't switch open-tabs HOT 3
- How to setup the python environment? HOT 32
- treesitter parser [swift] having issue when lazy-loading ts-related plugins HOT 11
- How to (re)install nvimdots HOT 5
- <C-V> in NvimTree can't work HOT 7
- In Inerst mode use <capslock> mapping <Esc> not work HOT 6
- How to custom user config for nvim-cmp mapping HOT 5
- replace `vim.tbl_islist()` with `vim.islist()` after `NVIM v0.10.0-dev-2560` HOT 3
- golang code hints default selected location is incorrect
- Color scheme HOT 2
- Sluggish WSL clipboard communication HOT 2
- skip lines when executing multiple macro operations HOT 9
- UI FIX HOT 3
- [migration] Nvim 0.10 Support HOT 2
- `<CR>` triggers autocompl instead of line break HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvimdots.