-
Notifications
You must be signed in to change notification settings - Fork 1
Recipies
- add this to your
settings.json
{
"whichkey.bindingOverrides": [
{
"keys": "g.s",
"name": "Go to line",
"type": "command",
"command":"workbench.action.gotoLine",
}
]
}
-
copy retronvim's init.lua and add your plugins/modification:
cp ~/.vscode/extensions/yeferyv.retronvim-0.0.2/nvim/init.lua ~/.config/retronvim/init.lua
add to your
settings.json
:"vscode-neovim.neovimInitVimPaths.linux": "$HOME/.config/retronvim/init.lua"
open (to test/debug) with:
NVIM_APPNAME=retronvim nvim
-
on linux/macos
curl -L pixi.sh/install.sh | bash pixi global install nvim git curl -L https://raw.githubusercontent.com/YeferYV/RetroNvim/main/nvim/init.lua --create-dirs --output $HOME/.config/nvim/init.lua
additionally install yazi and lazygit with:
pixi global install -c https://prefix.dev/rust-forge -c conda-forge yazi lazygit
-
on Windows 10/11 (using powershell)(relaunch terminal after installing dependencies to update PATH)
winget install neovim.neovim.nightly git.git prefix-dev.pixi ~/appdata/local/pixi/bin/pixi global install m2w64-gcc # treesitter requires gcc [Environment]::SetEnvironmentVariable("PATH", "$env:PATH;C:\Program Files\Git\bin", "user") # add bash.exe to PATH permanently [Environment]::SetEnvironmentVariable("PATH", "$env:PATH;$HOME\.pixi\envs\m2w64-gcc\Library\mingw-w64\bin", "user") # add gcc.exe to PATH permanently mkdir ${env:LOCALAPPDATA}/nvim curl https://raw.githubusercontent.com/YeferYV/RetroNvim/main/nvim/init.lua -outfile ${env:LOCALAPPDATA}/nvim/init.lua
additionally install yazi and lazygit with:
pixi global install -c https://prefix.dev/rust-forge -c conda-forge yazi lazygit # pixi installs them with the yazi.bat and lazygit.bat executable name
* copy Retronvim's `.zshrc` to `~/.zshrc` then add this to your `settings.json` (ctrl+shift+p then `open settings file (JSON)`)
```
"profiles":
{
"list":
[
{
"commandline": "sh -c 'HOME=/c/Users/$(whoami); msys2.cmd -shell zsh -full-path'",
"guid": "{00000000-0000-0000-ba54-000000000001}",
"icon": "%USERPROFILE%/scoop/apps/msys2/current/msys2.ico",
"name": "zsh (MSYS2)",
"startingDirectory": "%USERPROFILE%"
},
]
},
```
* tip: `ctrl + shift + m` to enter marks-mode (tmux-like copy mode)
* `alt+o` (keymap to open yazi) outputs string sequences on yazi `v0.2.5` but not in `<= v0.2.4` only in Msys2's zsh
-
add this to your
keybindings.json
, but won't restore cursor position when moving up and down, neither<number>h
,<number>j
,<number>k
,<number>l
,gh
,gl
,gnh
,gph
will be supported, and a extra fake space (e.g.r<fake space>
will modifyr<end of line>
) is navigable at the end of line, press<esc>
two or more times ifh
,j
,k
andl
doesn't want to use the vscode arrows keys remaps (e.g. sometimes after flash.nvim), added by default on Windows 10/11{ "key": "h", "command": "cursorLeft", "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'" }, { "key": "j", "command": "cursorDown", "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'" }, { "key": "k", "command": "cursorUp", "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'" }, { "key": "l", "command": "cursorRight", "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'" },
a alternative/old version but doesn't support flash.nvim nor replace mode
{ "key": "h", "command": "cursorLeft", "when": "editorTextFocus && neovim.mode == 'normal' && ( isLinux || isMac || isWindows || isWeb)" }, { "key": "j", "command": "cursorDown", "when": "editorTextFocus && neovim.mode == 'normal' && ( isLinux || isMac || isWindows || isWeb )" }, { "key": "k", "command": "cursorUp", "when": "editorTextFocus && neovim.mode == 'normal' && ( isLinux || isMac || isWindows || isWeb )" }, { "key": "l", "command": "cursorRight", "when": "editorTextFocus && neovim.mode == 'normal' && ( isLinux || isMac || isWindows || isWeb )" }
-
disable
cursorLeft
,cursorDown
,cursorUp
,cursorRight
(which were mapped toh
,j
,k
,l
for performance on Windows10). add this to yourkeybindings.json
{ "key": "h", "command": "-cursorLeft", "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" }, { "key": "j", "command": "-cursorDown", "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" }, { "key": "k", "command": "-cursorUp", "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" }, { "key": "l", "command": "-cursorRight", "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" }
-
with scoop using zsh (msys2), see:
https://github.com/conda/conda/issues/9922
scoop insall mambaforge
then add to your~/.zshrc
:eval "$('/c/path/to/miniconda3/Scripts/conda.exe' 'shell.zsh' 'hook' | sed -e 's/"$CONDA_EXE" $_CE_M $_CE_CONDA "$@"/"$CONDA_EXE" $_CE_M $_CE_CONDA "$@" | tr -d \x27\\r\x27/g')"
then relaunch vscode and choose your virtual environment (view vscode statusbar and click to change) -
with nixpkgs
nix-env -iA nixpkgs.conda echo 'source $HOME/.conda/etc/profile.d/conda.sh' | tee -a ~/.bashrc -a ~/.zshrc | sh conda install --name base conda=24.3.0 conda update conda
then choose your virtual environment (view vscode statusbar and click to change)
-
with brew
brew install mambaforge conda init
then relaunch vscode and choose your virtual environment (view vscode statusbar and click to change)
-
cheatsheet:
curl cht.sh/conda
-
there's a pull request
https://github.com/microsoft/vscode-python/pull/22968
to support pixi virtual environment then you will be able to choose your virtual environment inside vscode meanwhile runpixi init
to initialize a project thenpixi add python
to add dependencies thenpixi shell
on linux/mac/windows orpixi run zsh
on msys2 to activate a virtual environment then launchcode .
then select the virtual environment (view vscode statusbar and click to change), then the python LSP (completion, diagnostics ...) for external libraries should work -
alternatively in a new terminal run
pixi init
>pixi add python
>pixi run zsh
(the last command should be executed in every new terminal) -
RetroNvim already adds
"python.defaultInterpreterPath": ".\\.pixi\\envs\\default\\python.exe"
insettings.json
as default virtual-environment/interpreter on Windows 10 if overwritten then manually choose the pixi virtual environment (view vscode statusbar and click to change).\\.pixi\\envs\\default\\python.exe
on windows and./.pixi/envs/default/bin/python
on linux/macos -
cheatsheet:
https://pixi.sh/latest/basic_usage
https://code.visualstudio.com/docs/python/environments
- surfingkeys vim shortcuts/text-editing
- youtube-anywhere-remote youtube player shortcuts from anywhere
- spotify web player hotkeys spotify player shortcuts from anywhere
- tokyo-night colorscheme
- bookmarks whichkey has entries for this extension
- git-indicators status-bar with git changes