Skip to content

Commit 4fe6c41

Browse files
committed
Fix an issue with vscode nvim setup
1 parent e178806 commit 4fe6c41

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

lua/vscode-plugins.lua

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
-- [[ Install `lazy.nvim` plugin manager ]]
44
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
55
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
6+
7+
-- NOTE: for windows we need to make sure we're pointing towards the
8+
-- correct path
9+
if vim.fn.has "win32" == 1 or vim.fn.has "win64" == 1 then
10+
package.path = "%localappdata%\\nvim-data\\" .. package.path
11+
lazypath = vim.fn.stdpath 'data' .. '\\lazy\\lazy.nvim'
12+
-- lazypath ='C:\\Program Files\\Neovim\\bin\\lua' .. '\\lazy\\lazy.nvim'
13+
-- print('C:\\Program Files\\Neovim\\bin\\lua')
14+
end
15+
16+
-- If lazy.nvim doesn't exist, clone it
617
if not vim.uv.fs_stat(lazypath) then
718
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
819
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
@@ -12,29 +23,30 @@ if not vim.uv.fs_stat(lazypath) then
1223
end ---@diagnostic disable-next-line: undefined-field
1324
vim.opt.rtp:prepend(lazypath)
1425

15-
1626
-- Lazy
17-
require('lazy').setup({
18-
{ -- Collection of various small independent plugins/modules
19-
'echasnovski/mini.nvim',
20-
config = function()
21-
-- Better Around/Inside textobjects
22-
--
23-
-- Examples:
24-
-- - va) - [V]isually select [A]round [)]paren
25-
-- - yinq - [Y]an [I]nside [N]ext [Q]uote
26-
-- - ci' - [C]hange [I]nside [']quote
27-
require('mini.ai').setup { n_lines = 500 }
27+
require('lazy').setup({
28+
spec = {
29+
{ -- Collection of various small independent plugins/modules
30+
'echasnovski/mini.nvim',
31+
config = function()
32+
-- Better Around/Inside textobjects
33+
--
34+
-- Examples:
35+
-- - va) - [V]isually select [A]round [)]paren
36+
-- - yinq - [Y]an [I]nside [N]ext [Q]uote
37+
-- - ci' - [C]hange [I]nside [']quote
38+
require('mini.ai').setup { n_lines = 500 }
2839

29-
-- Add/delete/replace surroundings (bracets, quotes, etc.)
30-
--
31-
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
32-
-- - sd' - [S]urround [D]elete [']quotes
33-
-- - sr)' - [S]urround [R]eplace [)] [']
34-
require('mini.surround').setup()
40+
-- Add/delete/replace surroundings (bracets, quotes, etc.)
41+
--
42+
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
43+
-- - sd' - [S]urround [D]elete [']quotes
44+
-- - sr)' - [S]urround [R]eplace [)] [']
45+
require('mini.surround').setup()
3546

36-
-- For more Mini.nvim stuff:
37-
-- Check out: https://github.com/echasnovski/mini.nvim
38-
end,
47+
-- For more Mini.nvim stuff:
48+
-- Check out: https://github.com/echasnovski/mini.nvim
49+
end,
50+
}
3951
},
4052
})

0 commit comments

Comments
 (0)