-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an example of using pckr to download plugins instead of nix fro…
…m the same file. (#12) pckr example is included, 0 nix changes were required, only an extra lua function or 2. Help added. All plugins and lsps do work, HOWEVER, since you arent downloading via nix, you are in charge of dependencies now. Have fun! But it does actually work great if you get that right. dependencies for nixCats-nvim as-is are included in help file, and in the lua file for pckr itself.
- Loading branch information
Showing
9 changed files
with
429 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
|
||
-- first you should go ahead and install your dependencies | ||
-- you arent using nix if you are using this. | ||
-- this means you will have to install some stuff manually. | ||
|
||
-- so, you will need cmake, gcc, npm, nodejs, | ||
-- ripgrep, fd, <curl or wget>, and git, | ||
-- you will also need rustup and to run rustup toolchain install stable | ||
|
||
-- now you see why nix is so great. You dont have to do that every time. | ||
|
||
-- so, now for the stuff we can still auto install without nix: | ||
-- first check if we should be loading pckr: | ||
if not require('nixCatsUtils').isNixCats then | ||
-- you can use this same method | ||
-- if you want to install via mason when not in nix | ||
-- or just, anything you want to do only when not using nix | ||
|
||
local function bootstrap_pckr() | ||
local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim" | ||
|
||
if not vim.loop.fs_stat(pckr_path) then | ||
vim.fn.system({ | ||
'git', | ||
'clone', | ||
"--filter=blob:none", | ||
'https://github.com/lewis6991/pckr.nvim', | ||
pckr_path | ||
}) | ||
end | ||
|
||
vim.opt.rtp:prepend(pckr_path) | ||
end | ||
|
||
bootstrap_pckr() | ||
|
||
-- ### DONT USE CONFIG VARIABLE ### | ||
-- unless you are ok with that instruction | ||
-- not being ran when used via nix, | ||
-- this file will not be ran when using nix | ||
|
||
require('pckr').add{ | ||
|
||
{ 'joshdick/onedark.vim', }, | ||
{ 'nvim-tree/nvim-web-devicons', }, | ||
|
||
{ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', | ||
requires = { | ||
'nvim-treesitter/nvim-treesitter-textobjects', | ||
}, | ||
}, | ||
{'nvim-telescope/telescope.nvim', | ||
requires = { | ||
'nvim-lua/plenary.nvim', | ||
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'which make && make', } | ||
}, | ||
}, | ||
|
||
{ 'neovim/nvim-lspconfig', | ||
requires = { | ||
{ 'williamboman/mason.nvim', }, | ||
{ 'williamboman/mason-lspconfig.nvim', }, | ||
{ 'j-hui/fidget.nvim', }, | ||
{ 'folke/neodev.nvim', }, | ||
{ 'folke/neoconf.nvim', }, | ||
}, | ||
}, | ||
|
||
{ 'hrsh7th/nvim-cmp', | ||
requires = { | ||
{ 'onsails/lspkind.nvim', }, | ||
{ 'L3MON4D3/LuaSnip', }, | ||
{ 'saadparwaiz1/cmp_luasnip', }, | ||
{ 'hrsh7th/cmp-nvim-lsp', }, | ||
{ 'hrsh7th/cmp-nvim-lua', }, | ||
{ 'hrsh7th/cmp-nvim-lsp-signature-help', }, | ||
{ 'hrsh7th/cmp-path', }, | ||
{ 'rafamadriz/friendly-snippets', }, | ||
{ 'hrsh7th/cmp-buffer', }, | ||
{ 'hrsh7th/cmp-cmdline', }, | ||
{ 'dmitmel/cmp-cmdline-history', }, | ||
}, | ||
}, | ||
|
||
{ 'mfussenegger/nvim-dap', | ||
requires = { | ||
{ 'rcarriga/nvim-dap-ui', }, | ||
{ 'theHamsta/nvim-dap-virtual-text', }, | ||
{ 'jay-babu/mason-nvim-dap.nvim', }, | ||
}, | ||
}, | ||
|
||
{ 'm-demare/hlargs.nvim', }, | ||
{ 'mbbill/undotree', }, | ||
{ 'tpope/vim-fugitive', }, | ||
{ 'tpope/vim-rhubarb', }, | ||
{ 'tpope/vim-sleuth', }, | ||
{ 'folke/which-key.nvim', }, | ||
{ 'lewis6991/gitsigns.nvim', }, | ||
{ 'nvim-lualine/lualine.nvim', }, | ||
{ 'lukas-reineke/indent-blankline.nvim', }, | ||
{ 'numToStr/Comment.nvim', }, | ||
{ 'kylechui/nvim-surround', | ||
requires = { 'tpope/vim-repeat', }, | ||
}, | ||
{ | ||
"iamcco/markdown-preview.nvim", | ||
run = function() vim.fn["mkdp#util#install"]() end, | ||
}, | ||
|
||
-- { "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, }, | ||
|
||
-- all the rest of the setup will be done within the normal scheme, thus working regardless of what method loads the plugins. | ||
-- only stuff pertaining to downloading should be added to pckr. | ||
|
||
} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
local M = {} | ||
|
||
M.isNixCats, _ = pcall(function() require("nixCats") end) | ||
|
||
function M.setup(v) | ||
if not M.isNixCats then | ||
local nixCats_pckr_default | ||
if type(v) == "table" and v.default_cat_value ~= nil then | ||
nixCats_pckr_default = v.default_cat_value | ||
else | ||
nixCats_pckr_default = true | ||
end | ||
package.loaded.nixCats = nil | ||
-- if not in nix, just make it return a boolean | ||
require('_G').nixCats = function(_) return nixCats_pckr_default end | ||
end | ||
end | ||
|
||
|
||
return M |
Oops, something went wrong.