diff --git a/.config/nvim/after/plugin/mason-lspconfig.lua b/.config/nvim/after/plugin/mason-lspconfig.lua index b702ef2..e200854 100644 --- a/.config/nvim/after/plugin/mason-lspconfig.lua +++ b/.config/nvim/after/plugin/mason-lspconfig.lua @@ -1,3 +1,4 @@ +require('mason').setup {} require("mason-lspconfig").setup { ensure_installed = { "lua_ls", "cssls", diff --git a/.config/nvim/after/plugin/mason.lua b/.config/nvim/after/plugin/mason.lua deleted file mode 100644 index ac26661..0000000 --- a/.config/nvim/after/plugin/mason.lua +++ /dev/null @@ -1 +0,0 @@ -require("mason").setup() diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..0a32413 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,23 @@ +{ + "LuaSnip": { "branch": "master", "commit": "b84eeb3641b08324287587b426ec974b888390d9" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "dotnet.nvim": { "branch": "main", "commit": "748940cf70df499ae0d98113aaedf30175b200f4" }, + "everforest-nvim": { "branch": "main", "commit": "2c40c11b971da120796564e69aecce7e7c82a854" }, + "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lsp-zero.nvim": { "branch": "v4.x", "commit": "0161aeab61d407aa1d43326a5dfc33479f4c53f6" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1c55991321d1a861537e32446affc5de5d9a6eaf" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-lspconfig": { "branch": "master", "commit": "a89de2e049b5f89a0ee55029d5a31213bd4de6f8" }, + "nvim-treesitter": { "branch": "master", "commit": "ec8776ed9ef56ffe7a61e67b64d5d6b6aba2c631" }, + "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, + "packer.nvim": { "branch": "master", "commit": "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "roslyn.nvim": { "branch": "main", "commit": "e284f0e6c34b01cd1db9fdb71c75ae85d732a43b" }, + "telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" }, + "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, + "vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" }, + "vim-merginal": { "branch": "develop", "commit": "9ae2f12132d3ab8871d9dd6f8371149e826b7818" } +} diff --git a/.config/nvim/lua/wicked/init.lua b/.config/nvim/lua/wicked/init.lua index 6ed7213..5ba0706 100644 --- a/.config/nvim/lua/wicked/init.lua +++ b/.config/nvim/lua/wicked/init.lua @@ -1,2 +1,3 @@ require("wicked.remap") require("wicked.set") +require("wicked.lazy") diff --git a/.config/nvim/lua/wicked/lazy.lua b/.config/nvim/lua/wicked/lazy.lua new file mode 100644 index 0000000..e1daaf1 --- /dev/null +++ b/.config/nvim/lua/wicked/lazy.lua @@ -0,0 +1,68 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + 'wbthomason/packer.nvim', + { + 'nvim-telescope/telescope.nvim', + dependencies = { 'nvim-lua/plenary.nvim' } + }, + { + 'neanias/everforest-nvim', + config = function() + vim.cmd('colorscheme everforest') + end + }, + + 'nvim-treesitter/nvim-treesitter', + 'theprimeagen/harpoon', + 'mbbill/undotree', + 'tpope/vim-fugitive', + 'idanarye/vim-merginal', + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'seblj/roslyn.nvim', + 'neovim/nvim-lspconfig', + { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons', lazy = true } + }, + + { + 'VonHeikemen/lsp-zero.nvim', + dependencies = { + { 'hrsh7th/nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp' }, + { 'L3MON4D3/LuaSnip' }, + } + }, + { + 'MoaidHathot/dotnet.nvim', + config = function() + require("dotnet").setup({}) + end + }, + -- add your plugins here + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "everforest" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/.config/nvim/lua/wicked/packer.lua b/.config/nvim/lua/wicked/packer.lua deleted file mode 100644 index 8db8ad8..0000000 --- a/.config/nvim/lua/wicked/packer.lua +++ /dev/null @@ -1,55 +0,0 @@ --- This file can be loaded by calling `lua require('plugins')` from your init.vim - --- Only required if you have packer configured as `opt` -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use 'wbthomason/packer.nvim' - - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.8', - -- or , branch = '0.1.x', - requires = { { 'nvim-lua/plenary.nvim' } } - } - - use({ - 'neanias/everforest-nvim', - config = function() - vim.cmd('colorscheme everforest') - end - }) - - use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) - use('nvim-treesitter/playground') - use('theprimeagen/harpoon') - use('mbbill/undotree') - use('tpope/vim-fugitive') - use('idanarye/vim-merginal') - use('williamboman/mason.nvim') - use('williamboman/mason-lspconfig.nvim') - use('seblj/roslyn.nvim') - use('neovim/nvim-lspconfig') - use { - 'nvim-lualine/lualine.nvim', - requires = { 'nvim-tree/nvim-web-devicons', opt = true } - } - - use { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v3.x', - requires = { - --- Uncomment the two plugins below if you want to manage the language servers from neovim - - { 'hrsh7th/nvim-cmp' }, - { 'hrsh7th/cmp-nvim-lsp' }, - { 'L3MON4D3/LuaSnip' }, - } - } - use { - 'MoaidHathot/dotnet.nvim', - config = function() - require("dotnet").setup({}) - end - } -end) diff --git a/.config/nvim/nvim b/.config/nvim/nvim new file mode 120000 index 0000000..6b9831f --- /dev/null +++ b/.config/nvim/nvim @@ -0,0 +1 @@ +/home/rmaco/projects/setup/.config/nvim \ No newline at end of file diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua deleted file mode 100644 index 265863e..0000000 --- a/.config/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,210 +0,0 @@ --- Automatically generated packer.nvim plugin loader code - -if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then - vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') - return -end - -vim.api.nvim_command('packadd packer.nvim') - -local no_errors, error_msg = pcall(function() - -_G._packer = _G._packer or {} -_G._packer.inside_compile = true - -local time -local profile_info -local should_profile = false -if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end - end -else - time = function(chunk, start) end -end - -local function save_profiles(threshold) - local sorted_times = {} - for chunk_name, time_taken in pairs(profile_info) do - sorted_times[#sorted_times + 1] = {chunk_name, time_taken} - end - table.sort(sorted_times, function(a, b) return a[2] > b[2] end) - local results = {} - for i, elem in ipairs(sorted_times) do - if not threshold or threshold and elem[2] > threshold then - results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' - end - end - if threshold then - table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') - end - - _G._packer.profile_output = results -end - -time([[Luarocks path setup]], true) -local package_path_str = "/home/rmaco/.cache/nvim/packer_hererocks/2.1.1713484068/share/lua/5.1/?.lua;/home/rmaco/.cache/nvim/packer_hererocks/2.1.1713484068/share/lua/5.1/?/init.lua;/home/rmaco/.cache/nvim/packer_hererocks/2.1.1713484068/lib/luarocks/rocks-5.1/?.lua;/home/rmaco/.cache/nvim/packer_hererocks/2.1.1713484068/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/rmaco/.cache/nvim/packer_hererocks/2.1.1713484068/lib/lua/5.1/?.so" -if not string.find(package.path, package_path_str, 1, true) then - package.path = package.path .. ';' .. package_path_str -end - -if not string.find(package.cpath, install_cpath_pattern, 1, true) then - package.cpath = package.cpath .. ';' .. install_cpath_pattern -end - -time([[Luarocks path setup]], false) -time([[try_loadstring definition]], true) -local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) - if not success then - vim.schedule(function() - vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) - end) - end - return result -end - -time([[try_loadstring definition]], false) -time([[Defining packer_plugins]], true) -_G.packer_plugins = { - LuaSnip = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/LuaSnip", - url = "https://github.com/L3MON4D3/LuaSnip" - }, - ["cmp-nvim-lsp"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["dotnet.nvim"] = { - config = { "\27LJ\2\n8\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\vdotnet\frequire\0" }, - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/dotnet.nvim", - url = "https://github.com/MoaidHathot/dotnet.nvim" - }, - ["everforest-nvim"] = { - config = { "\27LJ\2\n:\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\27colorscheme everforest\bcmd\bvim\0" }, - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/everforest-nvim", - url = "https://github.com/neanias/everforest-nvim" - }, - harpoon = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/harpoon", - url = "https://github.com/theprimeagen/harpoon" - }, - ["lsp-zero.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", - url = "https://github.com/VonHeikemen/lsp-zero.nvim" - }, - ["lualine.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/lualine.nvim", - url = "https://github.com/nvim-lualine/lualine.nvim" - }, - ["mason-lspconfig.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", - url = "https://github.com/williamboman/mason-lspconfig.nvim" - }, - ["mason.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/mason.nvim", - url = "https://github.com/williamboman/mason.nvim" - }, - ["nvim-cmp"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["nvim-web-devicons"] = { - loaded = false, - needs_bufread = false, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", - url = "https://github.com/nvim-tree/nvim-web-devicons" - }, - ["packer.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - playground = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/playground", - url = "https://github.com/nvim-treesitter/playground" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["roslyn.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/roslyn.nvim", - url = "https://github.com/seblj/roslyn.nvim" - }, - ["telescope.nvim"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - undotree = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/undotree", - url = "https://github.com/mbbill/undotree" - }, - ["vim-fugitive"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/vim-fugitive", - url = "https://github.com/tpope/vim-fugitive" - }, - ["vim-merginal"] = { - loaded = true, - path = "/home/rmaco/.local/share/nvim/site/pack/packer/start/vim-merginal", - url = "https://github.com/idanarye/vim-merginal" - } -} - -time([[Defining packer_plugins]], false) --- Config for: dotnet.nvim -time([[Config for dotnet.nvim]], true) -try_loadstring("\27LJ\2\n8\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\vdotnet\frequire\0", "config", "dotnet.nvim") -time([[Config for dotnet.nvim]], false) --- Config for: everforest-nvim -time([[Config for everforest-nvim]], true) -try_loadstring("\27LJ\2\n:\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\27colorscheme everforest\bcmd\bvim\0", "config", "everforest-nvim") -time([[Config for everforest-nvim]], false) - -_G._packer.inside_compile = false -if _G._packer.needs_bufread == true then - vim.cmd("doautocmd BufRead") -end -_G._packer.needs_bufread = false - -if should_profile then save_profiles() end - -end) - -if not no_errors then - error_msg = error_msg:gsub('"', '\\"') - vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') -end diff --git a/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%after%plugin%mason-lspconfig.lua b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%after%plugin%mason-lspconfig.lua new file mode 100644 index 0000000..f7498e0 Binary files /dev/null and b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%after%plugin%mason-lspconfig.lua differ diff --git a/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%after%plugin%mason.lua b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%after%plugin%mason.lua new file mode 100644 index 0000000..f0b43c0 Binary files /dev/null and b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%after%plugin%mason.lua differ diff --git a/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%init.lua b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%init.lua new file mode 100644 index 0000000..011b417 Binary files /dev/null and b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%init.lua differ diff --git a/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%init.lua b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%init.lua new file mode 100644 index 0000000..5a54f49 Binary files /dev/null and b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%init.lua differ diff --git a/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%lazy.lua b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%lazy.lua new file mode 100644 index 0000000..7dc5838 Binary files /dev/null and b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%lazy.lua differ diff --git a/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%packer.lua b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%packer.lua new file mode 100644 index 0000000..254ff6a Binary files /dev/null and b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%packer.lua differ diff --git a/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%pckr.lua b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%pckr.lua new file mode 100644 index 0000000..55d08d4 Binary files /dev/null and b/.vim/undodir/%home%rmaco%projects%setup%.config%nvim%lua%wicked%pckr.lua differ diff --git a/.vim/undodir/undodir b/.vim/undodir/undodir new file mode 120000 index 0000000..b95ab04 --- /dev/null +++ b/.vim/undodir/undodir @@ -0,0 +1 @@ +/home/rmaco/projects/setup/.vim/undodir \ No newline at end of file diff --git a/install.sh b/install.sh index 59cb2b4..f696240 100644 --- a/install.sh +++ b/install.sh @@ -16,43 +16,41 @@ else ~/projects/homefull-gui fi -echo "----- Cloning packer -----" -if [ -d "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" ]; then - echo "[Skipped] Packer already exists" -else - git clone --depth 1 https://github.com/wbthomason/packer.nvim\ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim -fi - echo "----- Downloading NVIM -----" if [[ "$OSTYPE" == "linux-gnu"* ]]; then + nvim_path="/opt/nvim-linux64" + echo "----- Found Linux-GNU system -----" + echo "Downloading nvim" curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz sudo rm -rf /opt/nvim + echo "Copying NVIM to /opt/nvim-linux64" sudo tar -C /opt -xzf nvim-linux64.tar.gz - echo 'export PATH="$PATH:/opt/nvim-linux64/bin"' >> ~/.bashrc - . ~/.bashrc + echo "Adding NVIM to PATH in ./bashrc" + echo "export PATH="\$PATH:$nvim_path/bin"" >> ~/.bashrc + echo "NVIM added to path, run '. ~/.bashrc' to reload PATH variable" elif [[ "$OSTYPE" == "darwin"* ]]; then + nvim_path=~/Applications/nvim if [ -d "$HOME/Applications/nvim" ]; then echo "[Skipped] NVIM already installed" else curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-arm64.tar.gz tar xzf nvim-macos-arm64.tar.gz - mv nvim-macos-arm64 ~/Applications/nvim/ + mv nvim-macos-arm64 $nvim_path fi fi -sudo nvim --headless ~/projects/setup/.config/nvim/lua/wicked/packer.lua\ - -c 'autocmd User PackerComplete quitall' -c 'so' -c 'PackerSync' +# sudo $nvim_path/bin/nvim --headless ~/projects/setup/.config/nvim/lua/wicked/packer.lua\ +# -c 'autocmd User PackerComplete quitall' -c 'so' -c 'PackerSync' echo "----- Copying NVIM configuration -----" if [ ! -d "$HOME/.config" ]; then echo ".config folder not found. Creating one" mkdir ~/.config fi -ln -s ~/projects/setup/.config/nvim ~/.config/nvim +ln -s ~/projects/setup/.config/nvim ~/.config/ if [ ! -d "$HOME/.vim" ]; then echo ".vim folder not found. Creating one" mkdir ~/.vim fi -ln -s ~/projects/setup/.vim/undodir ~/.vim/undodir +ln -s ~/projects/setup/.vim/undodir ~/.vim/