From d17bcc2bb23ae2efa6bd1ad066b5c376df2aaa04 Mon Sep 17 00:00:00 2001 From: Zackarias Montell Date: Thu, 15 May 2025 09:46:18 +0200 Subject: [PATCH] Added fnm --- .profile.ps1 | 4 ++++ AppData/Local/nvim/init.lua | 7 ++++--- requirements.ps1 | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.profile.ps1 b/.profile.ps1 index 6507c02..556e73b 100644 --- a/.profile.ps1 +++ b/.profile.ps1 @@ -1,4 +1,8 @@ oh-my-posh init pwsh --config "$HOME/.theme.omp.json" | Invoke-Expression + +# setup fnm +fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression + function cdli { Set-Location "C:\repos\litium" } diff --git a/AppData/Local/nvim/init.lua b/AppData/Local/nvim/init.lua index b599ae3..a2ce81c 100644 --- a/AppData/Local/nvim/init.lua +++ b/AppData/Local/nvim/init.lua @@ -2,9 +2,10 @@ -- external requirements -- - use nvm and install @vue/typescript-plugin globally -- then ts_ls will use it for vue parsing. It is already in the arch install script. -local nvm_bin = os.getenv('nvm_home'):gsub('\n[^\n]*$', '') -- remove line endings -local node_version = vim.fn.system('nvm current'):gsub('\n[^\n]*$', '') -- remove line endings -local vue_typescript_plugin_path = vim.fs.normalize(nvm_bin .. '\\' .. node_version .. '\\node_modules\\@vue\\typescript-plugin') +--local nvm_bin = os.getenv('nvm_home'):gsub('\n[^\n]*$', '') -- remove line endings +--local node_version = vim.fn.system('nvm current'):gsub('\n[^\n]*$', '') -- remove line endings +--local vue_typescript_plugin_path = vim.fs.normalize(nvm_bin .. '\\' .. node_version .. '\\node_modules\\@vue\\typescript-plugin') +local vue_typescript_plugin_path = vim.fs.normalize('~/node_modules/@vue/typescript-plugin') print(vue_typescript_plugin_path) diff --git a/requirements.ps1 b/requirements.ps1 index 949be07..cf33e93 100644 --- a/requirements.ps1 +++ b/requirements.ps1 @@ -2,6 +2,7 @@ $packages = @( + "Schniz.fnm", # Fast node version manager "wez.wezterm", # Teminal emulator #"gnupg.gpg4win", "microsoft.teams", @@ -22,7 +23,6 @@ $packages = @( "microsoft.powershell", "Postman.Postman", "docker.dockerdesktop", - "CoreyButler.NVMforWindows" # Node version manager ) # Iterate through each package and install it @@ -30,6 +30,10 @@ foreach ($package in $packages) { winget install $package } +# Install latest node LTS +fnm install 22 +fnm use 22 + npm install -g @vue/typescript-plugin@2.2.10 # for nvim